Index: /trunk/NEMO/OPA_SRC/opa.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/opa.F90	(revision 1592)
+++ /trunk/NEMO/OPA_SRC/opa.F90	(revision 1593)
@@ -4,4 +4,26 @@
    !! Ocean system   : OPA ocean dynamics (including on-line tracers and sea-ice)
    !!==============================================================================
+   !! History :  OPA  ! 1990-10  (C. Levy, G. Madec)  Original code
+   !!            7.0  ! 1991-11  (M. Imbard, C. Levy, G. Madec)
+   !!            7.1  ! 1993-03  (M. Imbard, C. Levy, G. Madec, O. Marti, M. Guyon, A. Lazar, 
+   !!                             P. Delecluse, C. Perigaud, G. Caniaux, B. Colot, C. Maes )  release 7.1 
+   !!             -   ! 1992-06  (L.Terray)  coupling implementation
+   !!             -   ! 1993-11  (M.A. Filiberti) IGLOO sea-ice 
+   !!            8.0  ! 1996-03  (M. Imbard, C. Levy, G. Madec, O. Marti, M. Guyon, A. Lazar, 
+   !!                             P. Delecluse, L.Terray, M.A. Filiberti, J. Vialar, A.M. Treguier, M. Levy)  release 8.0
+   !!            8.1  ! 1997-06  (M. Imbard, G. Madec)
+   !!            8.2  ! 1999-11  (M. Imbard, H. Goosse)  LIM sea-ice model 
+   !!                 ! 1999-12  (V. Thierry, A-M. Treguier, M. Imbard, M-A. Foujols)  OPEN-MP 
+   !!                 ! 2000-07  (J-M Molines, M. Imbard)  Open Boundary Conditions  (CLIPPER)
+   !!   NEMO     1.0  ! 2002-08  (G. Madec)  F90: Free form and modules
+   !!             -   ! 2004-06  (R. Redler, NEC CCRLE, Germany) add OASIS[3/4] coupled interfaces
+   !!             -   ! 2004-08  (C. Talandier) New trends organization
+   !!             -   ! 2005-06  (C. Ethe) Add the 1D configuration possibility
+   !!             -   ! 2005-11  (V. Garnier) Surface pressure gradient organization
+   !!             -   ! 2006-03  (L. Debreu, C. Mazauric)  Agrif implementation
+   !!             -   ! 2006-04  (G. Madec, R. Benshila)  Step reorganization
+   !!             -   ! 2007-07  (J. Chanut, A. Sellar) Unstructured open boundaries (BDY)
+   !!            3.2  ! 2009-08  (S. Masson)  open/write in the listing file in mpp
+   !!----------------------------------------------------------------------
 
    !!----------------------------------------------------------------------
@@ -11,30 +33,4 @@
    !!   opa_closefile  : close remaining files
    !!----------------------------------------------------------------------
-   !! History :
-   !!   4.0  !  90-10  (C. Levy, G. Madec)  Original code
-   !!   7.0  !  91-11  (M. Imbard, C. Levy, G. Madec)
-   !!   7.1  !  93-03  (M. Imbard, C. Levy, G. Madec, O. Marti,
-   !!                   M. Guyon, A. Lazar, P. Delecluse, C. Perigaud,
-   !!                   G. Caniaux, B. Colot, C. Maes ) release 7.1 
-   !!        !  92-06  (L.Terray) coupling implementation
-   !!        !  93-11  (M.A. Filiberti) IGLOO sea-ice 
-   !!   8.0  !  96-03  (M. Imbard, C. Levy, G. Madec, O. Marti,
-   !!                   M. Guyon, A. Lazar, P. Delecluse, L.Terray,
-   !!                   M.A. Filiberti, J. Vialar, A.M. Treguier,
-   !!                   M. Levy)  release 8.0
-   !!   8.1  !  97-06  (M. Imbard, G. Madec)
-   !!   8.2  !  99-11  (M. Imbard, H. Goosse)  LIM sea-ice model 
-   !!        !  99-12  (V. Thierry, A-M. Treguier, M. Imbard, M-A. Foujols)  OPEN-MP 
-   !!        !  00-07  (J-M Molines, M. Imbard)  Open Boundary Conditions  (CLIPPER)
-   !!   9.0  !  02-08  (G. Madec)  F90: Free form and modules
-   !!    "   !  04-06  (R. Redler, NEC CCRLE, Germany) add OASIS[3/4] coupled interfaces
-   !!    "   !  04-08  (C. Talandier) New trends organization
-   !!    "   !  05-06  (C. Ethe) Add the 1D configuration possibility
-   !!    "   !  05-11  (V. Garnier) Surface pressure gradient organization
-   !!    "   !  06-03  (L. Debreu, C. Mazauric)  Agrif implementation
-   !!    "   !  06-04  (G. Madec, R. Benshila)  Step reorganization
-   !!    "   !  07-07  (J. Chanut, A. Sellar) Unstructured open boundaries (BDY)
-   !!----------------------------------------------------------------------
-   !! * Modules used
    USE oce             ! dynamics and tracers variables
    USE dom_oce         ! ocean space domain variables
@@ -42,7 +38,4 @@
    USE trdmod_oce      ! ocean variables trends
    USE daymod          ! calendar
-   USE in_out_manager  ! I/O manager
-   USE lib_mpp         ! distributed memory computing
-
    USE domcfg          ! domain configuration               (dom_cfg routine)
    USE mppini          ! shared/distributed memory setting (mpp_init routine)
@@ -53,17 +46,11 @@
    USE bdyini          ! unstructured open boundary cond. initialization (bdy_init routine)
    USE istate          ! initial state setting          (istate_init routine)
-   USE eosbn2          ! equation of state            (eos bn2 routine)
-   USE zpshde          ! partial step: hor. derivative (zps_hde routine)
-
-   ! ocean physics
+   USE eosbn2          ! equation of state                 (eos_init routine)
    USE ldfdyn          ! lateral viscosity setting      (ldfdyn_init routine)
    USE ldftra          ! lateral diffusivity setting    (ldftra_init routine)
    USE zdfini
-
    USE phycst          ! physical constant                  (par_cst routine)
    USE trdmod          ! momentum/tracers trends       (trd_mod_init routine)
-
    USE diaptr          ! poleward transports           (dia_ptr_init routine)
-
    USE step            ! OPA time-stepping                  (stp     routine)
 #if defined key_oasis3
@@ -77,7 +64,9 @@
    USE dyncor_c1d      ! Coriolis factor at T-point
    USE step_c1d        ! Time stepping loop for the 1D configuration
-
-   USE trcini          ! Initialization of the passive tracers
+   USE trcini          ! passive tracer initialisation
+   
    USE iom
+   USE in_out_manager  ! I/O manager
+   USE lib_mpp         ! distributed memory computing
 #if defined key_iomput
    USE mod_ioclient
@@ -87,13 +76,11 @@
    PRIVATE
 
-   !! * Module variables
-   CHARACTER (len=64) ::        &
-      cform_aaa="( /, 'AAAAAAAA', / ) "     ! flag for output listing
-
-   !! * Routine accessibility
-   PUBLIC opa_model      ! called by model.F90
-   PUBLIC opa_init
-   !!----------------------------------------------------------------------
-   !!  OPA 9.0 , LOCEAN-IPSL (2005) 
+   PUBLIC   opa_model   ! called by model.F90
+   PUBLIC   opa_init    ! needed by AGRIF
+
+   CHARACTER (len=64) ::   cform_aaa="( /, 'AAAAAAAA', / ) "     ! flag for output listing
+
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) 
    !! $Id$
    !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
@@ -107,12 +94,12 @@
       !!
       !! ** Purpose :   opa solves the primitive equations on an orthogonal 
-      !!      curvilinear mesh on the sphere.
+      !!              curvilinear mesh on the sphere.
       !!
       !! ** Method  : - model general initialization
       !!              - launch the time-stepping (stp routine)
-      !!
-      !! References :
-      !!      Madec, Delecluse,Imbard, and Levy, 1997: reference manual.
-      !!              internal report, IPSL.
+      !!              - finalize the run by closing files and communications
+      !!
+      !! References : Madec, Delecluse,Imbard, and Levy, 1997:  internal report, IPSL.
+      !!              Madec, 2008, internal report, IPSL.
       !!----------------------------------------------------------------------
       INTEGER ::   istp       ! time step index
@@ -120,8 +107,10 @@
 
 #if defined key_agrif
-      CALL Agrif_Init_Grids()
-#endif
-      
-      CALL opa_init  ! Initializations
+      CALL Agrif_Init_Grids()      ! AGRIF: set the meshes
+#endif
+
+      !                            !-----------------------!
+      CALL opa_init                !==  Initialisations  ==!
+      !                            !-----------------------!
 
       ! check that all process are still there... If some process have an error,
@@ -129,18 +118,21 @@
       IF( lk_mpp )   CALL mpp_max( nstop )
 
+      IF(lwp) WRITE(numout,cform_aaa)   ! Flag AAAAAAA
+
+      !                            !-----------------------!
+      !                            !==   time stepping   ==!
+      !                            !-----------------------!
       istp = nit000
-      IF( lk_c1d ) THEN                 ! 1D configuration (no AGRIF zoom)
-         !
+      IF( lk_c1d ) THEN                 !==  1D configuration  ==!
          DO WHILE ( istp <= nitend .AND. nstop == 0 )
             CALL stp_c1d( istp )
             istp = istp + 1
          END DO
-      ELSE                              ! 3D ocean with or without AGRIF zoom
-         !
+      ELSE                              !==  3D ocean with  ==!
          DO WHILE ( istp <= nitend .AND. nstop == 0 )
 #if defined key_agrif
-            CALL Agrif_Step( stp )
+            CALL Agrif_Step( stp )           ! AGRIF: time stepping
 #else
-            CALL stp( istp )
+            CALL stp( istp )                 ! standard time stepping
 #endif
             istp = istp + 1
@@ -148,20 +140,20 @@
          END DO
       ENDIF
-      !                                     ! ========= !
-      !                                     !  Job end  !
-      !                                     ! ========= !
-
-      IF(lwp) WRITE(numout,cform_aaa)       ! Flag AAAAAAA
-
-      IF( nstop /= 0 .AND. lwp ) THEN                 ! error print
+       
+      !                            !------------------------!
+      !                            !==  finalize the run  ==!
+      !                            !------------------------!
+      IF(lwp) WRITE(numout,cform_aaa)   ! Flag AAAAAAA
+      !
+      IF( nstop /= 0 .AND. lwp ) THEN   ! error print
          WRITE(numout,cform_err)
          WRITE(numout,*) nstop, ' error have been found' 
       ENDIF
-
+      !
       CALL opa_closefile
 #if defined key_oasis3 || defined key_oasis4
-      call cpl_prism_finalize
+      CALL cpl_prism_finalize           ! end coupling and mpp communications with OASIS
 #else
-      IF( lk_mpp )   CALL mppstop                          ! Close all files (mpp)
+      IF( lk_mpp )   CALL mppstop       ! end mpp communications
 #endif
       !
@@ -177,122 +169,101 @@
       !!----------------------------------------------------------------------
 #if defined key_oasis3 || defined key_oasis4 || defined key_iomput
-      INTEGER :: localComm
+      INTEGER :: ilocal_comm
 #endif
       CHARACTER(len=80),dimension(10) ::   cltxt = ''
-      INTEGER                         :: ji             ! local loop indicees
+      INTEGER                         ::   ji   ! local loop indices
+      !!
       NAMELIST/namctl/ ln_ctl, nprint, nictls, nictle,   &
          &             isplt , jsplt , njctls, njctle, nbench, nbit_cmp
       !!----------------------------------------------------------------------
-
-      ! Namelist namctl : Control prints & Benchmark
+      !
+      !                             ! open Namelist file
       CALL ctl_opn( numnam, 'namelist', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. )
-      READ  ( numnam, namctl )
-
+      !
+      READ( numnam, namctl )        ! Namelist namctl : Control prints & Benchmark
+      !
+      !                             !--------------------------------------------!
+      !                             !  set communicator & select the local node  !
+      !                             !--------------------------------------------!
 #if defined key_iomput
 # if defined key_oasis3 || defined key_oasis4
-      ! nemo local communicator given by oasis
-      CALL cpl_prism_init( localComm )
-      ! io_server will get its communicators (if needed) from oasis (we don't see it)
-      CALL init_ioclient()
+      CALL cpl_prism_init( ilocal_comm )      ! nemo local communicator given by oasis
+      CALL init_ioclient()                    ! io_server will get its communicators (if needed) from oasis (we don't see it)
 # else
-      ! nemo local communicator (used or not) given by the io_server
-      CALL init_ioclient( localcomm )
+      CALL init_ioclient( ilocal_comm )       ! nemo local communicator (used or not) given by the io_server
 # endif
-      ! Nodes selection
-      narea = mynode( cltxt, localComm )
+      narea = mynode( cltxt, ilocal_comm )    ! Nodes selection
+
 #else
 # if defined key_oasis3 || defined key_oasis4
-      ! nemo local communicator given by oasis
-      CALL cpl_prism_init( localComm )
-      ! Nodes selection
-      narea = mynode( cltxt, localComm )
+      CALL cpl_prism_init( ilocal_comm )      ! nemo local communicator given by oasis
+      narea = mynode( cltxt, ilocal_comm )    ! Nodes selection (control print return in cltxt)
 # else
-      ! Nodes selection
-      narea = mynode( cltxt )
+      narea = mynode( cltxt )                 ! Nodes selection (control print return in cltxt)
 # endif
 #endif
-      narea = narea + 1    ! mynode return the rank of proc (0 --> jpnij -1 )
-
-      lwp = narea == 1 .OR. ln_ctl   ! print control
-
-      IF( lwp ) THEN
-         ! open listing and namelist units
+      narea = narea + 1                       ! mynode return the rank of proc (0 --> jpnij -1 )
+
+      lwp = (narea == 1) .OR. ln_ctl          ! control of all listing output print
+
+      IF(lwp) THEN                            ! open listing units
+         !
          CALL ctl_opn( numout, 'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea )
-         
-         WRITE(numout,*)
-         WRITE(numout,*) '                 L O D Y C - I P S L'
-         WRITE(numout,*) '                     O P A model'
+         !
+         WRITE(numout,*)
+         WRITE(numout,*) '         CNRS - NERC - Met OFFICE - MERCATOR-ocean'
+         WRITE(numout,*) '                       NEMO team'
          WRITE(numout,*) '            Ocean General Circulation Model'
-         WRITE(numout,*) '               version OPA 9.0  (2005) '
-         WRITE(numout,*)
-         WRITE(numout,*)
-         DO ji = 1, SIZE(cltxt)
-            IF (TRIM(cltxt(ji)) /= '') WRITE(numout,*) cltxt(ji)
+         WRITE(numout,*) '                  version 3.2  (2009) '
+         WRITE(numout,*)
+         WRITE(numout,*)
+         DO ji = 1, SIZE(cltxt) 
+            IF( TRIM(cltxt(ji)) /= '' )   WRITE(numout,*) cltxt(ji)      ! control print of mynode
          END DO
-
-      ENDIF
-
-      !                                     ! ============================== !
-      !                                     !  Model general initialization  !
-      !                                     ! ============================== !
-
-      IF(lwp) WRITE(numout,cform_aaa)       ! Flag AAAAAAA
+         WRITE(numout,cform_aaa)                                         ! Flag AAAAAAA
+         !
+      ENDIF
+      !                             !--------------------------------!
+      !                             !  Model general initialization  !
+      !                             !--------------------------------!
 
       CALL opa_flg                          ! Control prints & Benchmark
 
                                             ! Domain decomposition
-      IF( jpni*jpnj == jpnij ) THEN
-         CALL mpp_init                          ! standard cutting out
-      ELSE
-         CALL mpp_init2                         ! eliminate land processors
+      IF( jpni*jpnj == jpnij ) THEN   ;   CALL mpp_init      ! standard cutting out
+      ELSE                            ;   CALL mpp_init2     ! eliminate land processors
       ENDIF
       
       CALL phy_cst                          ! Physical constants
-
       CALL eos_init                         ! Equation of state
-
       CALL dom_cfg                          ! Domain configuration
-      
       CALL dom_init                         ! Domain
-
-      IF( lk_c1d    ) THEN                      ! adaptation for 1D configuration 
-         CALL cor_c1d                                ! redefine Coriolis at T-point
-         umask(:,:,:) = tmask(:,:,:)                 ! U, V and T-points are the same
-         vmask(:,:,:) = tmask(:,:,:)                 ! 
-      ENDIF
-
-      IF( ln_ctl    )   CALL prt_ctl_init   ! Print control
-
-      IF( lk_obc    )   CALL obc_init       ! Open boundaries 
-
-      IF( lk_bdy    )   CALL bdy_init       ! Unstructured open boundaries
+!!gm c1d case can be moved in dom_init routine
+      IF( lk_c1d ) THEN                          ! 1D configuration 
+         CALL cor_c1d                            ! Coriolis defined at T-point
+         umask(:,:,:) = tmask(:,:,:)             ! U, V and T-points are the same
+         vmask(:,:,:) = tmask(:,:,:)             ! 
+      ENDIF
+!!gm c1d end
+
+      IF( ln_ctl )   CALL prt_ctl_init      ! Print control
+
+      IF( lk_obc )   CALL obc_init          ! Open boundaries 
+      IF( lk_bdy )   CALL bdy_init          ! Unstructured open boundaries
 
       CALL istate_init                      ! ocean initial state (Dynamics and tracers)
 
       !                                     ! Ocean physics
-
       CALL ldf_dyn_init                         ! Lateral ocean momentum physics
-
       CALL ldf_tra_init                         ! Lateral ocean tracer physics
-
       CALL zdf_init                             ! Vertical ocean physics
 
+      CALL trc_ini                          ! Passive tracers
+
+      !                                     ! diagnostics
+      CALL iom_init( fjulday - adatrj )         ! iom_put initialization
+      CALL dia_ptr_init                         ! Poleward TRansports initialization
       CALL trd_mod_init                         ! Mixed-layer/Vorticity/Integral constraints trends
-
-
-#if defined key_top
-      CALL trc_ini                          ! Passive tracers
-#endif
-
-      CALL dia_ptr_init                     ! Poleward TRansports initialization
-
-      CALL iom_init( fjulday - adatrj )     ! iom_put initialization
-
-      !                                     ! =============== !
-      !                                     !  time stepping  !
-      !                                     ! =============== !
-
-      IF(lwp) WRITE(numout,cform_aaa)       ! Flag AAAAAAA
-
+      !
    END SUBROUTINE opa_init
 
@@ -302,60 +273,49 @@
       !!                     ***  ROUTINE opa  ***
       !!
-      !! ** Purpose :   Initialize logical flags that control the choice of
-      !!      some algorithm or control print
-      !!
-      !! ** Method  :    Read in namilist namflg logical flags
-      !!
-      !! History :
-      !!   9.0  !  03-11  (G. Madec)  Original code
-      !!----------------------------------------------------------------------
-      !! * Local declarations
-
+      !! ** Purpose :   Initialise logical flags that control the choice of
+      !!              some algorithm or control print
+      !!
+      !! ** Method  : - print namctl information
+      !!              - Read in namilist namflg logical flags
+      !!----------------------------------------------------------------------
       NAMELIST/namflg/ ln_dynhpg_imp, nn_dynhpg_rst
       !!----------------------------------------------------------------------
 
-      ! Parameter control and print
-      ! ---------------------------
-      IF(lwp) THEN
+      IF(lwp) THEN                ! Parameter print
          WRITE(numout,*)
          WRITE(numout,*) 'opa_flg: Control prints & Benchmark'
          WRITE(numout,*) '~~~~~~~ '
-         WRITE(numout,*) '          Namelist namctl'
-         WRITE(numout,*) '             run control (for debugging)     ln_ctl    = ', ln_ctl
-         WRITE(numout,*) '             level of print                  nprint    = ', nprint
-         WRITE(numout,*) '             Start i indice for SUM control  nictls    = ', nictls
-         WRITE(numout,*) '             End i indice for SUM control    nictle    = ', nictle
-         WRITE(numout,*) '             Start j indice for SUM control  njctls    = ', njctls
-         WRITE(numout,*) '             End j indice for SUM control    njctle    = ', njctle
-         WRITE(numout,*) '             number of proc. following i     isplt     = ', isplt
-         WRITE(numout,*) '             number of proc. following j     jsplt     = ', jsplt
-         WRITE(numout,*) '             benchmark parameter (0/1)       nbench    = ', nbench
-         WRITE(numout,*) '             bit comparison mode (0/1)       nbit_cmp  = ', nbit_cmp
-      ENDIF
-
-      ! ... Control the sub-domain area indices for the control prints
-      IF( ln_ctl )   THEN
-         IF( lk_mpp )   THEN
-            ! the domain is forced to the real splitted domain in MPI
-            isplt = jpni ; jsplt = jpnj ; ijsplt = jpni*jpnj
+         WRITE(numout,*) '   Namelist namctl'
+         WRITE(numout,*) '      run control (for debugging)     ln_ctl    = ', ln_ctl
+         WRITE(numout,*) '      level of print                  nprint    = ', nprint
+         WRITE(numout,*) '      Start i indice for SUM control  nictls    = ', nictls
+         WRITE(numout,*) '      End i indice for SUM control    nictle    = ', nictle
+         WRITE(numout,*) '      Start j indice for SUM control  njctls    = ', njctls
+         WRITE(numout,*) '      End j indice for SUM control    njctle    = ', njctle
+         WRITE(numout,*) '      number of proc. following i     isplt     = ', isplt
+         WRITE(numout,*) '      number of proc. following j     jsplt     = ', jsplt
+         WRITE(numout,*) '      benchmark parameter (0/1)       nbench    = ', nbench
+         WRITE(numout,*) '      bit comparison mode (0/1)       nbit_cmp  = ', nbit_cmp
+      ENDIF
+
+      !                           ! Parameter control
+      !
+      IF( ln_ctl ) THEN                 ! sub-domain area indices for the control prints
+         IF( lk_mpp ) THEN
+            isplt = jpni   ;   jsplt = jpnj   ;   ijsplt = jpni*jpnj   ! the domain is forced to the real splitted domain
          ELSE
             IF( isplt == 1 .AND. jsplt == 1  ) THEN
-               CALL ctl_warn( '          - isplt & jsplt are equal to 1',   &
-                    &         '          - the print control will be done over the whole domain' )
-            ENDIF
-
-            ! compute the total number of processors ijsplt
-            ijsplt = isplt*jsplt
+               CALL ctl_warn( ' - isplt & jsplt are equal to 1',   &
+                  &           ' - the print control will be done over the whole domain' )
+            ENDIF
+            ijsplt = isplt * jsplt            ! total number of processors ijsplt
          ENDIF
-
          IF(lwp) WRITE(numout,*)'          - The total number of processors over which the'
          IF(lwp) WRITE(numout,*)'            print control will be done is ijsplt : ', ijsplt
-
-         ! Control the indices used for the SUM control
-         IF( nictls+nictle+njctls+njctle == 0 )   THEN
-            ! the print control is done over the default area
-            lsp_area = .FALSE.
-         ELSE
-            ! the print control is done over a specific  area
+         !
+         !                              ! indices used for the SUM control
+         IF( nictls+nictle+njctls+njctle == 0 )   THEN    ! print control done over the default area
+            lsp_area = .FALSE.                        
+         ELSE                                             ! print control done over a specific  area
             lsp_area = .TRUE.
             IF( nictls < 1 .OR. nictls > jpiglo )   THEN
@@ -363,58 +323,47 @@
                nictls = 1
             ENDIF
-
             IF( nictle < 1 .OR. nictle > jpiglo )   THEN
                CALL ctl_warn( '          - nictle must be 1<=nictle>=jpiglo, it is forced to jpiglo' )
                nictle = jpiglo
             ENDIF
-
             IF( njctls < 1 .OR. njctls > jpjglo )   THEN
                CALL ctl_warn( '          - njctls must be 1<=njctls>=jpjglo, it is forced to 1' )
                njctls = 1
             ENDIF
-
             IF( njctle < 1 .OR. njctle > jpjglo )   THEN
                CALL ctl_warn( '          - njctle must be 1<=njctle>=jpjglo, it is forced to jpjglo' )
                njctle = jpjglo
             ENDIF
-
-         ENDIF          ! IF( nictls+nictle+njctls+njctle == 0 )
-       ENDIF            ! IF(ln_ctl)
-
-      IF( nbench == 1 )   THEN
+         ENDIF
+      ENDIF
+
+      IF( nbench == 1 )   THEN            ! Benchmark 
          SELECT CASE ( cp_cfg )
-         CASE ( 'gyre' )
-            CALL ctl_warn( '          The Benchmark is activated ' )
-         CASE DEFAULT
-            CALL ctl_stop( '          The Benchmark is based on the GYRE configuration: key_gyre must &
-               &                      be used or set nbench = 0' )
+         CASE ( 'gyre' )   ;   CALL ctl_warn( ' The Benchmark is activated ' )
+         CASE DEFAULT      ;   CALL ctl_stop( ' The Benchmark is based on the GYRE configuration:',   &
+            &                                 ' key_gyre must be used or set nbench = 0' )
          END SELECT
       ENDIF
 
-      IF( nbit_cmp == 1 )   THEN
-         CALL ctl_warn( '          Bit comparison enabled. Single and multiple processor results must bit compare', &
-              &         '          WARNING: RESULTS ARE NOT PHYSICAL.' )
-      ENDIF
-
-
-      ! Read Namelist namflg : algorithm FLaG
-      ! --------------------
-      REWIND ( numnam )
-      READ   ( numnam, namflg )
-
-      ! Parameter control and print
-      ! ---------------------------
-      IF(lwp) THEN
+      IF( nbit_cmp == 1 )   THEN          ! Bit compare
+         CALL ctl_warn( ' Bit comparison enabled. Single and multiple processor results must bit compare', &
+              &         ' WARNING: RESULTS ARE NOT PHYSICAL.' )
+      ENDIF
+
+
+      REWIND( numnam )            ! Read Namelist namflg : algorithm FLaG
+      READ  ( numnam, namflg )
+
+      IF(lwp) THEN                ! Parameter print
          WRITE(numout,*)
          WRITE(numout,*) 'opa_flg : Hydrostatic pressure gradient algorithm'
          WRITE(numout,*) '~~~~~~~'
-         WRITE(numout,*) '          Namelist namflg : set algorithm flags'
-         WRITE(numout,*) '             centered (F) or semi-implicit (T)   ln_dynhpg_imp = ', ln_dynhpg_imp
-         WRITE(numout,*) '             hydrostatic pressure gradient'
-         WRITE(numout,*) '             add dynhpg implicit variable        nn_dynhpg_rst = ', nn_dynhpg_rst
-         WRITE(numout,*) '             in restart ot not nn_dynhpg_rst'
-      ENDIF
+         WRITE(numout,*) '   Namelist namflg : hydrostatic pressure gradient time stepping'
+         WRITE(numout,*) '      centered (F) or semi-implicit (T)        ln_dynhpg_imp = ', ln_dynhpg_imp
+         WRITE(numout,*) '      ensure restartability (=1) or not (=0)   nn_dynhpg_rst = ', nn_dynhpg_rst
+      ENDIF
+      !
       IF( .NOT. ln_dynhpg_imp )   nn_dynhpg_rst = 0      ! force no adding dynhpg implicit variables in restart
-
+      !
    END SUBROUTINE opa_flg
 
@@ -425,25 +374,19 @@
       !!
       !! ** Purpose :   Close the files
-      !!
-      !! ** Method  :
-      !!
-      !! History :
-      !!   9.0  !  05-01  (O. Le Galloudec)  Original code
-      !!----------------------------------------------------------------------
-      !! * Modules used
+      !!----------------------------------------------------------------------
       USE dtatem        ! temperature data
       USE dtasal        ! salinity data
       !!----------------------------------------------------------------------
-
-      IF ( lk_mpp ) CALL mppsync
-
+      !
+      IF( lk_mpp )   CALL mppsync
+      !
       CLOSE( numnam )           ! namelist
       CLOSE( numout )           ! standard model output file
-
+      !
       IF(lwp) CLOSE( numstp )   ! time-step file
       IF(lwp) CLOSE( numsol )   ! solver file
-
+      !
       CALL iom_close            ! close all input/output files
-
+      !
    END SUBROUTINE opa_closefile
 
