Index: /branches/nemo_v3_3_beta/NEMOGCM/NEMO/C1D_SRC/c1d.F90
===================================================================
--- /branches/nemo_v3_3_beta/NEMOGCM/NEMO/C1D_SRC/c1d.F90	(revision 2381)
+++ /branches/nemo_v3_3_beta/NEMOGCM/NEMO/C1D_SRC/c1d.F90	(revision 2382)
@@ -20,5 +20,5 @@
    !! NEMO/C1D 3.3 , NEMO Consortium (2010)
    !! $Id$ 
-   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
-   !!=====================================================================
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!======================================================================
 END MODULE c1d
Index: /branches/nemo_v3_3_beta/NEMOGCM/NEMO/C1D_SRC/diawri_c1d.F90
===================================================================
--- /branches/nemo_v3_3_beta/NEMOGCM/NEMO/C1D_SRC/diawri_c1d.F90	(revision 2381)
+++ /branches/nemo_v3_3_beta/NEMOGCM/NEMO/C1D_SRC/diawri_c1d.F90	(revision 2382)
@@ -46,7 +46,6 @@
    !! NEMO/C1D 3.3 , NEMO Consortium (2010)
    !! $Id$
-   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 CONTAINS
 
Index: /branches/nemo_v3_3_beta/NEMOGCM/NEMO/C1D_SRC/dyncor_c1d.F90
===================================================================
--- /branches/nemo_v3_3_beta/NEMOGCM/NEMO/C1D_SRC/dyncor_c1d.F90	(revision 2381)
+++ /branches/nemo_v3_3_beta/NEMOGCM/NEMO/C1D_SRC/dyncor_c1d.F90	(revision 2382)
@@ -31,7 +31,6 @@
    !! NEMO/C1D 3.3 , NEMO Consortium (2010)
    !! $Id$ 
-   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
-
 CONTAINS
 
@@ -40,5 +39,5 @@
       !!                   ***  ROUTINE cor_c1d  ***
       !! 
-      !! ** Purpose : Compute the Coriolis factor at T-point
+      !! ** Purpose : set the Coriolis factor at T-point
       !!----------------------------------------------------------------------
       REAL(wp) ::   zphi0, zbeta, zf0         !  temporary scalars
@@ -83,11 +82,6 @@
       !!                   ***  ROUTINE dyn_cor_c1d  ***
       !! 
-      !! ** Purpose :   Compute the now total vorticity trend and add it to 
-      !!               the general trend of the momentum equation
-      !!
-      !! ** Method  :
-      !!
-      !! History :
-      !!   9.0  !  04-09  (C. Ethe) 1D configuration
+      !! ** Purpose :   Compute the now Coriolis trend and add it to 
+      !!               the general trend of the momentum equation in 1D case.
       !!----------------------------------------------------------------------
       INTEGER, INTENT( in ) ::   kt   ! ocean time-step index
Index: /branches/nemo_v3_3_beta/NEMOGCM/NEMO/C1D_SRC/dynnxt_c1d.F90
===================================================================
--- /branches/nemo_v3_3_beta/NEMOGCM/NEMO/C1D_SRC/dynnxt_c1d.F90	(revision 2381)
+++ /branches/nemo_v3_3_beta/NEMOGCM/NEMO/C1D_SRC/dynnxt_c1d.F90	(revision 2382)
@@ -11,5 +11,4 @@
    !!   'key_c1d'                                          1D Configuration
    !!----------------------------------------------------------------------  
-   !!----------------------------------------------------------------------
    !!   dyn_nxt_c1d : update the horizontal velocity from the momentum trend
    !!----------------------------------------------------------------------
@@ -27,7 +26,6 @@
    !! NEMO/C1D 3.3 , NEMO Consortium (2010)
    !! $Id$ 
-   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
-
 CONTAINS
 
@@ -36,6 +34,5 @@
       !!                  ***  ROUTINE dyn_nxt_c1d  ***
       !!                   
-      !! ** Purpose :   Compute the after horizontal velocity from the 
-      !!      momentum trend.
+      !! ** Purpose :   Compute the after horizontal velocity from the momentum trend.
       !!
       !! ** Method  :   Apply lateral boundary conditions on the trends (ua,va) 
@@ -61,27 +58,24 @@
          IF(lwp) WRITE(numout,*)
          IF(lwp) WRITE(numout,*) 'dyn_nxt_c1d : time stepping on 1D configuation'
-         IF(lwp) WRITE(numout,*) '~~~~~~~'
+         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~'
       ENDIF
 
-      ! Local constant initialization
-      z2dt = 2. * rdt
+      z2dt = 2._wp * rdt                                                   ! Local constant initialization
       IF( neuler == 0 .AND. kt == nit000 )  z2dt = rdt
 
-      ! Lateral boundary conditions on ( ua, va )
-      CALL lbc_lnk( ua, 'U', -1. )
-      CALL lbc_lnk( va, 'V', -1. )
+      CALL lbc_lnk( ua, 'U', -1. )   ;   CALL lbc_lnk( va, 'V', -1. )      ! Lateral boundary conditions
 
-      DO jk = 1, jpkm1      ! Next Velocity
+      DO jk = 1, jpkm1                                                     ! Next Velocity
          ua(:,:,jk) = ( ub(:,:,jk) + z2dt * ua(:,:,jk) ) * umask(:,:,jk)
          va(:,:,jk) = ( vb(:,:,jk) + z2dt * va(:,:,jk) ) * vmask(:,:,jk)
       END DO 
  
-      DO jk = 1, jpkm1      ! Time filter and swap of dynamics arrays
-         IF( neuler == 0 .AND. kt == nit000 ) THEN      ! Euler (forward) time stepping
+      DO jk = 1, jpkm1                                                     ! Time filter and swap of dynamics arrays
+         IF( neuler == 0 .AND. kt == nit000 ) THEN                               ! Euler (forward) time stepping
              ub(:,:,jk) = un(:,:,jk)
              vb(:,:,jk) = vn(:,:,jk)
              un(:,:,jk) = ua(:,:,jk)
              vn(:,:,jk) = va(:,:,jk)
-         ELSE                                           ! Leap-frog time stepping
+         ELSE                                                                    ! Leap-frog time stepping
              ub(:,:,jk) = atfp * ( ub(:,:,jk) + ua(:,:,jk) ) + atfp1 * un(:,:,jk)
              vb(:,:,jk) = atfp * ( vb(:,:,jk) + va(:,:,jk) ) + atfp1 * vn(:,:,jk)
Index: /branches/nemo_v3_3_beta/NEMOGCM/NEMO/C1D_SRC/step_c1d.F90
===================================================================
--- /branches/nemo_v3_3_beta/NEMOGCM/NEMO/C1D_SRC/step_c1d.F90	(revision 2381)
+++ /branches/nemo_v3_3_beta/NEMOGCM/NEMO/C1D_SRC/step_c1d.F90	(revision 2382)
@@ -13,48 +13,11 @@
    !!   stp_c1d        : NEMO system time-stepping in c1d case
    !!----------------------------------------------------------------------
-   USE oce             ! ocean dynamics and tracers variables
-   USE dom_oce         ! ocean space and time domain variables 
-   USE zdf_oce         ! ocean vertical physics variables
-   USE in_out_manager  ! I/O manager
-   USE iom             !
-   USE lbclnk
-
-   USE daymod          ! calendar                         (day     routine)
-
-   USE dtatem          ! ocean temperature data           (dta_tem routine)
-   USE dtasal          ! ocean salinity    data           (dta_sal routine)
-   USE sbcmod          ! surface boundary condition       (sbc     routine)
-   USE sbcrnf          ! surface boundary condition: runoff variables
-
-   USE trcstp          ! passive tracer time-stepping      (trc_stp routine)
-
-   USE traqsr          ! solar radiation penetration      (tra_qsr routine)
-   USE trasbc          ! surface boundary condition       (tra_sbc routine)
-   !   zdfkpp          ! KPP non-local tracer fluxes      (tra_kpp routine)
-   USE trazdf          ! vertical mixing                  (tra_zdf routine)
-   USE tranxt          ! time-stepping                    (tra_nxt routine)
-   USE tranpc          ! non-penetrative convection       (tra_npc routine)
-
-   USE eosbn2          ! equation of state                (eos_bn2 routine)
-
+   USE step_oce         ! time stepping definition modules 
+#if defined key_top
+   USE trcstp           ! passive tracer time-stepping      (trc_stp routine)
+#endif
    USE dyncor_c1d      ! Coriolis term (c1d case)         (dyn_cor_1d     )
-   USE dynzdf          ! vertical diffusion               (dyn_zdf routine)
    USE dynnxt_c1d      ! time-stepping                    (dyn_nxt routine)
    USE diawri_c1d      ! write outputs                (dia_wri_c1d routine)
-
-   USE zdfbfr          ! bottom friction                  (zdf_bfr routine)
-   USE zdftke          ! TKE vertical mixing              (zdf_tke routine)
-   USE zdfkpp          ! KPP vertical mixing              (zdf_kpp routine)
-   USE zdfddm          ! double diffusion mixing          (zdf_ddm routine)
-   USE zdfevd          ! enhanced vertical diffusion      (zdf_evd routine)
-   USE zdfric          ! Richardson vertical mixing       (zdf_ric routine)
-   USE zdfmxl          ! Mixed-layer depth                (zdf_mxl routine)
-
-
-   USE diawri          ! Standard run outputs             (dia_wri routine)
-
-   USE stpctl          ! time stepping control            (stp_ctl routine)
-   USE restart         ! ocean restart                    (rst_wri routine)
-   USE prtctl          ! Print control                    (prt_ctl routine)
 
    IMPLICIT NONE
@@ -69,7 +32,6 @@
    !! NEMO/C1D 3.3 , NEMO Consortium (2010)
    !! $Id$
-   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
-
 CONTAINS
 
@@ -96,53 +58,54 @@
       !! ---------------------------------------------------------------------
 
-      indic = 1                    ! reset to no error condition
-
-      CALL day( kstp )             ! Calendar
-
-      CALL rst_opn( kstp )         ! Open the restart file
+                             indic = 0                ! reset to no error condition
+      IF( kstp /= nit000 )   CALL day( kstp )         ! Calendar (day was already called at nit000 in day_init)
+                             CALL iom_setkt( kstp )   ! say to iom that we are at time step kstp
 
       !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
       ! Update data, open boundaries, surface boundary condition (including sea-ice)
       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-
       IF( lk_dtatem  )   CALL dta_tem( kstp )         ! update 3D temperature data
       IF( lk_dtasal  )   CALL dta_sal( kstp )         ! update 3D salinity data
-
                          CALL sbc    ( kstp )         ! Sea Boundary Condition (including sea-ice)
 
-      IF( ninist == 1 ) THEN                          ! Output the initial state and forcings
-                        CALL dia_wri_state( 'output.init', kstp )   ;   ninist = 0
+      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+      ! Ocean physics update                (ua, va, ta, sa used as workspace)
+      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+                         CALL bn2( tsb, rn2b )        ! before Brunt-Vaisala frequency
+                         CALL bn2( tsn, rn2  )        ! now    Brunt-Vaisala frequency
+      !  VERTICAL PHYSICS   
+                         CALL zdf_bfr( kstp )         ! bottom friction
+      !                                               ! Vertical eddy viscosity and diffusivity coefficients
+      IF( lk_zdfric  )   CALL zdf_ric( kstp )            ! Richardson number dependent Kz
+      IF( lk_zdftke  )   CALL zdf_tke( kstp )            ! TKE closure scheme for Kz
+      IF( lk_zdfgls  )   CALL zdf_gls( kstp )            ! GLS closure scheme for Kz
+      IF( lk_zdfkpp  )   CALL zdf_kpp( kstp )            ! KPP closure scheme for Kz
+      IF( lk_zdfcst  )   THEN                            ! Constant Kz (reset avt, avm[uv] to the background value)
+         avt (:,:,:) = rn_avt0 * tmask(:,:,:)
+         avmu(:,:,:) = rn_avm0 * umask(:,:,:)
+         avmv(:,:,:) = rn_avm0 * vmask(:,:,:)
       ENDIF
 
+      IF( ln_rnf_mouth ) THEN                         ! increase diffusivity at rivers mouths
+         DO jk = 2, nkrnf   ;   avt(:,:,jk) = avt(:,:,jk) + 2.e0 * rn_avt_rnf * rnfmsk(:,:)   ;   END DO
+      ENDIF
+      IF( ln_zdfevd  )   CALL zdf_evd( kstp )         ! enhanced vertical eddy diffusivity
+
+      IF( lk_zdftmx  )   CALL zdf_tmx( kstp )         ! tidal vertical mixing
+
+      IF( lk_zdfddm .AND. .NOT. lk_zdfkpp )   &
+         &               CALL zdf_ddm( kstp )         ! double diffusive mixing
+         
+                         CALL zdf_mxl( kstp )         ! mixed layer depth
+
+                                                      ! write tke information in the restart file
+      IF( lrst_oce .AND. lk_zdftke )   CALL tke_rst( kstp, 'WRITE' )
+                                                      ! write gls information in the restart file
+      IF( lrst_oce .AND. lk_zdfgls )   CALL gls_rst( kstp, 'WRITE' )
 
       !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-      ! Ocean physics update
+      ! diagnostics and outputs             (ua, va, ta, sa used as workspace)
       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-      !-----------------------------------------------------------------------
-      !  VERTICAL PHYSICS
-      !-----------------------------------------------------------------------
-      ! N.B. ua, va, ta, sa arrays are used as workspace in this section
-      !-----------------------------------------------------------------------
-
-                        CALL bn2( tb, sb, rn2 )             ! before Brunt-Vaisala frequency
-      
-      !                                                     ! Vertical eddy viscosity and diffusivity coefficients
-      IF( lk_zdfric )   CALL zdf_ric( kstp )                     ! Richardson number dependent Kz
-      IF( lk_zdftke )   CALL zdf_tke( kstp )                     ! TKE closure scheme for Kz
-      IF( lk_zdfkpp )   CALL zdf_kpp( kstp )                     ! KPP closure scheme for Kz
-      IF( lk_zdfcst )   THEN                                     ! Constant Kz (reset avt, avm to the background value)
-         avt (:,:,:) = avt0 * tmask(:,:,:)
-         avmu(:,:,:) = avm0 * umask(:,:,:)
-         avmv(:,:,:) = avm0 * vmask(:,:,:)
-      ENDIF
-
-      IF( ln_rnf_mouth ) THEN                                ! increase diffusivity at rivers mouths
-         DO jk = 2, nkrnf   ;   avt(:,:,jk) = avt(:,:,jk) + 2.e0 * rn_avt_rnf * rnfmsk(:,:)   ;   END DO
-      ENDIF
-      IF( ln_zdfevd )   CALL zdf_evd( kstp )                 ! enhanced vertical eddy diffusivity
-      IF( lk_zdfddm .AND. .NOT. lk_zdfkpp )   &
-         &              CALL zdf_ddm( kstp )                 ! double diffusive mixing
-                        CALL zdf_bfr( kstp )                 ! bottom friction
-                        CALL zdf_mxl( kstp )                 ! mixed layer depth
+                         CALL dia_wri_c1d( kstp, indic )       ! ocean model: outputs
 
 #if defined key_top
@@ -150,29 +113,24 @@
       ! Passive Tracer Model
       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-      ! N.B. ua, va, ta, sa arrays are used as workspace in this section
-      !-----------------------------------------------------------------------
-                             CALL trc_stp( kstp, indic )            ! time-stepping
+                         CALL trc_stp( kstp, indic )            ! time-stepping
 #endif
 
       !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-      ! Active tracers
+      ! Active tracers                              (ua, va used as workspace)
       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-      ! N.B. ua, va arrays are used as workspace in this section
-      !-----------------------------------------------------------------------
                              tsa(:,:,:,:) = 0.e0                ! set tracer trends to zero
 
                              CALL tra_sbc    ( kstp )        ! surface boundary condition
       IF( ln_traqsr      )   CALL tra_qsr    ( kstp )        ! penetrative solar radiation qsr
-      IF( lk_zdfkpp )        CALL tra_kpp    ( kstp )        ! KPP non-local tracer fluxes
+      IF( lk_zdfkpp      )   CALL tra_kpp    ( kstp )        ! KPP non-local tracer fluxes
                              CALL tra_zdf    ( kstp )        ! vertical mixing
                              CALL tra_nxt    ( kstp )        ! tracer fields at next time step
       IF( ln_zdfnpc      )   CALL tra_npc    ( kstp )        ! applied non penetrative convective adjustment on (t,s)
-                             CALL eos( tsb, rhd, rhop )   ! now (swap=before) in situ density for dynhpg module
+                             CALL eos( tsb, rhd, rhop )      ! now (swap=before) in situ density for dynhpg module
+                             CALL tra_unswap                 ! udate T & S 3D arrays  (to be suppressed)
 
       !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-      ! Dynamics
+      ! Dynamics                                    (ta, sa used as workspace)
       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-      ! N.B. ta, sa arrays are used as workspace in this section 
-      !-----------------------------------------------------------------------
                                ua(:,:,:) = 0.e0               ! set dynamics trends to zero
                                va(:,:,:) = 0.e0
@@ -188,12 +146,4 @@
       IF( kstp == nit000     )   CALL iom_close( numror )             ! close input  ocean restart file
       IF( lrst_oce           )   CALL rst_write  ( kstp )             ! write output ocean restart file
-
-      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-      ! diagnostics and outputs
-      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-      ! N.B. ua, va, ta, sa arrays are used as workspace in this section
-      !-----------------------------------------------------------------------
-
-      IF( nstop == 0 )           CALL dia_wri_c1d( kstp, indic )       ! ocean model: outputs
       !
    END SUBROUTINE stp_c1d
Index: /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90
===================================================================
--- /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90	(revision 2381)
+++ /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90	(revision 2382)
@@ -11,4 +11,5 @@
    !!   NEMO     1.0  !  2002-08  (G. Madec)  F90: Free form and module
    !!            2.0  !  2005-11  (V. Garnier) Surface pressure gradient organization
+   !!            3.3  !  2010-11  (G. Madec)  initialisation in C1D configuration
    !!----------------------------------------------------------------------
    
@@ -18,6 +19,6 @@
    !!   dom_ctl        : control print for the ocean domain
    !!----------------------------------------------------------------------
-   USE oce             ! 
-   USE dom_oce         ! ocean space and time domain
+   USE oce             ! ocean variables
+   USE dom_oce         ! domain: ocean
    USE sbc_oce         ! surface boundary condition: ocean
    USE phycst          ! physical constants
@@ -32,4 +33,7 @@
    USE domwri          ! domain: write the meshmask file
    USE domvvl          ! variable volume
+#if defined key_c1d
+   USE dyncor_c1d      ! Coriolis term (c1d case)         (cor_c1d routine)
+#endif
 
    IMPLICIT NONE
@@ -43,7 +47,6 @@
    !! NEMO/OPA 3.3 , NEMO Consortium (2010)
    !! $Id$
-   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
+   !! Software governed by the CeCILL licence        (NEMOGCM/NEMO_CeCILL.txt)
    !!-------------------------------------------------------------------------
-
 CONTAINS
 
@@ -62,4 +65,5 @@
       !!              - dom_stp: defined the model time step
       !!              - dom_wri: create the meshmask file if nmsh=1
+      !!              - "key_c1d": 1D configuration, move Coriolis, u and v at T-point
       !!----------------------------------------------------------------------
       INTEGER ::   jk                ! dummy loop argument
@@ -79,4 +83,11 @@
                              CALL dom_msk      ! Masks
       IF( lk_vvl         )   CALL dom_vvl      ! Vertical variable mesh
+      !
+#if defined key_c1d
+      !                                        ! 1D configuration ("key_c1d")
+      CALL cor_c1d                                 ! Coriolis set at T-point
+      umask(:,:,:) = tmask(:,:,:)                  ! U, V moved at T-point
+      vmask(:,:,:) = tmask(:,:,:)
+#endif
       !
       hu(:,:) = 0.e0                           ! Ocean depth at U- and V-points
@@ -188,5 +199,5 @@
 #endif
 
-      REWIND( numnam )             ! Namelist namdom : space & time domain (bathymetry, mesh, timestep)
+      REWIND( numnam )              ! Namelist namdom : space & time domain (bathymetry, mesh, timestep)
       READ  ( numnam, namdom )
 
@@ -224,5 +235,5 @@
       nclosea   = nn_closea
 
-      REWIND( numnam )             ! Namelist cross land advection
+      REWIND( numnam )              ! Namelist cross land advection
       READ  ( numnam, namcla )
       IF(lwp) THEN
@@ -238,8 +249,8 @@
 
 #if defined key_netcdf4
-
-      REWIND( numnam )              ! Namelist namnc4 : netcdf4 chunking parameters
+      !                             ! NetCDF 4 case   ("key_netcdf4" defined)
+      REWIND( numnam )                    ! Namelist namnc4 : netcdf4 chunking parameters
       READ  ( numnam, namnc4 )
-      IF(lwp) THEN
+      IF(lwp) THEN                        ! control print
          WRITE(numout,*)
          WRITE(numout,*) '   Namelist namnc4 - Netcdf4 chunking parameters'
@@ -256,10 +267,8 @@
       snc4set%nk   = nn_nchunks_k
       snc4set%luse = ln_nc4zip
-
 #else
-
-      snc4set%luse = .FALSE.
- 
-#endif
+      snc4set%luse = .FALSE.        ! No NetCDF 4 case
+#endif
+      !
    END SUBROUTINE dom_nam
 
Index: /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90
===================================================================
--- /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90	(revision 2381)
+++ /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90	(revision 2382)
@@ -37,17 +37,17 @@
    !!   tke_rst      : read/write tke restart in ocean restart file
    !!----------------------------------------------------------------------
-   USE oce            ! ocean dynamics and active tracers 
-   USE dom_oce        ! ocean space and time domain
-   USE domvvl         ! ocean space and time domain : variable volume layer
-   USE zdf_oce        ! ocean vertical physics
+   USE oce            ! ocean: dynamics and active tracers variables
+   USE phycst         ! physical constants
+   USE dom_oce        ! domain: ocean
+   USE domvvl         ! domain: variable volume layer
    USE sbc_oce        ! surface boundary condition: ocean
-   USE phycst         ! physical constants
-   USE zdfmxl         ! mixed layer
-   USE restart        ! only for lrst_oce
+   USE zdf_oce        ! vertical physics: ocean variables
+   USE zdfmxl         ! vertical physics: mixed layer
+   USE zdfbfr         ! vertical mixing: bottom friction
+   USE restart        ! ocean restart
    USE lbclnk         ! ocean lateral boundary conditions (or mpp link)
    USE prtctl         ! Print control
    USE in_out_manager ! I/O manager
    USE iom            ! I/O manager library
-   USE zdfbfr          ! bottom friction
 
    IMPLICIT NONE
@@ -180,6 +180,6 @@
       !!
       INTEGER  ::   ji, jj, jk                      ! dummy loop arguments
-!!$      INTEGER  ::   ikbu, ikbv, ikbum1, ikbvm1      ! temporary scalar
-!!$      INTEGER  ::   ikbt, ikbumm1, ikbvmm1          ! temporary scalar
+!!bfr      INTEGER  ::   ikbu, ikbv, ikbum1, ikbvm1      ! temporary scalar
+!!bfr      INTEGER  ::   ikbt, ikbumm1, ikbvmm1          ! temporary scalar
       REAL(wp) ::   zrhoa  = 1.22                   ! Air density kg/m3
       REAL(wp) ::   zcdrag = 1.5e-3                 ! drag coefficient
@@ -190,5 +190,5 @@
       REAL(wp) ::   zus   , zwlc  , zind            !    -         -
       REAL(wp) ::   zzd_up, zzd_lw                  !    -         -
-!!$      REAL(wp) ::   zebot                           !    -         -
+!!bfr      REAL(wp) ::   zebot                           !    -         -
       INTEGER , DIMENSION(jpi,jpj)     ::   imlc    ! 2D workspace
       REAL(wp), DIMENSION(jpi,jpj)     ::   zhlc    !  -      -
@@ -209,5 +209,6 @@
          END DO
       END DO
-      !
+      
+!!bfr   - start commented area
       !                     !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
       !                     !  Bottom boundary condition on tke
@@ -219,5 +220,4 @@
       ! computational cost is justified
       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-      !
       !                     en(bot)   = (rn_ebb0/rau0)*0.5*sqrt(u_botfr^2+v_botfr^2) (min value rn_emin)
 !CDIR NOVERRCHK
@@ -242,5 +242,5 @@
 !!       END DO
 !!    END DO
-      !
+!!bfr   - end commented area
       !
       !                     !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
@@ -275,7 +275,4 @@
             END DO
          END DO
-# if defined key_c1d
-         hlc(:,:) = zhlc(:,:) * tmask(:,:,1)      ! c1d configuration: save finite Langmuir Circulation depth
-# endif
          zcof = 0.016 / SQRT( zrhoa * zcdrag )
 !CDIR NOVERRCHK
Index: /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/opa.F90
===================================================================
--- /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/opa.F90	(revision 2381)
+++ /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/opa.F90	(revision 2382)
@@ -36,5 +36,5 @@
    !!----------------------------------------------------------------------
 
-   USE step_oce        ! Time stepping module definition
+   USE step_oce        ! module used in the ocean time stepping module
    USE sbc_oce         ! surface boundary condition: ocean
    USE domcfg          ! domain configuration               (dom_cfg routine)
@@ -103,5 +103,5 @@
       INTEGER ::   istp       ! time step index
       !!----------------------------------------------------------------------
-
+      !
 #if defined key_agrif
       CALL Agrif_Init_Grids()      ! AGRIF: set the meshes
@@ -247,12 +247,5 @@
       ELSE                            ;   CALL mpp_init2     ! eliminate land processors
       ENDIF
-!!gm c1d case can be moved in dom_init routine
-#if defined key_c1d
-         CALL cor_c1d                            ! Coriolis defined at T-point
-         umask(:,:,:) = tmask(:,:,:)             ! U, V and T-points are the same
-         vmask(:,:,:) = tmask(:,:,:)             ! 
-#endif
-!!gm c1d end
-
+      !
       !                                      ! General initialization
                             CALL     phy_cst    ! Physical constants
@@ -307,5 +300,5 @@
                             CALL     trc_init
 #endif
-      !                                     ! diagnostics
+      !                                     ! Diagnostics
                             CALL     iom_init   ! iom_put initialization
       IF( lk_floats    )    CALL     flo_init   ! drifting Floats
@@ -314,11 +307,11 @@
                             CALL dia_hsb_init   ! heat content, salt content and volume budgets
                             CALL trd_mod_init   ! Mixed-layer/Vorticity/Integral constraints trends
-      IF( lk_diaobs    ) THEN
-         CALL dia_obs_init                  ! Initialize observational data
-         CALL dia_obs( nit000 - 1 )         ! Observation operator for restart
+      IF( lk_diaobs    ) THEN                   ! Observation & model comparison
+                            CALL dia_obs_init            ! Initialize observational data
+                            CALL dia_obs( nit000 - 1 )   ! Observation operator for restart
       ENDIF      
-      IF( lk_asminc    )    CALL asm_inc_init     ! Initialize assimilation increments
-      IF(lwp) WRITE(numout,*)'Euler time step switch is ', neuler
-
+      !                                     ! Assimilation increments
+      IF( lk_asminc    )    CALL asm_inc_init   ! Initialize assimilation increments
+      IF(lwp) WRITE(numout,*) 'Euler time step switch is ', neuler
       !
    END SUBROUTINE opa_init
Index: /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/step.F90
===================================================================
--- /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 2381)
+++ /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 2382)
@@ -32,12 +32,8 @@
    USE trcstp           ! passive tracer time-stepping      (trc_stp routine)
 #endif
+#if defined key_agrif
+   USE agrif_opa_sponge ! Momemtum and tracers sponges
+#endif
    USE asminc           ! assimilation increments    (tra_asm_inc, dyn_asm_inc routines)
-   USE stpctl           ! time stepping control            (stp_ctl routine)
-   USE restart          ! ocean restart                    (rst_wri routine)
-   USE prtctl           ! Print control                    (prt_ctl routine)
-
-#if defined key_agrif
-   USE agrif_opa_sponge ! Momemtum and tracers sponges
-#endif
 
    IMPLICIT NONE
@@ -116,10 +112,11 @@
       !  VERTICAL PHYSICS   
                          CALL zdf_bfr( kstp )         ! bottom friction
+                         
       !                                               ! Vertical eddy viscosity and diffusivity coefficients
-      IF( lk_zdfric     )   CALL zdf_ric    ( kstp )  ! Richardson number dependent Kz
-      IF( lk_zdftke     )   CALL zdf_tke    ( kstp )  ! TKE closure scheme for Kz
-      IF( lk_zdfgls     )   CALL zdf_gls    ( kstp )  ! GLS closure scheme for Kz
-      IF( lk_zdfkpp     )   CALL zdf_kpp    ( kstp )  ! KPP closure scheme for Kz
-      IF( lk_zdfcst     )   THEN                      ! Constant Kz (reset avt, avm[uv] to the background value)
+      IF( lk_zdfric  )   CALL zdf_ric( kstp )            ! Richardson number dependent Kz
+      IF( lk_zdftke  )   CALL zdf_tke( kstp )            ! TKE closure scheme for Kz
+      IF( lk_zdfgls  )   CALL zdf_gls( kstp )            ! GLS closure scheme for Kz
+      IF( lk_zdfkpp  )   CALL zdf_kpp( kstp )            ! KPP closure scheme for Kz
+      IF( lk_zdfcst  )   THEN                            ! Constant Kz (reset avt, avm[uv] to the background value)
          avt (:,:,:) = rn_avt0 * tmask(:,:,:)
          avmu(:,:,:) = rn_avm0 * umask(:,:,:)
@@ -135,9 +132,9 @@
       IF( lk_zdfddm .AND. .NOT. lk_zdfkpp )   &
          &               CALL zdf_ddm( kstp )         ! double diffusive mixing
+         
                          CALL zdf_mxl( kstp )         ! mixed layer depth
 
-                                                      ! write tke information in the restart file
+                                                      ! write TKE or GLS information in the restart file
       IF( lrst_oce .AND. lk_zdftke )   CALL tke_rst( kstp, 'WRITE' )
-                                                      ! write gls information in the restart file
       IF( lrst_oce .AND. lk_zdfgls )   CALL gls_rst( kstp, 'WRITE' )
       !
@@ -156,5 +153,5 @@
 #if defined key_traldf_c2d
       IF( lk_traldf_eiv )   CALL ldf_eiv( kstp )      ! eddy induced velocity coefficient
-#  endif
+#endif
 
       !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -179,5 +176,5 @@
       ! Active tracers                              (ua, va used as workspace)
       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-                             tsa(:,:,:,:) = 0.e0               ! set tracer trends to zero
+                             tsa(:,:,:,:) = 0.e0            ! set tracer trends to zero
 
       IF(  ln_asmiau .AND. &
@@ -190,5 +187,5 @@
                              CALL tra_adv    ( kstp )       ! horizontal & vertical advection
       IF( n_cla == 1     )   CALL tra_cla    ( kstp )       ! Cross Land Advection (Update Hor. advection)
-      IF( lk_zdfkpp )        CALL tra_kpp    ( kstp )       ! KPP non-local tracer fluxes
+      IF( lk_zdfkpp      )   CALL tra_kpp    ( kstp )       ! KPP non-local tracer fluxes
                              CALL tra_ldf    ( kstp )       ! lateral mixing
 #if defined key_agrif
@@ -213,5 +210,5 @@
                              CALL tra_nxt    ( kstp )       ! tracer fields at next time step
       ENDIF 
-                             CALL tra_unswap
+                             CALL tra_unswap                ! udate T & S 3D arrays  (to be suppressed)
 
       !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -222,5 +219,5 @@
 
       IF(  ln_asmiau .AND. &
-         & ln_dyninc     )     CALL dyn_asm_inc( kstp )       ! apply dynamics assimilation increment
+         & ln_dyninc       )   CALL dyn_asm_inc( kstp )     ! apply dynamics assimilation increment
                                CALL dyn_adv( kstp )         ! advection (vector or flux form)
                                CALL dyn_vor( kstp )         ! vorticity term including Coriolis
@@ -230,5 +227,5 @@
 #endif
                                CALL dyn_hpg( kstp )         ! horizontal gradient of Hydrostatic pressure
-                               CALL dyn_bfr( kstp )           ! bottom friction   
+                               CALL dyn_bfr( kstp )         ! bottom friction   
                                CALL dyn_zdf( kstp )         ! vertical diffusion
                                CALL dyn_spg( kstp, indic )  ! surface pressure gradient
Index: /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/step_oce.F90
===================================================================
--- /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/step_oce.F90	(revision 2381)
+++ /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/step_oce.F90	(revision 2382)
@@ -2,10 +2,7 @@
    !!======================================================================
    !!                       ***  MODULE step_oce  ***
-   !! Time-stepping    : module used for the ocean time stepping
+   !! Ocean time-stepping : module used in both initialisation phase and time stepping
    !!======================================================================
-   !!----------------------------------------------------------------------
-   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
-   !! $Id$
-   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
+   !! History :   3.3  ! 2010-08  (C. Ethe)  Original code - reorganisation of the initial phase
    !!----------------------------------------------------------------------
    USE oce              ! ocean dynamics and tracers variables
@@ -103,4 +100,8 @@
    USE agrif_opa_sponge ! Momemtum and tracers sponges
 #endif
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   !! $Id$
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
    !!======================================================================
 END MODULE step_oce
