Index: /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/EXPREF/namelist_coare3p6-noskin_cfg
===================================================================
--- /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/EXPREF/namelist_coare3p6-noskin_cfg	(revision 12248)
+++ /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/EXPREF/namelist_coare3p6-noskin_cfg	(revision 12249)
@@ -278,5 +278,4 @@
 &namctl        !   Control prints                                       (default: OFF)
 !-----------------------------------------------------------------------
-ln_ctl = .false.
 /
 !-----------------------------------------------------------------------
Index: /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/EXPREF/namelist_coare3p6_cfg
===================================================================
--- /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/EXPREF/namelist_coare3p6_cfg	(revision 12248)
+++ /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/EXPREF/namelist_coare3p6_cfg	(revision 12249)
@@ -278,5 +278,4 @@
 &namctl        !   Control prints                                       (default: OFF)
 !-----------------------------------------------------------------------
-ln_ctl = .false.
 /
 !-----------------------------------------------------------------------
Index: /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/EXPREF/namelist_ecmwf-noskin_cfg
===================================================================
--- /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/EXPREF/namelist_ecmwf-noskin_cfg	(revision 12248)
+++ /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/EXPREF/namelist_ecmwf-noskin_cfg	(revision 12249)
@@ -278,5 +278,4 @@
 &namctl        !   Control prints                                       (default: OFF)
 !-----------------------------------------------------------------------
-ln_ctl = .false.
 /
 !-----------------------------------------------------------------------
Index: /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/EXPREF/namelist_ecmwf_cfg
===================================================================
--- /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/EXPREF/namelist_ecmwf_cfg	(revision 12248)
+++ /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/EXPREF/namelist_ecmwf_cfg	(revision 12249)
@@ -278,5 +278,4 @@
 &namctl        !   Control prints                                       (default: OFF)
 !-----------------------------------------------------------------------
-ln_ctl = .false.
 /
 !-----------------------------------------------------------------------
Index: /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/EXPREF/namelist_ncar_cfg
===================================================================
--- /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/EXPREF/namelist_ncar_cfg	(revision 12248)
+++ /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/EXPREF/namelist_ncar_cfg	(revision 12249)
@@ -278,5 +278,4 @@
 &namctl        !   Control prints                                       (default: OFF)
 !-----------------------------------------------------------------------
-ln_ctl = .false.
 /
 !-----------------------------------------------------------------------
Index: /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/MY_SRC/diawri.F90
===================================================================
--- /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/MY_SRC/diawri.F90	(revision 12248)
+++ /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/MY_SRC/diawri.F90	(revision 12249)
@@ -25,5 +25,5 @@
    !!   dia_wri_state : create an output NetCDF file for a single instantaeous ocean state and forcing fields
    !!----------------------------------------------------------------------
-   USE oce            ! ocean dynamics and tracers 
+   USE oce            ! ocean dynamics and tracers
    USE dom_oce        ! ocean space and time domain
    USE phycst         ! physical constants
@@ -33,9 +33,9 @@
    USE lbclnk         ! ocean lateral boundary conditions (or mpp link)
    USE in_out_manager ! I/O manager
-   USE iom            ! 
-   USE ioipsl         ! 
+   USE iom            !
+   USE ioipsl         !
 #if defined key_si3
-   USE ice 
-   USE icewri 
+   USE ice
+   USE icewri
 #endif
    USE lib_mpp         ! MPP library
@@ -74,21 +74,24 @@
    END FUNCTION dia_wri_alloc
 
-   
-   SUBROUTINE dia_wri( kt )
+
+   SUBROUTINE dia_wri( kt, Kmm )
       !!---------------------------------------------------------------------
       !!                  ***  ROUTINE dia_wri  ***
-      !!                   
-      !! ** Purpose :   Standard output of opa: dynamics and tracer fields 
-      !!      NETCDF format is used by default 
-      !!      Standalone surface scheme 
+      !!
+      !! ** Purpose :   Standard output of opa: dynamics and tracer fields
+      !!      NETCDF format is used by default
+      !!     STATION_ASF
       !!
       !! ** Method  :  use iom_put
       !!----------------------------------------------------------------------
       INTEGER, INTENT( in ) ::   kt      ! ocean time-step index
-      !!----------------------------------------------------------------------
-      ! 
+      INTEGER, INTENT( in ) ::   Kmm     ! ocean time level index
+      !!----------------------------------------------------------------------
+      !
+      IF( ln_timing )   CALL timing_start('dia_wri')
+      !
       ! Output the initial state and forcings
-      IF( ninist == 1 ) THEN                       
-         CALL dia_wri_state( 'output.init' )
+      IF( ninist == 1 ) THEN
+         CALL dia_wri_state( Kmm, 'output.init' )
          ninist = 0
       ENDIF
@@ -99,4 +102,6 @@
       CALL iom_put(  "ssu", ssu_m(:,:) )    ! ocean surface current along i-axis
       CALL iom_put(  "ssv", ssv_m(:,:) )    ! ocean surface current along j-axis
+      !
+      IF( ln_timing )   CALL timing_stop('dia_wri')
       !
    END SUBROUTINE dia_wri
@@ -115,5 +120,5 @@
          &      ndex_hU(jpi*jpj) , ndex_U(jpi*jpj*jpk) ,     &
          &      ndex_hV(jpi*jpj) , ndex_V(jpi*jpj*jpk) , STAT=ierr(1) )
-         !
+      !
       dia_wri_alloc = MAXVAL(ierr)
       CALL mpp_sum( 'diawri', dia_wri_alloc )
@@ -121,18 +126,20 @@
    END FUNCTION dia_wri_alloc
 
-   
-   SUBROUTINE dia_wri( kt )
+
+
+   SUBROUTINE dia_wri( kt, Kmm )
       !!---------------------------------------------------------------------
       !!                  ***  ROUTINE dia_wri  ***
-      !!                   
-      !! ** Purpose :   Standard output of opa: dynamics and tracer fields 
-      !!      NETCDF format is used by default 
-      !!
-      !! ** Method  :   At the beginning of the first time step (nit000), 
+      !!
+      !! ** Purpose :   Standard output of opa: dynamics and tracer fields
+      !!      NETCDF format is used by default
+      !!
+      !! ** Method  :   At the beginning of the first time step (nit000),
       !!      define all the NETCDF files and fields
       !!      At each time step call histdef to compute the mean if ncessary
-      !!      Each nwrite time step, output the instantaneous or mean fields
+      !!      Each nn_write time step, output the instantaneous or mean fields
       !!----------------------------------------------------------------------
       INTEGER, INTENT( in ) ::   kt   ! ocean time-step index
+      INTEGER, INTENT( in ) ::   Kmm  ! ocean time level index
       !
       LOGICAL ::   ll_print = .FALSE.                        ! =T print and flush numout
@@ -144,11 +151,13 @@
       REAL(wp) ::   zsto, zout, zmax, zjulian                ! local scalars
       !!----------------------------------------------------------------------
-      ! 
+      !
+      IF( ninist == 1 ) THEN     !==  Output the initial state and forcings  ==!
+         CALL dia_wri_state( Kmm, 'output.init' )
+         ninist = 0
+      ENDIF
+      !
+      IF( nn_write == -1 )   RETURN   ! we will never do any output
+      !
       IF( ln_timing )   CALL timing_start('dia_wri')
-      !
-      IF( ninist == 1 ) THEN     !==  Output the initial state and forcings  ==!
-         CALL dia_wri_state( 'output.init' )
-         ninist = 0
-      ENDIF
       !
       ! 0. Initialisation
@@ -159,9 +168,7 @@
 
       ! Define frequency of output and means
-      IF( ln_mskland )   THEN   ;   clop = "only(x)"   ! put 1.e+20 on land (very expensive!!)
-      ELSE                      ;   clop = "x"         ! no use of the mask value (require less cpu time)
-      ENDIF
+      clop = "x"         ! no use of the mask value (require less cpu time and otherwise the model crashes)
 #if defined key_diainstant
-      zsto = nwrite * rdt
+      zsto = nn_write * rdt
       clop = "inst("//TRIM(clop)//")"
 #else
@@ -169,5 +176,5 @@
       clop = "ave("//TRIM(clop)//")"
 #endif
-      zout = nwrite * rdt
+      zout = nn_write * rdt
       zmax = ( nitend - nit000 + 1 ) * rdt
 
@@ -196,9 +203,9 @@
             &                    ' MONTH ', nmonth, ' DAY ', nday, 'Julian day : ', zjulian
          IF(lwp)WRITE(numout,*) ' indexes of zoom = ', iimi, iima, ijmi, ijma,   &
-                                 ' limit storage in depth = ', ipk
+            ' limit storage in depth = ', ipk
 
          ! WRITE root name in date.file for use by postpro
          IF(lwp) THEN
-            CALL dia_nam( clhstnam, nwrite,' ' )
+            CALL dia_nam( clhstnam, nn_write,' ' )
             CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea )
             WRITE(inum,*) clhstnam
@@ -208,5 +215,5 @@
          ! Define the T grid FILE ( nid_T )
 
-         CALL dia_nam( clhstnam, nwrite, 'grid_T' )
+         CALL dia_nam( clhstnam, nn_write, 'grid_T' )
          IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam    ! filename
          CALL histbeg( clhstnam, jpi, glamt, jpj, gphit,           &  ! Horizontal grid: glamt and gphit
@@ -220,5 +227,5 @@
          ! Define the U grid FILE ( nid_U )
 
-         CALL dia_nam( clhstnam, nwrite, 'grid_U' )
+         CALL dia_nam( clhstnam, nn_write, 'grid_U' )
          IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam    ! filename
          CALL histbeg( clhstnam, jpi, glamu, jpj, gphiu,           &  ! Horizontal grid: glamu and gphiu
@@ -232,5 +239,5 @@
          ! Define the V grid FILE ( nid_V )
 
-         CALL dia_nam( clhstnam, nwrite, 'grid_V' )                   ! filename
+         CALL dia_nam( clhstnam, nn_write, 'grid_V' )                   ! filename
          IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam
          CALL histbeg( clhstnam, jpi, glamv, jpj, gphiv,           &  ! Horizontal grid: glamv and gphiv
@@ -254,5 +261,5 @@
             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
          CALL histdef( nid_T, "sosfldow", "downward salt flux"                 , "PSU/m2/s",  &  ! (sfx)
-             &         jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
+            &         jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
          CALL histdef( nid_T, "sohefldo", "Net Downward Heat Flux"             , "W/m2"   ,   &  ! qns + qsr
             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
@@ -291,9 +298,9 @@
       ! ---------------------
 
-      ! ndex(1) est utilise ssi l'avant dernier argument est different de 
+      ! ndex(1) est utilise ssi l'avant dernier argument est different de
       ! la taille du tableau en sortie. Dans ce cas , l'avant dernier argument
       ! donne le nombre d'elements, et ndex la liste des indices a sortir
 
-      IF( lwp .AND. MOD( itmod, nwrite ) == 0 ) THEN 
+      IF( lwp .AND. MOD( itmod, nn_write ) == 0 ) THEN
          WRITE(numout,*) 'dia_wri : write model outputs in NetCDF files at ', kt, 'time-step'
          WRITE(numout,*) '~~~~~~ '
@@ -304,18 +311,18 @@
       CALL histwrite( nid_T, "sss_m", it, sss_m, ndim_hT, ndex_hT )   ! sea surface salinity
       CALL histwrite( nid_T, "sowaflup", it, (emp - rnf )  , ndim_hT, ndex_hT )   ! upward water flux
-      CALL histwrite( nid_T, "sosfldow", it, sfx           , ndim_hT, ndex_hT )   ! downward salt flux 
-                                                                                  ! (includes virtual salt flux beneath ice 
-                                                                                  ! in linear free surface case)
+      CALL histwrite( nid_T, "sosfldow", it, sfx           , ndim_hT, ndex_hT )   ! downward salt flux
+      ! (includes virtual salt flux beneath ice
+      ! in linear free surface case)
 
       CALL histwrite( nid_T, "sohefldo", it, qns + qsr     , ndim_hT, ndex_hT )   ! total heat flux
       CALL histwrite( nid_T, "soshfldo", it, qsr           , ndim_hT, ndex_hT )   ! solar heat flux
-      CALL histwrite( nid_T, "soicecov", it, fr_i          , ndim_hT, ndex_hT )   ! ice fraction   
-      CALL histwrite( nid_T, "sowindsp", it, wndm          , ndim_hT, ndex_hT )   ! wind speed   
-
-         ! Write fields on U grid
+      CALL histwrite( nid_T, "soicecov", it, fr_i          , ndim_hT, ndex_hT )   ! ice fraction
+      CALL histwrite( nid_T, "sowindsp", it, wndm          , ndim_hT, ndex_hT )   ! wind speed
+
+      ! Write fields on U grid
       CALL histwrite( nid_U, "ssu_m"   , it, ssu_m         , ndim_hU, ndex_hU )   ! i-current speed
       CALL histwrite( nid_U, "sozotaux", it, utau          , ndim_hU, ndex_hU )   ! i-wind stress
 
-         ! Write fields on V grid
+      ! Write fields on V grid
       CALL histwrite( nid_V, "ssv_m"   , it, ssv_m         , ndim_hV, ndex_hV )   ! j-current speed
       CALL histwrite( nid_V, "sometauy", it, vtau          , ndim_hV, ndex_hV )   ! j-wind stress
@@ -334,9 +341,9 @@
 #endif
 
-   SUBROUTINE dia_wri_state( cdfile_name )
+   SUBROUTINE dia_wri_state( Kmm, cdfile_name )
       !!---------------------------------------------------------------------
       !!                 ***  ROUTINE dia_wri_state  ***
-      !!        
-      !! ** Purpose :   create a NetCDF file named cdfile_name which contains 
+      !!
+      !! ** Purpose :   create a NetCDF file named cdfile_name which contains
       !!      the instantaneous ocean state and forcing fields.
       !!        Used to find errors in the initial state or save the last
@@ -347,9 +354,10 @@
       !!      File 'output.abort.nc' is created in case of abnormal job end
       !!----------------------------------------------------------------------
+      INTEGER           , INTENT( in ) ::   Kmm              ! time level index
       CHARACTER (len=* ), INTENT( in ) ::   cdfile_name      ! name of the file created
       !!
       INTEGER :: inum
       !!----------------------------------------------------------------------
-      ! 
+      !
       IF(lwp) WRITE(numout,*)
       IF(lwp) WRITE(numout,*) 'dia_wri_state : single instantaneous ocean state'
@@ -358,15 +366,15 @@
 
 #if defined key_si3
-     CALL iom_open( TRIM(cdfile_name), inum, ldwrt = .TRUE., kdlev = jpl )
+      CALL iom_open( TRIM(cdfile_name), inum, ldwrt = .TRUE., kdlev = jpl )
 #else
-     CALL iom_open( TRIM(cdfile_name), inum, ldwrt = .TRUE. )
-#endif
-
-      CALL iom_rstput( 0, 0, inum, 'votemper', tsn(:,:,:,jp_tem) )    ! now temperature
-      CALL iom_rstput( 0, 0, inum, 'vosaline', tsn(:,:,:,jp_sal) )    ! now salinity
-      CALL iom_rstput( 0, 0, inum, 'sossheig', sshn              )    ! sea surface height
-      CALL iom_rstput( 0, 0, inum, 'vozocrtx', un                )    ! now i-velocity
-      CALL iom_rstput( 0, 0, inum, 'vomecrty', vn                )    ! now j-velocity
-      CALL iom_rstput( 0, 0, inum, 'vovecrtz', wn                )    ! now k-velocity
+      CALL iom_open( TRIM(cdfile_name), inum, ldwrt = .TRUE. )
+#endif
+
+      CALL iom_rstput( 0, 0, inum, 'votemper', ts(:,:,:,jp_tem,Kmm) )    ! now temperature
+      CALL iom_rstput( 0, 0, inum, 'vosaline', ts(:,:,:,jp_sal,Kmm) )    ! now salinity
+      CALL iom_rstput( 0, 0, inum, 'sossheig', ssh(:,:,Kmm)              )    ! sea surface height
+      CALL iom_rstput( 0, 0, inum, 'vozocrtx', uu(:,:,:,Kmm)                )    ! now i-velocity
+      CALL iom_rstput( 0, 0, inum, 'vomecrty', vv(:,:,:,Kmm)                )    ! now j-velocity
+         CALL iom_rstput( 0, 0, inum, 'vovecrtz', ww             )    ! now k-velocity
       CALL iom_rstput( 0, 0, inum, 'sowaflup', emp - rnf         )    ! freshwater budget
       CALL iom_rstput( 0, 0, inum, 'sohefldo', qsr + qns         )    ! total heat flux
@@ -375,5 +383,5 @@
       CALL iom_rstput( 0, 0, inum, 'sozotaux', utau              )    ! i-wind stress
       CALL iom_rstput( 0, 0, inum, 'sometauy', vtau              )    ! j-wind stress
- 
+
 #if defined key_si3
       IF( nn_ice == 2 ) THEN   ! condition needed in case agrif + ice-model but no-ice in child grid
@@ -383,5 +391,5 @@
       !
       CALL iom_close( inum )
-      ! 
+      !
    END SUBROUTINE dia_wri_state
 
Index: /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/MY_SRC/nemogcm.F90
===================================================================
--- /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/MY_SRC/nemogcm.F90	(revision 12248)
+++ /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/MY_SRC/nemogcm.F90	(revision 12249)
@@ -8,4 +8,5 @@
    !!             -   ! 2014-12  (G. Madec) remove KPP scheme and cross-land advection (cla)
    !!            4.0  ! 2016-10  (G. Madec, S. Flavoni)  domain configuration / user defined interface
+   !!            4.x  ! 2019-12  (L. Brodeau)  STATION_ASF test-case
    !!----------------------------------------------------------------------
 
@@ -18,9 +19,10 @@
    !!----------------------------------------------------------------------
    USE step_oce       ! module used in the ocean time stepping module (step.F90)
-   USE sbc_oce        ! surface boundary condition: ocean
+   USE sbc_oce        ! surface boundary condition: ocean #LB: rm?
    USE phycst         ! physical constant                  (par_cst routine)
    USE domain         ! domain initialization   (dom_init & dom_cfg routines)
    USE closea         ! treatment of closed seas (for ln_closea)
    USE usrdef_nam     ! user defined configuration
+   USE step, ONLY : Nbb, Nnn, Naa, Nrhs ! time level indices
    USE daymod         ! calendar
    USE restart        ! open  restart file
@@ -84,39 +86,8 @@
       istp = nit000
       !
-#if defined key_c1d
       DO WHILE ( istp <= nitend .AND. nstop == 0 )    !==  C1D time-stepping  ==!
          CALL stp_c1d( istp )
          istp = istp + 1
       END DO
-#else
-      !
-      IF( .NOT.ln_diurnal_only ) THEN                 !==  Standard time-stepping  ==!
-         !
-         DO WHILE( istp <= nitend .AND. nstop == 0 )
-
-            ncom_stp = istp
-            IF( ln_timing ) THEN
-               zstptiming = MPI_Wtime()
-               IF ( istp == ( nit000 + 1 ) ) elapsed_time = zstptiming
-               IF ( istp ==         nitend ) elapsed_time = zstptiming - elapsed_time
-            ENDIF
-
-            CALL stp        ( istp )
-            istp = istp + 1
-
-            IF( lwp .AND. ln_timing )   WRITE(numtime,*) 'timing step ', istp-1, ' : ', MPI_Wtime() - zstptiming
-
-         END DO
-         !
-      ELSE                                            !==  diurnal SST time-steeping only  ==!
-         !
-         DO WHILE( istp <= nitend .AND. nstop == 0 )
-            CALL stp_diurnal( istp )   ! time step only the diurnal SST
-            istp = istp + 1
-         END DO
-         !
-      ENDIF
-      !
-#endif
       !
       !                            !------------------------!
@@ -158,5 +129,5 @@
       INTEGER ::   ios, ilocal_comm   ! local integers
       !!
-      NAMELIST/namctl/ ln_ctl   , sn_cfctl, nn_print, nn_ictls, nn_ictle,   &
+      NAMELIST/namctl/ sn_cfctl,  nn_print, nn_ictls, nn_ictle,             &
          &             nn_isplt , nn_jsplt, nn_jctls, nn_jctle,             &
          &             ln_timing, ln_diacfl
@@ -173,9 +144,9 @@
 #if defined key_iomput
       IF( Agrif_Root() ) THEN
-         CALL xios_initialize( "for_xios_mpi_id", return_comm=ilocal_comm )   ! nemo local communicator given by xios
+            CALL xios_initialize( "for_xios_mpi_id", return_comm=ilocal_comm )   ! nemo local communicator given by xios
       ENDIF
       CALL mpp_start( ilocal_comm )
 #else
-      CALL mpp_start( )
+         CALL mpp_start( )
 #endif
       !
@@ -190,6 +161,6 @@
       IF( lwm )   CALL ctl_opn(     numout,        'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. )
       ! open reference and configuration namelist files
-      CALL ctl_opn( numnam_ref,        'namelist_ref',     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. )
-      CALL ctl_opn( numnam_cfg,        'namelist_cfg',     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. )
+      CALL load_nml( numnam_ref,        'namelist_ref',                                           -1, lwm )
+      CALL load_nml( numnam_cfg,        'namelist_cfg',                                           -1, lwm )
       IF( lwm )   CALL ctl_opn(     numond, 'output.namelist.dyn', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. )
       ! open /dev/null file to be able to supress output write easily
@@ -197,15 +168,13 @@
       !
       !                             !--------------------!
-      !                             ! Open listing units !  -> need ln_ctl from namctl to define lwp
+      !                             ! Open listing units !  -> need sn_cfctl from namctl to define lwp
       !                             !--------------------!
       !
-      REWIND( numnam_ref )              ! Namelist namctl in reference namelist
       READ  ( numnam_ref, namctl, IOSTAT = ios, ERR = 901 )
 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namctl in reference namelist' )
-      REWIND( numnam_cfg )              ! Namelist namctl in confguration namelist
       READ  ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 )
 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namctl in configuration namelist' )
       !
-      lwp = (narea == 1) .OR. ln_ctl    ! control of all listing output print
+      lwp = (narea == 1) .OR. sn_cfctl%l_oceout    ! control of all listing output print
       !
       IF(lwp) THEN                      ! open listing units
@@ -239,17 +208,4 @@
       ENDIF
       !
-      ! finalize the definition of namctl variables
-      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
-      !
       IF(lwm) WRITE( numond, namctl )
       !
@@ -258,8 +214,6 @@
       !                             !------------------------------------!
       !
-      REWIND( numnam_ref )              ! Namelist namcfg in reference namelist
       READ  ( numnam_ref, namcfg, IOSTAT = ios, ERR = 903 )
 903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namcfg in reference namelist' )
-      REWIND( numnam_cfg )              ! Namelist namcfg in confguration namelist
       READ  ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 )
 904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namcfg in configuration namelist' )
@@ -281,4 +235,7 @@
       CALL nemo_alloc()
 
+      ! Initialise time level indices
+      Nbb = 1; Nnn = 2; Naa = 3; Nrhs = Naa
+
       !                             !-------------------------------!
       !                             !  NEMO general initialization  !
@@ -294,12 +251,23 @@
       CALL     eos_init        ! Equation of state
       IF( lk_c1d       )   CALL     c1d_init        ! 1D column configuration
-      CALL     dom_init("OPA") ! Domain
-      IF( ln_ctl       )   CALL prt_ctl_init        ! Print control
-
-      CALL day_init        ! model calendar (using both namelist and restart infos)
-      IF( ln_rstart )      CALL rst_read_open
+      CALL     dom_init( Nbb, Nnn, Naa, "OPA") ! Domain
+      IF( sn_cfctl%l_prtctl )   &
+         &                 CALL prt_ctl_init        ! Print control
+
+      IF( ln_rstart ) THEN                    ! Restart from a file                                                                                 
+         !                                    ! -------------------                                                                                 
+         CALL rst_read( Nbb, Nnn )            ! Read the restart file                                                                               
+         CALL day_init                        ! model calendar (using both namelist and restart infos)                                              
+         !                                                                                                                                          
+      ELSE                                    ! Start from rest                                                                                     
+         !                                    ! ---------------                                                                                     
+         numror = 0                           ! define numror = 0 -> no restart file to read                                                        
+         neuler = 0                           ! Set time-step indicator at nit000 (euler forward)                                                   
+         CALL day_init                        ! model calendar (using both namelist and restart infos)                                              
+      ENDIF
+      !
 
       !                                      ! external forcing
-      CALL     sbc_init    ! surface boundary conditions (including sea-ice)
+      CALL     sbc_init( Nbb, Nnn, Naa )    ! surface boundary conditions (including sea-ice)
 
       !
@@ -325,5 +293,6 @@
          WRITE(numout,*) '~~~~~~~~'
          WRITE(numout,*) '   Namelist namctl'
-         WRITE(numout,*) '      run control (for debugging)     ln_ctl     = ', ln_ctl
+         WRITE(numout,*) '                              sn_cfctl%l_glochk  = ', sn_cfctl%l_glochk
+         WRITE(numout,*) '                              sn_cfctl%l_allon   = ', sn_cfctl%l_allon
          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
@@ -331,6 +300,7 @@
          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%l_prtctl  = ', sn_cfctl%l_prtctl
+         WRITE(numout,*) '                              sn_cfctl%l_prttrc  = ', sn_cfctl%l_prttrc
+         WRITE(numout,*) '                              sn_cfctl%l_oasout  = ', sn_cfctl%l_oasout
          WRITE(numout,*) '                              sn_cfctl%procmin   = ', sn_cfctl%procmin
          WRITE(numout,*) '                              sn_cfctl%procmax   = ', sn_cfctl%procmax
@@ -370,5 +340,5 @@
       !                             ! Parameter control
       !
-      IF( ln_ctl ) THEN                 ! sub-domain area indices for the control prints
+      IF( sn_cfctl%l_prtctl .OR. sn_cfctl%l_prttrc ) THEN              ! sub-domain area indices for the control prints
          IF( lk_mpp .AND. jpnij > 1 ) THEN
             isplt = jpni   ;   jsplt = jpnj   ;   ijsplt = jpni*jpnj   ! the domain is forced to the real split domain
@@ -427,9 +397,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
       IF( lwm.AND.numond  /= -1 )   CLOSE( numond          )   ! oce output namelist
-      IF( numnam_ice_ref  /= -1 )   CLOSE( numnam_ice_ref  )   ! ice reference namelist
-      IF( numnam_ice_cfg  /= -1 )   CLOSE( numnam_ice_cfg  )   ! ice configuration namelist
       IF( lwm.AND.numoni  /= -1 )   CLOSE( numoni          )   ! ice output namelist
       IF( numevo_ice      /= -1 )   CLOSE( numevo_ice      )   ! ice variables (temp. evolution)
@@ -488,6 +454,7 @@
       sn_cfctl%l_oceout  = setto
       sn_cfctl%l_layout  = setto
-      sn_cfctl%l_mppout  = setto
-      sn_cfctl%l_mpptop  = setto
+      sn_cfctl%l_prtctl  = setto
+      sn_cfctl%l_prttrc  = setto
+      sn_cfctl%l_oasout  = setto
    END SUBROUTINE nemo_set_cfctl
 
Index: /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/MY_SRC/sbcssm.F90
===================================================================
--- /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/MY_SRC/sbcssm.F90	(revision 12248)
+++ /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/MY_SRC/sbcssm.F90	(revision 12249)
@@ -14,11 +14,8 @@
    USE c1d            ! 1D configuration: lk_c1d
    USE dom_oce        ! ocean domain: variables
-   !LB:USE zdf_oce        ! ocean vertical physics: variables
    USE sbc_oce        ! surface module: variables
    USE phycst         ! physical constants
    USE eosbn2         ! equation of state - Brunt Vaisala frequency
    USE lbclnk         ! ocean lateral boundary conditions (or mpp link)
-   !LB:USE zpshde         ! z-coord. with partial steps: horizontal derivatives
-   !LB:USE closea         ! for ln_closea
    !
    USE in_out_manager ! I/O manager
@@ -26,5 +23,5 @@
    USE lib_mpp        ! distributed memory computing library
    USE prtctl         ! print control
-   USE fldread        ! read input fields 
+   USE fldread        ! read input fields
    USE timing         ! Timing
 
@@ -32,11 +29,11 @@
    PRIVATE
 
-   PUBLIC   sbc_ssm        ! routine called by step.F90
-   PUBLIC   sbc_ssm_init   ! routine called by sbcmod.F90
+   PUBLIC   sbc_ssm_init   ! called by sbc_init
+   PUBLIC   sbc_ssm        ! called by sbc
 
    CHARACTER(len=100) ::   cn_dir        ! Root directory for location of ssm files
    LOGICAL            ::   ln_3d_uve     ! specify whether input velocity data is 3D
    LOGICAL            ::   ln_read_frq   ! specify whether we must read frq or not
-   
+
    LOGICAL            ::   l_sasread     ! Ice intilisation: =T read a file ; =F anaytical initilaistion
    LOGICAL            ::   l_initdone = .false.
@@ -62,5 +59,5 @@
 CONTAINS
 
-   SUBROUTINE sbc_ssm( kt )
+   SUBROUTINE sbc_ssm( kt, Kbb, Kmm )
       !!----------------------------------------------------------------------
       !!                  ***  ROUTINE sbc_ssm  ***
@@ -69,8 +66,10 @@
       !!               for an off-line simulation using surface processes only
       !!
-      !! ** Method : calculates the position of data 
+      !! ** Method : calculates the position of data
       !!             - interpolates data if needed
       !!----------------------------------------------------------------------
       INTEGER, INTENT(in) ::   kt   ! ocean time-step index
+      INTEGER, INTENT(in) ::   Kbb, Kmm   ! ocean time level indices
+      ! (not needed for SAS but needed to keep a consistent interface in sbcmod.F90)
       !
       INTEGER  ::   ji, jj     ! dummy loop indices
@@ -80,25 +79,25 @@
       !
       IF( ln_timing )   CALL timing_start( 'sbc_ssm')
-     
+
       IF ( l_sasread ) THEN
          IF( nfld_3d > 0 ) CALL fld_read( kt, 1, sf_ssm_3d )      !==   read data at kt time step   ==!
          IF( nfld_2d > 0 ) CALL fld_read( kt, 1, sf_ssm_2d )      !==   read data at kt time step   ==!
-         ! 
+         !
          IF( ln_3d_uve ) THEN
             IF( .NOT. ln_linssh ) THEN
-               e3t_m(:,:) = sf_ssm_3d(jf_e3t)%fnow(:,:,1) * tmask(:,:,1) ! vertical scale factor 
+               e3t_m(:,:) = sf_ssm_3d(jf_e3t)%fnow(:,:,1) * tmask(:,:,1) ! vertical scale factor
             ELSE
                e3t_m(:,:) = e3t_0(:,:,1)                                 ! vertical scale factor
             ENDIF
             ssu_m(:,:) = sf_ssm_3d(jf_usp)%fnow(:,:,1) * umask(:,:,1)    ! u-velocity
-            ssv_m(:,:) = sf_ssm_3d(jf_vsp)%fnow(:,:,1) * vmask(:,:,1)    ! v-velocity 
+            ssv_m(:,:) = sf_ssm_3d(jf_vsp)%fnow(:,:,1) * vmask(:,:,1)    ! v-velocity
          ELSE
             IF( .NOT. ln_linssh ) THEN
-               e3t_m(:,:) = sf_ssm_2d(jf_e3t)%fnow(:,:,1) * tmask(:,:,1) ! vertical scale factor 
+               e3t_m(:,:) = sf_ssm_2d(jf_e3t)%fnow(:,:,1) * tmask(:,:,1) ! vertical scale factor
             ELSE
                e3t_m(:,:) = e3t_0(:,:,1)                                 ! vertical scale factor
             ENDIF
             ssu_m(:,:) = sf_ssm_2d(jf_usp)%fnow(:,:,1) * umask(:,:,1)    ! u-velocity
-            ssv_m(:,:) = sf_ssm_2d(jf_vsp)%fnow(:,:,1) * vmask(:,:,1)    ! v-velocity 
+            ssv_m(:,:) = sf_ssm_2d(jf_vsp)%fnow(:,:,1) * vmask(:,:,1)    ! v-velocity
          ENDIF
          !
@@ -119,17 +118,17 @@
          IF( .NOT. ln_linssh ) e3t_m(:,:) = e3t_0(:,:,1) !clem: necessary at least for sas2D
          frq_m(:,:) = 1._wp                              !              - -
-         sshn (:,:) = 0._wp                              !              - -
-      ENDIF
-      
+         ssh  (:,:,Kmm) = 0._wp                              !              - -
+      ENDIF
+
       IF ( nn_ice == 1 ) THEN
-         tsn(:,:,1,jp_tem) = sst_m(:,:)
-         tsn(:,:,1,jp_sal) = sss_m(:,:)
-         tsb(:,:,1,jp_tem) = sst_m(:,:)
-         tsb(:,:,1,jp_sal) = sss_m(:,:)
-      ENDIF
-      ub (:,:,1) = ssu_m(:,:)
-      vb (:,:,1) = ssv_m(:,:)
- 
-      IF(ln_ctl) THEN                  ! print control
+         ts(:,:,1,jp_tem,Kmm) = sst_m(:,:)
+         ts(:,:,1,jp_sal,Kmm) = sss_m(:,:)
+         ts(:,:,1,jp_tem,Kbb) = sst_m(:,:)
+         ts(:,:,1,jp_sal,Kbb) = sss_m(:,:)
+      ENDIF
+      uu (:,:,1,Kbb) = ssu_m(:,:)
+      vv (:,:,1,Kbb) = ssv_m(:,:)
+
+      IF(sn_cfctl%l_prtctl) THEN            ! print control
          CALL prt_ctl(tab2d_1=sst_m, clinfo1=' sst_m   - : ', mask1=tmask   )
          CALL prt_ctl(tab2d_1=sss_m, clinfo1=' sss_m   - : ', mask1=tmask   )
@@ -156,10 +155,12 @@
 
 
-   SUBROUTINE sbc_ssm_init
+   SUBROUTINE sbc_ssm_init( Kbb, Kmm )
       !!----------------------------------------------------------------------
       !!                  ***  ROUTINE sbc_ssm_init  ***
       !!
-      !! ** Purpose :   Initialisation of sea surface mean data     
-      !!----------------------------------------------------------------------
+      !! ** Purpose :   Initialisation of sea surface mean data
+      !!----------------------------------------------------------------------
+      INTEGER, INTENT(in) ::   Kbb, Kmm   ! ocean time level indices
+      ! (not needed for SAS but needed to keep a consistent interface in sbcmod.F90)
       INTEGER  :: ierr, ierr0, ierr1, ierr2, ierr3   ! return error code
       INTEGER  :: ifpr                               ! dummy loop indice
@@ -186,15 +187,13 @@
       ENDIF
       !
-      REWIND( numnam_ref )              ! Namelist namsbc_sas in reference namelist : Input fields
       READ  ( numnam_ref, namsbc_sas, IOSTAT = ios, ERR = 901)
 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_sas in reference namelist' )
-      REWIND( numnam_cfg )              ! Namelist namsbc_sas in configuration namelist : Input fields
       READ  ( numnam_cfg, namsbc_sas, IOSTAT = ios, ERR = 902 )
 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_sas in configuration namelist' )
       IF(lwm) WRITE ( numond, namsbc_sas )
-      !           
+      !
       IF(lwp) THEN                              ! Control print
          WRITE(numout,*) '   Namelist namsbc_sas'
-         WRITE(numout,*) '      Initialisation using an input file                                 l_sasread   = ', l_sasread 
+         WRITE(numout,*) '      Initialisation using an input file                                 l_sasread   = ', l_sasread
          WRITE(numout,*) '      Are we supplying a 3D u,v and e3 field                             ln_3d_uve   = ', ln_3d_uve
          WRITE(numout,*) '      Are we reading frq (fraction of qsr absorbed in the 1st T level)   ln_read_frq = ', ln_read_frq
@@ -220,8 +219,8 @@
          nn_fwb = 0
       ENDIF
-      
-      !                  
+
+      !
       IF( l_sasread ) THEN                       ! store namelist information in an array
-         ! 
+         !
          !! following code is a bit messy, but distinguishes between when u,v are 3d arrays and
          !! when we have other 3d arrays that we need to read in
@@ -269,5 +268,5 @@
          ENDIF
          !
-         ierr1 = 0    ! default definition if slf_?d(ifpr)%ln_tint = .false. 
+         ierr1 = 0    ! default definition if slf_?d(ifpr)%ln_tint = .false.
          IF( nfld_3d > 0 ) THEN
             ALLOCATE( sf_ssm_3d(nfld_3d), STAT=ierr )         ! set sf structure
@@ -276,5 +275,5 @@
             ENDIF
             DO ifpr = 1, nfld_3d
-                                            ALLOCATE( sf_ssm_3d(ifpr)%fnow(jpi,jpj,jpk)    , STAT=ierr0 )
+               ALLOCATE( sf_ssm_3d(ifpr)%fnow(jpi,jpj,jpk)    , STAT=ierr0 )
                IF( slf_3d(ifpr)%ln_tint )   ALLOCATE( sf_ssm_3d(ifpr)%fdta(jpi,jpj,jpk,2)  , STAT=ierr1 )
                IF( ierr0 + ierr1 > 0 ) THEN
@@ -292,5 +291,5 @@
             ENDIF
             DO ifpr = 1, nfld_2d
-                                            ALLOCATE( sf_ssm_2d(ifpr)%fnow(jpi,jpj,1)    , STAT=ierr0 )
+               ALLOCATE( sf_ssm_2d(ifpr)%fnow(jpi,jpj,1)    , STAT=ierr0 )
                IF( slf_2d(ifpr)%ln_tint )   ALLOCATE( sf_ssm_2d(ifpr)%fdta(jpi,jpj,1,2)  , STAT=ierr1 )
                IF( ierr0 + ierr1 > 0 ) THEN
@@ -307,5 +306,5 @@
       ENDIF
       !
-      CALL sbc_ssm( nit000 )   ! need to define ss?_m arrays used in iceistate
+      CALL sbc_ssm( nit000, Kbb, Kmm )   ! need to define ss?_m arrays used in iceistate
       l_initdone = .TRUE.
       !
Index: /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/MY_SRC/step_c1d.F90
===================================================================
--- /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/MY_SRC/step_c1d.F90	(revision 12248)
+++ /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/MY_SRC/step_c1d.F90	(revision 12249)
@@ -6,21 +6,21 @@
    !! History :   2.0  !  2004-04  (C. Ethe)  adapted from step.F90 for C1D
    !!             3.0  !  2008-04  (G. Madec)  redo the adaptation to include SBC
+   !!             4.1  !  2019-08  (A. Coward, D. Storkey) rewrite in preparation for new timestepping scheme
+   !!             4.1  !  2019-12  (L. Brodeau) STATION_ASF test-case
    !!----------------------------------------------------------------------
 #if defined key_c1d
    !!----------------------------------------------------------------------
    !!   'key_c1d'                                       1D Configuration
-   !!----------------------------------------------------------------------  
+   !!----------------------------------------------------------------------
    !!   stp_c1d        : NEMO system time-stepping in c1d case
    !!----------------------------------------------------------------------
-   USE step_oce        ! time stepping definition modules 
-   !LB:USE dyncor_c1d      ! Coriolis term (c1d case)         (dyn_cor_1d     )
-   !LB:USE dynnxt          ! time-stepping                    (dyn_nxt routine)
-   !LB:USE dyndmp          ! U & V momentum damping           (dyn_dmp routine)
-   USE restart         ! restart 
+   USE step_oce        ! time stepping definition modules
+   USE step, ONLY : Nbb, Nnn, Naa, Nrhs ! time level indices
+   USE restart         ! restart
 
    IMPLICIT NONE
    PRIVATE
 
-   PUBLIC   stp_c1d   ! called by nemogcm.F90
+   PUBLIC stp_c1d   ! called by nemogcm.F90
 
    !!----------------------------------------------------------------------
@@ -34,13 +34,13 @@
       !!----------------------------------------------------------------------
       !!                     ***  ROUTINE stp_c1d  ***
-      !!                      
+      !!
       !! ** Purpose :  - Time stepping of SBC including sea ice (dynamic and thermodynamic eqs.)
       !!               - Time stepping of OPA (momentum and active tracer eqs.)
       !!               - Time stepping of TOP (passive tracer eqs.)
-      !! 
-      !! ** Method  : -1- Update forcings and data  
-      !!              -2- Update vertical ocean physics 
-      !!              -3- Compute the t and s trends 
-      !!              -4- Update t and s 
+      !!
+      !! ** Method  : -1- Update forcings and data
+      !!              -2- Update vertical ocean physics
+      !!              -3- Compute the t and s trends
+      !!              -4- Update t and s
       !!              -5- Compute the momentum trends
       !!              -6- Update the horizontal velocity
@@ -54,57 +54,41 @@
       !! ---------------------------------------------------------------------
 
-                             indic = 0                ! reset to no error condition
+      indic = 0                ! reset to no error condition
       IF( kstp == nit000 )   CALL iom_init( "nemo")   ! iom_put initialization (must be done after nemo_init for AGRIF+XIOS+OASIS)
       IF( kstp /= nit000 )   CALL day( kstp )         ! Calendar (day was already called at nit000 in day_init)
-                             CALL iom_setkt( kstp - nit000 + 1, "nemo" )   ! say to iom that we are at time step kstp
+      CALL iom_setkt( kstp - nit000 + 1, "nemo" )   ! say to iom that we are at time step kstp
 
-                             CALL sbc    ( kstp )         ! Sea Boundary Condition (including sea-ice)
+      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+      ! Update data, open boundaries, surface boundary condition (including sea-ice)
+      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+      CALL sbc    ( kstp, Nbb, Nnn )  ! Sea Boundary Condition (including sea-ice)
 
-                             CALL dia_wri( kstp )         ! ocean model: outputs
+      CALL dia_wri( kstp, Nnn )  ! ocean model: outputs
 
-                             
+      ! Swap time levels
+      Nrhs = Nbb
+      Nbb = Nnn
+      Nnn = Naa
+      Naa = Nrhs
+
       !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-      ! Control
+      ! Control and restarts
       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-                             CALL stp_ctl( kstp, indic )
-      IF( indic < 0  )  THEN
-                             CALL ctl_stop( 'step: indic < 0' )
-                             CALL dia_wri_state( 'output.abort' )
-      ENDIF
-                             
-      IF( kstp == nit000   ) CALL iom_close( numror )     ! close input  ocean restart file
-
-      !#LB: from C1D:
-      IF( lrst_oce       )   CALL rst_write( kstp )        ! write output ocean restart file
+      CALL stp_ctl( kstp, Nbb, Nnn, indic )
+      IF( kstp == nit000 )   CALL iom_close( numror )          ! close input  ocean restart file
+      IF( lrst_oce       )   CALL rst_write( kstp, Nbb, Nnn )  ! write output ocean restart file
       !
 #if defined key_iomput
       IF( kstp == nitend .OR. indic < 0 )   CALL xios_context_finalize()   ! needed for XIOS
+      !
 #endif
-
-      !#LB: from SAS"
-!#if defined key_iomput
-!      IF( kstp == nitrst ) THEN
-!         IF(.NOT.lwxios) THEN
-!            CALL iom_close( numrow )
-!         ELSE
-!            CALL iom_context_finalize( cwxios_context )
-!         ENDIF
-!         lrst_oce = .FALSE.
-!      ENDIF
-!      IF( kstp == nitend .OR. indic < 0 ) THEN
-!                             CALL iom_context_finalize( cxios_context ) ! needed for XIOS+AGRIF
-!      ENDIF
-!#endif
-!      !
-!      IF( ln_timing .AND.  kstp == nit000  )   CALL timing_reset
-      !
    END SUBROUTINE stp_c1d
 
 #else
-   !!----------------------------------------------------------------------                                                                     
-   !!   Default key                                            NO 1D Config                                                                     
-   !!----------------------------------------------------------------------                                                                     
+   !!----------------------------------------------------------------------
+   !!   Default key                                            NO 1D Config
+   !!----------------------------------------------------------------------
 CONTAINS
-   SUBROUTINE stp_c1d ( kt )      ! dummy routine                                                                                               
+   SUBROUTINE stp_c1d ( kt )      ! dummy routine
       IMPLICIT NONE
       INTEGER, INTENT( in ) :: kt
@@ -112,5 +96,5 @@
    END SUBROUTINE stp_c1d
 #endif
-   
+
    !!======================================================================
 END MODULE step_c1d
Index: /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/MY_SRC/stpctl.F90
===================================================================
--- /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/MY_SRC/stpctl.F90	(revision 12248)
+++ /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/MY_SRC/stpctl.F90	(revision 12249)
@@ -12,5 +12,4 @@
    !!            3.7  ! 2016-09  (G. Madec)  Remove solver
    !!            4.0  ! 2017-04  (G. Madec)  regroup global communications
-   !!            4.x  ! 2019-10  (L. Brodeau)  adapted for STATION_ASF test-case
    !!----------------------------------------------------------------------
 
@@ -18,10 +17,7 @@
    !!   stp_ctl      : Control the run
    !!----------------------------------------------------------------------
-   !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 sbc_oce         ! surface fluxes and stuff
-   USE diawri
+   USE diawri          ! Standard run outputs       (dia_wri_state routine)
    !
    USE in_out_manager  ! I/O manager
@@ -42,8 +38,7 @@
    !! Software governed by the CeCILL license (see ./LICENSE)
    !!----------------------------------------------------------------------
-
 CONTAINS
 
-   SUBROUTINE stp_ctl( kt, kindic )
+   SUBROUTINE stp_ctl( kt, Kbb, Kmm, kindic )
       !!----------------------------------------------------------------------
       !!                    ***  ROUTINE stp_ctl  ***
@@ -57,6 +52,8 @@
       !! ** Actions :   "time.step" file = last ocean time-step
       !!                "run.stat"  file = run statistics
+      !!                nstop indicator sheared among all local domain (lk_mpp=T)
       !!----------------------------------------------------------------------
       INTEGER, INTENT(in   ) ::   kt       ! ocean time-step index
+      INTEGER, INTENT(in   ) ::   Kbb, Kmm      ! ocean time level index
       INTEGER, INTENT(inout) ::   kindic   ! error indicator
       !!
@@ -67,6 +64,6 @@
       !
       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
+      ll_colruns = ll_wrtstp .AND. ( sn_cfctl%l_runstat )
+      ll_wrtruns = ll_colruns .AND. lwm
       IF( kt == nit000 .AND. lwp ) THEN
          WRITE(numout,*)
@@ -74,8 +71,8 @@
          WRITE(numout,*) '~~~~~~~'
          !                                ! open time.step file
-         CALL ctl_opn( numstp, 'time.step', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea )
+         IF( lwm ) CALL ctl_opn( numstp, 'time.step', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea )
          !                                ! open run.stat file(s) at start whatever
          !                                ! the value of sn_cfctl%ptimincr
-         IF( ln_ctl .OR. sn_cfctl%l_runstat ) THEN
+         IF( lwm .AND. ( sn_cfctl%l_runstat ) ) THEN
             CALL ctl_opn( numrun, 'run.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea )
             clname = 'run.stat.nc'
@@ -91,5 +88,5 @@
       IF( kt == nit000 )   lsomeoce = COUNT( ssmask(:,:) == 1._wp ) > 0
       !
-      IF(ll_wrtstp) THEN        !==  current time step  ==!   ("time.step" file)
+      IF(lwm .AND. ll_wrtstp) THEN        !==  current time step  ==!   ("time.step" file)
          WRITE ( numstp, '(1x, i8)' )   kt
          REWIND( numstp )
@@ -103,4 +100,5 @@
       IF( ll_colruns ) THEN
          CALL mpp_max( "stpctl", zmax )          ! max over the global domain
+         nstop = NINT( zmax(3) )                 ! nstop indicator sheared among all local domains
       ENDIF
       !                                   !==  run statistics  ==!   ("run.stat" files)
@@ -114,5 +112,5 @@
       END IF
       !                                   !==  error handling  ==!
-      IF( ( ln_ctl .OR. lsomeoce ) .AND. (   &             ! have use mpp_max (because ln_ctl=.T.) or contains some ocean points
+      IF( ( sn_cfctl%l_glochk .OR. lsomeoce ) .AND. (   &  ! domain contains some ocean points, check for sensible ranges
          &  zmax(1) >    5._wp .OR.   &             ! too large wind stress ( > 5 N/m^2 )
          &  zmax(2) > 2000._wp .OR.   &             ! too large non-solar heat flux ( > 2000 W/m^2)
@@ -126,7 +124,7 @@
          WRITE(ctmp6,*) '      ===> output of last computed fields in output.abort.nc file'
 
-         CALL dia_wri_state( 'output.abort' )     ! create an output.abort file
+         CALL dia_wri_state( Kmm, 'output.abort' )     ! create an output.abort file
 
-         IF( .NOT. ln_ctl ) THEN
+         IF( .NOT. sn_cfctl%l_glochk ) THEN
             WRITE(ctmp8,*) 'E R R O R message from sub-domain: ', narea
             CALL ctl_stop( 'STOP', ctmp1, ' ', ctmp2, ' ', ctmp6, ' ' )
Index: /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/MY_SRC/usrdef_nam.F90
===================================================================
--- /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/MY_SRC/usrdef_nam.F90	(revision 12248)
+++ /NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/MY_SRC/usrdef_nam.F90	(revision 12249)
@@ -15,6 +15,6 @@
    !!   usr_def_hgr   : initialize the horizontal mesh 
    !!----------------------------------------------------------------------
-   USE dom_oce  , ONLY: nimpp, njmpp       ! ocean space and time domain
-   USE dom_oce  , ONLY: ln_zco, ln_zps, ln_sco   ! flag of type of coordinate !#LB???
+   USE dom_oce  , ONLY: nimpp, njmpp             ! ocean space and time domain
+   USE dom_oce  , ONLY: ln_zco, ln_zps, ln_sco   ! flag of type of coordinate
    USE par_oce        ! ocean space and time domain
    USE phycst         ! physical constants
