Index: trunk/NEMO/OPA_SRC/BDY/bdytides.F90
===================================================================
--- trunk/NEMO/OPA_SRC/BDY/bdytides.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/BDY/bdytides.F90	(revision 1601)
@@ -72,5 +72,5 @@
       INTEGER ::   itide                  ! dummy loop index 
       !!
-      NAMELIST/namtide/ln_tide_date, filtide, tide_cpt, tide_speed
+      NAMELIST/nambdy_tide/ln_tide_date, filtide, tide_cpt, tide_speed
       !!----------------------------------------------------------------------
 
@@ -79,5 +79,5 @@
       IF(lwp) WRITE(numout,*) '~~~~~~~~~'
 
-      ! Namelist namtide : tidal harmonic forcing at open boundaries
+      ! Namelist nambdy_tide : tidal harmonic forcing at open boundaries
       ln_tide_date = .false.
       filtide(:) = ''
@@ -85,5 +85,5 @@
       tide_cpt(:) = ''
       REWIND( numnam )                                ! Read namelist parameters
-      READ  ( numnam, namtide )
+      READ  ( numnam, nambdy_tide )
       !                                               ! Count number of components specified
       ntide = jptides_max
@@ -118,7 +118,7 @@
       !                                               ! Parameter control and print
       IF( ntide < 1 ) THEN 
-         CALL ctl_stop( '          Did not find any tidal components in namelist namtide' )
+         CALL ctl_stop( '          Did not find any tidal components in namelist nambdy_tide' )
       ELSE
-         IF(lwp) WRITE(numout,*) '          Namelist namtide : tidal harmonic forcing at open boundaries'
+         IF(lwp) WRITE(numout,*) '          Namelist nambdy_tide : tidal harmonic forcing at open boundaries'
          IF(lwp) WRITE(numout,*) '             tidal components specified ', ntide
          IF(lwp) WRITE(numout,*) '                ', tide_cpt(1:ntide)
Index: trunk/NEMO/OPA_SRC/DIA/diagap.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DIA/diagap.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/DIA/diagap.F90	(revision 1601)
@@ -4,4 +4,8 @@
    !! Ocean diagnostics : computation of model-data tracer gap
    !!======================================================================
+   !! History :  OPA  ! 1991-10  (G. Madec)  Original code
+   !!            7.0  ! 1992-07  (M. Imbard)  Add variance and mpp staff
+   !!   NEMO     1.0  ! 2002-07  (G. Madec)  Free form, F90
+   !!----------------------------------------------------------------------
 #if defined key_diagap
    !!----------------------------------------------------------------------
@@ -10,5 +14,4 @@
    !!   dia_gap      : model and data level mean temperature and salinity
    !!----------------------------------------------------------------------
-   !! * Modules used
    USE oce             ! ocean dynamics and tracers
    USE dom_oce         ! ocean space and time domain
@@ -23,31 +26,26 @@
    PRIVATE
 
-   !! * Routine accessibility
-   PUBLIC dia_gap     ! called in step.F90 module
-
-   !! * Shared module variables
+   PUBLIC   dia_gap    ! called in step.F90 module
+
    LOGICAL, PUBLIC, PARAMETER ::   lk_diagap = .TRUE.   !: model-data diagnostics flag
 
-   !! * Module variables
-   INTEGER ::                 &
-      ngap  ,                 &  ! time step frequency
-      nprg                       ! switch for control print
-   ! netcdf files and index common
-   INTEGER ::   &
-      nhoridg, ndepidg,             &
-      ndex(1)
-   REAL(wp) ::     &
-      vol                        ! total ocean volume
-   REAL(wp), DIMENSION(jpk) ::   &
-      volk , volkr,           &  ! level ocean volume and its inverse
-      tdtag, sdtag,           &  ! level mean data temperature & salinity
-      tmodg, smodg               ! level mean model temperature & salinity
+   !                         !!* Namelist namgap : model-data gap
+   INTEGER ::   nn_gap = 15   ! time step frequency
+   INTEGER ::   nn_prg = 15   ! switch for control print
+
+   INTEGER ::   nhoridg, ndepidg, ndex(1)   ! netcdf files and index common
+
+   REAL(wp) ::   vol                        ! total ocean volume
+
+   REAL(wp), DIMENSION(jpk) ::   volk , volkr   ! level ocean volume and its inverse
+   REAL(wp), DIMENSION(jpk) ::   tdtag, sdtag   ! level mean data temperature & salinity
+   REAL(wp), DIMENSION(jpk) ::   tmodg, smodg   ! level mean model temperature & salinity
 
    !! * Substitutions
 #  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
-   !!   OPA 9.0 , LOCEAN-IPSL (2005) 
+   !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) 
    !! $Id$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
 
@@ -59,26 +57,17 @@
       !!
       !! ** Purpose :   Compute model and data level mean T and S profiles
-      !!      and output it in numgap (NetCDF or direct access file)
-      !!
-      !! ** Method :
-      !!         tracers (model) : tn, sn
-      !!         tracers (data)  : t_dta, s_dta
-      !!         difference between model and data tracers
-      !!         variance between model and data tracers
+      !!              and output it in numgap (NetCDF or direct access file)
+      !!
+      !! ** Method :   tracers (model) : tn, sn
+      !!               tracers (data)  : t_dta, s_dta
+      !!               difference between model and data tracers
+      !!               variance between model and data tracers
       !!
       !! ** Action  :   output in file numgap
-      !!
-      !! History :
-      !!   6.0  !  91-10  (G. Madec)  Original code
-      !!   7.0  !  92-07  (M. Imbard)  Add variance and mpp staff
-      !!   8.5  !  02-07  (G. Madec)  Free form, F90
       !!----------------------------------------------------------------------
-      !! * Modules used
       USE ioipsl
-
-      !! * Arguments
+      !!
       INTEGER, INTENT(in) ::   kt           ! ocean time-step index
-
-      !! * local declarations
+      !!
       INTEGER ::   ji, jj, jk   ! dummy loop indices
       INTEGER ::   it, itmod    ! time step indices
@@ -89,30 +78,23 @@
       REAL(wp), DIMENSION(jpi) ::   zfoo
       REAL(wp), DIMENSION(jpj) ::   zloo
-
-      NAMELIST/namgap/ ngap, nprg
+      !!
+      NAMELIST/namgap/ nn_gap, nn_prg
       !!----------------------------------------------------------------------
-
 
       ! 0. initialization
       ! -----------------
-
       zdt = rdt
       IF( nacc == 1 )   zdt = rdtmin
 
       IF( kt == nit000 ) THEN
-
          IF(lwp) WRITE(numout,*)
          IF(lwp) WRITE(numout,*) 'dia_gap : level mean model-data gap'
          IF(lwp) WRITE(numout,*) '~~~~~~~'
 
-         ! Read diagap parameters in namelist namgap
-         ngap = 15
-         nprg = 15
-
-         REWIND( numnam )
+         REWIND( numnam )            ! Read diagap parameters in namelist namgap
          READ( numnam, namgap )
 
-         IF(lwp) WRITE(numout,*) '          time step frequency for gap     ngap  = ',ngap
-         IF(lwp) WRITE(numout,*) '          switch for control print gap    nprg  = ',nprg
+         IF(lwp) WRITE(numout,*) '          time step frequency for gap     nn_gap  = ',nn_gap
+         IF(lwp) WRITE(numout,*) '          switch for control print gap    nn_prg  = ',nn_prg
 
          ! horizontal slab volume (tmask_i to take into account only interior ocean domain)
@@ -152,9 +134,9 @@
 
          ! Define frequency of output and means
-         zsto = ngap * zdt
+         zsto = nn_gap * zdt
          IF( ln_mskland )   THEN   ;   clop = "ave(only(x))"   ! put 1.e+20 on land (very expensive!!)
          ELSE                      ;   clop = "ave(x)"         ! no use of the mask value (require less cpu time)
          ENDIF
-         zout = ngap * zdt
+         zout = nn_gap * zdt
          zmax = FLOAT( nitend - nit000 + 1 ) * zdt
          zfoo(1:jpi) = 0.e0
@@ -166,5 +148,5 @@
          zjulian = zjulian - adatrj   !   set calendar origin to the beginning of the experiment
 
-         CALL dia_nam( clhstnam, ngap, 'diagap' )
+         CALL dia_nam( clhstnam, nn_gap, 'diagap' )
          IF(lwp) WRITE(numout,*) 'Name of diagap NETCDF file ', clhstnam
          ! Horizontal grid : zphi()
@@ -200,5 +182,5 @@
       itmod = kt - nit000 + 1       ! define time axis
       it = kt 
-      IF( MOD( itmod, ngap ) == 0 ) THEN
+      IF( MOD( itmod, nn_gap ) == 0 ) THEN
 
          ! initialization
@@ -223,8 +205,6 @@
          END DO
 
-
          ! 2. Basin averaged
          ! -----------------
-         
          DO jk = 1, jpkm1
             tdtag(jpk) = tdtag(jpk) + tdtag(jk) * volk(jk) / vol
@@ -240,13 +220,11 @@
           ! 3.  Averaged output in file numgap
           ! ----------------------------======
-
-          IF( MOD( itmod, nprg ) == 0 ) THEN
+          IF( MOD( itmod, nn_prg ) == 0 ) THEN
               IF(lwp) THEN
                   WRITE(numout,*) 'dia_gap: time step = ', kt, 'model - data'
                   WRITE(numout,9300)
-
                   DO jk = 1, jpk
                     WRITE(numout,9310) tdtag(jk), tmodg(jk), tdtag(jk) - tmodg(jk), jk, fsdept(1,1,jk),   &
-                                       sdtag(jk), smodg(jk), sdtag(jk) - smodg(jk)
+                       &               sdtag(jk), smodg(jk), sdtag(jk) - smodg(jk)
                   END DO  
               ENDIF
@@ -269,9 +247,8 @@
 
       ! Closing numgap file
-
       IF( kt == nitend ) THEN
          CALL histclo( numgap )      !   Netcdf file
       ENDIF 
-
+      !
    END SUBROUTINE dia_gap
 
Index: trunk/NEMO/OPA_SRC/DOM/closea.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DOM/closea.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/DOM/closea.F90	(revision 1601)
@@ -32,8 +32,4 @@
    PUBLIC clo_bat      ! routine called in domzgr module
 
-   !!* Namelist namclo : closed seas and lakes
-   INTEGER, PUBLIC                     ::   nclosea =  0     !: = 0 no closed sea or lake
-      !                                                      !  = 1 closed sea or lake in the domain
-      
    INTEGER, PUBLIC, PARAMETER          ::   jpncs   = 4      !: number of closed sea
    INTEGER, PUBLIC, DIMENSION(jpncs)   ::   ncstt            !: Type of closed sea
Index: trunk/NEMO/OPA_SRC/DOM/dom_oce.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DOM/dom_oce.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/DOM/dom_oce.F90	(revision 1601)
@@ -1,16 +1,14 @@
 MODULE dom_oce
-   !!----------------------------------------------------------------------
+   !!======================================================================
    !!                       ***  MODULE dom_oce  ***
    !!       
    !! ** Purpose :   Define in memory all the ocean space domain variables
-   !!----------------------------------------------------------------------
-   !! History :
-   !!   9.0  !  05-10  (A. Beckmann, G. Madec)  reactivate s-coordinate 
-   !!----------------------------------------------------------------------
-   !!  OPA 9.0 , LOCEAN-IPSL (2006) 
+   !!======================================================================
+   !! History :  1.0  ! 2005-10  (A. Beckmann, G. Madec)  reactivate s-coordinate 
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) 
    !! $Id$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
-   !!----------------------------------------------------------------------
-   !! * Modules used
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
    USE par_oce      ! ocean parameters
 
@@ -20,81 +18,106 @@
 
    !!----------------------------------------------------------------------
+   !! time & space domain namelist
+   !! ----------------------------
+   !                                              !!* Namelist namdom : time & space domain *
+   INTEGER , PUBLIC ::   nn_bathy     =  0         !: = 0/1 ,compute/read the bathymetry file
+   REAL(wp), PUBLIC ::   rn_e3zps_min = 5.0_wp     !: miminum thickness for partial steps (meters)
+   REAL(wp), PUBLIC ::   rn_e3zps_rat = 0.1_wp     !: minimum thickness ration for partial steps
+   INTEGER , PUBLIC ::   nn_msh       = 0          !: = 1 create a mesh-mask file
+   INTEGER , PUBLIC ::   nn_acc       = 0          !: = 0/1 use of the acceleration of convergence technique
+   REAL(wp), PUBLIC ::   rn_atfp      = 0.1_wp     !: asselin time filter parameter
+   REAL(wp), PUBLIC ::   rn_rdt       = 3600._wp   !: time step for the dynamics (and tracer if nacc=0)
+   REAL(wp), PUBLIC ::   rn_rdtmin    = 3600._wp   !: minimum time step on tracers
+   REAL(wp), PUBLIC ::   rn_rdtmax    = 3600._wp   !: maximum time step on tracers
+   REAL(wp), PUBLIC ::   rn_rdth      =  800._wp   !: depth variation of tracer step
+   INTEGER , PUBLIC ::   nn_baro      = 64         !: number of barotropic time steps (key_dynspg_ts)
+   INTEGER , PUBLIC ::   nn_closea    =  0         !: =0 suppress closed sea/lake from the ORCA domain or not (=1)
+
+   !                                          ! old non-DOCTOR names still used in the model
+   INTEGER , PUBLIC ::   ntopo                !: = 0/1 ,compute/read the bathymetry file
+   REAL(wp), PUBLIC ::   e3zps_min            !: miminum thickness for partial steps (meters)
+   REAL(wp), PUBLIC ::   e3zps_rat            !: minimum thickness ration for partial steps
+   INTEGER , PUBLIC ::   nmsh                 !: = 1 create a mesh-mask file
+   INTEGER , PUBLIC ::   nacc                 !: = 0/1 use of the acceleration of convergence technique
+   REAL(wp), PUBLIC ::   atfp                 !: asselin time filter parameter
+   REAL(wp), PUBLIC ::   rdt                  !: time step for the dynamics (and tracer if nacc=0)
+   REAL(wp), PUBLIC ::   rdtmin               !: minimum time step on tracers
+   REAL(wp), PUBLIC ::   rdtmax               !: maximum time step on tracers
+   REAL(wp), PUBLIC ::   rdth                 !: depth variation of tracer step
+   INTEGER , PUBLIC ::   nclosea              !: =0 suppress closed sea/lake from the ORCA domain or not (=1)
+
+
+   !                                         !!! associated variables
+   INTEGER , PUBLIC                 ::   neuler  = 0   !: restart euler forward option (0=Euler)
+   REAL(wp), PUBLIC                 ::   atfp1         !: asselin time filter coeff. (atfp1= 1-2*atfp)
+   REAL(wp), PUBLIC, DIMENSION(jpk) ::   rdttra        !: vertical profile of tracer time step
+
+   !                                         !!* Namelist namcla : cross land advection
+   INTEGER, PUBLIC ::   nn_cla = 0            !: =1 cross land advection for exchanges through some straits (ORCA2)
+
+   !                                          ! old non-DOCTOR names still used in the model
+   INTEGER, PUBLIC ::   n_cla = 0             !: =1 cross land advection for exchanges through some straits (ORCA2)
+
+   !!----------------------------------------------------------------------
    !! space domain parameters
    !! -----------------------
-   LOGICAL, PUBLIC ::   &   !:
-      lzoom      =  .FALSE. ,   &  !: zoom flag
-      lzoom_e    =  .FALSE. ,   &  !: East  zoom type flag
-      lzoom_w    =  .FALSE. ,   &  !: West  zoom type flag
-      lzoom_s    =  .FALSE. ,   &  !: South zoom type flag
-      lzoom_n    =  .FALSE. ,   &  !: North zoom type flag
-      lzoom_arct =  .FALSE. ,   &  !: ORCA    arctic zoom flag
-      lzoom_anta =  .FALSE.        !: ORCA antarctic zoom flag
-
-   INTEGER, PUBLIC ::           & !!: namdom : space domain (bathymetry, mesh)
-      ntopo   =  0 ,            &  !: = 0/1 ,compute/read the bathymetry file
-      nmsh    =  0                 !: = 1 create a mesh-mask file
-
-   INTEGER, PUBLIC ::         &   !:
-      ! domain parameters linked to mpp
-      nperio,          &  !: type of lateral boundary condition
-      nimpp, njmpp,    &  !: i- & j-indexes for mpp-subdomain left bottom
-      nreci, nrecj,    &  !: overlap region in i and j
-      nproc,           &  !: number for local processor
-      narea,           &  !: number for local area
-      nbondi, nbondj,  &  !: mark of i- and j-direction local boundaries
-      npolj,           &  !: north fold mark (0, 3 or 4)
-      nlci, nlcj,      &  !: i- & j-dimensions of the local subdomain
-      nldi, nlei,      &  !: first and last indoor i- and j-indexes
-      nldj, nlej,      &  !:
-      noea, nowe,      &  !: index of the local neighboring processors in
-      noso, nono,      &  !: east, west, south and north directions
-      npne, npnw,      &  !: index of north east and north west processor
-      npse, npsw,      &  !: index of south east and south west processor
-      nbne, nbnw,      &  !: logical of north east & north west processor
-      nbse, nbsw,      &  !: logical of south east & south west processor
-      nidom               !: ???
-
-   INTEGER, PUBLIC, DIMENSION(jpi) ::   &   !:
-      mig                 !: local  ==> global  domain i-indice
-   INTEGER, PUBLIC, DIMENSION(jpj) ::   &   !:
-      mjg                 !: local  ==> global  domain j-indice
-   INTEGER, PUBLIC, DIMENSION( jpidta ) ::   &  !:  !!bug ==> other solution?
-      mi0, mi1            !: global ==> local domain i-indice
-      !                   !  (mi0=1 and mi1=0 if the global indice is not in the local domain)
-   INTEGER, PUBLIC, DIMENSION( jpjdta ) ::   &  !:
-      mj0, mj1            !: global ==> local domain j-indice
-      !                   ! (mi0=1 and mi1=0 if the global indice is not in the local domain)
-
-   INTEGER, PUBLIC, DIMENSION(jpnij) ::   &  !:
-      nimppt, njmppt,  &  !: i-, j-indexes for each processor
-      ibonit, ibonjt,  &  !: i-, j- processor neighbour existence
-      nlcit , nlcjt,   &  !: dimensions of every subdomain
-      nldit , nldjt,   &  !: first, last indoor index for each i-domain
-      nleit , nlejt       !: first, last indoor index for each j-domain
+   LOGICAL, PUBLIC ::   lzoom      =  .FALSE.   !: zoom flag
+   LOGICAL, PUBLIC ::   lzoom_e    =  .FALSE.   !: East  zoom type flag
+   LOGICAL, PUBLIC ::   lzoom_w    =  .FALSE.   !: West  zoom type flag
+   LOGICAL, PUBLIC ::   lzoom_s    =  .FALSE.   !: South zoom type flag
+   LOGICAL, PUBLIC ::   lzoom_n    =  .FALSE.   !: North zoom type flag
+   LOGICAL, PUBLIC ::   lzoom_arct =  .FALSE.   !: ORCA    arctic zoom flag
+   LOGICAL, PUBLIC ::   lzoom_anta =  .FALSE.   !: ORCA antarctic zoom flag
+
+   !                                     !!! domain parameters linked to mpp
+   INTEGER, PUBLIC ::   nperio            !: type of lateral boundary condition
+   INTEGER, PUBLIC ::   nimpp, njmpp      !: i- & j-indexes for mpp-subdomain left bottom
+   INTEGER, PUBLIC ::   nreci, nrecj      !: overlap region in i and j
+   INTEGER, PUBLIC ::   nproc             !: number for local processor
+   INTEGER, PUBLIC ::   narea             !: number for local area
+   INTEGER, PUBLIC ::   nbondi, nbondj    !: mark of i- and j-direction local boundaries
+   INTEGER, PUBLIC ::   npolj             !: north fold mark (0, 3 or 4)
+   INTEGER, PUBLIC ::   nlci, nldi, nlei  !: i-dimensions of the local subdomain and its first and last indoor indices
+   INTEGER, PUBLIC ::   nlcj, nldj, nlej  !: i-dimensions of the local subdomain and its first and last indoor indices
+   INTEGER, PUBLIC ::   noea, nowe        !: index of the local neighboring processors in
+   INTEGER, PUBLIC ::   noso, nono        !: east, west, south and north directions
+   INTEGER, PUBLIC ::   npne, npnw        !: index of north east and north west processor
+   INTEGER, PUBLIC ::   npse, npsw        !: index of south east and south west processor
+   INTEGER, PUBLIC ::   nbne, nbnw        !: logical of north east & north west processor
+   INTEGER, PUBLIC ::   nbse, nbsw        !: logical of south east & south west processor
+   INTEGER, PUBLIC ::   nidom             !: ???
+
+   INTEGER, PUBLIC, DIMENSION(jpi)    ::   mig        !: local  ==> global domain i-index
+   INTEGER, PUBLIC, DIMENSION(jpj)    ::   mjg        !: local  ==> global domain j-index
+   INTEGER, PUBLIC, DIMENSION(jpidta) ::   mi0, mi1   !: global ==> local  domain i-index    !!bug ==> other solution?
+   !                                                  ! (mi0=1 and mi1=0 if the global index is not in the local domain)
+   INTEGER, PUBLIC, DIMENSION(jpjdta) ::   mj0, mj1   !: global ==> local  domain j-index     !!bug ==> other solution?
+   !                                                  ! (mi0=1 and mi1=0 if the global index is not in the local domain)
+   INTEGER, PUBLIC, DIMENSION(jpnij)  ::   nimppt, njmppt   !: i-, j-indexes for each processor
+   INTEGER, PUBLIC, DIMENSION(jpnij)  ::   ibonit, ibonjt   !: i-, j- processor neighbour existence
+   INTEGER, PUBLIC, DIMENSION(jpnij)  ::   nlcit , nlcjt    !: dimensions of every subdomain
+   INTEGER, PUBLIC, DIMENSION(jpnij)  ::   nldit , nldjt    !: first, last indoor index for each i-domain
+   INTEGER, PUBLIC, DIMENSION(jpnij)  ::   nleit , nlejt    !: first, last indoor index for each j-domain
 
    !!----------------------------------------------------------------------
    !! horizontal curvilinear coordinate and scale factors
    !! ---------------------------------------------------------------------
-
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   &  !:
-      glamt, glamu,    &  !: longitude of t-, u-, v- and f-points (degre)
-      glamv, glamf,    &  !:
-      gphit, gphiu,    &  !: latitude  of t-, u-, v- and f-points (degre)
-      gphiv, gphif,    &  !:
-      e1t, e2t,        &  !: horizontal scale factors at t-point (m)
-      e1u, e2u,        &  !: horizontal scale factors at u-point (m)
-      e1v, e2v,        &  !: horizontal scale factors at v-point (m)
-      e1f, e2f,        &  !: horizontal scale factors at f-point (m)
-      ff                  !: coriolis factor (2.*omega*sin(yphi) ) (s-1)
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   glamt, glamu   !: longitude of t-, u-, v- and f-points (degre)
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   glamv, glamf   !:
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   gphit, gphiu   !: latitude  of t-, u-, v- and f-points (degre)
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   gphiv, gphif   !:
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   e1t, e2t       !: horizontal scale factors at t-point (m)
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   e1u, e2u       !: horizontal scale factors at u-point (m)
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   e1v, e2v       !: horizontal scale factors at v-point (m)
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   e1f, e2f       !: horizontal scale factors at f-point (m)
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   ff             !: coriolis factor (2.*omega*sin(yphi) ) (s-1)
 
    !!----------------------------------------------------------------------
    !! vertical coordinate and scale factors
    !! --------------------------------------
-
-   LOGICAL, PUBLIC ::           & !!: namzgr : vertical coordinate
-      ln_zco     =  .TRUE.  ,   &  !: z-coordinate - full step
-      ln_zps     =  .FALSE. ,   &  !: z-coordinate - partial step
-      ln_sco     =  .FALSE.        !: s-coordinate or hybrid z-s coordinate
-
+   !                                           !!* Namelist namzgr : vertical coordinate *
+   LOGICAL, PUBLIC ::   ln_zco     =  .TRUE.    !: z-coordinate - full step
+   LOGICAL, PUBLIC ::   ln_zps     =  .FALSE.   !: z-coordinate - partial step
+   LOGICAL, PUBLIC ::   ln_sco     =  .FALSE.   !: s-coordinate or hybrid z-s coordinate
 #if defined key_zco
    LOGICAL, PUBLIC, PARAMETER ::   lk_zco = .TRUE.    !: z-coordinate flag (1D arrays)
@@ -104,14 +127,14 @@
    !! All coordinates
    !! ---------------
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   &  !:
-      gdep3w        ,    &  !: depth of T-points (sum of e3w) (m)
-      gdept , gdepw ,    &  !: analytical depth at T-W  points (m)
-      e3v   , e3f   ,    &  !: analytical vertical scale factors at  V--F
-      e3t   , e3u   ,    &  !:                                       T--U  points (m)
-      e3vw          ,    &  !: analytical vertical scale factors at  VW--
-      e3w   , e3uw          !:                                        W--UW  points (m)
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   gdep3w          !: depth of T-points (sum of e3w) (m)
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   gdept , gdepw   !: analytical depth at T-W  points (m)
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   e3v   , e3f     !: analytical vertical scale factors at  V--F
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   e3t   , e3u     !:                                       T--U  points (m)
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   e3vw            !: analytical vertical scale factors at  VW--
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   e3w   , e3uw    !:                                        W--UW  points (m)
 #endif
 #if defined key_vvl
    LOGICAL, PUBLIC, PARAMETER ::   lk_vvl = .TRUE.    !: variable grid flag
+
    !! All coordinates
    !! ---------------
@@ -125,66 +148,46 @@
    LOGICAL, PUBLIC, PARAMETER ::   lk_vvl = .FALSE.   !: fixed grid flag
 #endif
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   &   !:
-      hur, hvr,          &  !: inverse of u and v-points ocean depth (1/m)
-      hu , hv,           &  !: depth at u- and v-points (meters)
-      hu_0 , hv_0           !: refernce depth at u- and v-points (meters)
-
-   INTEGER, PUBLIC            ::   nla10              !: deepest    W level Above  ~10m (nlb10 - 1)
-   INTEGER, PUBLIC            ::   nlb10              !: shallowest W level Bellow ~10m (nla10 + 1) 
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   hur  , hvr    !: inverse of u and v-points ocean depth (1/m)
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   hu   , hv     !: depth at u- and v-points (meters)
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   hu_0 , hv_0   !: refernce depth at u- and v-points (meters)
+
+   INTEGER, PUBLIC ::   nla10              !: deepest    W level Above  ~10m (nlb10 - 1)
+   INTEGER, PUBLIC ::   nlb10              !: shallowest W level Bellow ~10m (nla10 + 1) 
 
    !! z-coordinate with full steps (also used in the other cases as reference z-coordinate)
    !! =-----------------====------
-   REAL(wp), PUBLIC, DIMENSION(jpk) ::   &  !:
-      gdept_0, gdepw_0,       &  !: reference depth of t- and w-points (m)
-      e3t_0  , e3w_0             !: reference vertical scale factors at T- and W-pts (m)
-
-   !! z-coordinate with partial steps
-   !! =-----------------=======------
-   REAL(wp), PUBLIC ::      & !!: * namelist namdom *
-      e3zps_min = 5.0_wp,   &  !: miminum thickness for partial steps (meters)
-      e3zps_rat = 0.1_wp       !: minimum thickness ration for partial steps
-
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   &  !:
-      hdept, hdepw, e3tp, e3wp   !: bottom depth and thickness at T and W points
+   REAL(wp), PUBLIC, DIMENSION(jpk)     ::   gdept_0, gdepw_0   !: reference depth of t- and w-points (m)
+   REAL(wp), PUBLIC, DIMENSION(jpk)     ::   e3t_0  , e3w_0     !: reference vertical scale factors at T- and W-pts (m)
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   hdept  , hdepw     !: ocean bottom depth at T and W points
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   e3tp   , e3wp      !: ocean bottom level thickness at T and W points
 
    !! s-coordinate and hybrid z-s-coordinate
    !! =----------------======---------------
-   REAL(wp), PUBLIC, DIMENSION(jpk) ::   &   !:
-      gsigt, gsigw ,   &  !: model level depth coefficient at t-, w-levels (analytic)
-      gsi3w        ,   &  !: model level depth coefficient at w-level (sum of gsigw)
-      esigt, esigw        !: vertical scale factor coef. at t-, w-levels
-
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   &   !:
-      hbatv , hbatf ,   &  !: ocean depth at the vertical of  V--F
-      hbatt , hbatu ,   &  !:                                 T--U  points (m)
-      scosrf, scobot,   &  !:  ocean surface and bottom topographies (if deviating from coordinate surfaces in HYBRID)
-      hifv  , hiff  ,   &  !: interface depth between stretching    at  V--F
-      hift  , hifu         !: and quasi-uniform spacing                 T--U  points (m)
+   REAL(wp), PUBLIC, DIMENSION(jpk) ::   gsigt, gsigw   !: model level depth coefficient at t-, w-levels (analytic)
+   REAL(wp), PUBLIC, DIMENSION(jpk) ::   gsi3w          !: model level depth coefficient at w-level (sum of gsigw)
+   REAL(wp), PUBLIC, DIMENSION(jpk) ::   esigt, esigw   !: vertical scale factor coef. at t-, w-levels
+
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   hbatv , hbatf    !: ocean depth at the vertical of  V--F
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   hbatt , hbatu    !:                                 T--U  points (m)
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   scosrf, scobot   !: ocean surface and bottom topographies 
+   !                                                          !  (if deviating from coordinate surfaces in HYBRID)
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   hifv  , hiff     !: interface depth between stretching    at  V--F
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   hift  , hifu     !: and quasi-uniform spacing                 T--U  points (m)
 
    !!----------------------------------------------------------------------
    !! masks, bathymetry
    !! -----------------
-
-   INTEGER , PUBLIC, DIMENSION(jpi,jpj) ::   &   !:
-      mbathy     !: number of ocean level (=0, 1, ... , jpk-1)
-
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   &   !:
-      bathy  ,         &  !: ocean depth (meters)
-      tmask_i,         &  !: interior domain T-point mask
-      bmask               !: land/ocean mask of barotropic stream function
-
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   &   !:
-      tmask, umask,    &  !: land/ocean mask at T-, U-, V- and F-points
-      vmask, fmask        !:
-
-   REAL(wp), PUBLIC, DIMENSION(jpiglo) ::   &   !:
-      tpol, fpol          !: north fold mask (nperio= 3 or 4)
+   INTEGER , PUBLIC, DIMENSION(jpi,jpj) ::   mbathy    !: number of ocean level (=0, 1, ... , jpk-1)
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   bathy     !: ocean depth (meters)
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   tmask_i   !: interior domain T-point mask
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   bmask     !: land/ocean mask of barotropic stream function
+
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   tmask, umask, vmask, fmask   !: land/ocean mask at T-, U-, V- and F-points
+
+   REAL(wp), PUBLIC, DIMENSION(jpiglo) ::   tpol, fpol          !: north fold mask (nperio= 3 or 4)
 
 #if defined key_noslip_accurate
-   INTEGER, PUBLIC, DIMENSION(4,jpk) ::   &   !:
-      npcoa               !: ???
-   INTEGER, PUBLIC, DIMENSION(2*(jpi+jpj),4,jpk) ::   &   !:
-      nicoa,           &  !: ???
-      njcoa               !: ???
+   INTEGER, PUBLIC, DIMENSION            (4,jpk) ::   npcoa          !: ???
+   INTEGER, PUBLIC, DIMENSION(2*(jpi+jpj),4,jpk) ::   nicoa, njcoa   !: ???
 #endif
 
@@ -198,31 +201,4 @@
 #endif
 
-
-   !!----------------------------------------------------------------------
-   !! time domain
-   !!----------------------------------------------------------------------
-   INTEGER, PUBLIC ::      & !!: * Namelist * ???
-      nacc   = 0   ,       &  !: = 0/1 use of the acceleration of convergence technique
-      neuler       ,       &  !: restart euler forward option (0=Euler)
-      nn_baro = 64            !: number of barotropic time steps (key_dynspg_ts)
-
-   REAL(wp), PUBLIC ::       & !!: * Namelist ??? *
-      rdt    = 3600._wp ,    &  !: time step for the dynamics (and tracer if nacc=0)
-      rdtmin = 3600._wp ,    &  !: minimum time step on tracers
-      rdtmax = 3600._wp ,    &  !: maximum time step on tracers
-      rdth   =  800._wp ,    &  !: depth variation of tracer step
-      atfp   = 0.1_wp   ,    &  !: asselin time filter parameter
-      atfp1                     !: asselin time filter coeff. (atfp1= 1-2*atfp)
-
-   REAL(wp), PUBLIC, DIMENSION(jpk) ::   &  !:
-      rdttra                    !: vertical profile of tracer time step
-
-   !!----------------------------------------------------------------------
-   !! cross land advection
-   !!----------------------------------------------------------------------
-
-   INTEGER, PUBLIC ::       & !!: namelist ???
-      n_cla                    !: flag (0/1) for cross land advection to
-      !                        ! parameterize exchanges through straits
-
+   !!======================================================================
 END MODULE dom_oce
Index: trunk/NEMO/OPA_SRC/DOM/domain.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DOM/domain.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/DOM/domain.F90	(revision 1601)
@@ -5,5 +5,4 @@
    !!==============================================================================
    !! History :  OPA  !  1990-10  (C. Levy - G. Madec)  Original code
-   !!                 !  1991-11  (G. Madec)
    !!                 !  1992-01  (M. Imbard) insert time step initialization
    !!                 !  1996-06  (G. Madec) generalized vertical coordinate 
@@ -23,4 +22,5 @@
    USE sbc_oce         ! surface boundary condition: ocean
    USE phycst          ! physical constants
+   USE closea          ! closed seas
    USE in_out_manager  ! I/O manager
    USE lib_mpp         ! distributed memory computing library
@@ -31,5 +31,4 @@
    USE dommsk          ! domain: set the mask system
    USE domwri          ! domain: write the meshmask file
-   USE closea          ! closed sea or lake              (dom_clo routine)
    USE domvvl          ! variable volume
 
@@ -54,19 +53,18 @@
       !!                    
       !! ** Purpose :   Domain initialization. Call the routines that are 
-      !!      required to create the arrays which define the space and time
-      !!      domain of the ocean model.
+      !!              required to create the arrays which define the space 
+      !!              and time domain of the ocean model.
       !!
-      !! ** Method  :
-      !!      - dom_msk: compute the masks from the bathymetry file
-      !!      - dom_hgr: compute or read the horizontal grid-point position and
-      !!                scale factors, and the coriolis factor
-      !!      - dom_zgr: define the vertical coordinate system and the bathymetry
-      !!      - dom_stp: defined the model time step
-      !!      - dom_wri: create the meshmask file if nmsh=1
+      !! ** Method  : - dom_msk: compute the masks from the bathymetry file
+      !!              - dom_hgr: compute or read the horizontal grid-point position
+      !!                         and scale factors, and the coriolis factor
+      !!              - dom_zgr: define the vertical coordinate and the bathymetry
+      !!              - dom_stp: defined the model time step
+      !!              - dom_wri: create the meshmask file if nmsh=1
       !!----------------------------------------------------------------------
       INTEGER ::   jk                ! dummy loop argument
       INTEGER ::   iconf = 0         ! temporary integers
       !!----------------------------------------------------------------------
-
+      !
       IF(lwp) THEN
          WRITE(numout,*)
@@ -74,21 +72,13 @@
          WRITE(numout,*) '~~~~~~~~'
       ENDIF
-
-      CALL dom_nam                        ! read namelist ( namrun, namdom, namcla )
-
-      CALL dom_clo                        ! Closed seas and lake
-
-      CALL dom_hgr                        ! Horizontal mesh
-
-      CALL dom_zgr                        ! Vertical mesh and bathymetry
-
-      CALL dom_msk                        ! Masks
-
-      IF( lk_vvl )   CALL dom_vvl         ! Vertical variable mesh
-
-      ! Local depth or Inverse of the local depth of the water column at u- and v-points
-      ! ------------------------------
-      ! Ocean depth at U- and V-points
-      hu(:,:) = 0.e0
+      !
+                             CALL dom_nam      ! read namelist ( namrun, namdom, namcla )
+                             CALL dom_clo      ! Closed seas and lake
+                             CALL dom_hgr      ! Horizontal mesh
+                             CALL dom_zgr      ! Vertical mesh and bathymetry
+                             CALL dom_msk      ! Masks
+      IF( lk_vvl         )   CALL dom_vvl      ! Vertical variable mesh
+      !
+      hu(:,:) = 0.e0                           ! Ocean depth at U- and V-points
       hv(:,:) = 0.e0
       DO jk = 1, jpk
@@ -96,20 +86,11 @@
          hv(:,:) = hv(:,:) + fse3v(:,:,jk) * vmask(:,:,jk)
       END DO
-      ! Inverse of the local depth
-      hur(:,:) = fse3u(:,:,1)             ! Lower bound : thickness of the first model level
-      hvr(:,:) = fse3v(:,:,1)
-      DO jk = 2, jpk                      ! Sum of the vertical scale factors
-         hur(:,:) = hur(:,:) + fse3u(:,:,jk) * umask(:,:,jk)
-         hvr(:,:) = hvr(:,:) + fse3v(:,:,jk) * vmask(:,:,jk)
-      END DO
-      ! Compute and mask the inverse of the local depth
-      hur(:,:) = 1. / hur(:,:) * umask(:,:,1)
-      hvr(:,:) = 1. / hvr(:,:) * vmask(:,:,1)
-
-      CALL dom_stp                        ! Time step
-
-      IF( nmsh /= 0 )   CALL dom_wri      ! Create a domain file
-
-      IF( .NOT.ln_rstart )   CALL dom_ctl    ! Domain control
+      !                                        ! Inverse of the local depth
+      hur(:,:) = 1. / ( hu(:,:) + 1.e0 - umask(:,:,1) ) * umask(:,:,1)
+      hvr(:,:) = 1. / ( hv(:,:) + 1.e0 - vmask(:,:,1) ) * vmask(:,:,1)
+
+                             CALL dom_stp      ! time step
+      IF( nmsh /= 0      )   CALL dom_wri      ! Create a domain file
+      IF( .NOT.ln_rstart )   CALL dom_ctl      ! Domain control
       !
    END SUBROUTINE dom_init
@@ -127,49 +108,58 @@
       !!----------------------------------------------------------------------
       USE ioipsl
-      NAMELIST/namrun/ no    , cexper, cn_ocerst_in, cn_ocerst_out, ln_rstart, nrstdt,   &
-         &             nit000, nitend, ndate0      , nleapy       , ninist   , nstock,   &
-         &             nwrite, ln_dimgnnn, ln_mskland, ln_clobber, nn_chunksz
-
-      NAMELIST/namdom/ ntopo , e3zps_min, e3zps_rat, nmsh   ,   &
-         &             nacc  , atfp     , rdt      , rdtmin ,   &
-         &             rdtmax, rdth     , nn_baro  , nclosea
-      NAMELIST/namcla/ n_cla
-      !!----------------------------------------------------------------------
-
-      IF(lwp) THEN
+      NAMELIST/namrun/ nn_no   , cn_exp    , cn_ocerst_in, cn_ocerst_out, ln_rstart , nn_rstctl,   &
+         &             nn_it000, nn_itend  , nn_date0    , nn_leapy     , nn_istate , nn_stock ,   &
+         &             nn_write, ln_dimgnnn, ln_mskland  , ln_clobber   , nn_chunksz
+      NAMELIST/namdom/ nn_bathy , rn_e3zps_min, rn_e3zps_rat, nn_msh   ,   &
+         &             nn_acc   , rn_atfp     , rn_rdt      , rn_rdtmin,   &
+         &             rn_rdtmax, rn_rdth     , nn_baro     , nn_closea
+      NAMELIST/namcla/ nn_cla
+      !!----------------------------------------------------------------------
+
+      REWIND( numnam )              ! Namelist namrun : parameters of the run
+      READ  ( numnam, namrun )
+      !
+      IF(lwp) THEN                  ! control print
          WRITE(numout,*)
          WRITE(numout,*) 'dom_nam  : domain initialization through namelist read'
          WRITE(numout,*) '~~~~~~~ '
-      ENDIF
-
-      REWIND( numnam )              ! Namelist namrun : parameters of the run
-      READ  ( numnam, namrun )
-      IF(lwp) THEN
-         WRITE(numout,*) '        Namelist namrun'
-         WRITE(numout,*) '           job number                      no        = ', no
-         WRITE(numout,*) '           experiment name for output      cexper    = ', cexper
-         WRITE(numout,*) '           restart logical                 ln_rstart = ', ln_rstart
-         WRITE(numout,*) '           control of time step            nrstdt    = ', nrstdt
-         WRITE(numout,*) '           number of the first time step   nit000    = ', nit000
-         WRITE(numout,*) '           number of the last time step    nitend    = ', nitend
-         WRITE(numout,*) '           initial calendar date aammjj    ndate0    = ', ndate0
-         WRITE(numout,*) '           leap year calendar (0/1)        nleapy    = ', nleapy
-         WRITE(numout,*) '           initial state output            ninist    = ', ninist
-         WRITE(numout,*) '           frequency of restart file       nstock    = ', nstock
-         WRITE(numout,*) '           frequency of output file        nwrite    = ', nwrite
-         WRITE(numout,*) '           multi file dimgout           ln_dimgnnn   = ', ln_dimgnnn
-         WRITE(numout,*) '           mask land points             ln_mskland   = ', ln_mskland
-         WRITE(numout,*) '           overwrite an existing file   ln_clobber   = ', ln_clobber
-         WRITE(numout,*) '           NetCDF chunksize (bytes)     nn_chunksz   = ', nn_chunksz
-      ENDIF
-
-      ! ... Control of output frequency
+         WRITE(numout,*) '   Namelist namrun'
+         WRITE(numout,*) '      job number                      nn_no      = ', nn_no
+         WRITE(numout,*) '      experiment name for output      cn_exp     = ', cn_exp
+         WRITE(numout,*) '      restart logical                 ln_rstart  = ', ln_rstart
+         WRITE(numout,*) '      control of time step            nn_rstdt   = ', nn_rstctl
+         WRITE(numout,*) '      number of the first time step   nn_it000   = ', nn_it000
+         WRITE(numout,*) '      number of the last time step    nn_itend   = ', nn_itend
+         WRITE(numout,*) '      initial calendar date aammjj    nn_date0   = ', nn_date0
+         WRITE(numout,*) '      leap year calendar (0/1)        nn_leapy   = ', nn_leapy
+         WRITE(numout,*) '      initial state output            nn_istate  = ', nn_istate
+         WRITE(numout,*) '      frequency of restart file       nn_stock   = ', nn_stock
+         WRITE(numout,*) '      frequency of output file        nn_write   = ', nn_write
+         WRITE(numout,*) '      multi file dimgout              ln_dimgnnn = ', ln_dimgnnn
+         WRITE(numout,*) '      mask land points                ln_mskland = ', ln_mskland
+         WRITE(numout,*) '      overwrite an existing file      ln_clobber = ', ln_clobber
+         WRITE(numout,*) '      NetCDF chunksize (bytes)        nn_chunksz = ', nn_chunksz
+      ENDIF
+
+      no = nn_no                    ! conversion DOCTOR names into model names (this should disappear soon)
+      cexper = cn_exp
+      nrstdt = nn_rstctl
+      nit000 = nn_it000
+      nitend = nn_itend
+      ndate0 = nn_date0
+      nleapy = nn_leapy
+      ninist = nn_istate
+      nstock = nn_stock
+      nwrite = nn_write
+
+
+      !                             ! control of output frequency
       IF ( nstock == 0 .OR. nstock > nitend ) THEN
-         WRITE(ctmp1,*) '           nstock = ', nstock, ' it is forced to ', nitend
+         WRITE(ctmp1,*) 'nstock = ', nstock, ' it is forced to ', nitend
          CALL ctl_warn( ctmp1 )
          nstock = nitend
       ENDIF
       IF ( nwrite == 0 ) THEN
-         WRITE(ctmp1,*) '           nwrite = ', nwrite, ' it is forced to ', nitend
+         WRITE(ctmp1,*) 'nwrite = ', nwrite, ' it is forced to ', nitend
          CALL ctl_warn( ctmp1 )
          nwrite = nitend
@@ -177,22 +167,22 @@
 
 #if defined key_agrif
-      if ( Agrif_Root() ) then
+      IF( Agrif_Root() ) THEN
 #endif
-      SELECT CASE ( nleapy )   ! Choose calendar for IOIPSL
+      SELECT CASE ( nleapy )        ! Choose calendar for IOIPSL
       CASE (  1 ) 
          CALL ioconf_calendar('gregorian')
-         IF(lwp) WRITE(numout,*) '           The IOIPSL calendar is "gregorian", i.e. leap year'
+         IF(lwp) WRITE(numout,*) '   The IOIPSL calendar is "gregorian", i.e. leap year'
       CASE (  0 )
          CALL ioconf_calendar('noleap')
-         IF(lwp) WRITE(numout,*) '           The IOIPSL calendar is "noleap", i.e. no leap year'
+         IF(lwp) WRITE(numout,*) '   The IOIPSL calendar is "noleap", i.e. no leap year'
       CASE ( 30 )
          CALL ioconf_calendar('360d')
-         IF(lwp) WRITE(numout,*) '           The IOIPSL calendar is "360d", i.e. 360 days in a year'
+         IF(lwp) WRITE(numout,*) '   The IOIPSL calendar is "360d", i.e. 360 days in a year'
       END SELECT
 #if defined key_agrif
-      endif
+      ENDIF
 #endif
 
-      SELECT CASE ( nleapy )   ! year=raajj*days day=rjjhh*hours hour=rhhmm*minutes etc ...
+      SELECT CASE ( nleapy )       ! year=raajj*days day=rjjhh*hours hour=rhhmm*minutes etc ...
       CASE ( 1 )
          raajj = 365.25
@@ -210,40 +200,54 @@
       IF(lwp) THEN
          WRITE(numout,*)
-         WRITE(numout,*) '           nb of days per year      raajj = ', raajj,' days'
-         WRITE(numout,*) '           nb of seconds per year   raass = ', raass, ' s'
-         WRITE(numout,*) '           nb of seconds per month  rmoss = ', rmoss, ' s'
-      ENDIF
-
-      REWIND( numnam )              ! Namelist namdom : space/time domain (bathymetry, mesh, timestep)
+         WRITE(numout,*) '   nb of days per year      raajj = ', raajj,' days'
+         WRITE(numout,*) '   nb of seconds per year   raass = ', raass, ' s'
+         WRITE(numout,*) '   nb of seconds per month  rmoss = ', rmoss, ' s'
+      ENDIF
+
+      REWIND( numnam )             ! Namelist namdom : space & time domain (bathymetry, mesh, timestep)
       READ  ( numnam, namdom )
 
       IF(lwp) THEN
          WRITE(numout,*)
-         WRITE(numout,*) '        Namelist namdom'
-         WRITE(numout,*) '           flag read/compute bathymetry   ntopo     = ', ntopo
-         WRITE(numout,*) '           minimum thickness of partial   e3zps_min = ', e3zps_min, ' (m)'
-         WRITE(numout,*) '              step level                  e3zps_rat = ', e3zps_rat
-         WRITE(numout,*) '           flag write mesh/mask file(s)   nmsh      = ', nmsh
-         WRITE(numout,*) '                = 0   no file created                 '
-         WRITE(numout,*) '                = 1   mesh_mask                       '
-         WRITE(numout,*) '                = 2   mesh and mask                   '
-         WRITE(numout,*) '                = 3   mesh_hgr, msh_zgr and mask      '
-         WRITE(numout,*) '           acceleration of converge       nacc      = ', nacc
-         WRITE(numout,*) '           asselin time filter parameter  atfp      = ', atfp
-         WRITE(numout,*) '           time step                      rdt       = ', rdt
-         WRITE(numout,*) '           minimum time step on tracers   rdtmin    = ', rdtmin
-         WRITE(numout,*) '           maximum time step on tracers   rdtmax    = ', rdtmax
-         WRITE(numout,*) '           depth variation tracer step    rdth      = ', rdth
-         WRITE(numout,*) '           number of barotropic time step nn_baro   = ', nn_baro
-      ENDIF
-
-      n_cla = 0
-      REWIND( numnam )              ! Namelist cross land advection
+         WRITE(numout,*) '   Namelist namdom : space & time domain'
+         WRITE(numout,*) '      flag read/compute bathymetry      nn_bathy     = ', nn_bathy
+         WRITE(numout,*) '      minimum thickness of partial      rn_e3zps_min = ', rn_e3zps_min, ' (m)'
+         WRITE(numout,*) '         step level                     rn_e3zps_rat = ', rn_e3zps_rat
+         WRITE(numout,*) '      create mesh/mask file(s)          nn_msh       = ', nn_msh
+         WRITE(numout,*) '           = 0   no file created                 '
+         WRITE(numout,*) '           = 1   mesh_mask                       '
+         WRITE(numout,*) '           = 2   mesh and mask                   '
+         WRITE(numout,*) '           = 3   mesh_hgr, msh_zgr and mask      '
+         WRITE(numout,*) '      ocean time step                      rn_rdt    = ', rn_rdt
+         WRITE(numout,*) '      asselin time filter parameter        rn_atfp   = ', rn_atfp
+         WRITE(numout,*) '      time-splitting: nb of sub time-step  nn_baro   = ', nn_baro
+         WRITE(numout,*) '      acceleration of converge             nn_acc    = ', nn_acc
+         WRITE(numout,*) '        nn_acc=1: surface tracer rdt       rn_rdtmin = ', rn_rdtmin
+         WRITE(numout,*) '                  bottom  tracer rdt       rdtmax    = ', rn_rdtmax
+         WRITE(numout,*) '                  depth of transition      rn_rdth   = ', rn_rdth
+         WRITE(numout,*) '      suppression of closed seas (=0)      nn_closea = ', nn_closea
+      ENDIF
+
+      ntopo     = nn_bathy          ! conversion DOCTOR names into model names (this should disappear soon)
+      e3zps_min = rn_e3zps_min
+      e3zps_rat = rn_e3zps_rat
+      nmsh      = nn_msh
+      nacc      = nn_acc
+      atfp      = rn_atfp
+      rdt       = rn_rdt
+      rdtmin    = rn_rdtmin
+      rdtmax    = rn_rdtmin
+      rdth      = rn_rdth
+      nclosea   = nn_closea
+
+      REWIND( numnam )             ! Namelist cross land advection
       READ  ( numnam, namcla )
       IF(lwp) THEN
          WRITE(numout,*)
-         WRITE(numout,*) '        Namelist namcla'
-         WRITE(numout,*) '           cross land advection        n_cla        = ',n_cla
-      ENDIF
+         WRITE(numout,*) '   Namelist namcla'
+         WRITE(numout,*) '      cross land advection                 nn_cla    = ', nn_cla
+      ENDIF
+
+      n_cla = nn_cla                ! conversion DOCTOR names into model names (this should disappear soon)
 
       IF( nbit_cmp == 1 .AND. n_cla /= 0 )   CALL ctl_stop( ' Reproductibility tests (nbit_cmp=1) require n_cla = 0' )
@@ -261,13 +265,9 @@
       !!----------------------------------------------------------------------
       INTEGER ::   iimi1, ijmi1, iimi2, ijmi2, iima1, ijma1, iima2, ijma2
-      INTEGER, DIMENSION(2) ::   iloc      ! 
+      INTEGER, DIMENSION(2) ::   iloc   ! 
       REAL(wp) ::   ze1min, ze1max, ze2min, ze2max
       !!----------------------------------------------------------------------
-
-      IF(lwp)WRITE(numout,*)
-      IF(lwp)WRITE(numout,*) 'dom_ctl : extrema of the masked scale factors'
-      IF(lwp)WRITE(numout,*) '~~~~~~~'
-
-      IF (lk_mpp) THEN
+      !
+      IF(lk_mpp) THEN
          CALL mpp_minloc( e1t(:,:), tmask(:,:,1), ze1min, iimi1,ijmi1 )
          CALL mpp_minloc( e2t(:,:), tmask(:,:,1), ze2min, iimi2,ijmi2 )
@@ -293,6 +293,8 @@
          ijma2 = iloc(2) + njmpp - 1
       ENDIF
-
-      IF(lwp) THEN
+      IF(lwp) THEN
+         WRITE(numout,*)
+         WRITE(numout,*) 'dom_ctl : extrema of the masked scale factors'
+         WRITE(numout,*) '~~~~~~~'
          WRITE(numout,"(14x,'e1t maxi: ',1f10.2,' at i = ',i5,' j= ',i5)") ze1max, iima1, ijma1
          WRITE(numout,"(14x,'e1t mini: ',1f10.2,' at i = ',i5,' j= ',i5)") ze1min, iimi1, ijmi1
Index: trunk/NEMO/OPA_SRC/DOM/dommsk.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DOM/dommsk.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/DOM/dommsk.F90	(revision 1601)
@@ -36,5 +36,6 @@
    PUBLIC   dom_msk    ! routine called by inidom.F90
 
-   REAL(wp) ::   shlat = 2.   ! type of lateral boundary condition on velocity (namelist namlbc)
+   !                            !!* Namelist namlbc : lateral boundary condition *
+   REAL(wp) ::   rn_shlat = 2.   ! type of lateral boundary condition on velocity
    
    !! * Substitutions
@@ -77,10 +78,10 @@
       !!
       !!        The lateral friction is set through the value of fmask along
-      !!      the coast and topography. This value is defined by shlat, a
+      !!      the coast and topography. This value is defined by rn_shlat, a
       !!      namelist parameter:
-      !!         shlat = 0, free slip  (no shear along the coast)
-      !!         shlat = 2, no slip  (specified zero velocity at the coast)
-      !!         0 < shlat < 2, partial slip   | non-linear velocity profile
-      !!         2 < shlat, strong slip        | in the lateral boundary layer
+      !!         rn_shlat = 0, free slip  (no shear along the coast)
+      !!         rn_shlat = 2, no slip  (specified zero velocity at the coast)
+      !!         0 < rn_shlat < 2, partial slip   | non-linear velocity profile
+      !!         2 < rn_shlat, strong slip        | in the lateral boundary layer
       !!
       !!      N.B. If nperio not equal to 0, the land/ocean mask arrays
@@ -106,5 +107,5 @@
       !!               vmask    : land/ocean mask at v-point (=0. or 1.)
       !!               fmask    : land/ocean mask at f-point (=0. or 1.)
-      !!                          =shlat along lateral boundaries
+      !!                          =rn_shlat along lateral boundaries
       !!               bmask    : land/ocean mask at barotropic stream
       !!                          function point (=0. or 1.) and set to 0 along lateral boundaries
@@ -114,8 +115,8 @@
       INTEGER  ::   iif, iil, ii0, ii1, ii
       INTEGER  ::   ijf, ijl, ij0, ij1
-      INTEGER, DIMENSION(jpi,jpj) ::  imsk
+      INTEGER , DIMENSION(jpi,jpj) ::  imsk
       REAL(wp), DIMENSION(jpi,jpj) ::   zwf
-
-      NAMELIST/namlbc/ shlat
+      !!
+      NAMELIST/namlbc/ rn_shlat
       !!---------------------------------------------------------------------
       
@@ -128,14 +129,14 @@
          WRITE(numout,*) '~~~~~~'
          WRITE(numout,*) '   Namelist namlbc'
-         WRITE(numout,*) '      lateral momentum boundary cond. shlat = ',shlat
-      ENDIF
-
-      IF(             shlat == 0.            ) THEN   ;   IF(lwp) WRITE(numout,*) '         ocean lateral free-slip '
-        ELSEIF (      shlat == 2.            ) THEN   ;   IF(lwp) WRITE(numout,*) '         ocean lateral  no-slip '
-        ELSEIF ( 0. < shlat .AND. shlat < 2. ) THEN   ;   IF(lwp) WRITE(numout,*) '         ocean lateral  partial-slip '
-        ELSEIF ( 2. < shlat                  ) THEN   ;   IF(lwp) WRITE(numout,*) '         ocean lateral  strong-slip '
-        ELSE
-          WRITE(ctmp1,*) ' shlat is negative = ', shlat
-          CALL ctl_stop( ctmp1 )
+         WRITE(numout,*) '      lateral momentum boundary cond.    rn_shlat = ',rn_shlat
+      ENDIF
+
+      IF     (      rn_shlat == 0.               ) THEN   ;   IF(lwp) WRITE(numout,*) '   ocean lateral free-slip '
+      ELSEIF (      rn_shlat == 2.               ) THEN   ;   IF(lwp) WRITE(numout,*) '   ocean lateral  no-slip '
+      ELSEIF ( 0. < rn_shlat .AND. rn_shlat < 2. ) THEN   ;   IF(lwp) WRITE(numout,*) '   ocean lateral  partial-slip '
+      ELSEIF ( 2. < rn_shlat                     ) THEN   ;   IF(lwp) WRITE(numout,*) '   ocean lateral  strong-slip '
+      ELSE
+         WRITE(ctmp1,*) ' rn_shlat is negative = ', rn_shlat
+         CALL ctl_stop( ctmp1 )
       ENDIF
 
@@ -148,5 +149,5 @@
          DO jj = 1, jpj
             DO ji = 1, jpi
-               IF( REAL( mbathy(ji,jj) - jk ) +.1 >= 0.e0 ) tmask(ji,jj,jk) = 1.e0
+               IF( REAL( mbathy(ji,jj) - jk ) +.1 >= 0.e0 )   tmask(ji,jj,jk) = 1.e0
             END DO  
          END DO  
@@ -155,7 +156,6 @@
 !!gm  ????
 #if defined key_zdfkpp
-      IF( cp_cfg == 'orca' )   THEN
-         IF( jp_cfg == 2 )   THEN
-            ! land point on Bab el Mandeb zonal section
+      IF( cp_cfg == 'orca' ) THEN
+         IF( jp_cfg == 2 )   THEN       ! land point on Bab el Mandeb zonal section
             ij0 =  87   ;   ij1 =  88
             ii0 = 160   ;   ii1 = 161
@@ -283,6 +283,6 @@
             DO ji = fs_2, fs_jpim1   ! vector opt.
                IF( fmask(ji,jj,jk) == 0. ) THEN
-                  fmask(ji,jj,jk) = shlat * MIN( 1., MAX( zwf(ji+1,jj), zwf(ji,jj+1),   &
-                     &                                    zwf(ji-1,jj), zwf(ji,jj-1)  )  )
+                  fmask(ji,jj,jk) = rn_shlat * MIN( 1., MAX( zwf(ji+1,jj), zwf(ji,jj+1),   &
+                     &                                       zwf(ji-1,jj), zwf(ji,jj-1)  )  )
                ENDIF
             END DO
@@ -290,16 +290,16 @@
          DO jj = 2, jpjm1
             IF( fmask(1,jj,jk) == 0. ) THEN
-               fmask(1  ,jj,jk) = shlat * MIN( 1., MAX( zwf(2,jj), zwf(1,jj+1), zwf(1,jj-1) ) )
+               fmask(1  ,jj,jk) = rn_shlat * MIN( 1., MAX( zwf(2,jj), zwf(1,jj+1), zwf(1,jj-1) ) )
             ENDIF
             IF( fmask(jpi,jj,jk) == 0. ) THEN
-               fmask(jpi,jj,jk) = shlat * MIN( 1., MAX( zwf(jpi,jj+1), zwf(jpim1,jj), zwf(jpi,jj-1) ) )
+               fmask(jpi,jj,jk) = rn_shlat * MIN( 1., MAX( zwf(jpi,jj+1), zwf(jpim1,jj), zwf(jpi,jj-1) ) )
             ENDIF
          END DO         
          DO ji = 2, jpim1
             IF( fmask(ji,1,jk) == 0. ) THEN
-               fmask(ji, 1 ,jk) = shlat * MIN( 1., MAX( zwf(ji+1,1), zwf(ji,2), zwf(ji-1,1) ) )
+               fmask(ji, 1 ,jk) = rn_shlat * MIN( 1., MAX( zwf(ji+1,1), zwf(ji,2), zwf(ji-1,1) ) )
             ENDIF
             IF( fmask(ji,jpj,jk) == 0. ) THEN
-               fmask(ji,jpj,jk) = shlat * MIN( 1., MAX( zwf(ji+1,jpj), zwf(ji-1,jpj), zwf(ji,jpjm1) ) )
+               fmask(ji,jpj,jk) = rn_shlat * MIN( 1., MAX( zwf(ji+1,jpj), zwf(ji-1,jpj), zwf(ji,jpjm1) ) )
             ENDIF
          END DO
Index: trunk/NEMO/OPA_SRC/DOM/domzgr.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DOM/domzgr.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/DOM/domzgr.F90	(revision 1601)
@@ -42,10 +42,14 @@
 
 !!gm   DOCTOR name for the namelist parameter...
-   !                                 !!! ** Namelist nam_zgr_sco **
-   REAL(wp) ::   sbot_min =  300.     ! minimum depth of s-bottom surface (>0) (m)
-   REAL(wp) ::   sbot_max = 5250.     ! maximum depth of s-bottom surface (= ocean depth) (>0) (m)
-   REAL(wp) ::   theta    =    6.0    ! surface control parameter (0<=theta<=20)
-   REAL(wp) ::   thetb    =    0.75   ! bottom control parameter  (0<=thetb<= 1)
-   REAL(wp) ::   r_max    =    0.15   ! maximum cut-off r-value allowed (0<r_max<1)
+   !                                    !!! ** Namelist namzgr_sco **
+   REAL(wp) ::   rn_sbot_min =  300.     ! minimum depth of s-bottom surface (>0) (m)
+   REAL(wp) ::   rn_sbot_max = 5250.     ! maximum depth of s-bottom surface (= ocean depth) (>0) (m)
+   REAL(wp) ::   rn_theta    =    6.0    ! surface control parameter (0<=rn_theta<=20)
+   REAL(wp) ::   rn_thetb    =    0.75   ! bottom control parameter  (0<=rn_thetb<= 1)
+   REAL(wp) ::   rn_rmax     =    0.15   ! maximum cut-off r-value allowed (0<rn_rmax<1)
+   LOGICAL  ::   ln_s_sigma  = .false.   ! use hybrid s-sigma -coordinate & stretching function fssig1 (ln_sco=T)
+   REAL(wp) ::   rn_bb       =    0.8    ! stretching parameter for song and haidvogel stretching
+   !                                     ! ( rn_bb=0; top only, rn_bb =1; top and bottom)
+   REAL(wp) ::   rn_hc       = 150.      ! Critical depth for s-sigma coordinates
  
    !! * Substitutions
@@ -79,9 +83,9 @@
       INTEGER ::   ioptio = 0   ! temporary integer
       !!
-      NAMELIST/nam_zgr/ ln_zco, ln_zps, ln_sco
-      !!----------------------------------------------------------------------
-
-      REWIND ( numnam )                ! Read Namelist nam_zgr : vertical coordinate'
-      READ   ( numnam, nam_zgr )
+      NAMELIST/namzgr/ ln_zco, ln_zps, ln_sco
+      !!----------------------------------------------------------------------
+
+      REWIND ( numnam )                ! Read Namelist namzgr : vertical coordinate'
+      READ   ( numnam, namzgr )
 
       IF(lwp) THEN                     ! Control print
@@ -89,5 +93,5 @@
          WRITE(numout,*) 'dom_zgr : vertical coordinate'
          WRITE(numout,*) '~~~~~~~'
-         WRITE(numout,*) '          Namelist nam_zgr : set vertical coordinate'
+         WRITE(numout,*) '          Namelist namzgr : set vertical coordinate'
          WRITE(numout,*) '             z-coordinate - full steps      ln_zco = ', ln_zco
          WRITE(numout,*) '             z-coordinate - partial steps   ln_zps = ', ln_zps
@@ -232,8 +236,10 @@
       ENDIF
 
+!!gm BUG in s-coordinate this does not work!
       ! deepest/shallowest W level Above/Bellow ~10m
       zrefdep = 10. - ( 0.1*MINVAL(e3w_0) )                          ! ref. depth with tolerance (10% of minimum layer thickness)
       nlb10 = MINLOC( gdepw_0, mask = gdepw_0 > zrefdep, dim = 1 )   ! shallowest W level Bellow ~10m
       nla10 = nlb10 - 1                                              ! deepest    W level Above  ~10m
+!!gm end bug
 
       IF(lwp) THEN                        ! control print
@@ -1001,14 +1007,14 @@
       !!----------------------------------------------------------------------
       !
-      pf =   (   TANH( theta * ( -(pk-0.5) / REAL(jpkm1) + thetb )  )      &
-         &     - TANH( thetb * theta                                )  )   &
-         & * (   COSH( theta                           )                   &
-         &     + COSH( theta * ( 2.e0 * thetb - 1.e0 ) )  )                &
-         & / ( 2.e0 * SINH( theta ) )
+      pf =   (   TANH( rn_theta * ( -(pk-0.5) / REAL(jpkm1) + rn_thetb )  )      &
+         &     - TANH( rn_thetb * rn_theta                                )  )   &
+         & * (   COSH( rn_theta                           )                   &
+         &     + COSH( rn_theta * ( 2.e0 * rn_thetb - 1.e0 ) )  )                &
+         & / ( 2.e0 * SINH( rn_theta ) )
       !
    END FUNCTION fssig
 
 
-   FUNCTION fssig1( pk1, bb ) RESULT( pf1 )
+   FUNCTION fssig1( pk1, pbb ) RESULT( pf1 )
       !!----------------------------------------------------------------------
       !!                 ***  ROUTINE eos_init  ***
@@ -1024,14 +1030,14 @@
       !!----------------------------------------------------------------------
       REAL(wp), INTENT(in   ) ::   pk1   ! continuous "k" coordinate
-      REAL(wp), INTENT(in   ) ::   bb    ! Stretching coefficient
+      REAL(wp), INTENT(in   ) ::   pbb   ! Stretching coefficient
       REAL(wp)                ::   pf1   ! sigma value
       !!----------------------------------------------------------------------
       !
-      IF ( theta == 0 ) then      ! uniform sigma
+      IF ( rn_theta == 0 ) then      ! uniform sigma
          pf1 = -(pk1-0.5) / REAL( jpkm1 )
       ELSE                        ! stretched sigma
-         pf1 =   (1.0-bb) * (sinh( theta*(-(pk1-0.5)/REAL(jpkm1)) ) ) / sinh(theta) + &
-            &    bb * ( (tanh( theta*( (-(pk1-0.5)/REAL(jpkm1)) + 0.5) ) - tanh(0.5*theta) ) / &
-            &    (2*tanh(0.5*theta) ) )
+         pf1 =   (1.0-pbb) * (sinh( rn_theta*(-(pk1-0.5)/REAL(jpkm1)) ) ) / sinh(rn_theta) + &
+            &    pbb * ( (tanh( rn_theta*( (-(pk1-0.5)/REAL(jpkm1)) + 0.5) ) - tanh(0.5*rn_theta) ) / &
+            &    (2*tanh(0.5*rn_theta) ) )
       ENDIF
       !
@@ -1077,7 +1083,4 @@
       REAL(wp), DIMENSION(jpi,jpj) ::   zri , zrj , zhbat   !  -     -
       !!
-      LOGICAL  :: ln_s_sigma = .false. !use hybrid s_sigma coordinates & stretching function fssig1,used with ln_sco = .true.
-      REAL(wp) :: bb = 0.8   ! stretching parameter for song and haidvogel stretching, bb=0; top only, bb =1; top and bottom
-      REAL(wp) :: hc = 150   ! Critical depth for s-sigma coordinates
 !!gm never do that !!!!   ==> Pb at compilation phase on several computer
       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   gsigw3 = 0.0d0
@@ -1093,9 +1096,9 @@
 !!gm end
       !!
-      NAMELIST/nam_zgr_sco/ sbot_max, sbot_min, theta, thetb, r_max, ln_s_sigma, bb, hc
-      !!----------------------------------------------------------------------
-
-      REWIND( numnam )                        ! Read Namelist nam_zgr_sco : sigma-stretching parameters
-      READ  ( numnam, nam_zgr_sco )
+      NAMELIST/namzgr_sco/ rn_sbot_max, rn_sbot_min, rn_theta, rn_thetb, rn_rmax, ln_s_sigma, rn_bb, rn_hc
+      !!----------------------------------------------------------------------
+
+      REWIND( numnam )                        ! Read Namelist namzgr_sco : sigma-stretching parameters
+      READ  ( numnam, namzgr_sco )
 
       IF(lwp) THEN                            ! control print
@@ -1103,27 +1106,28 @@
          WRITE(numout,*) 'dom:zgr_sco : s-coordinate or hybrid z-s-coordinate'
          WRITE(numout,*) '~~~~~~~~~~~'
-         WRITE(numout,*) '         Namelist nam_zgr_sco'
-         WRITE(numout,*) '            sigma-stretching coeffs '
-         WRITE(numout,*) '            maximum depth of s-bottom surface (>0)    sbot_max   = ' ,sbot_max
-         WRITE(numout,*) '            minimum depth of s-bottom surface (>0)    sbot_min   = ' ,sbot_min
-         WRITE(numout,*) '            surface control parameter (0<=theta<=20)  theta      = ', theta
-         WRITE(numout,*) '            bottom control parameter  (0<=thetb<= 1)  thetb      = ', thetb
-         WRITE(numout,*) '            maximum cut-off r-value allowed           r_max      = ' , r_max
-         WRITE(numout,*) '            Critical depth                            hc         = ', hc
-         WRITE(numout,*) '            Hybrid s-sigma-coordinate                 ln_s_sigma = ', ln_s_sigma
-      ENDIF
-
-      hift(:,:) = sbot_min                     ! set the minimum depth for the s-coordinate
-      hifu(:,:) = sbot_min
-      hifv(:,:) = sbot_min
-      hiff(:,:) = sbot_min
+         WRITE(numout,*) '   Namelist namzgr_sco'
+         WRITE(numout,*) '      sigma-stretching coeffs '
+         WRITE(numout,*) '      maximum depth of s-bottom surface (>0)       rn_sbot_max   = ' ,rn_sbot_max
+         WRITE(numout,*) '      minimum depth of s-bottom surface (>0)       rn_sbot_min   = ' ,rn_sbot_min
+         WRITE(numout,*) '      surface control parameter (0<=rn_theta<=20)  rn_theta      = ', rn_theta
+         WRITE(numout,*) '      bottom  control parameter (0<=rn_thetb<= 1)  rn_thetb      = ', rn_thetb
+         WRITE(numout,*) '      maximum cut-off r-value allowed              rn_rmax       = ', rn_rmax
+         WRITE(numout,*) '      Hybrid s-sigma-coordinate                    ln_s_sigma    = ', ln_s_sigma
+         WRITE(numout,*) '      stretching parameter (song and haidvogel)    rn_bb         = ', rn_bb
+         WRITE(numout,*) '      Critical depth                               rn_hc         = ', rn_hc
+      ENDIF
+
+      hift(:,:) = rn_sbot_min                     ! set the minimum depth for the s-coordinate
+      hifu(:,:) = rn_sbot_min
+      hifv(:,:) = rn_sbot_min
+      hiff(:,:) = rn_sbot_min
 
       !                                        ! set maximum ocean depth
-      bathy(:,:) = MIN( sbot_max, bathy(:,:) )
+      bathy(:,:) = MIN( rn_sbot_max, bathy(:,:) )
 
       DO jj = 1, jpj
          DO ji = 1, jpi
            IF (bathy(ji,jj) .gt. 0.0) THEN
-              bathy(ji,jj) = MAX( sbot_min, bathy(ji,jj) )
+              bathy(ji,jj) = MAX( rn_sbot_min, bathy(ji,jj) )
            ENDIF
          END DO
@@ -1139,5 +1143,5 @@
       DO jj = 1, jpj
          DO ji = 1, jpi
-            zenv(ji,jj) = MAX( bathy(ji,jj), sbot_min )
+            zenv(ji,jj) = MAX( bathy(ji,jj), rn_sbot_min )
          END DO
       END DO
@@ -1145,5 +1149,5 @@
       zrmax = 1.e0
       !                                                     ! ================ !
-      DO WHILE ( jl <= 10000 .AND. zrmax > r_max )          !  Iterative loop  !
+      DO WHILE ( jl <= 10000 .AND. zrmax > rn_rmax )          !  Iterative loop  !
          !                                                  ! ================ !
          jl = jl + 1
@@ -1157,8 +1161,8 @@
                zrj(ji,jj) = ABS( zenv(ji  ,ijp1) - zenv(ji,jj) ) / ( zenv(ji  ,ijp1) + zenv(ji,jj) )
                zrmax = MAX( zrmax, zri(ji,jj), zrj(ji,jj) )
-               IF( zri(ji,jj) > r_max )   zmsk(ji  ,jj  ) = 1.0
-               IF( zri(ji,jj) > r_max )   zmsk(iip1,jj  ) = 1.0
-               IF( zrj(ji,jj) > r_max )   zmsk(ji  ,jj  ) = 1.0
-               IF( zrj(ji,jj) > r_max )   zmsk(ji  ,ijp1) = 1.0
+               IF( zri(ji,jj) > rn_rmax )   zmsk(ji  ,jj  ) = 1.0
+               IF( zri(ji,jj) > rn_rmax )   zmsk(iip1,jj  ) = 1.0
+               IF( zrj(ji,jj) > rn_rmax )   zmsk(ji  ,jj  ) = 1.0
+               IF( zrj(ji,jj) > rn_rmax )   zmsk(ji  ,ijp1) = 1.0
             END DO
          END DO
@@ -1218,5 +1222,5 @@
             DO ji = 1, jpi
                ztaper = EXP( -(gphit(ji,jj)/8)**2 )
-               hbatt(ji,jj) = sbot_max * ztaper + hbatt(ji,jj) * (1.-ztaper)
+               hbatt(ji,jj) = rn_sbot_max * ztaper + hbatt(ji,jj) * (1.-ztaper)
             END DO
          END DO
@@ -1239,9 +1243,9 @@
       IF(lwp) THEN
          WRITE(numout,*)
-         WRITE(numout,*) ' zgr_sco: minimum depth of the envelop topography set to : ', sbot_min
-      ENDIF
-      hbatu(:,:) = sbot_min
-      hbatv(:,:) = sbot_min
-      hbatf(:,:) = sbot_min
+         WRITE(numout,*) ' zgr_sco: minimum depth of the envelop topography set to : ', rn_sbot_min
+      ENDIF
+      hbatu(:,:) = rn_sbot_min
+      hbatv(:,:) = rn_sbot_min
+      hbatf(:,:) = rn_sbot_min
       DO jj = 1, jpjm1
         DO ji = 1, jpim1
@@ -1259,5 +1263,5 @@
          DO ji = 1, jpi
             IF( hbatu(ji,jj) == 0.e0 ) THEN
-               IF( zhbat(ji,jj) == 0.e0 )   hbatu(ji,jj) = sbot_min
+               IF( zhbat(ji,jj) == 0.e0 )   hbatu(ji,jj) = rn_sbot_min
                IF( zhbat(ji,jj) /= 0.e0 )   hbatu(ji,jj) = zhbat(ji,jj)
             ENDIF
@@ -1268,5 +1272,5 @@
          DO ji = 1, jpi
             IF( hbatv(ji,jj) == 0.e0 ) THEN
-               IF( zhbat(ji,jj) == 0.e0 )   hbatv(ji,jj) = sbot_min
+               IF( zhbat(ji,jj) == 0.e0 )   hbatv(ji,jj) = rn_sbot_min
                IF( zhbat(ji,jj) /= 0.e0 )   hbatv(ji,jj) = zhbat(ji,jj)
             ENDIF
@@ -1277,5 +1281,5 @@
          DO ji = 1, jpi
             IF( hbatf(ji,jj) == 0.e0 ) THEN
-               IF( zhbat(ji,jj) == 0.e0 )   hbatf(ji,jj) = sbot_min
+               IF( zhbat(ji,jj) == 0.e0 )   hbatf(ji,jj) = rn_sbot_min
                IF( zhbat(ji,jj) /= 0.e0 )   hbatf(ji,jj) = zhbat(ji,jj)
             ENDIF
@@ -1307,13 +1311,13 @@
       ! non-dimensional "sigma" for model level depth at w- and t-levels
 
-      IF ( ln_s_sigma ) THEN  !Song and Haidvogel style stretched sigma for depths below hc, with uniform sigma in shallower waters
-
-         DO ji=1,jpi
-           DO jj=1,jpj
-
-             IF (hbatt(ji,jj).GT.hc) THEN !deep water, stretched sigma
+      IF( ln_s_sigma ) THEN        ! Song and Haidvogel style stretched sigma for depths
+         !                         ! below rn_hc, with uniform sigma in shallower waters
+         DO ji = 1, jpi
+            DO jj = 1, jpj
+
+             IF (hbatt(ji,jj).GT.rn_hc) THEN !deep water, stretched sigma
                DO jk = 1, jpk
-                  gsigw3(ji,jj,jk) = -fssig1( REAL(jk,wp)-0.5_wp, bb )
-                  gsigt3(ji,jj,jk) = -fssig1( REAL(jk,wp)       , bb )
+                  gsigw3(ji,jj,jk) = -fssig1( REAL(jk,wp)-0.5_wp, rn_bb )
+                  gsigt3(ji,jj,jk) = -fssig1( REAL(jk,wp)       , rn_bb )
                END DO
              ELSE ! shallow water, uniform sigma
@@ -1342,7 +1346,7 @@
                 zcoeft = ( REAL(jk,wp) - 0.5 ) / REAL(jpkm1,wp)
                 zcoefw = ( REAL(jk,wp) - 1.0 ) / REAL(jpkm1,wp)
-                gdept (ji,jj,jk) = (scosrf(ji,jj)+(hbatt(ji,jj)-hc)*gsigt3(ji,jj,jk)+hc*zcoeft)
-                gdepw (ji,jj,jk) = (scosrf(ji,jj)+(hbatt(ji,jj)-hc)*gsigw3(ji,jj,jk)+hc*zcoefw)
-                gdep3w(ji,jj,jk) = (scosrf(ji,jj)+(hbatt(ji,jj)-hc)*gsi3w3(ji,jj,jk)+hc*zcoefw)
+                gdept (ji,jj,jk) = (scosrf(ji,jj)+(hbatt(ji,jj)-rn_hc)*gsigt3(ji,jj,jk)+rn_hc*zcoeft)
+                gdepw (ji,jj,jk) = (scosrf(ji,jj)+(hbatt(ji,jj)-rn_hc)*gsigw3(ji,jj,jk)+rn_hc*zcoefw)
+                gdep3w(ji,jj,jk) = (scosrf(ji,jj)+(hbatt(ji,jj)-rn_hc)*gsi3w3(ji,jj,jk)+rn_hc*zcoefw)
              END DO
 
@@ -1367,12 +1371,12 @@
                                    ( hbatt(ji,jj)+hbatt(ji,jj+1) )
 
-                e3t(ji,jj,jk)=((hbatt(ji,jj)-hc)*esigt3(ji,jj,jk) + hc/FLOAT(jpkm1))
-                e3u(ji,jj,jk)=((hbatu(ji,jj)-hc)*esigtu3(ji,jj,jk) + hc/FLOAT(jpkm1))
-                e3v(ji,jj,jk)=((hbatv(ji,jj)-hc)*esigtv3(ji,jj,jk) + hc/FLOAT(jpkm1))
-                e3f(ji,jj,jk)=((hbatf(ji,jj)-hc)*esigtf3(ji,jj,jk) + hc/FLOAT(jpkm1))
+                e3t(ji,jj,jk)=((hbatt(ji,jj)-rn_hc)*esigt3(ji,jj,jk) + rn_hc/FLOAT(jpkm1))
+                e3u(ji,jj,jk)=((hbatu(ji,jj)-rn_hc)*esigtu3(ji,jj,jk) + rn_hc/FLOAT(jpkm1))
+                e3v(ji,jj,jk)=((hbatv(ji,jj)-rn_hc)*esigtv3(ji,jj,jk) + rn_hc/FLOAT(jpkm1))
+                e3f(ji,jj,jk)=((hbatf(ji,jj)-rn_hc)*esigtf3(ji,jj,jk) + rn_hc/FLOAT(jpkm1))
                 !
-                e3w (ji,jj,jk)=((hbatt(ji,jj)-hc)*esigw3(ji,jj,jk) + hc/FLOAT(jpkm1))
-                e3uw(ji,jj,jk)=((hbatu(ji,jj)-hc)*esigwu3(ji,jj,jk) + hc/FLOAT(jpkm1))
-                e3vw(ji,jj,jk)=((hbatv(ji,jj)-hc)*esigwv3(ji,jj,jk) + hc/FLOAT(jpkm1))
+                e3w (ji,jj,jk)=((hbatt(ji,jj)-rn_hc)*esigw3(ji,jj,jk) + rn_hc/FLOAT(jpkm1))
+                e3uw(ji,jj,jk)=((hbatu(ji,jj)-rn_hc)*esigwu3(ji,jj,jk) + rn_hc/FLOAT(jpkm1))
+                e3vw(ji,jj,jk)=((hbatv(ji,jj)-rn_hc)*esigwv3(ji,jj,jk) + rn_hc/FLOAT(jpkm1))
              END DO
 
Index: trunk/NEMO/OPA_SRC/DYN/dynadv.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DYN/dynadv.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/DYN/dynadv.F90	(revision 1601)
@@ -86,9 +86,9 @@
       INTEGER ::   ioptio
 
-      NAMELIST/nam_dynadv/ ln_dynadv_vec, ln_dynadv_cen2 , ln_dynadv_ubs
+      NAMELIST/namdyn_adv/ ln_dynadv_vec, ln_dynadv_cen2 , ln_dynadv_ubs
       !!----------------------------------------------------------------------
 
-      REWIND ( numnam )               ! Read Namelist nam_dynadv : momentum advection scheme
-      READ   ( numnam, nam_dynadv )
+      REWIND ( numnam )               ! Read Namelist namdyn_adv : momentum advection scheme
+      READ   ( numnam, namdyn_adv )
 
       IF(lwp) THEN                    ! Namelist print
@@ -96,5 +96,5 @@
          WRITE(numout,*) 'dyn_adv_ctl : choice/control of the momentum advection scheme'
          WRITE(numout,*) '~~~~~~~~~~~'
-         WRITE(numout,*) '       Namelist nam_dynadv : chose a advection formulation & scheme for momentum'
+         WRITE(numout,*) '       Namelist namdyn_adv : chose a advection formulation & scheme for momentum'
          WRITE(numout,*) '          Vector/flux form (T/F)             ln_dynadv_vec  = ', ln_dynadv_vec
          WRITE(numout,*) '          2nd order centred advection scheme ln_dynadv_cen2 = ', ln_dynadv_cen2
@@ -108,5 +108,5 @@
       IF( lk_esopa       )   ioptio =          1
 
-      IF( ioptio /= 1 )   CALL ctl_stop( 'Choose ONE advection scheme in namelist nam_dynadv' )
+      IF( ioptio /= 1 )   CALL ctl_stop( 'Choose ONE advection scheme in namelist namdyn_adv' )
 
       !                               ! Set nadv
Index: trunk/NEMO/OPA_SRC/DYN/dynhpg.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DYN/dynhpg.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/DYN/dynhpg.F90	(revision 1601)
@@ -41,16 +41,17 @@
    PUBLIC   dyn_hpg    ! routine called by step module
 
-   !!* Namelist nam_dynhpg : Choice of horizontal pressure gradient computation
-   LOGICAL  ::   ln_hpg_zco = .TRUE.    ! z-coordinate - full steps
-   LOGICAL  ::   ln_hpg_zps = .FALSE.   ! z-coordinate - partial steps (interpolation)
-   LOGICAL  ::   ln_hpg_sco = .FALSE.   ! s-coordinate (standard jacobian formulation)
-   LOGICAL  ::   ln_hpg_hel = .FALSE.   ! s-coordinate (helsinki modification)
-   LOGICAL  ::   ln_hpg_wdj = .FALSE.   ! s-coordinate (weighted density jacobian)
-   LOGICAL  ::   ln_hpg_djc = .FALSE.   ! s-coordinate (Density Jacobian with Cubic polynomial)
-   LOGICAL  ::   ln_hpg_rot = .FALSE.   ! s-coordinate (ROTated axes scheme)
-   REAL(wp) ::   gamm       = 0.e0      ! weighting coefficient
-
-   INTEGER  ::   nhpg  =  0             ! = 0 to 6, type of pressure gradient scheme used
-      !                                 ! (deduced from ln_hpg_... flags)
+   !                                              !!* Namelist namdyn_hpg : hydrostatic pressure gradient 
+   LOGICAL , PUBLIC ::   ln_hpg_zco    = .TRUE.    !: z-coordinate - full steps
+   LOGICAL , PUBLIC ::   ln_hpg_zps    = .FALSE.   !: z-coordinate - partial steps (interpolation)
+   LOGICAL , PUBLIC ::   ln_hpg_sco    = .FALSE.   !: s-coordinate (standard jacobian formulation)
+   LOGICAL , PUBLIC ::   ln_hpg_hel    = .FALSE.   !: s-coordinate (helsinki modification)
+   LOGICAL , PUBLIC ::   ln_hpg_wdj    = .FALSE.   !: s-coordinate (weighted density jacobian)
+   LOGICAL , PUBLIC ::   ln_hpg_djc    = .FALSE.   !: s-coordinate (Density Jacobian with Cubic polynomial)
+   LOGICAL , PUBLIC ::   ln_hpg_rot    = .FALSE.   !: s-coordinate (ROTated axes scheme)
+   REAL(wp), PUBLIC ::   rn_gamma      = 0.e0      !: weighting coefficient
+   LOGICAL , PUBLIC ::   ln_dynhpg_imp = .FALSE.   !: semi-implicite hpg flag
+   INTEGER , PUBLIC ::   nn_dynhpg_rst = 0         !: add dynhpg implicit variables in restart ot not
+
+   INTEGER  ::   nhpg  =  0   ! = 0 to 6, type of pressure gradient scheme used ! (deduced from ln_hpg_... flags)
 
    !! * Substitutions
@@ -116,30 +117,35 @@
       !!              computation and consistency control
       !!
-      !! ** Action  :   Read the namelist namdynhpg and check the consistency
+      !! ** Action  :   Read the namelist namdyn_hpg and check the consistency
       !!      with the type of vertical coordinate used (zco, zps, sco)
       !!----------------------------------------------------------------------
       INTEGER ::   ioptio = 0      ! temporary integer
-
-      NAMELIST/nam_dynhpg/ ln_hpg_zco, ln_hpg_zps, ln_hpg_sco, ln_hpg_hel,   &
-         &                 ln_hpg_wdj, ln_hpg_djc, ln_hpg_rot, gamm
-      !!----------------------------------------------------------------------
-
-      REWIND ( numnam )               ! Read Namelist nam_dynhpg : pressure gradient calculation options
-      READ   ( numnam, nam_dynhpg )
+      !!
+!     NAMELIST/namdyn_hpg/ ln_hpg_zco   , ln_hpg_zps   , ln_hpg_sco, ln_hpg_hel,   &
+!        &                 ln_hpg_wdj   , ln_hpg_djc   , ln_hpg_rot, rn_gamma  ,   &
+!        &                 ln_dynhpg_imp, nn_dynhpg_rst
+      !!----------------------------------------------------------------------
+
+!     REWIND ( numnam )               ! Namelist namdyn_hpg : already read in opa.F90 module
+!     READ   ( numnam, namdyn_hpg )
 
       IF(lwp) THEN                    ! Control print
          WRITE(numout,*)
-         WRITE(numout,*) 'dyn:hpg_ctl : hydrostatic pressure gradient control'
-         WRITE(numout,*) '~~~~~~~~~~~'
-         WRITE(numout,*) '       Namelist nam_dynhpg : choice of hpg scheme'
-         WRITE(numout,*) '          z-coord. - full steps                          ln_hpg_zco = ', ln_hpg_zco
-         WRITE(numout,*) '          z-coord. - partial steps (interpolation)       ln_hpg_zps = ', ln_hpg_zps
-         WRITE(numout,*) '          s-coord. (standard jacobian formulation)       ln_hpg_sco = ', ln_hpg_sco
-         WRITE(numout,*) '          s-coord. (helsinki modification)               ln_hpg_hel = ', ln_hpg_hel
-         WRITE(numout,*) '          s-coord. (weighted density jacobian)           ln_hpg_wdj = ', ln_hpg_wdj
-         WRITE(numout,*) '          s-coord. (Density Jacobian: Cubic polynomial)  ln_hpg_djc = ', ln_hpg_djc
-         WRITE(numout,*) '          s-coord. (ROTated axes scheme)                 ln_hpg_rot = ', ln_hpg_rot
-         WRITE(numout,*) '          weighting coeff. (wdj scheme)                     gamm       = ', gamm
+         WRITE(numout,*) 'dyn_hpg : hydrostatic pressure gradient'
+         WRITE(numout,*) '~~~~~~~'
+         WRITE(numout,*) '   Namelist namdyn_hpg : choice of hpg scheme'
+         WRITE(numout,*) '      z-coord. - full steps                             ln_hpg_zco    = ', ln_hpg_zco
+         WRITE(numout,*) '      z-coord. - partial steps (interpolation)          ln_hpg_zps    = ', ln_hpg_zps
+         WRITE(numout,*) '      s-coord. (standard jacobian formulation)          ln_hpg_sco    = ', ln_hpg_sco
+         WRITE(numout,*) '      s-coord. (helsinki modification)                  ln_hpg_hel    = ', ln_hpg_hel
+         WRITE(numout,*) '      s-coord. (weighted density jacobian)              ln_hpg_wdj    = ', ln_hpg_wdj
+         WRITE(numout,*) '      s-coord. (Density Jacobian: Cubic polynomial)     ln_hpg_djc    = ', ln_hpg_djc
+         WRITE(numout,*) '      s-coord. (ROTated axes scheme)                    ln_hpg_rot    = ', ln_hpg_rot
+         WRITE(numout,*) '      weighting coeff. (wdj scheme)                     rn_gamma      = ', rn_gamma
+         WRITE(numout,*) '      time stepping: centered (F) or semi-implicit (T)  ln_dynhpg_imp = ', ln_dynhpg_imp
+         WRITE(numout,*) '      add in restart dynhpg semi-implicit variable      nn_dynhpg_rst = ', nn_dynhpg_rst
       ENDIF
+
+      IF( .NOT. ln_dynhpg_imp )   nn_dynhpg_rst = 0      ! force no adding dynhpg implicit variables in restart
 
       IF( lk_vvl .AND. .NOT. ln_hpg_sco )   THEN
@@ -517,6 +523,6 @@
       !!
       !! ** Method  :   Weighted Density Jacobian (wdj) scheme (song 1998)
-      !!      The weighting coefficients from the namelist parameter gamm
-      !!      (alpha=0.5-gamm ; beta=1-alpha=0.5+gamm)
+      !!      The weighting coefficients from the namelist parameter rn_gamma
+      !!      (alpha=0.5-rn_gamma ; beta=1-alpha=0.5+rn_gamma
       !!
       !! Reference : Song, Mon. Wea. Rev., 126, 3213-3230, 1998.
@@ -540,6 +546,6 @@
       ! Local constant initialization
       zcoef0 = - grav * 0.5
-      zalph  = 0.5 - gamm        ! weighting coefficients (alpha=0.5-gamm)
-      zbeta  = 0.5 + gamm        !                        (beta =1-alpha=0.5+gamm)
+      zalph  = 0.5 - rn_gamma    ! weighting coefficients (alpha=0.5-rn_gamma
+      zbeta  = 0.5 + rn_gamma    !                        (beta =1-alpha=0.5+rn_gamma
 
       ! Surface value (no ponderation)
Index: trunk/NEMO/OPA_SRC/DYN/dynspg_flt.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DYN/dynspg_flt.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/DYN/dynspg_flt.F90	(revision 1601)
@@ -18,7 +18,5 @@
    !!   'key_dynspg_flt'                              filtered free surface
    !!----------------------------------------------------------------------
-   !!   dyn_spg_flt  : update the momentum trend with the surface pressure
-   !!                  gradient in the filtered free surface case with
-   !!                  vector optimization
+   !!   dyn_spg_flt  : update the momentum trend with the surface pressure gradient in the filtered free surface case 
    !!   flt_rst      : read/write the time-splitting restart fields in the ocean restart file
    !!----------------------------------------------------------------------
@@ -31,4 +29,5 @@
    USE phycst          ! physical constants
    USE domvvl          ! variable volume
+   USE solmat          ! matrix construction for elliptic solvers
    USE solver          ! solver initialization
    USE solpcg          ! preconditionned conjugate gradient solver
@@ -44,5 +43,4 @@
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
    USE prtctl          ! Print control
-   USE solmat          ! matrix construction for elliptic solvers
    USE agrif_opa_interp
    USE iom
@@ -76,6 +74,6 @@
       !! ** Method  :   Filtered free surface formulation. The surface
       !!      pressure gradient is given by:
-      !!         spgu = 1/rau0 d/dx(ps) =  1/e1u di( sshn + rnu btda )
-      !!         spgv = 1/rau0 d/dy(ps) =  1/e2v dj( sshn + rnu btda )
+      !!         spgu = 1/rau0 d/dx(ps) =  1/e1u di( sshn + btda )
+      !!         spgv = 1/rau0 d/dy(ps) =  1/e2v dj( sshn + btda )
       !!      where sshn is the free surface elevation and btda is the after
       !!      time derivative of the free surface elevation
@@ -106,11 +104,11 @@
       USE oce, ONLY :   zvb   => sa   ! ta used as workspace
       !!
-      INTEGER, INTENT( in )  ::   kt       ! ocean time-step index
-      INTEGER, INTENT( out ) ::   kindic   ! solver convergence flag (<0 if not converge)
+      INTEGER, INTENT(in   ) ::   kt       ! ocean time-step index
+      INTEGER, INTENT(  out) ::   kindic   ! solver convergence flag (<0 if not converge)
       !!                                   
-      INTEGER  ::   ji, jj, jk                          ! dummy loop indices
-      REAL(wp) ::   z2dt, z2dtg, zraur, znugdt          ! temporary scalars
-      REAL(wp) ::   znurau, zgcb, zbtd                  !   "          "
-      REAL(wp) ::   ztdgu, ztdgv                        !   "          "
+      INTEGER  ::   ji, jj, jk           ! dummy loop indices
+      REAL(wp) ::   z2dt, z2dtg, zraur   ! temporary scalars
+      REAL(wp) ::   zgcb, zbtd   !   -          -
+      REAL(wp) ::   ztdgu, ztdgv         !   -          -
       !!----------------------------------------------------------------------
       !
@@ -127,16 +125,14 @@
          ! read filtered free surface arrays in restart file
          ! when using agrif, sshn, gcx have to be read in istate
-         IF (.NOT. lk_agrif) CALL flt_rst( nit000, 'READ' )       ! read or initialize the following fields:
+         IF(.NOT. lk_agrif)   CALL flt_rst( nit000, 'READ' )      ! read or initialize the following fields:
          !                                                        ! gcx, gcxb
       ENDIF
 
       ! Local constant initialization
-      z2dt = 2. * rdt                                       ! time step: leap-frog
-      IF( neuler == 0 .AND. kt == nit000 ) z2dt = rdt       ! time step: Euler if restart from rest
-      IF( neuler == 0 .AND. kt == nit000+1 ) CALL sol_mat(kt)
+      z2dt = 2. * rdt                                             ! time step: leap-frog
+      IF( neuler == 0 .AND. kt == nit000   )   z2dt = rdt         ! time step: Euler if restart from rest
+      IF( neuler == 0 .AND. kt == nit000+1 )   CALL sol_mat( kt )
       z2dtg  = grav * z2dt
       zraur  = 1. / rauw
-      znugdt =  rnu * grav * z2dt
-      znurau =  znugdt * zraur
 
       !! Explicit physics with thickness weighted updates
@@ -237,7 +233,5 @@
          END DO
       END DO
-
-      ! Boundary conditions on (spgu,spgv)
-      CALL lbc_lnk( spgu, 'U', -1. )
+      CALL lbc_lnk( spgu, 'U', -1. )       ! lateral boundary conditions 
       CALL lbc_lnk( spgv, 'V', -1. )
 
@@ -245,5 +239,5 @@
 
       ! Right hand side of the elliptic equation and first guess
-      ! -----------------------------------------------------------
+      ! --------------------------------------------------------
       DO jj = 2, jpjm1
          DO ji = fs_2, fs_jpim1   ! vector opt.
@@ -259,5 +253,5 @@
       END DO
       ! applied the lateral boundary conditions
-      IF( nsolv == 2 .AND. MAX( jpr2di, jpr2dj ) > 0 ) CALL lbc_lnk_e( gcb, c_solver_pt, 1. )   
+      IF( nn_solv == 2 .AND. MAX( jpr2di, jpr2dj ) > 0 )   CALL lbc_lnk_e( gcb, c_solver_pt, 1. )   
 
 #if defined key_agrif
@@ -265,11 +259,11 @@
          ! add contribution of gradient of after barotropic transport divergence 
          IF( nbondi == -1 .OR. nbondi == 2 )   gcb(3     ,:) =   &
-            &    gcb(3     ,:) - znugdt * z2dt * laplacu(2     ,:) * gcdprc(3     ,:) * hu(2     ,:) * e2u(2     ,:)
+            &    gcb(3     ,:) - z2dtg * z2dt * laplacu(2     ,:) * gcdprc(3     ,:) * hu(2     ,:) * e2u(2     ,:)
          IF( nbondi ==  1 .OR. nbondi == 2 )   gcb(nlci-2,:) =   &
-            &    gcb(nlci-2,:) + znugdt * z2dt * laplacu(nlci-2,:) * gcdprc(nlci-2,:) * hu(nlci-2,:) * e2u(nlci-2,:)
+            &    gcb(nlci-2,:) + z2dtg * z2dt * laplacu(nlci-2,:) * gcdprc(nlci-2,:) * hu(nlci-2,:) * e2u(nlci-2,:)
          IF( nbondj == -1 .OR. nbondj == 2 )   gcb(:     ,3) =   &
-            &    gcb(:,3     ) - znugdt * z2dt * laplacv(:,2     ) * gcdprc(:,3     ) * hv(:,2     ) * e1v(:,2     )
+            &    gcb(:,3     ) - z2dtg * z2dt * laplacv(:,2     ) * gcdprc(:,3     ) * hv(:,2     ) * e1v(:,2     )
          IF( nbondj ==  1 .OR. nbondj == 2 )   gcb(:,nlcj-2) =   &
-            &    gcb(:,nlcj-2) + znugdt * z2dt * laplacv(:,nlcj-2) * gcdprc(:,nlcj-2) * hv(:,nlcj-2) * e1v(:,nlcj-2)
+            &    gcb(:,nlcj-2) + z2dtg * z2dt * laplacv(:,nlcj-2) * gcdprc(:,nlcj-2) * hv(:,nlcj-2) * e1v(:,nlcj-2)
       ENDIF
 #endif
@@ -298,11 +292,6 @@
       kindic = 0
       IF( ncut == 0 ) THEN
-         IF( nsolv == 1 ) THEN         ! diagonal preconditioned conjuguate gradient
-            CALL sol_pcg( kindic )
-         ELSEIF( nsolv == 2 ) THEN     ! successive-over-relaxation
-            CALL sol_sor( kindic )
-         ELSE                          ! e r r o r in nsolv namelist parameter
-            WRITE(ctmp1,*) ' ~~~~~~~~~~~                not = ', nsolv
-            CALL ctl_stop( ' dyn_spg_flt : e r r o r, nsolv = 1 or 2', ctmp1 )
+         IF    ( nn_solv == 1 ) THEN   ;   CALL sol_pcg( kindic )      ! diagonal preconditioned conjuguate gradient
+         ELSEIF( nn_solv == 2 ) THEN   ;   CALL sol_sor( kindic )      ! successive-over-relaxation
          ENDIF
       ENDIF
@@ -313,6 +302,6 @@
          DO ji = fs_2, fs_jpim1   ! vector opt.
             ! trend of Transport divergence gradient
-            ztdgu = znugdt * (gcx(ji+1,jj  ) - gcx(ji,jj) ) / e1u(ji,jj)
-            ztdgv = znugdt * (gcx(ji  ,jj+1) - gcx(ji,jj) ) / e2v(ji,jj)
+            ztdgu = z2dtg * (gcx(ji+1,jj  ) - gcx(ji,jj) ) / e1u(ji,jj)
+            ztdgv = z2dtg * (gcx(ji  ,jj+1) - gcx(ji,jj) ) / e2v(ji,jj)
             ! multiplied by z2dt
 #if defined key_obc
@@ -336,8 +325,8 @@
       IF( .NOT. Agrif_Root() ) THEN
          ! caution : grad D (fine) = grad D (coarse) at coarse/fine interface
-         IF( nbondi == -1 .OR. nbondi == 2 ) spgu(2     ,:) = znugdt * z2dt * laplacu(2     ,:) * umask(2     ,:,1)
-         IF( nbondi ==  1 .OR. nbondi == 2 ) spgu(nlci-2,:) = znugdt * z2dt * laplacu(nlci-2,:) * umask(nlci-2,:,1)
-         IF( nbondj == -1 .OR. nbondj == 2 ) spgv(:,2     ) = znugdt * z2dt * laplacv(:,2     ) * vmask(:     ,2,1)
-         IF( nbondj ==  1 .OR. nbondj == 2 ) spgv(:,nlcj-2) = znugdt * z2dt * laplacv(:,nlcj-2) * vmask(:,nlcj-2,1)
+         IF( nbondi == -1 .OR. nbondi == 2 ) spgu(2     ,:) = z2dtg * z2dt * laplacu(2     ,:) * umask(2     ,:,1)
+         IF( nbondi ==  1 .OR. nbondi == 2 ) spgu(nlci-2,:) = z2dtg * z2dt * laplacu(nlci-2,:) * umask(nlci-2,:,1)
+         IF( nbondj == -1 .OR. nbondj == 2 ) spgv(:,2     ) = z2dtg * z2dt * laplacv(:,2     ) * vmask(:     ,2,1)
+         IF( nbondj ==  1 .OR. nbondj == 2 ) spgv(:,nlcj-2) = z2dtg * z2dt * laplacv(:,nlcj-2) * vmask(:,nlcj-2,1)
       ENDIF
 #endif      
Index: trunk/NEMO/OPA_SRC/DYN/dynvor.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DYN/dynvor.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/DYN/dynvor.F90	(revision 1601)
@@ -38,5 +38,5 @@
    PUBLIC   dyn_vor   ! routine called by step.F90
 
-   !                                             !!* Namelist nam_dynvor: vorticity term
+   !                                             !!* Namelist namdyn_vor: vorticity term
    LOGICAL, PUBLIC ::   ln_dynvor_ene = .FALSE.   !: energy conserving scheme
    LOGICAL, PUBLIC ::   ln_dynvor_ens = .TRUE.    !: enstrophy conserving scheme
@@ -645,9 +645,9 @@
       !!----------------------------------------------------------------------
       INTEGER ::   ioptio          ! temporary integer
-      NAMELIST/nam_dynvor/ ln_dynvor_ens, ln_dynvor_ene, ln_dynvor_mix, ln_dynvor_een
-      !!----------------------------------------------------------------------
-
-      REWIND ( numnam )               ! Read Namelist nam_dynvor : Vorticity scheme options
-      READ   ( numnam, nam_dynvor )
+      NAMELIST/namdyn_vor/ ln_dynvor_ens, ln_dynvor_ene, ln_dynvor_mix, ln_dynvor_een
+      !!----------------------------------------------------------------------
+
+      REWIND ( numnam )               ! Read Namelist namdyn_vor : Vorticity scheme options
+      READ   ( numnam, namdyn_vor )
 
       IF(lwp) THEN                    ! Namelist print
@@ -655,5 +655,5 @@
          WRITE(numout,*) 'dyn:vor_ctl : vorticity term : read namelist and control the consistency'
          WRITE(numout,*) '~~~~~~~~~~~'
-         WRITE(numout,*) '        Namelist nam_dynvor : oice of the vorticity term scheme'
+         WRITE(numout,*) '        Namelist namdyn_vor : oice of the vorticity term scheme'
          WRITE(numout,*) '           energy    conserving scheme                ln_dynvor_ene = ', ln_dynvor_ene
          WRITE(numout,*) '           enstrophy conserving scheme                ln_dynvor_ens = ', ln_dynvor_ens
Index: trunk/NEMO/OPA_SRC/FLO/flo_oce.F90
===================================================================
--- trunk/NEMO/OPA_SRC/FLO/flo_oce.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/FLO/flo_oce.F90	(revision 1601)
@@ -2,14 +2,8 @@
    !!======================================================================
    !!                     ***  MODULE flo_oce  ***
-   !!                
-   !! ** Purpose : - Define in memory all floats parameters and variables
-   !!
-   !! History :
-   !!   8.0  !  99-10  (CLIPPER projet)
-   !!   9.0  !  02-11  (G. Madec, A. Bozec)  F90: Free form and module
+   !! lagrangian floats :   define in memory all floats parameters and variables
    !!======================================================================
-   !!  OPA 9.0 , LOCEAN-IPSL (2005) 
-   !! $Id$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
+   !! History :   OPA  ! 1999-10  (CLIPPER projet)
+   !!   NEMO      1.0  ! 2002-11  (G. Madec, A. Bozec)  F90: Free form and module
    !!----------------------------------------------------------------------
 #if   defined key_floats   ||   defined key_esopa
@@ -17,8 +11,8 @@
    !!   'key_floats'                                        drifting floats
    !!----------------------------------------------------------------------
-   !! * Modules used
    USE par_oce         ! ocean parameters
 
    IMPLICIT NONE
+   PUBLIC
 
    LOGICAL, PUBLIC, PARAMETER ::   lk_floats = .TRUE.    !: float flag
@@ -26,36 +20,24 @@
    !! float parameters
    !! ----------------
-   INTEGER, PARAMETER ::   &
-      jpnfl     = 23 ,            &  ! total number of floats during the run
-      jpnnewflo =  0 ,            &  ! number of floats added in a new run
-      jpnrstflo = jpnfl-jpnnewflo    ! number of floats for the restart
+   INTEGER, PUBLIC, PARAMETER ::   jpnfl     = 23 ,                !: total number of floats during the run
+   INTEGER, PUBLIC, PARAMETER ::   jpnnewflo =  0 ,                !: number of floats added in a new run
+   INTEGER, PUBLIC, PARAMETER ::   jpnrstflo = jpnfl - jpnnewflo   !: number of floats for the restart
 
    !! float variables
    !! ---------------
-   INTEGER, DIMENSION(jpnfl)  ::    &
-      nisobfl,    &  ! 0 for a isobar float
-      !              ! 1 for a float following the w velocity
-      ngrpfl         ! number to identify searcher group
+   INTEGER, PUBLIC, DIMENSION(jpnfl)  ::   nisobfl   !: =0 for a isobar float , =1 for a float following the w velocity
+   INTEGER, PUBLIC, DIMENSION(jpnfl)  ::   ngrpfl    !: number to identify searcher group
 
-   REAL(wp), DIMENSION(jpnfl) ::    &
-      flxx,       &  ! longitude of float (decimal degree)
-      flyy,       &  ! latitude of float (decimal degree)
-      flzz,       &  ! depth of float (m, positive)
-      tpifl,      &  ! index of float position on zonal axe
-      tpjfl,      &  ! index of float position on meridien axe
-      tpkfl          ! index of float position on z axe
+   REAL(wp), PUBLIC, DIMENSION(jpnfl) ::   flxx , flyy , flzz    !: longitude, latitude, depth of float (decimal degree, m >0)
+   REAL(wp), PUBLIC, DIMENSION(jpnfl) ::   tpifl, tpjfl, tpkfl   !: (i,j,k) indices of float position
+
+   REAL(wp), PUBLIC, DIMENSION(jpi, jpj, jpk) ::   wb            !: vertical velocity at previous time step (m s-1).
    
-   REAL(wp), DIMENSION(jpi, jpj, jpk) ::    & 
-      wb             ! vertical velocity at previous time step (m s-1).
-   
-   ! floats unit
-   
-   LOGICAL  ::                & !!! * namelist namflo *
-      ln_rstflo = .FALSE. ,   &  ! T/F float restart 
-      ln_argo   = .FALSE. ,   &  ! T/F argo type floats
-      ln_flork4 = .FALSE.        ! T/F 4th order Runge-Kutta
-   INTEGER  ::               & !!! * namelist namflo *
-      nwritefl,              &  ! frequency of float output file 
-      nstockfl                  ! frequency of float restart file
+   !                                  !!! * namelist namflo : langrangian floats *
+   LOGICAL, PUBLIC  ::   ln_rstflo  = .FALSE.    !: T/F float restart 
+   LOGICAL, PUBLIC  ::   ln_argo    = .FALSE.    !: T/F argo type floats
+   LOGICAL, PUBLIC  ::   ln_flork4  = .FALSE.    !: T/F 4th order Runge-Kutta
+   INTEGER, PUBLIC  ::   nn_writefl = 150       !: frequency of float output file 
+   INTEGER, PUBLIC  ::   nn_stockfl = 450       !: frequency of float restart file
 
 #else
@@ -66,4 +48,8 @@
 #endif
 
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) 
+   !! $Id$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
    !!======================================================================
 END MODULE flo_oce
Index: trunk/NEMO/OPA_SRC/FLO/floats.F90
===================================================================
--- trunk/NEMO/OPA_SRC/FLO/floats.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/FLO/floats.F90	(revision 1601)
@@ -4,4 +4,7 @@
    !! Ocean floats : floats
    !!======================================================================
+   !! History :  OPA  !          (CLIPPER)   original Code
+   !!   NEMO     1.0  ! 2002-06  (A. Bozec)  F90, Free form and module
+   !!----------------------------------------------------------------------
 #if   defined key_floats   ||   defined key_esopa
    !!----------------------------------------------------------------------
@@ -11,5 +14,4 @@
    !!   flo_init  : initialization of float trajectories computation
    !!----------------------------------------------------------------------
-   !! * Modules used
    USE flo_oce         ! floats variables
    USE lib_mpp         ! distributed memory computing
@@ -22,10 +24,10 @@
    PRIVATE  
 
-   !! * Routine accessibility
-   PUBLIC flo_stp    ! routine called by step.F90
+   PUBLIC   flo_stp    ! routine called by step.F90
+
    !!----------------------------------------------------------------------
-   !!   OPA 9.0 , LOCEAN-IPSL (2005) 
+   !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) 
    !! $Id$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
 
@@ -42,12 +44,8 @@
       !!        algorithm by default and with a 4th order Runge-Kutta scheme
       !!        if ln_flork4 =T
-      !!      
-      !! History :
-      !!   8.5  !  02-06  (A. Bozec, G. Madec )  F90: Free form and module
       !!----------------------------------------------------------------------
-      !! * arguments
       INTEGER, INTENT( in  ) ::   kt   ! ocean time step
       !!----------------------------------------------------------------------
-
+      !
       IF( kt == nit000 ) THEN
          IF(lwp) WRITE(numout,*)
@@ -59,27 +57,18 @@
          CALL flo_dom            ! compute/read initial position of floats
 
-         ! Initialisation of wb for computation of floats trajectories at the first time step
-         wb(:,:,:) = wn(:,:,:)
+         wb(:,:,:) = wn(:,:,:)   ! set wb for computation of floats trajectories at the first time step
       ENDIF
-
-      IF( ln_flork4 ) THEN
-         CALL flo_4rk( kt )        ! Trajectories using a 4th order Runge Kutta scheme
-      ELSE
-         CALL flo_blk( kt )        ! Trajectories using Blanke' algorithme
+      !
+      IF( ln_flork4 ) THEN   ;   CALL flo_4rk( kt )        ! Trajectories using a 4th order Runge Kutta scheme
+      ELSE                   ;   CALL flo_blk( kt )        ! Trajectories using Blanke' algorithme
       ENDIF
-
+      !
       IF( lk_mpp )   CALL mppsync   ! synchronization of all the processor
-
-
-      ! Writing and restart      
-      
-      ! trajectories file 
-      IF( kt == nit000 .OR. MOD( kt, nwritefl ) == 0 )   CALL flo_wri( kt )
-      ! restart file 
-      IF( kt == nitend .OR. MOD( kt, nstockfl ) == 0 )   CALL flo_wri( kt )
-
-      ! Save the old vertical velocity field
-      wb(:,:,:) = wn(:,:,:)
-
+      !
+      IF( kt == nit000 .OR. MOD( kt, nn_writefl ) == 0 )   CALL flo_wri( kt )      ! trajectories file 
+      IF( kt == nitend .OR. MOD( kt, nn_stockfl ) == 0 )   CALL flo_wri( kt )      ! restart file 
+      !
+      wb(:,:,:) = wn(:,:,:)         ! Save the old vertical velocity field
+      !
    END SUBROUTINE flo_stp
 
@@ -90,37 +79,23 @@
       !!                   
       !! ** Purpose :   Read the namelist of floats
-      !!      
-      !! History :
-      !!   8.0  !         (CLIPPER)   original Code
-      !!   8.5  !  02-06  (A. Bozec)  F90, Free form and module
       !!----------------------------------------------------------------------
-      !! * Modules used
       USE ioipsl
-
-      !! * Local declarations
-      NAMELIST/namflo/ ln_rstflo, nwritefl, nstockfl, ln_argo, ln_flork4 
+      !!
+      NAMELIST/namflo/ ln_rstflo, nn_writefl, nn_stockfl, ln_argo, ln_flork4 
       !!---------------------------------------------------------------------
-      ! Namelist namflo : floats
-      
-      ! default values
-      ln_rstflo  = .FALSE.
-      nwritefl  = 150
-      nstockfl  = 450
-      
-      ! lecture of namflo
-      REWIND( numnam )
+      !
+      REWIND( numnam )              ! Namelist namflo : floats
       READ  ( numnam, namflo )
-
-      IF(lwp) THEN
-         WRITE(numout,*) ' '
+      !
+      IF(lwp) THEN                  ! control print
+         WRITE(numout,*)
          WRITE(numout,*) '         Namelist floats :'
          WRITE(numout,*) '            restart                          ln_rstflo = ', ln_rstflo
-         WRITE(numout,*) '            frequency of float output file   nwritefl  = ', nwritefl
-         WRITE(numout,*) '            frequency of float restart file  nstockfl  = ', nstockfl
+         WRITE(numout,*) '            frequency of float output file   nn_writefl  = ', nn_writefl
+         WRITE(numout,*) '            frequency of float restart file  nn_stockfl  = ', nn_stockfl
          WRITE(numout,*) '            Argo type floats                 ln_argo   = ', ln_argo
          WRITE(numout,*) '            Computation of T trajectories    ln_flork4 = ', ln_flork4
-         WRITE(numout,*) ' '
       ENDIF
-
+      !
    END SUBROUTINE flo_init
 
Index: trunk/NEMO/OPA_SRC/FLO/flowri.F90
===================================================================
--- trunk/NEMO/OPA_SRC/FLO/flowri.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/FLO/flowri.F90	(revision 1601)
@@ -2,6 +2,11 @@
    !!======================================================================
    !!                       ***  MODULE  flowri  ***
-   !! 
+   !! lagrangian floats :   outputs
    !!======================================================================
+   !! History :   OPA  ! 1999-09  (Y. Drillet)  Original code
+   !!                  ! 2000-06  (J.-M. Molines)  Profiling floats for CLS 
+   !!   NEMO      1.0  ! 2002-11  (G. Madec, A. Bozec)  F90: Free form and module
+   !!----------------------------------------------------------------------
+
 #if   defined key_floats   ||   defined key_esopa
    !!----------------------------------------------------------------------
@@ -10,5 +15,4 @@
    !!    flowri     : write trajectories of floats in file 
    !!----------------------------------------------------------------------
-   !! * Modules used
    USE flo_oce         ! ocean drifting floats
    USE oce             ! ocean dynamics and tracers
@@ -19,18 +23,16 @@
 
    IMPLICIT NONE
-
-   !! * Accessibility
    PRIVATE
-   PUBLIC flo_wri     ! routine called by floats.F90
-
-   !! * Module variables
-      INTEGER :: jfl              ! number of floats
+
+   PUBLIC   flo_wri    ! routine called by floats.F90
+
+   INTEGER ::   jfl    ! number of floats
 
    !! * Substitutions
 #  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
-   !!   OPA 9.0 , LOCEAN-IPSL (2005) 
+   !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) 
    !! $Id$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
 
@@ -38,5 +40,5 @@
 
    SUBROUTINE flo_wri( kt )
-      !!---------------------------------------------------------------------
+      !!-------------------------------------------------------------------
       !!                  ***  ROUTINE flo_wri  ***
       !!             
@@ -44,21 +46,12 @@
       !!      and the temperature and salinity at this position
       !!      
-      !! ** Method  :   The frequency is nwritefl
-      !!      
-      !!  History :
-      !!    8.0  !  99-09  (Y. Drillet)  Original code
-      !!         !  00-06  (J.-M. Molines)  Profiling floats for CLS 
-      !!    8.5  !  02-10  (A. Bozec)  F90: Free form and module
+      !! ** Method  :   The frequency is nn_writefl
       !!----------------------------------------------------------------------
-      !! * Arguments
-      INTEGER  :: kt                               ! time step
-
-      !! * Local declarations
+      INTEGER ::   kt   ! time step
+      !!
       CHARACTER (len=21) ::  clname
-      INTEGER ::   inum            ! temporary logical unit for restart file
-      INTEGER  ::   &
-         iafl,ibfl,icfl,ia1fl,ib1fl,ic1fl,jfl,irecflo,   &
-         iafloc,ibfloc,ia1floc,ib1floc,   &
-         iafln, ibfln
+      INTEGER ::   inum   ! temporary logical unit for restart file
+      INTEGER ::   iafl, ibfl, icfl, ia1fl, ib1fl, ic1fl, jfl, irecflo,   &
+      INTEGER ::   iafloc, ibfloc, ia1floc, ib1floc, iafln, ibfln
       INTEGER  ::    ic, jc , jpn
       INTEGER, DIMENSION ( jpnij )  :: iproc
@@ -69,5 +62,5 @@
       !!---------------------------------------------------------------------
       
-      IF( kt == nit000 .OR. MOD( kt,nwritefl)== 0 ) THEN 
+      IF( kt == nit000 .OR. MOD( kt,nn_writefl)== 0 ) THEN 
 
          ! header of output floats file
@@ -84,6 +77,6 @@
 
          IF( kt == nit000 ) THEN
-            irecflo = NINT( (nitend-nit000) / FLOAT(nwritefl) )
-            IF(lwp) WRITE(numflo)cexper,no,irecflo,jpnfl,nwritefl
+            irecflo = NINT( (nitend-nit000) / FLOAT(nn_writefl) )
+            IF(lwp) WRITE(numflo)cexper,no,irecflo,jpnfl,nn_writefl
          ENDIF
          zdtj = rdt / 86400.      !!bug   use of 86400 instead of the phycst parameter
@@ -246,5 +239,5 @@
       ENDIF
       
-      IF( (MOD(kt,nstockfl) == 0) .OR. ( kt == nitend ) ) THEN 
+      IF( (MOD(kt,nn_stockfl) == 0) .OR. ( kt == nitend ) ) THEN 
          ! Writing the restart file 
          IF(lwp) THEN
Index: trunk/NEMO/OPA_SRC/IOM/in_out_manager.F90
===================================================================
--- trunk/NEMO/OPA_SRC/IOM/in_out_manager.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/IOM/in_out_manager.F90	(revision 1601)
@@ -29,16 +29,18 @@
    !!                   namrun namelist parameters
    !!----------------------------------------------------------------------
-   CHARACTER(len=16)  ::   cexper        = "exp0"      !: experiment name used for output filename
+   CHARACTER(len=16)  ::   cn_exp        = "exp0"      !: experiment name used for output filename
    CHARACTER(len=32)  ::   cn_ocerst_in  = "restart"   !: suffix of ocean restart name (input)
    CHARACTER(len=32)  ::   cn_ocerst_out = "restart"   !: suffix of ocean restart name (output)
    LOGICAL            ::   ln_rstart     = .FALSE.     !: start from (F) rest or (T) a restart file
-   INTEGER            ::   no            = 0           !: job number
-   INTEGER            ::   nrstdt        = 0           !: control of the time step (0, 1 or 2)
+   INTEGER            ::   nn_no         = 0           !: job number
+   INTEGER            ::   nn_rstctl     = 0           !: control of the time step (0, 1 or 2)
    INTEGER            ::   nn_rstssh     = 0           !: hand made initilization of ssh or not (1/0)
-   INTEGER            ::   nit000        = 1           !: index of the first time step
-   INTEGER            ::   nitend        = 10          !: index of the last time step
-   INTEGER            ::   ndate0        = 961115      !: initial calendar date aammjj
-   INTEGER            ::   nleapy        = 0           !: Leap year calendar flag (0/1 or 30)
-   INTEGER            ::   ninist        = 0           !: initial state output flag (0/1)
+   INTEGER            ::   nn_it000      = 1           !: index of the first time step
+   INTEGER            ::   nn_itend      = 10          !: index of the last time step
+   INTEGER            ::   nn_date0      = 961115      !: initial calendar date aammjj
+   INTEGER            ::   nn_leapy      = 0           !: Leap year calendar flag (0/1 or 30)
+   INTEGER            ::   nn_istate     = 0           !: initial state output flag (0/1)
+   INTEGER            ::   nn_write      =   10        !: model standard output frequency
+   INTEGER            ::   nn_stock      =   10        !: restart file frequency
    LOGICAL            ::   ln_dimgnnn    = .FALSE.     !: type of dimgout. (F): 1 file for all proc
                                                        !:                  (T): 1 file per proc
@@ -46,24 +48,43 @@
    LOGICAL            ::   ln_clobber    = .FALSE.     !: clobber (overwrite) an existing file
    INTEGER            ::   nn_chunksz    = 0           !: chunksize (bytes) for NetCDF file (working only with iom_nf90 routines)
+
+   !! conversion of DOCTOR norm namelist name into model name
+   !! (this should disappear in a near futur)
+
+   CHARACTER(len=16)  ::   cexper                      !: experiment name used for output filename
+   INTEGER            ::   no                          !: job number
+   INTEGER            ::   nrstdt                      !: control of the time step (0, 1 or 2)
+   INTEGER            ::   nit000                      !: index of the first time step
+   INTEGER            ::   nitend                      !: index of the last time step
+   INTEGER            ::   ndate0                      !: initial calendar date aammjj
+   INTEGER            ::   nleapy                      !: Leap year calendar flag (0/1 or 30)
+   INTEGER            ::   ninist                      !: initial state output flag (0/1)
+   INTEGER            ::   nwrite                      !: model standard output frequency
+   INTEGER            ::   nstock                      !: restart file frequency
+
    !!----------------------------------------------------------------------
    !! was in restart but moved here because of the OFF line... better solution should be found...
    !!----------------------------------------------------------------------
    INTEGER            ::   nitrst                 !: time step at which restart file should be written
+
    !!----------------------------------------------------------------------
    !!                    output monitoring
    !!----------------------------------------------------------------------
    LOGICAL            ::   ln_ctl     = .FALSE.   !: run control for debugging
-   INTEGER            ::   nstock     =   10      !: restart file frequency
-   INTEGER            ::   nprint     =    0      !: level of print (0 no print)
-   INTEGER            ::   nwrite     =   10      !: restart file frequency
-   INTEGER            ::   nictls     =    0      !: Start i indice for the SUM control
-   INTEGER            ::   nictle     =    0      !: End   i indice for the SUM control
-   INTEGER            ::   njctls     =    0      !: Start j indice for the SUM control
-   INTEGER            ::   njctle     =    0      !: End   j indice for the SUM control
-   INTEGER            ::   isplt      =    1      !: number of processors following i
-   INTEGER            ::   jsplt      =    1      !: number of processors following j
+   INTEGER            ::   nn_print     =    0    !: level of print (0 no print)
+   INTEGER            ::   nn_ictls     =    0    !: Start i indice for the SUM control
+   INTEGER            ::   nn_ictle     =    0    !: End   i indice for the SUM control
+   INTEGER            ::   nn_jctls     =    0    !: Start j indice for the SUM control
+   INTEGER            ::   nn_jctle     =    0    !: End   j indice for the SUM control
+   INTEGER            ::   nn_isplt      =    1   !: number of processors following i
+   INTEGER            ::   nn_jsplt      =    1   !: number of processors following j
+   INTEGER            ::   nn_bench     =    0    !: benchmark parameter (0/1)
+   INTEGER            ::   nn_bit_cmp   =    0    !: bit reproducibility  (0/1)
+
+   !                                              !: OLD namelist names
+   INTEGER ::   nprint, nictls, nictle, njctls, njctle, isplt, jsplt, nbench, nbit_cmp   
+
    INTEGER            ::   ijsplt     =    1      !: nb of local domain = nb of processors
-   INTEGER            ::   nbench     =    0      !: benchmark parameter (0/1)
-   INTEGER            ::   nbit_cmp   =    0      !: bit reproducibility  (0/1)
+
    !!----------------------------------------------------------------------
    !!                        logical units
@@ -84,5 +105,4 @@
    !!                          Run control  
    !!----------------------------------------------------------------------
-
    INTEGER            ::   nstop = 0                !: error flag (=number of reason for a premature stop run)
    INTEGER            ::   nwarn = 0                !: warning flag (=number of warning found during the run)
Index: trunk/NEMO/OPA_SRC/LDF/ldfdyn.F90
===================================================================
--- trunk/NEMO/OPA_SRC/LDF/ldfdyn.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/LDF/ldfdyn.F90	(revision 1601)
@@ -4,4 +4,7 @@
    !! Ocean physics:  lateral viscosity coefficient 
    !!=====================================================================
+   !! History :  OPA  ! 1997-07  (G. Madec)  multi dimensional coefficients
+   !!   NEMO     1.0  ! 2002-09  (G. Madec)  F90: Free form and module
+   !!----------------------------------------------------------------------
 
    !!----------------------------------------------------------------------
@@ -11,5 +14,4 @@
    !!   ldf_dyn_c1d   : 1D eddy viscosity coefficient initialization
    !!----------------------------------------------------------------------
-   !! * Modules used
    USE oce             ! ocean dynamics and tracers   
    USE dom_oce         ! ocean space and time domain 
@@ -17,4 +19,5 @@
    USE phycst          ! physical constants
    USE ldfslp          ! ???
+   USE ioipsl
    USE in_out_manager  ! I/O manager
    USE lib_mpp         ! distribued memory computing library
@@ -24,6 +27,5 @@
    PRIVATE
 
-   !! *  Routine accessibility
-   PUBLIC ldf_dyn_init   ! called by opa.F90
+   PUBLIC   ldf_dyn_init   ! called by opa.F90
 
   INTERFACE ldf_zpf
@@ -34,7 +36,7 @@
 #  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
-   !!   OPA 9.0 , LOCEAN-IPSL (2005) 
+   !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) 
    !! $Id$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
 
@@ -48,12 +50,9 @@
       !!
       !! ** Method  :  
-      !!      Eddy viscosity coefficients:
-      !!         default option   : constant coef. ahm0 (namelist)
-      !!        'key_dynldf_c1d': depth dependent coef. defined in 
-      !!                        in ldf_dyn_c1d routine
-      !!        'key_dynldf_c2d': latitude and longitude dependent coef.
-      !!                        defined in ldf_dyn_c2d routine
-      !!        'key_dynldf_c3d': latitude, longitude, depth dependent coef.
-      !!                        defined in ldf_dyn_c3d routine
+      !!      -  default option : ahm = constant coef. = rn_ahm_0 (namelist)
+      !!      - 'key_dynldf_c1d': ahm = F(depth)                     see ldf_dyn_c1d.h90
+      !!      - 'key_dynldf_c2d': ahm = F(latitude,longitude)        see ldf_dyn_c2d.h90
+      !!      - 'key_dynldf_c3d': ahm = F(latitude,longitude,depth)  see ldf_dyn_c3d.h90
+      !!
       !!      N.B. User defined include files.  By default, 3d and 2d coef.
       !!      are set to a constant value given in the namelist and the 1d
@@ -61,48 +60,33 @@
       !!      profile.
       !!
-      !! Reference :
-      !!      Madec, G. and M. Imbard, 1996, A global ocean mesh to overcome
-      !!      the North Pole singularity, Climate Dynamics, 12, 381-388.
-      !!
-      !! History :
-      !!        !  07-97  (G. Madec)  from inimix.F split in 2 routines
-      !!        !  08-97  (G. Madec)  multi dimensional coefficients
-      !!   8.5  !  02-09  (G. Madec)  F90: Free form and module
-      !!----------------------------------------------------------------------
-      !! * Modules used
-      USE ioipsl
-
-      !! * Local declarations
+      !! Reference :   Madec, G. and M. Imbard, 1996: Climate Dynamics, 12, 381-388.
+      !!----------------------------------------------------------------------
       INTEGER ::   ioptio         ! ???
       LOGICAL :: ll_print = .FALSE.    ! Logical flag for printing viscosity coef.
-
-       
-      NAMELIST/nam_dynldf/ ln_dynldf_lap  , ln_dynldf_bilap,                &
-         &                 ln_dynldf_level, ln_dynldf_hor, ln_dynldf_iso,   &
-         &                 ahm0, ahmb0
-      !!----------------------------------------------------------------------
-
-
-      ! Define the lateral physics parameters
-      ! ======================================
-    
-      ! Read Namelist nam_dynldf : Lateral physics
-      REWIND( numnam )
-      READ  ( numnam, nam_dynldf )
-
-      ! Parameter print
-      IF(lwp) THEN
+      !! 
+      NAMELIST/namdyn_ldf/ ln_dynldf_lap  , ln_dynldf_bilap,                  &
+         &                 ln_dynldf_level, ln_dynldf_hor  , ln_dynldf_iso,   &
+         &                 rn_ahm_0       , rn_ahmb_0
+      !!----------------------------------------------------------------------
+
+      REWIND( numnam )                  ! Read Namelist namdyn_ldf : Lateral physics
+      READ  ( numnam, namdyn_ldf )
+
+      IF(lwp) THEN                      ! Parameter print
          WRITE(numout,*)
          WRITE(numout,*) 'ldf_dyn : lateral momentum physics'
          WRITE(numout,*) '~~~~~~~'
-         WRITE(numout,*) '          Namelist nam_dynldf : set lateral mixing parameters'
-         WRITE(numout,*) '             laplacian operator          ln_dynldf_lap   = ', ln_dynldf_lap
-         WRITE(numout,*) '             bilaplacian operator        ln_dynldf_bilap = ', ln_dynldf_bilap
-         WRITE(numout,*) '             iso-level                   ln_dynldf_level = ', ln_dynldf_level
-         WRITE(numout,*) '             horizontal (geopotential)   ln_dynldf_hor   = ', ln_dynldf_hor
-         WRITE(numout,*) '             iso-neutral                 ln_dynldf_iso   = ', ln_dynldf_iso
-         WRITE(numout,*) '             horizontal eddy viscosity            ahm0   = ', ahm0
-         WRITE(numout,*) '             background viscosity                 ahmb0  = ', ahmb0
-      ENDIF
+         WRITE(numout,*) '   Namelist nam_dynldf : set lateral mixing parameters'
+         WRITE(numout,*) '      laplacian operator          ln_dynldf_lap   = ', ln_dynldf_lap
+         WRITE(numout,*) '      bilaplacian operator        ln_dynldf_bilap = ', ln_dynldf_bilap
+         WRITE(numout,*) '      iso-level                   ln_dynldf_level = ', ln_dynldf_level
+         WRITE(numout,*) '      horizontal (geopotential)   ln_dynldf_hor   = ', ln_dynldf_hor
+         WRITE(numout,*) '      iso-neutral                 ln_dynldf_iso   = ', ln_dynldf_iso
+         WRITE(numout,*) '      horizontal eddy viscosity   rn_ahm_0        = ', rn_ahm_0
+         WRITE(numout,*) '      background viscosity        rn_ahmb_0       = ', rn_ahmb_0
+      ENDIF
+
+      ahm0  = rn_ahm_0                  ! OLD namelist variables defined from DOCTOR namelist variables
+      ahmb0 = rn_ahmb_0
 
       ! ... check of lateral diffusive operator on tracers
@@ -112,32 +96,29 @@
       ioptio = 0
 #if defined key_dynldf_c3d
-      IF(lwp) WRITE(numout,*) '          momentum mixing coef. = F( latitude, longitude, depth)'
+      IF(lwp) WRITE(numout,*) '   momentum mixing coef. = F( latitude, longitude, depth)'
       ioptio = ioptio+1
 #endif
 #if defined key_dynldf_c2d
-      IF(lwp) WRITE(numout,*) '          momentum mixing coef. = F( latitude, longitude)'
+      IF(lwp) WRITE(numout,*) '   momentum mixing coef. = F( latitude, longitude)'
       ioptio = ioptio+1
 #endif
 #if defined key_dynldf_c1d
-      IF(lwp) WRITE(numout,*) '          momentum mixing coef. = F( depth )'
+      IF(lwp) WRITE(numout,*) '   momentum mixing coef. = F( depth )'
       ioptio = ioptio+1
-      IF( ln_sco ) CALL ctl_stop( '          key_dynldf_c1d cannot be used in s-coordinate (ln_sco)' )
+      IF( ln_sco ) CALL ctl_stop( 'key_dynldf_c1d cannot be used in s-coordinate (ln_sco)' )
 #endif
       IF( ioptio == 0 ) THEN
-          IF(lwp) WRITE(numout,*) '          momentum mixing coef. = constant  (default option)'
+          IF(lwp) WRITE(numout,*) '   momentum mixing coef. = constant  (default option)'
         ELSEIF( ioptio > 1 ) THEN
-           CALL ctl_stop( '          use only one of the following keys:',   &
-                &         ' key_dynldf_c3d, key_dynldf_c2d, key_dynldf_c1d' )
+           CALL ctl_stop( 'use only one of the following keys: key_dynldf_c3d, key_dynldf_c2d, key_dynldf_c1d' )
       ENDIF
 
 
       IF( ln_dynldf_bilap ) THEN
-         IF(lwp) WRITE(numout,*) '          biharmonic momentum diffusion'
-         IF( ahm0 > 0 .AND. .NOT. lk_esopa )   &
-              &   CALL ctl_stop( 'The horizontal viscosity coef. ahm0 must be negative' )
+         IF(lwp) WRITE(numout,*) '   biharmonic momentum diffusion'
+         IF( ahm0 > 0 .AND. .NOT. lk_esopa )   CALL ctl_stop( 'The horizontal viscosity coef. ahm0 must be negative' )
       ELSE
-         IF(lwp) WRITE(numout,*) '          harmonic momentum diff. (default)'
-         IF( ahm0 < 0 .AND. .NOT. lk_esopa ) &
-              &   CALL ctl_stop( '          The horizontal viscosity coef. ahm0 must be positive' )
+         IF(lwp) WRITE(numout,*) '   harmonic momentum diff. (default)'
+         IF( ahm0 < 0 .AND. .NOT. lk_esopa )   CALL ctl_stop( 'The horizontal viscosity coef. ahm0 must be positive' )
       ENDIF
 
@@ -145,5 +126,4 @@
       ! Lateral eddy viscosity
       ! ======================
-
 #if defined key_dynldf_c3d
       CALL ldf_dyn_c3d( ll_print )   ! ahm = 3D coef. = F( longitude, latitude, depth )
@@ -159,5 +139,5 @@
       IF(lwp) WRITE(numout,*) '        ahm1 = ahm2 = ahm0 =  ',ahm0
 #endif
-
+      !
    END SUBROUTINE ldf_dyn_init
 
@@ -178,18 +158,12 @@
       !!
       !! ** Method  :   1D eddy viscosity coefficients ( depth )
-      !!
-      !!----------------------------------------------------------------------
-      !! * Arguments
-      LOGICAL , INTENT (in   ) :: ld_print   ! If true, output arrays on numout
-      REAL(wp), INTENT (in   ) ::   &
-          pdam,     &  ! depth of the inflection point
-          pwam,     &  ! width of inflection
-          pbot         ! battom value (0<pbot<= 1)
-      REAL(wp), INTENT (in   ), DIMENSION(jpk) ::   &
-          pdep         ! depth of the gridpoint (T, U, V, F)
-      REAL(wp), INTENT (inout), DIMENSION(jpk) ::   &
-          pah          ! adimensional vertical profile
-
-      !! * Local variables
+      !!----------------------------------------------------------------------
+      LOGICAL , INTENT(in   )                 ::   ld_print   ! If true, output arrays on numout
+      REAL(wp), INTENT(in   )                 ::   pdam       ! depth of the inflection point
+      REAL(wp), INTENT(in   )                 ::   pwam       ! width of inflection
+      REAL(wp), INTENT(in   )                 ::   pbot       ! bottom value (0<pbot<= 1)
+      REAL(wp), INTENT(in   ), DIMENSION(jpk) ::   pdep       ! depth of the gridpoint (T, U, V, F)
+      REAL(wp), INTENT(inout), DIMENSION(jpk) ::   pah        ! adimensional vertical profile
+      !!
       INTEGER  ::   jk           ! dummy loop indices
       REAL(wp) ::   zm00, zm01, zmhb, zmhs       ! temporary scalars
@@ -205,6 +179,5 @@
       END DO
 
-      ! Control print
-      IF(lwp .AND. ld_print ) THEN
+      IF(lwp .AND. ld_print ) THEN      ! Control print
          WRITE(numout,*)
          WRITE(numout,*) '         ahm profile : '
@@ -215,5 +188,5 @@
          END DO
       ENDIF
-
+      !
    END SUBROUTINE ldf_zpf_1d
 
@@ -226,18 +199,12 @@
       !!
       !! ** Method  :   1D eddy viscosity coefficients ( depth )
-      !!
-      !!----------------------------------------------------------------------
-      !! * Arguments
-      LOGICAL , INTENT (in   ) :: ld_print   ! If true, output arrays on numout
-      REAL(wp), INTENT (in   ) ::   &
-          pdam,     &  ! depth of the inflection point
-          pwam,     &  ! width of inflection
-          pbot         ! battom value (0<pbot<= 1)
-      REAL(wp), INTENT (in   ), DIMENSION(jpk) ::   &
-          pdep         ! depth of the gridpoint (T, U, V, F)
-      REAL(wp), INTENT (inout), DIMENSION(jpi,jpj,jpk) ::   &
-          pah          ! adimensional vertical profile
-
-      !! * Local variables
+      !!----------------------------------------------------------------------
+      LOGICAL , INTENT(in   )                         ::   ld_print   ! If true, output arrays on numout
+      REAL(wp), INTENT(in   )                         ::   pdam       ! depth of the inflection point
+      REAL(wp), INTENT(in   )                         ::   pwam       ! width of inflection
+      REAL(wp), INTENT(in   )                         ::   pbot       ! bottom value (0<pbot<= 1)
+      REAL(wp), INTENT(in   ), DIMENSION        (jpk) ::   pdep       ! depth of the gridpoint (T, U, V, F)
+      REAL(wp), INTENT(inout), DIMENSION(jpi,jpj,jpk) ::   pah        ! adimensional vertical profile
+      !!
       INTEGER  ::   jk           ! dummy loop indices
       REAL(wp) ::   zm00, zm01, zmhb, zmhs, zcf  ! temporary scalars
@@ -254,6 +221,5 @@
       END DO
 
-      ! Control print
-      IF(lwp .AND. ld_print ) THEN
+      IF(lwp .AND. ld_print ) THEN      ! Control print
          WRITE(numout,*)
          WRITE(numout,*) '         ahm profile : '
@@ -264,5 +230,5 @@
          END DO
       ENDIF
-
+      !
    END SUBROUTINE ldf_zpf_1d_3d
 
@@ -275,18 +241,12 @@
       !!
       !! ** Method  :   3D for partial step or s-coordinate
-      !!
-      !!----------------------------------------------------------------------
-      !! * Arguments
-      LOGICAL , INTENT (in   ) :: ld_print   ! If true, output arrays on numout
-      REAL(wp), INTENT (in   ) ::   &
-          pdam,     &  ! depth of the inflection point
-          pwam,     &  ! width of inflection
-          pbot         ! reduction factor (surface value / bottom value)
-      REAL(wp), INTENT (in   ), DIMENSION(jpi,jpj,jpk) ::   &
-          pdep         ! dep of the gridpoint (T, U, V, F)
-      REAL(wp), INTENT (inout), DIMENSION(jpi,jpj,jpk) ::   &
-          pah          ! adimensional vertical profile
-
-      !! * Local variables
+      !!----------------------------------------------------------------------
+      LOGICAL , INTENT(in   )                         ::   ld_print   ! If true, output arrays on numout
+      REAL(wp), INTENT(in   )                         ::   pdam       ! depth of the inflection point
+      REAL(wp), INTENT(in   )                         ::   pwam       ! width of inflection
+      REAL(wp), INTENT(in   )                         ::   pbot       ! bottom value (0<pbot<= 1)
+      REAL(wp), INTENT(in   ), DIMENSION(jpi,jpj,jpk) ::   pdep       ! dep of the gridpoint (T, U, V, F)
+      REAL(wp), INTENT(inout), DIMENSION(jpi,jpj,jpk) ::   pah        ! adimensional vertical profile
+      !!
       INTEGER  ::   jk           ! dummy loop indices
       REAL(wp) ::   zm00, zm01, zmhb, zmhs       ! temporary scalars
@@ -302,6 +262,5 @@
       END DO
 
-      ! Control print
-      IF(lwp .AND. ld_print ) THEN
+      IF(lwp .AND. ld_print ) THEN      ! Control print
          WRITE(numout,*)
          WRITE(numout,*) '         ahm profile : '
@@ -312,6 +271,7 @@
          END DO
       ENDIF
-
+      !
    END SUBROUTINE ldf_zpf_3d
+
    !!======================================================================
 END MODULE ldfdyn
Index: trunk/NEMO/OPA_SRC/LDF/ldfdyn_oce.F90
===================================================================
--- trunk/NEMO/OPA_SRC/LDF/ldfdyn_oce.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/LDF/ldfdyn_oce.F90	(revision 1601)
@@ -4,16 +4,6 @@
    !! Ocean physics:  lateral momentum mixing coefficient defined in memory 
    !!======================================================================
-   !!
-   !! ** Purpose :
-   !!       - Define in memory lateral momentum mixing coefficients
-   !!
-   !! History :
-   !!   8.5  !  02-11  (G. Madec)  F90: Free form and module
+   !! History :  1.0  ! 2002-11  (G. Madec)  F90: Free form and module
    !!----------------------------------------------------------------------
-   !!  OPA 9.0 , LOCEAN-IPSL (2005) 
-   !! $Id$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
-   !!----------------------------------------------------------------------
-   !! * Modules used
    USE par_oce      ! ocean parameters
 
@@ -21,30 +11,29 @@
    PUBLIC
 
-   !!----------------------------------------------------------------------
-   !! Lateral eddy viscosity coefficients (dynamics)
-   !!----------------------------------------------------------------------
+   !                                                  !!* Namelist namdyn_ldf : lateral mixing *
+   LOGICAL , PUBLIC ::   ln_dynldf_lap   = .TRUE.      !: laplacian operator
+   LOGICAL , PUBLIC ::   ln_dynldf_bilap = .FALSE.     !: bilaplacian operator
+   LOGICAL , PUBLIC ::   ln_dynldf_level = .FALSE.     !: iso-level direction
+   LOGICAL , PUBLIC ::   ln_dynldf_hor   = .TRUE.      !: horizontal (geopotential) direction
+   LOGICAL , PUBLIC ::   ln_dynldf_iso   = .FALSE.     !: iso-neutral direction
+   REAL(wp), PUBLIC ::   rn_ahm_0        = 40000._wp   !: lateral eddy viscosity (m2/s)
+   REAL(wp), PUBLIC ::   rn_ahmb_0       =     0._wp   !: lateral background eddy viscosity (m2/s)
 
-   LOGICAL  ::                      & !!! ** lateral mixing namelist (nam_dynldf) **
-      ln_dynldf_lap   = .TRUE.  ,   &  ! laplacian operator
-      ln_dynldf_bilap = .FALSE. ,   &  ! bilaplacian operator
-      ln_dynldf_level = .FALSE. ,   &  ! iso-level direction
-      ln_dynldf_hor   = .TRUE.  ,   &  ! horizontal (geopotential) direction
-      ln_dynldf_iso   = .FALSE.        ! iso-neutral direction
-
-   REAL(wp) ::                      & !!! ** lateral mixing namelist (nam_dynldf) **
-      ahm0  = 40000._wp ,   &  ! lateral eddy viscosity (m2/s)
-      ahmb0 =     0._wp        ! lateral background eddy viscosity (m2/s)
+   REAL(wp), PUBLIC ::   ahm0, ahmb0                 ! OLD namelist names
 
 #if defined key_dynldf_c3d
-   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   &  ! ** 3D coefficients **
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   ahm1, ahm2, ahm3, ahm4  ! ** 3D coefficients **
 #elif defined key_dynldf_c2d
-   REAL(wp), DIMENSION(jpi,jpj)     ::   &  ! ** 2D coefficients **
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj)     ::   ahm1, ahm2, ahm3, ahm4  ! ** 2D coefficients **
 #elif defined key_dynldf_c1d
-   REAL(wp), DIMENSION(jpk)         ::   &  ! ** 2D coefficients **
+   REAL(wp), PUBLIC, DIMENSION(jpk)         ::   ahm1, ahm2, ahm3, ahm4  ! ** 2D coefficients **
 #else
-   REAL(wp)                         ::   &  ! ** 0D coefficients **
+   REAL(wp), PUBLIC                         ::   ahm1, ahm2, ahm3, ahm4  ! ** 0D coefficients **
 #endif
-      ahm1, ahm2, ahm3, ahm4                ! ????
 
    !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) 
+   !! $Id$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!======================================================================
 END MODULE ldfdyn_oce
Index: trunk/NEMO/OPA_SRC/LDF/ldftra.F90
===================================================================
--- trunk/NEMO/OPA_SRC/LDF/ldftra.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/LDF/ldftra.F90	(revision 1601)
@@ -4,9 +4,9 @@
    !! Ocean physics:  lateral diffusivity coefficient 
    !!=====================================================================
-   !! History :
-   !!        !  07-97  (G. Madec)  from inimix.F split in 2 routines
-   !!        !  08-97  (G. Madec)  multi dimensional coefficients
-   !!   8.5  !  02-09  (G. Madec)  F90: Free form and module
-   !!   9.0  !  05-11  (G. Madec)  
+   !! History :        ! 1997-07  (G. Madec)  from inimix.F split in 2 routines
+   !!   NEMO      1.0  ! 2002-09  (G. Madec)  F90: Free form and module
+   !!             2.0  ! 2005-11  (G. Madec)  
+   !!----------------------------------------------------------------------
+
    !!----------------------------------------------------------------------
    !!   ldf_tra_init : initialization, namelist read, and parameters control
@@ -15,5 +15,4 @@
    !!   ldf_tra_c1d   : 1D eddy viscosity coefficient initialization
    !!----------------------------------------------------------------------
-   !! * Modules used
    USE oce             ! ocean dynamics and tracers
    USE dom_oce         ! ocean space and time domain
@@ -22,4 +21,5 @@
    USE ldfslp          ! ???
    USE in_out_manager  ! I/O manager
+   USE ioipsl
    USE lib_mpp         ! distribued memory computing library
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
@@ -28,15 +28,14 @@
    PRIVATE
 
-   !! *  Routine accessibility
-   PUBLIC ldf_tra_init   ! called by opa.F90
+   PUBLIC   ldf_tra_init   ! called by opa.F90
 
    !! * Substitutions
 #  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
-   !!---------------------------------------------------------------------------------
-   !!   OPA 9.0 , LOCEAN-IPSL (2005) 
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) 
    !! $Id$
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
-   !!---------------------------------------------------------------------------------
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 
 CONTAINS
@@ -62,14 +61,11 @@
       !!      coefficients are initialized to a hyperbolic tangent vertical
       !!      profile.
-      !!
       !!----------------------------------------------------------------------
-      USE ioipsl
-
-      INTEGER ::   ioptio               ! ???
+      INTEGER ::   ioptio               ! temporary integer
       LOGICAL ::   ll_print = .FALSE.   ! =T print eddy coef. in numout
-       
-      NAMELIST/nam_traldf/ ln_traldf_lap  , ln_traldf_bilap,                &
-         &                 ln_traldf_level, ln_traldf_hor, ln_traldf_iso,   &
-         &                 aht0, ahtb0, aeiv0
+      !! 
+      NAMELIST/namtra_ldf/ ln_traldf_lap  , ln_traldf_bilap,                  &
+         &                 ln_traldf_level, ln_traldf_hor  , ln_traldf_iso,   &
+         &                 rn_aht_0       , rn_ahtb_0      , rn_aeiv_0
       !!----------------------------------------------------------------------
 
@@ -77,22 +73,26 @@
       ! =============================================
     
-      ! Read Namelist nam_traldf : Lateral physics on tracers
-      REWIND( numnam )
-      READ  ( numnam, nam_traldf )
+      REWIND( numnam )                  ! Read Namelist namtra_ldf : Lateral physics on tracers
+      READ  ( numnam, namtra_ldf )
 
-      IF(lwp) THEN
+      IF(lwp) THEN                      ! control print
          WRITE(numout,*)
          WRITE(numout,*) 'ldf_tra_init : lateral tracer physics'
          WRITE(numout,*) '~~~~~~~~~~~~ '
-         WRITE(numout,*) '          Namelist nam_traldf : lateral mixing coefficients'
-         WRITE(numout,*) '             laplacian operator          ln_traldf_lap   = ', ln_traldf_lap
-         WRITE(numout,*) '             bilaplacian operator        ln_traldf_bilap = ', ln_traldf_bilap
-         WRITE(numout,*) '             lateral eddy diffusivity             aht0   = ', aht0
-         WRITE(numout,*) '             background hor. diffusivity          ahtb0  = ', ahtb0
-         WRITE(numout,*) '             eddy induced velocity coef.          aeiv0  = ', aeiv0
+         WRITE(numout,*) '   Namelist namtra_ldf : lateral mixing coefficients'
+         WRITE(numout,*) '      laplacian operator            ln_traldf_lap   = ', ln_traldf_lap
+         WRITE(numout,*) '      bilaplacian operator          ln_traldf_bilap = ', ln_traldf_bilap
+         WRITE(numout,*) '      lateral eddy diffusivity      rn_aht_0        = ', rn_aht_0
+         WRITE(numout,*) '      background hor. diffusivity   rn_ahtb_0       = ', rn_ahtb_0
+         WRITE(numout,*) '      eddy induced velocity coef.   rn_aeiv_0       = ', rn_aeiv_0
          WRITE(numout,*)
       ENDIF
 
-      ! Parameter control
+      !                                ! convert DOCTOR namelist names into OLD names
+      aht0  = rn_aht_0
+      ahtb0 = rn_ahtb_0
+      aeiv0 = rn_aeiv_0
+
+      !                                ! Parameter control
 
       ! ... Check consistency for type and direction :
@@ -112,6 +112,5 @@
       IF(lwp) WRITE(numout,*) '          tracer mixing coef. = F( depth )'
       ioptio = ioptio + 1
-      IF( .NOT. ln_zco ) &
-           &   CALL ctl_stop( '          key_traldf_c1d can only be used in z-coordinate - full step' )
+      IF( .NOT. ln_zco )   CALL ctl_stop( 'key_traldf_c1d can only be used in z-coordinate - full step' )
 #endif
       IF( ioptio == 0 ) THEN
@@ -124,10 +123,8 @@
       IF( ln_traldf_bilap ) THEN
          IF(lwp) WRITE(numout,*) '          biharmonic tracer diffusion'
-         IF( aht0 > 0 .AND. .NOT. lk_esopa )   &
-              &   CALL ctl_stop( '          The horizontal diffusivity coef. aht0 must be negative' )
+         IF( aht0 > 0 .AND. .NOT. lk_esopa )   CALL ctl_stop( 'The horizontal diffusivity coef. aht0 must be negative' )
       ELSE
          IF(lwp) WRITE(numout,*) '          harmonic tracer diffusion (default)'
-         IF( aht0 < 0 .AND. .NOT. lk_esopa )   &
-              &   CALL ctl_stop('          The horizontal diffusivity coef. aht0 must be positive' )
+         IF( aht0 < 0 .AND. .NOT. lk_esopa )   CALL ctl_stop('The horizontal diffusivity coef. aht0 must be positive' )
       ENDIF
 
@@ -135,5 +132,4 @@
       !  Lateral eddy diffusivity and eddy induced velocity coefficients
       ! ================================================================
-
 #if defined key_traldf_c3d
       CALL ldf_tra_c3d( ll_print )      ! aht = 3D coef. = F( longitude, latitude, depth )
@@ -145,11 +141,11 @@
                                         ! Constant coefficients
       IF(lwp)WRITE(numout,*)
-      IF(lwp)WRITE(numout,*) '          constant eddy diffusivity coef.   ahtu = ahtv = ahtw = aht0 = ', aht0
+      IF(lwp)WRITE(numout,*) '      constant eddy diffusivity coef.   ahtu = ahtv = ahtw = aht0 = ', aht0
       IF( lk_traldf_eiv ) THEN
          IF(lwp)WRITE(numout,*)
-         IF(lwp)WRITE(numout,*) '          constant eddy induced velocity coef.   aeiu = aeiv = aeiw = aeiv0 = ', aeiv0
+         IF(lwp)WRITE(numout,*) '      constant eddy induced velocity coef.   aeiu = aeiv = aeiw = aeiv0 = ', aeiv0
       ENDIF
 #endif
-
+      !
    END SUBROUTINE ldf_tra_init
 
Index: trunk/NEMO/OPA_SRC/LDF/ldftra_oce.F90
===================================================================
--- trunk/NEMO/OPA_SRC/LDF/ldftra_oce.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/LDF/ldftra_oce.F90	(revision 1601)
@@ -4,15 +4,6 @@
    !! Ocean physics :  lateral tracer mixing coefficient defined in memory 
    !!=====================================================================
-   !!
-   !! ** Purpose : - Define in memory lateral tracer mixing coefficients
-   !!
-   !! History :
-   !!   9.0  !  02-11  (G. Madec)  Original code (from common.h)
+   !! History :  9.0  !  02-11  (G. Madec)  Original code
    !!----------------------------------------------------------------------
-   !!  OPA 9.0 , LOCEAN-IPSL (2005) 
-   !! $Id$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
-   !!----------------------------------------------------------------------
-   !! * Modules used
    USE par_oce         ! ocean parameters
 
@@ -23,27 +14,25 @@
    !! Lateral eddy diffusivity coefficients (tracers)
    !!----------------------------------------------------------------------
+   !                                                !!* Namelist namtra_ldf : lateral mixing *
+   LOGICAL , PUBLIC ::   ln_traldf_lap   = .TRUE.    !: laplacian operator
+   LOGICAL , PUBLIC ::   ln_traldf_bilap = .FALSE.   !: bilaplacian operator
+   LOGICAL , PUBLIC ::   ln_traldf_level = .FALSE.   !: iso-level direction
+   LOGICAL , PUBLIC ::   ln_traldf_hor   = .FALSE.   !: horizontal (geopotential) direction
+   LOGICAL , PUBLIC ::   ln_traldf_iso   = .TRUE.    !: iso-neutral direction
+   REAL(wp), PUBLIC ::   rn_aht_0        = 2000._wp  !: lateral eddy diffusivity (m2/s)
+   REAL(wp), PUBLIC ::   rn_ahtb_0       =    0._wp  !: lateral background eddy diffusivity (m2/s)
+   REAL(wp), PUBLIC ::   rn_aeiv_0       = 2000._wp  !: eddy induced velocity coefficient (m2/s)
 
-   LOGICAL , PUBLIC ::              & !!: ** lateral mixing namelist (nam_traldf) **
-      ln_traldf_lap   = .TRUE.  ,   &  !: laplacian operator
-      ln_traldf_bilap = .FALSE. ,   &  !: bilaplacian operator
-      ln_traldf_level = .FALSE. ,   &  !: iso-level direction
-      ln_traldf_hor   = .FALSE. ,   &  !: horizontal (geopotential) direction
-      ln_traldf_iso   = .TRUE.         !: iso-neutral direction
-
-   REAL(wp), PUBLIC ::              & !!: ** lateral mixing namelist (namldf) **
-      aht0  = 2000._wp     ,        &  !: lateral eddy diffusivity (m2/s)
-      ahtb0 =    0._wp     ,        &  !: lateral background eddy diffusivity (m2/s)
-      aeiv0 = 2000._wp                 !: eddy induced velocity coefficient (m2/s)
+   REAL(wp), PUBLIC ::   aht0, ahtb0, aeiv0         !!: OLD namelist names
 
 #if defined key_traldf_c3d
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   &  !: ** 3D coefficients **
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   ahtt, ahtu, ahtv, ahtw   !: ** 3D coefficients ** at T-, U-, V-, W-points
 #elif defined key_traldf_c2d
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj)     ::   &  !: ** 2D coefficients **
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj)     ::   ahtt, ahtu, ahtv, ahtw   !: ** 2D coefficients ** at T-, U-, V-, W-points
 #elif defined key_traldf_c1d
-   REAL(wp), PUBLIC, DIMENSION(jpk)         ::   &  !: ** 1D coefficients **
+   REAL(wp), PUBLIC, DIMENSION(jpk)         ::   ahtt, ahtu, ahtv, ahtw   !: ** 1D coefficients ** at T-, U-, V-, W-points
 #else
-   REAL(wp), PUBLIC                         ::   &  !: ** 0D coefficients **
+   REAL(wp), PUBLIC                         ::   ahtt, ahtu, ahtv, ahtw   !: ** 0D coefficients ** at T-, U-, V-, W-points
 #endif
-      ahtt, ahtu, ahtv, ahtw                !: T-, U-, V-, W-points coefficients
 
 
@@ -55,17 +44,14 @@
       
 # if defined key_traldf_c3d
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   &  !: ** 3D coefficients **
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   aeiu, aeiv, aeiw  !: ** 3D coefficients ** at U-, V-, W-points  [m2/s]
 # elif defined key_traldf_c2d
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj)     ::   &  !: ** 2D coefficients **
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj)     ::   aeiu, aeiv, aeiw  !: ** 2D coefficients ** at U-, V-, W-points  [m2/s]
 # elif defined key_traldf_c1d
-   REAL(wp), PUBLIC, DIMENSION(jpk)         ::   &  !: ** 1D coefficients **
+   REAL(wp), PUBLIC, DIMENSION(jpk)         ::   aeiu, aeiv, aeiw  !: ** 1D coefficients ** at U-, V-, W-points  [m2/s]
 # else
-   REAL(wp), PUBLIC                         ::   &  !: ** 0D coefficients **
+   REAL(wp), PUBLIC                         ::   aeiu, aeiv, aeiw  !: ** 0D coefficients ** at U-, V-, W-points  [m2/s]
 # endif
-      aeiu, aeiv, aeiw                              !: U-, V-, W-points  induced velocity coef. (m2/s)
-
 # if defined key_diaeiv
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::    &  !:
-      u_eiv, v_eiv, w_eiv     !: The three component of the eddy induced velocity (m/s)
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   u_eiv, v_eiv, w_eiv   !: eddy induced velocity [m/s]
 # endif
 
@@ -75,7 +61,11 @@
    !!----------------------------------------------------------------------
    LOGICAL , PUBLIC, PARAMETER ::   lk_traldf_eiv   = .FALSE.   !: eddy induced velocity flag
-   REAL(wp), PUBLIC ::   aeiu, aeiv, aeiw
+   REAL(wp), PUBLIC            ::   aeiu, aeiv, aeiw            !: eddy induced coef. (not used)
 #endif
 
    !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) 
+   !! $Id$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!=====================================================================
 END MODULE ldftra_oce
Index: trunk/NEMO/OPA_SRC/OBC/obc_oce.F90
===================================================================
--- trunk/NEMO/OPA_SRC/OBC/obc_oce.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/OBC/obc_oce.F90	(revision 1601)
@@ -4,8 +4,4 @@
    !! Open Boundary Cond. :   define related variables
    !!==============================================================================
-   !!  OPA 9.0 , LOCEAN-IPSL (2005) 
-   !! $Id$ 
-   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
-   !!----------------------------------------------------------------------
    !!----------------------------------------------------------------------
    !!   'key_obc' :                                 Open Boundary Condition
@@ -29,29 +25,43 @@
    !! open boundary variables
    !!----------------------------------------------------------------------
-   !!
+   !
+   !                                  !!* Namelist namobc: open boundary condition *
+   INTEGER           ::   nn_nbobc    = 2        !: number of open boundaries ( 1=< nbobc =< 4 ) 
+   INTEGER           ::   nn_obcdta   = 0        !:  = 0 use the initial state as obc data
+   !                                             !   = 1 read obc data in obcxxx.dta files
+   CHARACTER(len=20) ::   cn_obcdta   = 'annual' !: set to annual  if obc datafile hold 1 year of data
+   !                                             !  set to monthly if obc datafile hold 1 month of data
+   LOGICAL           ::   ln_obc_clim = .true.   !:  obc data files are climatological
+   LOGICAL           ::   ln_obc_fla  = .false.  !:  Flather open boundary condition not used
+   LOGICAL           ::   ln_vol_cst  = .true.   !:  Conservation of the whole volume
+   REAL(wp)          ::   rn_dpein    =  1.      !: damping time scale for inflow at East open boundary
+   REAL(wp)          ::   rn_dpwin    =  1.      !:    "                      "   at West open boundary
+   REAL(wp)          ::   rn_dpsin    =  1.      !:    "                      "   at South open boundary
+   REAL(wp)          ::   rn_dpnin    =  1.      !:    "                      "   at North open boundary
+   REAL(wp)          ::   rn_dpeob    = 15.      !: damping time scale for the climatology at East open boundary
+   REAL(wp)          ::   rn_dpwob    = 15.      !:    "                           "       at West open boundary
+   REAL(wp)          ::   rn_dpsob    = 15.      !:    "                           "       at South open boundary
+   REAL(wp)          ::   rn_dpnob    = 15.      !:    "                           "       at North open boundary
+   REAL(wp)          ::   rn_volemp   =  1.      !: = 0 the total volume will have the variability of the 
+   !                                             !      surface Flux E-P else (volemp = 1) the volume will be constant
+   !                                             !  = 1 the volume will be constant during all the integration.
+
+   !                                  !!! OLD non-DOCTOR name of namelist variables
+   INTEGER  ::   nbobc                 !: number of open boundaries ( 1=< nbobc =< 4 ) 
+   INTEGER  ::   nobc_dta              !:  = 0 use the initial state as obc data
+   REAL(wp) ::   rdpein                !: damping time scale for inflow at East open boundary
+   REAL(wp) ::   rdpwin                !:    "                      "   at West open boundary
+   REAL(wp) ::   rdpsin                !:    "                      "   at South open boundary
+   REAL(wp) ::   rdpnin                !:    "                      "   at North open boundary
+   REAL(wp) ::   rdpeob                !: damping time scale for the climatology at East open boundary
+   REAL(wp) ::   rdpwob                !:    "                           "       at West open boundary
+   REAL(wp) ::   rdpsob                !:    "                           "       at South open boundary
+   REAL(wp) ::   rdpnob                !:    "                           "       at North open boundary
+   REAL(wp) ::   volemp                !: = 0 the total volume will have the variability of the 
+   CHARACTER(len=20) :: cffile
+
+
    !!General variables for open boundaries:
    !!--------------------------------------
-   INTEGER ::              & !: * namelist ??? *
-      nbobc    = 2  ,      & !: number of open boundaries ( 1=< nbobc =< 4 ) 
-      nobc_dta = 0           !:  = 0 use the initial state as obc data
-      !                      !   = 1 read obc data in obcxxx.dta files
-
-   LOGICAL ::  ln_obc_clim = .true.  !:  obc data files are climatological
-   LOGICAL ::  ln_obc_fla  = .false. !:  Flather open boundary condition not used
-   LOGICAL ::  ln_vol_cst  = .true.  !:  Conservation of the whole volume
-
-   REAL(wp) ::             & !!: open boundary namelist (namobc)
-      rdpein =  1.  ,      &  !: damping time scale for inflow at East open boundary
-      rdpwin =  1.  ,      &  !:    "                      "   at West open boundary
-      rdpsin =  1.  ,      &  !:    "                      "   at South open boundary
-      rdpnin =  1.  ,      &  !:    "                      "   at North open boundary
-      rdpeob = 15.  ,      &  !: damping time scale for the climatology at East open boundary
-      rdpwob = 15.  ,      &  !:    "                           "       at West open boundary
-      rdpsob = 15.  ,      &  !:    "                           "       at South open boundary
-      rdpnob = 15.  ,      &  !:    "                           "       at North open boundary
-      volemp =  1.            !: = 0 the total volume will have the variability of the 
-                              !      surface Flux E-P else (volemp = 1) the volume will be constant
-                              !  = 1 the volume will be constant during all the integration.
-
    LOGICAL ::              &  !:
       lfbceast, lfbcwest,  &  !: logical flag for a fixed East and West open boundaries       
@@ -60,6 +70,5 @@
       !                       !  scale are set to 0 in the namelist, for both inflow and outflow).
 
-   REAL(wp), PUBLIC ::    &  !:
-      obcsurftot       !: Total lateral surface of open boundaries
+   REAL(wp), PUBLIC ::   obcsurftot       !: Total lateral surface of open boundaries
    
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: &  !:
@@ -79,14 +88,5 @@
    INTEGER ::   nje1m2, nje0m1    !: do loop index in mpp case for jpjefm1-1,jpjed
 
-   REAL(wp), DIMENSION(jpj) ::    &  !:
-      bsfeob              !: now barotropic stream fuction computed at the OBC. The corres-
-      !                   ! ponding bsfn will be computed by the forward time step in dynspg.
-
-   REAL(wp), DIMENSION(jpj,3,3) ::   &  !:
-      bebnd               !: east boundary barotropic streamfunction over 3 rows
-      !                   ! and 3 time step (now, before, and before before)
-
    REAL(wp), DIMENSION(jpjed:jpjef) ::   &  !:
-      bfoe,             & !: now climatology of the east boundary barotropic stream function 
       sshfoe,           & !: now climatology of the east boundary sea surface height
       ubtfoe,vbtfoe       !: now climatology of the east boundary barotropic transport
@@ -98,26 +98,18 @@
       !                   ! in the obcdyn.F90 routine
 
-   REAL(wp), DIMENSION(jpjed:jpjef,jpj) ::   &  !:
-      sshfoe_b            !: east boundary ssh correction averaged over the barotropic loop
-                          !: (if Flather's algoritm applied at open boundary)
+   REAL(wp), DIMENSION(jpjed:jpjef,jpj) ::   sshfoe_b      !: east boundary ssh correction averaged over the barotropic loop
+      !                                                    !  (if Flather's algoritm applied at open boundary)
 
    !!-------------------------------
    !! Arrays for radiative East OBC: 
    !!-------------------------------
-   REAL(wp), DIMENSION(jpj,jpk,3,3) ::   &  !:
-      uebnd, vebnd                  !: baroclinic u & v component of the velocity over 3 rows 
-                                    ! and 3 time step (now, before, and before before)
-
-   REAL(wp), DIMENSION(jpj,jpk,2,2) ::   &  !:
-      tebnd, sebnd                  !: East boundary temperature and salinity over 2 rows 
-                                    ! and 2 time step (now and before)
-
-   REAL(wp), DIMENSION(jpj,jpk) ::   &  !:
-      u_cxebnd, v_cxebnd            !: Zonal component of the phase speed ratio computed with 
-                                    ! radiation of u and v velocity (respectively) at the 
-                                    ! east open boundary (u_cxebnd = cx rdt )
-
-   REAL(wp), DIMENSION(jpj,jpk) ::   &  !:
-      uemsk, vemsk, temsk           !: 2D mask for the East OB
+   REAL(wp), DIMENSION(jpj,jpk,3,3) ::   uebnd, vebnd      !: baroclinic u & v component of the velocity over 3 rows 
+      !                                                    !  and 3 time step (now, before, and before before)
+   REAL(wp), DIMENSION(jpj,jpk,2,2) ::   tebnd, sebnd      !: East boundary temperature and salinity over 2 rows 
+      !                                                    !  and 2 time step (now and before)
+   REAL(wp), DIMENSION(jpj,jpk) ::   u_cxebnd, v_cxebnd    !: Zonal component of the phase speed ratio computed with 
+      !                                                    !  radiation of u and v velocity (respectively) at the 
+      !                                                    !  east open boundary (u_cxebnd = cx rdt )
+   REAL(wp), DIMENSION(jpj,jpk) ::   uemsk, vemsk, temsk   !: 2D mask for the East OB
 
    ! Note that those arrays are optimized for mpp case 
@@ -133,14 +125,5 @@
    INTEGER ::   njw1m2, njw0m1     !: do loop index in mpp case for jpjwfm2,jpjwd
 
-   REAL(wp), DIMENSION(jpj) ::   &  !:
-      bsfwob              !: now barotropic stream fuction computed at the OBC. The corres-
-      !                   !  ponding bsfn will be computed by the forward time step in dynspg.
-
-   REAL(wp), DIMENSION(jpj,3,3) ::   &  !:
-      bwbnd               !: West boundary barotropic streamfunction over
-      !                   !  3 rows and 3 time step (now, before, and before before)
-
    REAL(wp), DIMENSION(jpjwd:jpjwf) ::   &  !:
-      bfow,             & !: now climatology of the west boundary barotropic stream function
       sshfow,           & !: now climatology of the west boundary sea surface height
       ubtfow,vbtfow       !: now climatology of the west boundary barotropic transport
@@ -152,26 +135,18 @@
       !                   !  in the obcdyn.F90 routine
 
-   REAL(wp), DIMENSION(jpjwd:jpjwf,jpj) ::   &  !:
-      sshfow_b            !: west boundary ssh correction averaged over the barotropic loop
-                          !: (if Flather's algoritm applied at open boundary)
+   REAL(wp), DIMENSION(jpjwd:jpjwf,jpj) ::   sshfow_b    !: west boundary ssh correction averaged over the barotropic loop
+      !                                                  !  (if Flather's algoritm applied at open boundary)
 
    !!-------------------------------
    !! Arrays for radiative West OBC
    !!-------------------------------
-   REAL(wp), DIMENSION(jpj,jpk,3,3) ::   &  !:
-      uwbnd, vwbnd                  !: baroclinic u & v components of the velocity over 3 rows 
-      !                             !  and 3 time step (now, before, and before before)
-
-   REAL(wp), DIMENSION(jpj,jpk,2,2) ::   &  !:
-      twbnd, swbnd                  !: west boundary temperature and salinity over 2 rows and 
-      !                             !  2 time step (now and before)
-
-   REAL(wp), DIMENSION(jpj,jpk) ::    &  !:
-      u_cxwbnd, v_cxwbnd            !: Zonal component of the phase speed ratio computed with 
-      !                             !  radiation of zonal and meridional velocity (respectively) 
-      !                             !  at the west open boundary (u_cxwbnd = cx rdt )
-
-   REAL(wp), DIMENSION(jpj,jpk) ::    &  !:
-      uwmsk, vwmsk, twmsk           !: 2D mask for the West OB
+   REAL(wp), DIMENSION(jpj,jpk,3,3) ::   uwbnd, vwbnd     !: baroclinic u & v components of the velocity over 3 rows 
+      !                                                   !  and 3 time step (now, before, and before before)
+   REAL(wp), DIMENSION(jpj,jpk,2,2) ::   twbnd, swbnd     !: west boundary temperature and salinity over 2 rows and 
+      !                                                   !  2 time step (now and before)
+   REAL(wp), DIMENSION(jpj,jpk) ::   u_cxwbnd, v_cxwbnd   !: Zonal component of the phase speed ratio computed with 
+      !                                                   !  radiation of zonal and meridional velocity (respectively) 
+      !                                                   !  at the west open boundary (u_cxwbnd = cx rdt )
+   REAL(wp), DIMENSION(jpj,jpk) ::   uwmsk, vwmsk, twmsk  !: 2D mask for the West OB
 
    ! Note that those arrays are optimized for mpp case 
@@ -188,14 +163,5 @@
    INTEGER ::   njn0m1, njn1m1     !: do loop index in mpp case for jpnob-1
 
-   REAL(wp), DIMENSION(jpi) ::   &  !:
-      bsfnob              !: now barotropic stream fuction computed at the OBC. The corres-
-      !                   !  ponding bsfn will be computed by the forward time step in dynspg.
-
-   REAL(wp), DIMENSION(jpi,3,3) ::   &  !:
-      bnbnd               !: north boundary barotropic streamfunction over
-      !                   !  3 rows and 3 time step (now, before, and before before)
-
    REAL(wp), DIMENSION(jpind:jpinf) ::   &  !:
-      bfon,             & !: now climatology of the north boundary barotropic stream function
       sshfon,           & !: now climatology of the north boundary sea surface height
       ubtfon,vbtfon       !: now climatology of the north boundary barotropic transport
@@ -207,27 +173,18 @@
       !                   !  in yhe obcdyn.F90 routine
 
-   REAL(wp), DIMENSION(jpind:jpinf,jpj) ::   &  !:
-      sshfon_b            !: north boundary ssh correction averaged over the barotropic loop
-                          !: (if Flather's algoritm applied at open boundary)
+   REAL(wp), DIMENSION(jpind:jpinf,jpj) ::   sshfon_b      !: north boundary ssh correction averaged over the barotropic loop
+      !                                                    !  (if Flather's algoritm applied at open boundary)
 
    !!--------------------------------
    !! Arrays for radiative North OBC
    !!--------------------------------
-   !!   
-   REAL(wp), DIMENSION(jpi,jpk,3,3) ::   &   !:
-      unbnd, vnbnd                  !: baroclinic u & v components of the velocity over 3
-      !                             !  rows and 3 time step (now, before, and before before)
-
-   REAL(wp), DIMENSION(jpi,jpk,2,2) ::   &   !:
-      tnbnd, snbnd                  !: north boundary temperature and salinity over
-      !                             !  2 rows and 2 time step (now and before)
-
-   REAL(wp), DIMENSION(jpi,jpk) ::   &     !:
-      u_cynbnd, v_cynbnd            !: Meridional component of the phase speed ratio compu-
-      !                             !  ted with radiation of zonal and meridional velocity 
-      !                             !  (respectively) at the north OB (u_cynbnd = cx rdt )
-
-   REAL(wp), DIMENSION(jpi,jpk) ::   &  !:
-      unmsk, vnmsk, tnmsk           !: 2D mask for the North OB
+   REAL(wp), DIMENSION(jpi,jpk,3,3) ::   unbnd, vnbnd      !: baroclinic u & v components of the velocity over 3
+      !                                                    !  rows and 3 time step (now, before, and before before)
+   REAL(wp), DIMENSION(jpi,jpk,2,2) ::   tnbnd, snbnd      !: north boundary temperature and salinity over
+      !                                                    !  2 rows and 2 time step (now and before)
+   REAL(wp), DIMENSION(jpi,jpk) ::   u_cynbnd, v_cynbnd    !: Meridional component of the phase speed ratio compu-
+      !                                                    !  ted with radiation of zonal and meridional velocity 
+      !                                                    !  (respectively) at the north OB (u_cynbnd = cx rdt )
+   REAL(wp), DIMENSION(jpi,jpk) ::   unmsk, vnmsk, tnmsk   !: 2D mask for the North OB
 
    ! Note that those arrays are optimized for mpp case 
@@ -243,13 +200,5 @@
    INTEGER ::   njs0p1, njs1p1     !: do loop index in mpp case for jpsob+1
 
-   REAL(wp), DIMENSION(jpi) ::    &   !:
-      bsfsob              !: now barotropic stream fuction computed at the OBC.The corres-
-      !                   !  ponding bsfn will be computed by the forward time step in dynspg.
-   REAL(wp), DIMENSION(jpi,3,3) ::   &   !:
-      bsbnd               !: south boundary barotropic stream function over
-      !                   !  3 rows and 3 time step (now, before, and before before)
-
    REAL(wp), DIMENSION(jpisd:jpisf) ::    &   !:
-      bfos,             & !: now climatology of the south boundary barotropic stream function
       sshfos,           & !: now climatology of the south boundary sea surface height
       ubtfos,vbtfos       !: now climatology of the south boundary barotropic transport
@@ -261,29 +210,18 @@
       !                   !  in the obcdyn.F90 routine
 
-   REAL(wp), DIMENSION(jpisd:jpisf,jpj) ::   &  !:
-      sshfos_b            !: south boundary ssh correction averaged over the barotropic loop
-                          !: (if Flather's algoritm applied at open boundary)
-
-   !!--------------------------------
-   !! Arrays for radiative South OBC
-   !!--------------------------------
-   !!                        computed by the forward time step in dynspg.
-   REAL(wp), DIMENSION(jpi,jpk,3,3) ::   &   !:
-      usbnd, vsbnd                  !: baroclinic u & v components of the velocity over 3 
-      !                             !  rows and 3 time step (now, before, and before before)
-
-   REAL(wp), DIMENSION(jpi,jpk,2,2) ::   &  !:
-      tsbnd, ssbnd                  !: south boundary temperature and salinity over
-      !                             !  2 rows and 2 time step (now and before)
-
-   REAL(wp), DIMENSION(jpi,jpk) ::   &  !:
-      u_cysbnd, v_cysbnd            !: Meridional component of the phase speed ratio compu-
-      !                             !  ted with radiation of zonal and meridional velocity 
-      !                             !  (repsectively) at the south OB (u_cynbnd = cx rdt )
-
-   REAL(wp), DIMENSION(jpi,jpk) ::   &  !:
-      usmsk, vsmsk, tsmsk           !: 2D mask for the South OB
-
-   CHARACTER ( len=20 ) :: cffile
+   REAL(wp), DIMENSION(jpisd:jpisf,jpj) ::   sshfos_b     !: south boundary ssh correction averaged over the barotropic loop
+      !                                                   !  (if Flather's algoritm applied at open boundary)
+
+   !!--------------------------------
+   !! Arrays for radiative South OBC   (computed by the forward time step in dynspg)
+   !!--------------------------------
+   REAL(wp), DIMENSION(jpi,jpk,3,3) ::   usbnd, vsbnd     !: baroclinic u & v components of the velocity over 3 
+      !                                                   !  rows and 3 time step (now, before, and before before)
+   REAL(wp), DIMENSION(jpi,jpk,2,2) ::   tsbnd, ssbnd     !: south boundary temperature and salinity over
+      !                                                   !  2 rows and 2 time step (now and before)
+   REAL(wp), DIMENSION(jpi,jpk) ::   u_cysbnd, v_cysbnd   !: Meridional component of the phase speed ratio
+      !                                                   !  computed with radiation of zonal and meridional velocity 
+      !                                                   !  (repsectively) at the south OB (u_cynbnd = cx rdt )
+   REAL(wp), DIMENSION(jpi,jpk) ::   usmsk, vsmsk, tsmsk  !: 2D mask for the South OB
 
 #else
@@ -293,4 +231,8 @@
 #endif
 
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) 
+   !! $Id$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
    !!======================================================================
 END MODULE obc_oce
Index: trunk/NEMO/OPA_SRC/OBC/obcini.F90
===================================================================
--- trunk/NEMO/OPA_SRC/OBC/obcini.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/OBC/obcini.F90	(revision 1601)
@@ -1,14 +1,17 @@
  MODULE obcini
-   !!=================================================================================
+   !!======================================================================
    !!                       ***  MODULE  obcini  ***
    !! OBC initial state :  Open boundary initial state
-   !!=================================================================================
+   !!======================================================================
+   !! History :  8.0  !  97-07  (J.M. Molines, G. Madec)  Original code
+   !!   NEMO     1.0  !  02-11  (C. Talandier, A-M. Treguier) Free surface, F90
+   !!            2.0  !  05-11  (V. Garnier) Surface pressure gradient organization
+   !!----------------------------------------------------------------------
 #if defined key_obc
-   !!---------------------------------------------------------------------------------
-   !!   'key_obc'                                             Open Boundary Conditions
-   !!---------------------------------------------------------------------------------
+   !!----------------------------------------------------------------------
+   !!   'key_obc'                                  Open Boundary Conditions
+   !!----------------------------------------------------------------------
    !!   obc_init       : initialization for the open boundary condition
-   !!---------------------------------------------------------------------------------
-   !! * Modules used
+   !!----------------------------------------------------------------------
    USE oce             ! ocean dynamics and tracers variables
    USE dom_oce         ! ocean space and time domain variables
@@ -23,14 +26,13 @@
    PRIVATE
 
-   !! * Routine accessibility
-   PUBLIC obc_init        ! routine called by opa.F90
+   PUBLIC   obc_init   ! routine called by opa.F90
 
    !! * Substitutions
 #  include "obc_vectopt_loop_substitute.h90"
-   !!---------------------------------------------------------------------------------
-   !!   OPA 9.0 , LOCEAN-IPSL (2005) 
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 9.0 , LOCEAN-IPSL (2005) 
    !! $Id$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
-   !!---------------------------------------------------------------------------------
+   !! software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 
 CONTAINS
@@ -41,5 +43,5 @@
       !!         
       !! ** Purpose :   Initialization of the dynamics and tracer fields at 
-      !!      the open boundaries.
+      !!              the open boundaries.
       !!
       !! ** Method  :   initialization of open boundary variables
@@ -51,49 +53,41 @@
       !!
       !! ** Input   :   restart.obc file, restart file for open boundaries 
+      !!----------------------------------------------------------------------
+      USE obcrst,   ONLY :   obc_rst_read   ! Make obc_rst_read routine available
       !!
-      !! History :
-      !!   8.0  !  97-07  (G. Madec)  Original code
-      !!        !  97-11  (J.M. Molines)
-      !!   8.5  !  02-11  (C. Talandier, A-M. Treguier) Free surface, F90
-      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization
-      !!----------------------------------------------------------------------
-      !! * Modules used
-      USE obcrst,   ONLY :   obc_rst_read   ! Make obc_rst_read routine available
-
-      !! * Local declarations
       INTEGER  ::   ji, jj, istop , inumfbc
       INTEGER, DIMENSION(4) ::   icorner
-      REAL(wp) ::   zbsic1, zbsic2, zbsic3
       REAL(wp), DIMENSION(2) ::   ztestmask
-
-      NAMELIST/namobc/ rdpein, rdpwin, rdpnin, rdpsin,   &
-         &             rdpeob, rdpwob, rdpnob, rdpsob,   &
-         &             zbsic1, zbsic2, zbsic3,           &
-         &             volemp, nobc_dta, cffile,         &
+      !!
+      NAMELIST/namobc/ rn_dpein, rn_dpwin, rn_dpnin, rn_dpsin,      &
+         &             rn_dpeob, rn_dpwob, rn_dpnob, rn_dpsob,      &
+         &             rn_volemp, nn_obcdta, cn_obcdta, rn_volemp   &
          &             ln_obc_clim, ln_vol_cst, ln_obc_fla
       !!----------------------------------------------------------------------
 
-      IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) 'obc_init : initialization of open boundaries'
-      IF(lwp) WRITE(numout,*) '~~~~~~~~'
-
-
-      ! 0. read namelist parameters
-      ! ---------------------------
-      ! default values already set except:
-      zbsic1 = 0.e0
-      zbsic2 = 0.e0
-      zbsic3 = 0.e0
-
-      ! Namelist namobc : open boundaries
-      REWIND( numnam )
+      REWIND( numnam )              ! Namelist namobc : open boundaries
       READ  ( numnam, namobc )
 
-      ! By security we set rdpxin and rdpxob respectively
-      ! to 1. and 15. if the corresponding OBC is not activated
-      IF( .NOT.lp_obc_east  ) THEN ; rdpein = 1. ; rdpeob = 15. ; END IF
-      IF( .NOT.lp_obc_west  ) THEN ; rdpwin = 1. ; rdpwob = 15. ; END IF
-      IF( .NOT.lp_obc_north ) THEN ; rdpnin = 1. ; rdpnob = 15. ; END IF
-      IF( .NOT.lp_obc_south ) THEN ; rdpsin = 1. ; rdpsob = 15. ; END IF
+      ! convert DOCTOR namelist name into the OLD names
+      nbobc    = nn_nbobc
+      nobc_dta = nn_obcdta
+      cffile   = cn_obcdta
+      rdpein   = rn_dpein
+      rdpwin   = rn_dpwin
+      rdpsin   = rn_dpsin
+      rdpnin   = rn_dpnin
+      rdpeob   = rn_dpeob
+      rdpwob   = rn_dpwob
+      rdpsob   = rn_dpsob
+      rdpnob   = rn_dpnob
+      volemp   = rn_volemp
+      
+
+
+      ! By security we set rdpxin and rdpxob respectively to 1. and 15. if the corresponding OBC is not activated
+      IF( .NOT.lp_obc_east  ) THEN   ;   rdpein = 1.   ;   rdpeob = 15.   ;   END IF
+      IF( .NOT.lp_obc_west  ) THEN   ;   rdpwin = 1.   ;   rdpwob = 15.   ;   END IF
+      IF( .NOT.lp_obc_north ) THEN   ;   rdpnin = 1.   ;   rdpnob = 15.   ;   END IF
+      IF( .NOT.lp_obc_south ) THEN   ;   rdpsin = 1.   ;   rdpsob = 15.   ;   END IF
 
       ! number of open boudaries and open boundary indicators
@@ -104,68 +98,67 @@
       IF( lp_obc_south )   nbobc = nbobc + 1
 
-      IF(lwp) WRITE(numout,*) '         Number of open boundaries    nbobc = ',nbobc
       IF(lwp) WRITE(numout,*)
-      IF( nbobc /= 0 .AND. jperio /= 0 ) &
-           &   CALL ctl_stop( ' Cyclic or symmetric, and open boundary condition are not compatible' )
+      IF(lwp) WRITE(numout,*) 'obc_init : initialization of open boundaries'
+      IF(lwp) WRITE(numout,*) '~~~~~~~~'
+      IF(lwp) WRITE(numout,*) '   Number of open boundaries    nn_nbobc = ', nn_nbobc
+      IF(lwp) WRITE(numout,*)
 
       ! control prints
-      IF(lwp) WRITE(numout,*) '         namobc'
+      IF(lwp) WRITE(numout,*) '   Namelist namobc'
+      IF(lwp) WRITE(numout,*) '      data in file (=1) or initial state used (=0)   nn_obcdta   = ', nn_obcdta
+      IF(lwp) WRITE(numout,*) '      climatology (true) or not                      ln_obc_clim = ', ln_obc_clim
+      IF(lwp) WRITE(numout,*) '      vol_cst (true) or not:                         ln_vol_cst  = ', ln_vol_cst
       IF(lwp) WRITE(numout,*) ' '
-      IF(lwp) WRITE(numout,*) '         data in file (=1) or     nobc_dta = ', nobc_dta
-      IF(lwp) WRITE(numout,*) '         initial state used (=0)             '
-      IF(lwp) WRITE(numout,*) '         climatology (true) or not:', ln_obc_clim
-      IF(lwp) WRITE(numout,*) '         vol_cst (true) or not:', ln_vol_cst
-      IF(lwp) THEN
-          IF ( lk_dynspg_flt ) WRITE(numout,*) '                   dynspg_flt T ==> vol_cst forced to T'
-      ENDIF
-      IF(lwp) WRITE(numout,*) ' '
-      IF(lwp) WRITE(numout,*) '                                 WARNING                                                  '
-      IF(lwp) WRITE(numout,*) '         Flather"s algorithm is applied with explicit free surface scheme                 '
-      IF(lwp) WRITE(numout,*) '         or with free surface time-splitting scheme                                       '
-      IF(lwp) WRITE(numout,*) '         Nor radiation neither relaxation is allowed with explicit free surface scheme:   '
-      IF(lwp) WRITE(numout,*) '         Radiation and/or relaxation is allowed with free surface time-splitting scheme '
-      IF(lwp) WRITE(numout,*) '         depending of the choice of rdpXin = rdpXob  = 0. for open boundaries             '
-      IF(lwp) WRITE(numout,*) ' '
-      IF(lwp) WRITE(numout,*) '         For the filtered free surface case,                                              '
-      IF(lwp) WRITE(numout,*) '         radiation, relaxation or presciption of data can be applied                      '
+      IF(lwp) WRITE(numout,*) '   WARNING                                                  '
+      IF(lwp) WRITE(numout,*) '      Flather"s algorithm is applied with explicit free surface scheme                 '
+      IF(lwp) WRITE(numout,*) '      or with free surface time-splitting scheme                                       '
+      IF(lwp) WRITE(numout,*) '      Nor radiation neither relaxation is allowed with explicit free surface scheme:   '
+      IF(lwp) WRITE(numout,*) '      Radiation and/or relaxation is allowed with free surface time-splitting scheme '
+      IF(lwp) WRITE(numout,*) '      depending of the choice of rdpXin = rdpXob  = 0. for open boundaries             '
+      IF(lwp) WRITE(numout,*)
+      IF(lwp) WRITE(numout,*) '      For the filtered free surface case,                                              '
+      IF(lwp) WRITE(numout,*) '      radiation, relaxation or presciption of data can be applied                      '
+      IF(lwp) WRITE(numout,*)
 
       IF( lwp.AND.lp_obc_east ) THEN
-         WRITE(numout,*) '         East open boundary :'
-         WRITE(numout,*) '              i index                    jpieob = ', jpieob
-         WRITE(numout,*) '              damping time scale (days)  rdpeob = ', rdpeob
-         WRITE(numout,*) '              damping time scale (days)  rdpein = ', rdpein
+         WRITE(numout,*) '      East open boundary :'
+         WRITE(numout,*) '         i index                    jpieob   = ', jpieob
+         WRITE(numout,*) '         damping time scale (days)  rn_dpeob = ', rn_dpeob
+         WRITE(numout,*) '         damping time scale (days)  rn_dpein = ', rn_dpein
       ENDIF
 
       IF( lwp.AND.lp_obc_west ) THEN
-         WRITE(numout,*) '         West open boundary :'
-         WRITE(numout,*) '              i index                    jpiwob = ', jpiwob
-         WRITE(numout,*) '              damping time scale (days)  rdpwob = ', rdpwob
-         WRITE(numout,*) '              damping time scale (days)  rdpwin = ', rdpwin
+         WRITE(numout,*) '      West open boundary :'
+         WRITE(numout,*) '         i index                    jpiwob   = ', jpiwob
+         WRITE(numout,*) '         damping time scale (days)  rn_dpwob = ', rn_dpwob
+         WRITE(numout,*) '         damping time scale (days)  rn_dpwin = ', rn_dpwin
       ENDIF
 
       IF( lwp.AND.lp_obc_north ) THEN
-         WRITE(numout,*) '         North open boundary :'
-         WRITE(numout,*) '               j index                    jpjnob = ', jpjnob
-         WRITE(numout,*) '               damping time scale (days)  rdpnob = ', rdpnob
-         WRITE(numout,*) '               damping time scale (days)  rdpnin = ', rdpnin
+         WRITE(numout,*) '      North open boundary :'
+         WRITE(numout,*) '         j index                    jpjnob   = ', jpjnob
+         WRITE(numout,*) '         damping time scale (days)  rn_dpnob = ', rn_dpnob
+         WRITE(numout,*) '         damping time scale (days)  rn_dpnin = ', rn_dpnin
       ENDIF
 
       IF( lwp.AND.lp_obc_south ) THEN
-         WRITE(numout,*) '         South open boundary :'
-         WRITE(numout,*) '               j index                    jpjsob = ', jpjsob
-         WRITE(numout,*) '               damping time scale (days)  rdpsob = ', rdpsob
-         WRITE(numout,*) '               damping time scale (days)  rdpsin = ', rdpsin
-         WRITE(numout,*) ' '
-      ENDIF
+         WRITE(numout,*) '      South open boundary :'
+         WRITE(numout,*) '         j index                    jpjsob   = ', jpjsob
+         WRITE(numout,*) '         damping time scale (days)  rn_dpsob = ', rn_dpsob
+         WRITE(numout,*) '         damping time scale (days)  rn_dpsin = ', rn_dpsin
+         WRITE(numout,*)
+      ENDIF
+
+      IF( nbobc /= 0 .AND. jperio /= 0 )   &
+         &   CALL ctl_stop( ' Cyclic or symmetric, and open boundary condition are not compatible' )
 
       ! 1. Initialisation of constants 
       ! ------------------------------
-
       ! ...                          convert rdp$ob in seconds
       ! Fixed Bdy flag              inbound                outbound
-      lfbceast  = .FALSE. ; rdpein = rdpein * rday  ; rdpeob = rdpeob * rday
-      lfbcwest  = .FALSE. ; rdpwin = rdpwin * rday  ; rdpwob = rdpwob * rday
-      lfbcnorth = .FALSE. ; rdpnin = rdpnin * rday  ; rdpnob = rdpnob * rday
-      lfbcsouth = .FALSE. ; rdpsin = rdpsin * rday  ; rdpsob = rdpsob * rday
+      lfbceast  = .FALSE.   ;   rdpein = rdpein * rday    ;   rdpeob = rdpeob * rday
+      lfbcwest  = .FALSE.   ;   rdpwin = rdpwin * rday    ;   rdpwob = rdpwob * rday
+      lfbcnorth = .FALSE.   ;   rdpnin = rdpnin * rday    ;   rdpnob = rdpnob * rday
+      lfbcsouth = .FALSE.   ;   rdpsin = rdpsin * rday    ;   rdpsob = rdpsob * rday
       inumfbc = 0
       ! ... look for Fixed Boundaries (rdp = 0 )
@@ -175,8 +168,8 @@
       IF( lp_obc_east )  THEN
          IF( (rdpein+rdpeob) == 0 )  THEN
-            lfbceast = .TRUE. ; rdpein = 1e-3 ; rdpeob = 1e-3
+            lfbceast = .TRUE.   ;   rdpein = 1e-3   ;   rdpeob = 1e-3
             inumfbc = inumfbc+1
          ELSEIF ( (rdpein*rdpeob) == 0 )  THEN
-            CALL ctl_stop( 'obc_init : rdpein & rdpeob must be both zero or non zero' )
+            CALL ctl_stop( 'obc_init : rn_dpein & rn_dpeob must be both zero or non zero' )
          END IF
       END IF
@@ -184,24 +177,24 @@
       IF( lp_obc_west )  THEN
          IF( (rdpwin + rdpwob) == 0 )  THEN
-            lfbcwest = .TRUE. ; rdpwin = 1e-3 ; rdpwob = 1e-3
+            lfbcwest = .TRUE.     ;     rdpwin = 1e-3     ;     rdpwob = 1e-3
             inumfbc = inumfbc+1
          ELSEIF ( (rdpwin*rdpwob) == 0 )  THEN
-            CALL ctl_stop( 'obc_init : rdpwin & rdpwob must be both zero or non zero' )
+            CALL ctl_stop( 'obc_init : rn_dpwin & rn_dpwob must be both zero or non zero' )
          END IF
       END IF
       IF( lp_obc_north )  THEN
          IF( (rdpnin + rdpnob) == 0 )  THEN
-            lfbcnorth = .TRUE. ; rdpnin = 1e-3 ; rdpnob = 1e-3
+            lfbcnorth = .TRUE.     ;     rdpnin = 1e-3     ;     rdpnob = 1e-3
             inumfbc = inumfbc+1
          ELSEIF ( (rdpnin*rdpnob) == 0 )  THEN
-            CALL ctl_stop( 'obc_init : rdpnin & rdpnob must be both zero or non zero' )
+            CALL ctl_stop( 'obc_init : rn_dpnin & rn_dpnob must be both zero or non zero' )
          END IF
       END IF
       IF( lp_obc_south )  THEN
          IF( (rdpsin + rdpsob) == 0 )  THEN
-            lfbcsouth = .TRUE. ; rdpsin = 1e-3 ; rdpsob = 1e-3
+            lfbcsouth = .TRUE.   ;   rdpsin = 1e-3   ;   rdpsob = 1e-3
             inumfbc = inumfbc+1
          ELSEIF ( (rdpsin*rdpsob) == 0 )  THEN
-            CALL ctl_stop( 'obc_init : rdpsin & rdpsob must be both zero or non zero' )
+            CALL ctl_stop( 'obc_init : rn_dpsin & rn_dpsob must be both zero or non zero' )
          END IF
       END IF
@@ -315,5 +308,5 @@
 
          ! ... initilization to zero
-         uemsk(:,:) = 0.e0 ; vemsk(:,:) = 0.e0 ; temsk(:,:) = 0.e0
+         uemsk(:,:) = 0.e0   ;   vemsk(:,:) = 0.e0   ;   temsk(:,:) = 0.e0
 
          ! ... set 2D mask on East OBC,  Vopt
@@ -333,5 +326,5 @@
 
          ! ... initilization to zero
-         uwmsk(:,:) = 0.e0 ; vwmsk(:,:) = 0.e0 ; twmsk(:,:) = 0.e0  
+         uwmsk(:,:) = 0.e0   ;   vwmsk(:,:) = 0.e0   ;   twmsk(:,:) = 0.e0  
 
          ! ... set 2D mask on West OBC,  Vopt
@@ -350,5 +343,5 @@
 
          ! ... initilization to zero
-         unmsk(:,:) = 0.e0 ; vnmsk(:,:) = 0.e0 ; tnmsk(:,:) = 0.e0
+         unmsk(:,:) = 0.e0   ;   vnmsk(:,:) = 0.e0   ;   tnmsk(:,:) = 0.e0
 
          ! ... set 2D mask on North OBC,  Vopt
@@ -368,5 +361,5 @@
 
          ! ... initilization to zero
-         usmsk(:,:) = 0.e0 ; vsmsk(:,:) = 0.e0 ; tsmsk(:,:) = 0.e0
+         usmsk(:,:) = 0.e0   ;   vsmsk(:,:) = 0.e0   ;   tsmsk(:,:) = 0.e0
 
          ! ... set 2D mask on South OBC,  Vopt
Index: trunk/NEMO/OPA_SRC/SBC/albedo.F90
===================================================================
--- trunk/NEMO/OPA_SRC/SBC/albedo.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/SBC/albedo.F90	(revision 1601)
@@ -4,9 +4,11 @@
    !! Ocean forcing:  bulk thermohaline forcing of the ocean (or ice)
    !!=====================================================================
-   !! History :  8.0  !  01-04  (LIM 1.0)
-   !!            8.5  !  03-07  (C. Ethe, G. Madec)  Optimization (old name:shine)
-   !!            9.0  !  04-11  (C. Talandier)  add albedo_init
-   !!             -   !  01-06  (M. Vancoppenolle) LIM 3.0
-   !!             -   !  06-08  (G. Madec)  cleaning for surface module
+   !! History :  8.0  ! 2001-04  (LIM 1.0)
+   !!   NEMO     1.0  ! 2003-07  (C. Ethe, G. Madec)  Optimization (old name:shine)
+   !!             -   ! 2004-11  (C. Talandier)  add albedo_init
+   !!             -   ! 2001-06  (M. Vancoppenolle) LIM 3.0
+   !!             -   ! 2006-08  (G. Madec)  cleaning for surface module
+   !!----------------------------------------------------------------------
+
    !!----------------------------------------------------------------------
    !!   albedo_ice  : albedo for   ice (clear and overcast skies)
@@ -20,6 +22,6 @@
    PRIVATE
 
-   PUBLIC albedo_ice   ! routine called sbcice_lim.F90
-   PUBLIC albedo_oce   ! routine called by ???
+   PUBLIC   albedo_ice   ! routine called sbcice_lim.F90
+   PUBLIC   albedo_oce   ! routine called by ???
 
    INTEGER  ::   albd_init = 0      !: control flag for initialization
@@ -31,18 +33,17 @@
    REAL(wp) ::   rmue   = 0.40    !  cosine of local solar altitude
 
-   !!* namelist namalb
-   REAL(wp) ::   &
-      cgren  = 0.06  ,     &   !  cloudiness effect on snow or ice albedo (Grenfell & Perovich, 1984)
+   !                               !!* namelist namsbc_alb
+   REAL(wp) ::   rn_cloud  = 0.06   !  cloudiness effect on snow or ice albedo (Grenfell & Perovich, 1984)
 #if defined key_lim3
-      albice = 0.53  ,     &   !  albedo of melting ice in the arctic and antarctic (Shine & Hendersson-Sellers)
+   REAL(wp) ::   rn_albice = 0.53   !  albedo of melting ice in the arctic and antarctic (Shine & Hendersson-Sellers)
 #else
-      albice = 0.50  ,     &   !  albedo of melting ice in the arctic and antarctic (Shine & Hendersson-Sellers)
+   REAL(wp) ::   rn_albice = 0.50   !  albedo of melting ice in the arctic and antarctic (Shine & Hendersson-Sellers)
 #endif
-      alphd  = 0.80  ,     &   !  coefficients for linear interpolation used to compute
-      alphdi = 0.72  ,     &   !  albedo between two extremes values (Pyane, 1972)
-      alphc  = 0.65 
-
-   !!----------------------------------------------------------------------
-   !!   OPA 9.0 , LOCEAN-IPSL (2006) 
+   REAL(wp) ::   rn_alphd  = 0.80   !  coefficients for linear interpolation used to compute
+   REAL(wp) ::   rn_alphdi = 0.72   !  albedo between two extremes values (Pyane, 1972)
+   REAL(wp) ::   rn_alphc  = 0.65   ! 
+
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 9.0 , LOCEAN-IPSL (2009) 
    !! $Id$
    !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
@@ -82,5 +83,5 @@
       !!
       LOGICAL , DIMENSION(jpi,jpj,SIZE(pt_ice,3)) ::   llmask
-      REAL(wp), DIMENSION(jpi,jpj,SIZE(pt_ice,3)) ::   zalbfz    ! = alphdi for freezing ice ; = albice for melting ice
+      REAL(wp), DIMENSION(jpi,jpj,SIZE(pt_ice,3)) ::   zalbfz    ! = rn_alphdi for freezing ice ; = rn_albice for melting ice
       REAL(wp), DIMENSION(jpi,jpj,SIZE(pt_ice,3)) ::   zficeth   !  function of ice thickness
       !!---------------------------------------------------------------------
@@ -95,8 +96,6 @@
       llmask = ( ph_snw == 0.e0 ) .AND. ( pt_ice >= rt0_ice )
       ! ice free of snow and melts
-      WHERE( llmask )   
-         zalbfz = albice
-      ELSEWHERE     
-         zalbfz = alphdi
+      WHERE( llmask )   ;   zalbfz = rn_albice
+      ELSEWHERE         ;   zalbfz = rn_alphdi
       END WHERE
 
@@ -131,11 +130,11 @@
                !                                        !  freezing snow        
                zihsc1   = 1.0 - MAX( zzero , SIGN( zone , - ( ph_snw(ji,jj,jl) - c1 ) ) )
-               zalbpsnf = ( 1.0 - zihsc1 ) * (  zficeth(ji,jj,jl)                                        &
-                  &                           + ph_snw(ji,jj,jl) * ( alphd - zficeth(ji,jj,jl) ) / c1  )   &
-                  &     +         zihsc1   * alphd  
+               zalbpsnf = ( 1.0 - zihsc1 ) * (  zficeth(ji,jj,jl)                                             &
+                  &                           + ph_snw(ji,jj,jl) * ( rn_alphd - zficeth(ji,jj,jl) ) / c1  )   &
+                  &     +         zihsc1   * rn_alphd  
                !                                        !  melting snow                
                zihsc2   = MAX( zzero , SIGN( zone , ph_snw(ji,jj,jl) - c2 ) )
-               zalbpsnm = ( 1.0 - zihsc2 ) * ( albice + ph_snw(ji,jj,jl) * ( alphc - albice ) / c2 )       &
-                  &     +         zihsc2   * alphc 
+               zalbpsnm = ( 1.0 - zihsc2 ) * ( rn_albice + ph_snw(ji,jj,jl) * ( rn_alphc - rn_albice ) / c2 )   &
+                  &     +         zihsc2   *   rn_alphc 
                !
                zitmlsn  =  MAX( zzero , SIGN( zone , pt_ice(ji,jj,jl) - rt0_snow ) )   
@@ -154,5 +153,5 @@
       !    Albedo of snow-ice for overcast sky.
       !----------------------------------------------  
-      pa_ice_os(:,:,:) = pa_ice_cs(:,:,:) + cgren       ! Oberhuber correction
+      pa_ice_os(:,:,:) = pa_ice_cs(:,:,:) + rn_cloud       ! Oberhuber correction
       !
    END SUBROUTINE albedo_ice
@@ -186,25 +185,24 @@
       !! ** Purpose :   initializations for the albedo parameters
       !!
-      !! ** Method  :   Read the namelist namalb
-      !!----------------------------------------------------------------------
-      NAMELIST/namalb/ cgren, albice, alphd, alphdi, alphc
-      !!----------------------------------------------------------------------
-
-      ! set the initialization flag to 1
-      albd_init = 1           ! indicate that the initialization has been done
-
-      ! Read Namelist namalb : albedo parameters
-      REWIND( numnam )
-      READ  ( numnam, namalb )
-
-      IF(lwp) THEN               ! Control print
+      !! ** Method  :   Read the namelist namsbc_alb
+      !!----------------------------------------------------------------------
+      NAMELIST/namsbc_alb/ rn_cloud, rn_albice, rn_alphd, rn_alphdi, rn_alphc
+      !!----------------------------------------------------------------------
+      !
+      albd_init = 1                     ! indicate that the initialization has been done
+      !
+      REWIND( numnam )                  ! Read Namelist namsbc_alb : albedo parameters
+      READ  ( numnam, namsbc_alb )
+      !
+      IF(lwp) THEN                      ! Control print
          WRITE(numout,*)
-         WRITE(numout,*) 'albedo_init : set albedo parameters from namelist namalb'
-         WRITE(numout,*) '~~~~~~~~~~~'
-         WRITE(numout,*) '             correction for snow and ice albedo                    cgren  = ', cgren
-         WRITE(numout,*) '             albedo of melting ice in the arctic and antarctic     albice = ', albice
-         WRITE(numout,*) '             coefficients for linear                               alphd  = ', alphd
-         WRITE(numout,*) '             interpolation used to compute albedo                  alphdi = ', alphdi
-         WRITE(numout,*) '             between two extremes values (Pyane, 1972)             alphc  = ', alphc
+         WRITE(numout,*) 'albedo : set albedo parameters'
+         WRITE(numout,*) '~~~~~~~'
+         WRITE(numout,*) '   Namelist namsbc_alb : albedo '
+         WRITE(numout,*) '      correction for snow and ice albedo                  rn_cloud  = ', rn_cloud
+         WRITE(numout,*) '      albedo of melting ice in the arctic and antarctic   rn_albice = ', rn_albice
+         WRITE(numout,*) '      coefficients for linear                             rn_alphd  = ', rn_alphd
+         WRITE(numout,*) '      interpolation used to compute albedo                rn_alphdi = ', rn_alphdi
+         WRITE(numout,*) '      between two extremes values (Pyane, 1972)           rn_alphc  = ', rn_alphc
       ENDIF
       !
Index: trunk/NEMO/OPA_SRC/SBC/sbcblk_core.F90
===================================================================
--- trunk/NEMO/OPA_SRC/SBC/sbcblk_core.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/SBC/sbcblk_core.F90	(revision 1601)
@@ -54,5 +54,5 @@
    TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf   ! structure of input fields (file informations, fields read)
          
-   !! * CORE bulk parameters
+   !                                             !!! CORE bulk parameters
    REAL(wp), PARAMETER ::   rhoa =    1.22        ! air density
    REAL(wp), PARAMETER ::   cpa  = 1000.5         ! specific heat of air
@@ -62,6 +62,7 @@
    REAL(wp), PARAMETER ::   Cice =    1.63e-3     ! transfer coefficient over ice
 
-   LOGICAL  ::   ln_2m = .FALSE.                  !: logical flag for height of air temp. and hum
-   REAL(wp) ::   alpha_precip=1.                  !: multiplication factor for precipitation
+   !                                !!* Namelist namsbc_core : CORE bulk parameters
+   LOGICAL  ::   ln_2m = .FALSE.     ! logical flag for height of air temp. and hum
+   REAL(wp) ::   rn_pfac = 1.        ! multiplication factor for precipitation
 
    !! * Substitutions
@@ -115,6 +116,6 @@
       TYPE(FLD_N) ::   sn_wndi, sn_wndj, sn_humi, sn_qsr       ! informations about the fields to be read
       TYPE(FLD_N) ::   sn_qlw , sn_tair, sn_prec, sn_snow      !   "                                 "
-      NAMELIST/namsbc_core/ cn_dir, ln_2m, alpha_precip, sn_wndi, sn_wndj, sn_humi, sn_qsr,   &
-         &                                               sn_qlw , sn_tair, sn_prec, sn_snow
+      NAMELIST/namsbc_core/ cn_dir, ln_2m, rn_pfac, sn_wndi, sn_wndj, sn_humi, sn_qsr,   &
+         &                                                sn_qlw , sn_tair, sn_prec, sn_snow
       !!---------------------------------------------------------------------
 
@@ -124,5 +125,5 @@
          ! set file information (default values)
          cn_dir = './'       ! directory in which the model is executed
-
+         !
          ! (NB: frequency positive => hours, negative => months)
          !            !    file     ! frequency !  variable  ! time intep !  clim   ! 'yearly' or ! weights  ! rotation   !
@@ -136,8 +137,8 @@
          sn_prec = FLD_N( 'precip'  ,    -1.    ,  'precip'  ,  .true.    , .false. ,   'yearly'  , ''       , ''         )
          sn_snow = FLD_N( 'snow'    ,    -1.    ,  'snow'    ,  .true.    , .false. ,   'yearly'  , ''       , ''         )
-
+         !
          REWIND( numnam )                    ! ... read in namlist namsbc_core
          READ  ( numnam, namsbc_core )
-
+         !
          ! store namelist information in an array
          slf_i(jp_wndi) = sn_wndi   ;   slf_i(jp_wndj) = sn_wndj
@@ -145,5 +146,5 @@
          slf_i(jp_tair) = sn_tair   ;   slf_i(jp_humi) = sn_humi
          slf_i(jp_prec) = sn_prec   ;   slf_i(jp_snow) = sn_snow
-         
+         !
          ! set sf structure
          ALLOCATE( sf(jpfld), STAT=ierror )
@@ -151,15 +152,13 @@
             CALL ctl_stop( 'sbc_blk_core: unable to allocate sf structure' )   ;   RETURN
          ENDIF
-
          DO ifpr= 1, jpfld
             ALLOCATE( sf(ifpr)%fnow(jpi,jpj) )
             ALLOCATE( sf(ifpr)%fdta(jpi,jpj,2) )
          END DO
-
+         !
          ! fill sf with slf_i and control print
          CALL fld_fill( sf, slf_i, cn_dir, 'sbc_blk_core', 'flux formulattion for ocean surface boundary condition', 'namsbc_core' )
          !
       ENDIF
-
 
       CALL fld_read( kt, nn_fsbc, sf )                   ! input fields provided at the current time-step
@@ -327,5 +326,5 @@
       qns(:,:) = zqlw(:,:) - zqsb(:,:) - zqla(:,:)      ! Downward Non Solar flux
 !CDIR COLLAPSE
-      emp (:,:) = zevap(:,:) - sf(jp_prec)%fnow(:,:) * alpha_precip * tmask(:,:,1)
+      emp (:,:) = zevap(:,:) - sf(jp_prec)%fnow(:,:) * rn_pfac * tmask(:,:,1)
 !CDIR COLLAPSE
       emps(:,:) = emp(:,:)
@@ -533,8 +532,8 @@
        
 !CDIR COLLAPSE
-      p_tpr(:,:) = sf(jp_prec)%fnow(:,:) * alpha_precip      ! total precipitation [kg/m2/s]
-!CDIR COLLAPSE
-      p_spr(:,:) = sf(jp_snow)%fnow(:,:) * alpha_precip      ! solid precipitation [kg/m2/s]
-      CALL iom_put( 'snowpre', p_spr )                       ! Snow precipitation 
+      p_tpr(:,:) = sf(jp_prec)%fnow(:,:) * rn_pfac      ! total precipitation [kg/m2/s]
+!CDIR COLLAPSE
+      p_spr(:,:) = sf(jp_snow)%fnow(:,:) * rn_pfac      ! solid precipitation [kg/m2/s]
+      CALL iom_put( 'snowpre', p_spr )                  ! Snow precipitation 
       !
       IF(ln_ctl) THEN
Index: trunk/NEMO/OPA_SRC/SBC/sbcmod.F90
===================================================================
--- trunk/NEMO/OPA_SRC/SBC/sbcmod.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/SBC/sbcmod.F90	(revision 1601)
@@ -115,5 +115,5 @@
          WRITE(numout,*) '              Sea Surface Restoring on SST and/or SSS    ln_ssr      = ', ln_ssr
          WRITE(numout,*) '              FreshWater Budget control  (=0/1/2)        nn_fwb      = ', nn_fwb
-         WRITE(numout,*) '              closed sea (=0/1) (set in namdom)          nclosea     = ', nclosea
+         WRITE(numout,*) '              closed sea (=0/1) (set in namdom)          nn_closea   = ', nn_closea
       ENDIF
 
Index: trunk/NEMO/OPA_SRC/SBC/sbcrnf.F90
===================================================================
--- trunk/NEMO/OPA_SRC/SBC/sbcrnf.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/SBC/sbcrnf.F90	(revision 1601)
@@ -37,5 +37,5 @@
    REAL(wp)          , PUBLIC ::   rn_hrnf      = 0.e0    !: runoffs, depth over which enhanced vertical mixing is used
    REAL(wp)          , PUBLIC ::   rn_avt_rnf   = 0.e0    !: runoffs, value of the additional vertical mixing coef. [m2/s]
-   REAL(wp)          , PUBLIC ::   rn_mul_rnf   = 1.e0    !: multiplicative factor for runoff
+   REAL(wp)          , PUBLIC ::   rn_rfact     = 1.e0    !: multiplicative factor for runoff
 
    INTEGER , PUBLIC                     ::   nkrnf = 0   !: number of levels over which Kz is increased at river mouths
@@ -103,6 +103,6 @@
 
          IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN
-            emp (:,:) = emp (:,:) - rn_mul_rnf * ABS( sf_rnf(1)%fnow(:,:) )
-            emps(:,:) = emps(:,:) - rn_mul_rnf * ABS( sf_rnf(1)%fnow(:,:) )
+            emp (:,:) = emp (:,:) - rn_rfact * ABS( sf_rnf(1)%fnow(:,:) )
+            emps(:,:) = emps(:,:) - rn_rfact * ABS( sf_rnf(1)%fnow(:,:) )
             CALL iom_put( "runoffs", sf_rnf(1)%fnow )         ! runoffs
          ENDIF
@@ -126,5 +126,5 @@
       !!
       NAMELIST/namsbc_rnf/ cn_dir, ln_rnf_emp, sn_rnf, sn_cnf, ln_rnf_mouth,   &
-         &                 rn_hrnf, rn_avt_rnf, rn_mul_rnf
+         &                 rn_hrnf, rn_avt_rnf, rn_rfact
       !!----------------------------------------------------------------------
 
@@ -152,5 +152,5 @@
          WRITE(numout,*) '      river mouth additional Kz                  rn_avt_rnf   = ', rn_avt_rnf
          WRITE(numout,*) '      depth of river mouth additional mixing     rn_hrnf      = ', rn_hrnf
-         WRITE(numout,*) '      multiplicative factor for runoff           rn_mul_rnf   = ', rn_mul_rnf  
+         WRITE(numout,*) '      multiplicative factor for runoff           rn_rfact     = ', rn_rfact    
       ENDIF
 
@@ -228,5 +228,5 @@
       !!                rnfmsk_z vertical structure
       !!----------------------------------------------------------------------
-      USE closea, ONLY :    nclosea, clo_rnf   ! closed sea flag, rnfmsk update routine
+      USE closea, ONLY :    clo_rnf   ! rnfmsk update routine
       !
       INTEGER           ::   inum        ! temporary integers
Index: trunk/NEMO/OPA_SRC/SBC/sbcssr.F90
===================================================================
--- trunk/NEMO/OPA_SRC/SBC/sbcssr.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/SBC/sbcssr.F90	(revision 1601)
@@ -32,9 +32,11 @@
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   qrp      !: heat flux damping        [w/m2]
 
-   !                                      !!* Namelist namsbc_ssr *
-   INTEGER, PUBLIC ::   nn_sstr, nn_sssr   ! SST/SSS restoring indicator
-   REAL(wp)        ::   dqdt, deds         ! restoring factor on SST and SSS
-   LOGICAL         ::   ln_sssr_bnd        ! flag to bound erp term 
-   REAL(wp)        ::   rn_sssr_bnd        ! ABS(Max./Min.) value of erp term [mm/day]
+   !                                           !!* Namelist namsbc_ssr *
+   INTEGER, PUBLIC ::   nn_sstr     =   0       ! SST/SSS restoring indicator
+   INTEGER, PUBLIC ::   nn_sssr     =   0       ! SST/SSS restoring indicator
+   REAL(wp)        ::   rn_dqdt     = -40.e0    ! restoring factor on SST and SSS
+   REAL(wp)        ::   rn_deds     = -27.70    ! restoring factor on SST and SSS
+   LOGICAL         ::   ln_sssr_bnd = .false.   ! flag to bound erp term 
+   REAL(wp)        ::   rn_sssr_bnd =   0.e0    ! ABS(Max./Min.) value of erp term [mm/day]
 
    REAL(wp) , ALLOCATABLE, DIMENSION(:) ::   buffer   ! Temporary buffer for exchange
@@ -71,5 +73,5 @@
       REAL(wp) ::   zerp     ! local scalar for evaporation damping
       REAL(wp) ::   zqrp     ! local scalar for heat flux damping
-      REAL(wp) ::   zsrp     ! local scalar for unit conversion of deds factor
+      REAL(wp) ::   zsrp     ! local scalar for unit conversion of rn_deds factor
       REAL(wp) ::   zerp_bnd ! local scalar for unit conversion of rn_epr_max factor
       INTEGER  ::   ierror   ! return error code
@@ -77,5 +79,5 @@
       CHARACTER(len=100) ::  cn_dir          ! Root directory for location of ssr files
       TYPE(FLD_N) ::   sn_sst, sn_sss        ! informations about the fields to be read
-      NAMELIST/namsbc_ssr/ cn_dir, nn_sstr, nn_sssr, dqdt, deds, sn_sst, sn_sss, ln_sssr_bnd, rn_sssr_bnd
+      NAMELIST/namsbc_ssr/ cn_dir, nn_sstr, nn_sssr, rn_dqdt, rn_deds, sn_sst, sn_sss, ln_sssr_bnd, rn_sssr_bnd
       !!----------------------------------------------------------------------
       !
@@ -83,8 +85,5 @@
       IF( kt == nit000 ) THEN                         ! First call kt=nit000 !
          !                                            ! -------------------- !
-         nn_sstr = 0                  !* set file information
-         nn_sssr = 0
-         dqdt    = -40.e0
-         deds    = -27.70
+         !                            !* set file information
          cn_dir  = './'            ! directory in which the model is executed
          ! ... default values (NB: frequency positive => hours, negative => months)
@@ -101,11 +100,12 @@
             WRITE(numout,*) 'sbc_ssr : SST and/or SSS damping term '
             WRITE(numout,*) '~~~~~~~ '
-            WRITE(numout,*) '          SST restoring term (Yes=1)             nn_sstr = ', nn_sstr
-            WRITE(numout,*) '          SSS damping term (Yes=1, salt flux)    nn_sssr = ', nn_sssr
-            WRITE(numout,*) '                           (Yes=2, volume flux) '
-            WRITE(numout,*) '          dQ/dT (restoring magnitude on SST)     dqdt    = ', dqdt, ' W/m2/K'
-            WRITE(numout,*) '          dE/dS (restoring magnitude on SST)     deds    = ', deds, ' mm/day'
-            WRITE(numout,*) '          flag to bound erp term             ln_sssr_bnd = ', ln_sssr_bnd
-            WRITE(numout,*) '          ABS(Max./Min.) erp threshold       rn_sssr_bnd = ', rn_sssr_bnd, ' mm/day'
+            WRITE(numout,*) '   Namelist namsbc_ssr :'
+            WRITE(numout,*) '      SST restoring term (Yes=1)             nn_sstr     = ', nn_sstr
+            WRITE(numout,*) '      SSS damping term (Yes=1, salt flux)    nn_sssr     = ', nn_sssr
+            WRITE(numout,*) '                       (Yes=2, volume flux) '
+            WRITE(numout,*) '      dQ/dT (restoring magnitude on SST)     rn_dqdt     = ', rn_dqdt, ' W/m2/K'
+            WRITE(numout,*) '      dE/dS (restoring magnitude on SST)     rn_deds     = ', rn_deds, ' mm/day'
+            WRITE(numout,*) '      flag to bound erp term                 ln_sssr_bnd = ', ln_sssr_bnd
+            WRITE(numout,*) '      ABS(Max./Min.) erp threshold           rn_sssr_bnd = ', rn_sssr_bnd, ' mm/day'
          ENDIF
 
@@ -154,5 +154,5 @@
                DO jj = 1, jpj
                   DO ji = 1, jpi
-                     zqrp = dqdt * ( sst_m(ji,jj) - sf_sst(1)%fnow(ji,jj) )
+                     zqrp = rn_dqdt * ( sst_m(ji,jj) - sf_sst(1)%fnow(ji,jj) )
                      qns(ji,jj) = qns(ji,jj) + zqrp
                      qrp(ji,jj) = zqrp
@@ -163,5 +163,5 @@
             !
             IF( nn_sssr == 1 ) THEN                   !* Salinity damping term (salt flux, emps only)
-               zsrp = deds / rday                                     ! from [mm/day] to [kg/m2/s]
+               zsrp = rn_deds / rday                                  ! from [mm/day] to [kg/m2/s]
 !CDIR COLLAPSE
                DO jj = 1, jpj
@@ -175,6 +175,7 @@
                END DO
                CALL iom_put( "erp", erp )                             ! freshwater flux damping
+               !
             ELSEIF( nn_sssr == 2 ) THEN               !* Salinity damping term (volume flux, emp and emps)
-               zsrp = deds / rday                                     ! from [mm/day] to [kg/m2/s]
+               zsrp = rn_deds / rday                                  ! from [mm/day] to [kg/m2/s]
                zerp_bnd = rn_sssr_bnd / rday                          !       -              -    
 !CDIR COLLAPSE
Index: trunk/NEMO/OPA_SRC/SOL/sol_oce.F90
===================================================================
--- trunk/NEMO/OPA_SRC/SOL/sol_oce.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/SOL/sol_oce.F90	(revision 1601)
@@ -2,17 +2,8 @@
    !!======================================================================
    !!                    ***  MODULE  sol_oce  ***
-   !! Ocean solver :  solver variables defined in memory 
-   !!=====================================================================
-   !!
-   !! ** Purpose :   Define in memory solver variables
-   !!
-   !! History :
-   !!   9.0  !  02-11  (G. Madec)  F90: Free form and module
+   !! Ocean solver :  elliptic solver variables defined in memory 
+   !!======================================================================
+   !! History :  1.0  !  02-11  (G. Madec)  F90: Free form and module
    !!----------------------------------------------------------------------
-   !!  OPA 9.0 , LOCEAN-IPSL (2005) 
-   !! $Id$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
-   !!----------------------------------------------------------------------
-   !! * Modules used
    USE par_oce         ! ocean parameters
 
@@ -20,46 +11,37 @@
    PRIVATE
 
-   !!----------------------------
-   !! elliptic solver: SOR or PCG
-   !! ---------------------------
-   INTEGER , PUBLIC ::      & !!: namsol   elliptic solver / free surface
-      nsolv    =    1 ,     &  !: = 1/2 type of elliptic solver
-      nsol_arp =    0 ,     &  !: = 0/1 absolute/relative precision convergence test
-      nmin     =  300 ,     &  !: minimum of iterations for the SOR solver
-      nmax     =  800 ,     &  !: maximum of iterations for the SOR solver
-      nmod     =   10          !: frequency of test for the SOR solver
-     
-   REAL(wp), PUBLIC ::      & !!: namsol   elliptic solver / free surface
-      eps    =  1.e-6_wp ,  &  !: absolute precision of the solver
-      resmax = 1.e-14_wp ,  &  !: absolute precision for the SOR solver
-      sor    =   1.92_wp ,  &  !: optimal coefficient for the SOR solver
-      rnu    =    1.0_wp       !: strength of the additional force used in free surface
+   !                                             !!* Namelist namsol : elliptic solver *
+   INTEGER , PUBLIC ::   nn_solv    =    1        !: = 1/2 type of elliptic solver
+   INTEGER , PUBLIC ::   nn_sol_arp =    0        !: = 0/1 absolute/relative precision convergence test
+   INTEGER , PUBLIC ::   nn_nmin    =  300        !: minimum of iterations for the SOR solver
+   INTEGER , PUBLIC ::   nn_nmax    =  800        !: maximum of iterations for the SOR solver
+   INTEGER , PUBLIC ::   nn_nmod    =   10        !: frequency of test for the SOR solver
+   REAL(wp), PUBLIC ::   rn_eps     =  1.e-6_wp   !: absolute precision of the solver
+   REAL(wp), PUBLIC ::   rn_resmax  = 1.e-14_wp   !: absolute precision for the SOR solver
+   REAL(wp), PUBLIC ::   rn_sor     =   1.92_wp   !: optimal coefficient for the SOR solver
+   REAL(wp), PUBLIC ::   rn_nu      =    1.0_wp   !: strength of the additional force used in free surface
 
-   CHARACTER(len=1), PUBLIC ::   &  !:
-      c_solver_pt = 'T'        !: nature of grid-points T (S) for free surface case
+   CHARACTER(len=1), PUBLIC ::   c_solver_pt = 'T'   !: nature of grid-points T (S) for free surface case
 
-   INTEGER , PUBLIC ::   &  !:
-      ncut,         &  !: indicator of solver convergence
-      niter            !: number of iteration done by the solver
+   INTEGER , PUBLIC ::   ncut        !: indicator of solver convergence
+   INTEGER , PUBLIC ::   niter       !: number of iteration done by the solver
 
-   REAL(wp), PUBLIC ::   &  !:
-      epsr,         &  !: relative precision for SOR & PCG solvers
-      rnorme, res,  &  !: intermediate modulus, solver residu
-      alph,         &  !: coefficient  =(gcr,gcr)/(gcx,gccd)
-      beta,         &  !: coefficient  =(rn+1,rn+1)/(rn,rn)
-      radd,         &  !: coefficient  =(gccd,gcdes)
-      rr               !: coefficient  =(rn,rn)
+   REAL(wp), PUBLIC ::   eps, epsr   !: relative precision for SOR & PCG solvers
+   REAL(wp), PUBLIC ::   rnorme      !: intermediate modulus
+   REAL(wp), PUBLIC ::   res         !: solver residu
+   REAL(wp), PUBLIC ::   alph        !: coefficient  =(gcr,gcr)/(gcx,gccd)
+   REAL(wp), PUBLIC ::   beta        !: coefficient  =(rn+1,rn+1)/(rn,rn)
+   REAL(wp), PUBLIC ::   radd        !: coefficient  =(gccd,gcdes)
+   REAL(wp), PUBLIC ::   rr          !: coefficient  =(rn,rn)
 
-   REAL(wp), PUBLIC, DIMENSION(1-jpr2di:jpi+jpr2di,1-jpr2dj:jpj+jpr2dj,4) ::   &  !:
-      gcp              !: barotropic matrix extra-diagonal elements
-
-   REAL(wp), PUBLIC, DIMENSION(1-jpr2di:jpi+jpr2di,1-jpr2dj:jpj+jpr2dj) ::   &  !:
-      gcx, gcxb,    &  !: now, before solution of the elliptic equation
-      gcdprc,       &  !: inverse diagonal preconditioning matrix
-      gcdmat,       &  !: diagonal preconditioning matrix
-      gcb,          &  !: second member of the barotropic linear system
-      gcr,          &  !: residu =b-a.x
-      gcdes,        &  !: vector descente
-      gccd             !: vector such that ca.gccd=a.d (ca-1=gcdprc)
+   REAL(wp), PUBLIC, DIMENSION(1-jpr2di:jpi+jpr2di,1-jpr2dj:jpj+jpr2dj,4) ::   gcp     !: matrix extra-diagonal elements
+   REAL(wp), PUBLIC, DIMENSION(1-jpr2di:jpi+jpr2di,1-jpr2dj:jpj+jpr2dj)   ::   gcx     !: now    solution of the elliptic eq.
+   REAL(wp), PUBLIC, DIMENSION(1-jpr2di:jpi+jpr2di,1-jpr2dj:jpj+jpr2dj)   ::   gcxb    !: before solution of the elliptic eq.
+   REAL(wp), PUBLIC, DIMENSION(1-jpr2di:jpi+jpr2di,1-jpr2dj:jpj+jpr2dj)   ::   gcdprc  !: inverse diagonal preconditioning matrix
+   REAL(wp), PUBLIC, DIMENSION(1-jpr2di:jpi+jpr2di,1-jpr2dj:jpj+jpr2dj)   ::   gcdmat  !: diagonal preconditioning matrix
+   REAL(wp), PUBLIC, DIMENSION(1-jpr2di:jpi+jpr2di,1-jpr2dj:jpj+jpr2dj)   ::   gcb     !: second member of the elliptic eq.
+   REAL(wp), PUBLIC, DIMENSION(1-jpr2di:jpi+jpr2di,1-jpr2dj:jpj+jpr2dj)   ::   gcr     !: residu =b-a.x
+   REAL(wp), PUBLIC, DIMENSION(1-jpr2di:jpi+jpr2di,1-jpr2dj:jpj+jpr2dj)   ::   gcdes   !: vector descente
+   REAL(wp), PUBLIC, DIMENSION(1-jpr2di:jpi+jpr2di,1-jpr2dj:jpj+jpr2dj)   ::   gccd    !: gccd= gcdprc^-1.a.d 
 
 #if defined key_agrif
@@ -68,3 +50,7 @@
 
    !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) 
+   !! $Id$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 END MODULE sol_oce
Index: trunk/NEMO/OPA_SRC/SOL/solmat.F90
===================================================================
--- trunk/NEMO/OPA_SRC/SOL/solmat.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/SOL/solmat.F90	(revision 1601)
@@ -4,23 +4,21 @@
    !! solver       : construction of the matrix 
    !!======================================================================
-   !! History :   1.0  !  88-04  (G. Madec)  Original code
-   !!                  !  93-03  (M. Guyon)  symetrical conditions
-   !!                  !  93-06  (M. Guyon)  suppress pointers
-   !!                  !  96-05  (G. Madec)  merge sor and pcg formulations
-   !!                  !  96-11  (A. Weaver)  correction to preconditioning
-   !!             8.5  !  02-08  (G. Madec)  F90: Free form
-   !!                  !  02-11  (C. Talandier, A-M. Treguier) Free surface & Open boundaries
-   !!             9.0  !  05-09  (R. Benshila)  add sol_exd for extra outer halo
-   !!             9.0  !  05-11  (V. Garnier) Surface pressure gradient organization
-   !!             9.0  !  06-07  (S. Masson)  distributed restart using iom
-   !!----------------------------------------------------------------------
-
-   !!----------------------------------------------------------------------
-   !!   sol_mat       : Construction of the matrix of used by the elliptic solvers
-   !!   fetsch        :
-   !!   fetmat        :
-   !!   fetstr        :
-   !!----------------------------------------------------------------------
-   !! * Modules used
+   !! History :   1.0  ! 1988-04  (G. Madec)  Original code
+   !!                  ! 1993-03  (M. Guyon)  symetrical conditions
+   !!                  ! 1993-06  (M. Guyon)  suppress pointers
+   !!                  ! 1996-05  (G. Madec)  merge sor and pcg formulations
+   !!                  ! 1996-11  (A. Weaver)  correction to preconditioning
+   !!   NEMO      1.0  ! 1902-08  (G. Madec)  F90: Free form
+   !!              -   ! 1902-11  (C. Talandier, A-M. Treguier) Free surface & Open boundaries
+   !!             2.0  ! 2005-09  (R. Benshila)  add sol_exd for extra outer halo
+   !!              -   ! 2005-11  (V. Garnier) Surface pressure gradient organization
+   !!             3.2  ! 2009-06  (S. Masson)  distributed restart using iom
+   !!              -   ! 2009-07  (R. Benshila)  suppression of rigid-lid option
+   !!----------------------------------------------------------------------
+
+   !!----------------------------------------------------------------------
+   !!   sol_mat : Construction of the matrix of used by the elliptic solvers
+   !!   sol_exd :
+   !!----------------------------------------------------------------------
    USE oce             ! ocean dynamics and active tracers
    USE dom_oce         ! ocean space and time domain
@@ -35,8 +33,8 @@
    PRIVATE
 
-   !! * Routine accessibility
-   PUBLIC sol_mat     ! routine called by inisol.F90
-   !!----------------------------------------------------------------------
-   !!   OPA 9.0 , LOCEAN-IPSL (2005) 
+   PUBLIC   sol_mat    ! routine called by inisol.F90
+
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) 
    !! $Id$ 
    !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
@@ -50,10 +48,8 @@
       !!
       !! ** Purpose :   Construction of the matrix of used by the elliptic 
-      !!      solvers (either sor or pcg methods).
-      !!
-      !! ** Method  :  
-      !!      lk_dynspg_flt=T: free surface formulation
-      !!      The matrix is built for the divergence of the transport system
-      !!      a diagonal preconditioning matrix is also defined.
+      !!              solvers (either sor or pcg methods).
+      !!
+      !! ** Method  :   The matrix is built for the divergence of the transport 
+      !!              system. a diagonal preconditioning matrix is also defined.
       !! 
       !! ** Action  : - gcp    : extra-diagonal elements of the matrix
@@ -61,8 +57,6 @@
       !!              - gcdprc : inverse of the preconditioning matrix
       !!----------------------------------------------------------------------
-      !! * Arguments
       INTEGER, INTENT(in) :: kt
-
-      !! * Local declarations
+      !!
       INTEGER ::   ji, jj                    ! dummy loop indices
       REAL(wp) ::   zcoefs, zcoefw, zcoefe, zcoefn  ! temporary scalars
@@ -73,29 +67,22 @@
       ! 1. Construction of the matrix
       ! -----------------------------
-      
-      ! initialize to zero
-      zcoef = 0.e0
+      zcoef = 0.e0                          ! initialize to zero
       gcp(:,:,1) = 0.e0
       gcp(:,:,2) = 0.e0
       gcp(:,:,3) = 0.e0
       gcp(:,:,4) = 0.e0
-      
+      !
       gcdprc(:,:) = 0.e0
       gcdmat(:,:) = 0.e0
-      
-      IF( neuler == 0 .AND. kt == nit000 ) THEN
-         z2dt = rdt
-      ELSE
-         z2dt = 2. * rdt
+      !
+      IF( neuler == 0 .AND. kt == nit000 ) THEN   ;   z2dt = rdt
+      ELSE                                        ;   z2dt = 2. * rdt
       ENDIF
 
 #if defined key_dynspg_flt && ! defined key_obc
-!!cr      IF( lk_dynspg_flt .AND. .NOT.lk_obc ) THEN   !bug missing lk_dynspg_flt_atsk
-
-      ! defined the coefficients for free surface elliptic system
-
-      DO jj = 2, jpjm1
+
+      DO jj = 2, jpjm1                      ! matrix of free surface elliptic system
          DO ji = 2, jpim1
-            zcoef = z2dt * z2dt * grav * rnu * bmask(ji,jj)
+            zcoef = z2dt * z2dt * grav * bmask(ji,jj)
             zcoefs = -zcoef * hv(ji  ,jj-1) * e1v(ji  ,jj-1) / e2v(ji  ,jj-1)    ! south coefficient
             zcoefw = -zcoef * hu(ji-1,jj  ) * e2u(ji-1,jj  ) / e1u(ji-1,jj  )    ! west coefficient
@@ -112,12 +99,9 @@
       
 #  elif defined key_dynspg_flt && defined key_obc
-!!cr      ELSEIF( lk_dynspg_flt .AND. lk_obc ) THEN     !bug missing lk_dynspg_flt_atsk 
-
-      !   defined gcdmat in the case of open boundaries
-
-      DO jj = 2, jpjm1
+
+      DO jj = 2, jpjm1                      ! matrix of free surface elliptic system with open boundaries
          DO ji = 2, jpim1
-            zcoef = z2dt * z2dt * grav * rnu * bmask(ji,jj)
-            !  south coefficient
+            zcoef = z2dt * z2dt * grav * bmask(ji,jj)
+            !                                    ! south coefficient
             IF( lp_obc_south .AND. ( jj == njs0p1 ) ) THEN
                zcoefs = -zcoef * hv(ji,jj-1) * e1v(ji,jj-1)/e2v(ji,jj-1)*(1.-vsmsk(ji,1))
@@ -126,6 +110,6 @@
             END IF
             gcp(ji,jj,1) = zcoefs
-
-            !  west coefficient
+            !
+            !                                    ! west coefficient
             IF( lp_obc_west  .AND. ( ji == niw0p1 ) ) THEN
                zcoefw = -zcoef * hu(ji-1,jj) * e2u(ji-1,jj)/e1u(ji-1,jj)*(1.-uwmsk(jj,1))
@@ -134,6 +118,6 @@
             END IF
             gcp(ji,jj,2) = zcoefw
-
-            !   east coefficient
+            !
+            !                                    ! east coefficient
             IF( lp_obc_east  .AND. ( ji == nie0 ) ) THEN
                zcoefe = -zcoef * hu(ji,jj) * e2u(ji,jj)/e1u(ji,jj)*(1.-uemsk(jj,1))
@@ -142,6 +126,6 @@
             END IF
             gcp(ji,jj,3) = zcoefe
-
-            !   north coefficient
+            !
+            !                                    ! north coefficient
             IF( lp_obc_north .AND. ( jj == njn0 ) ) THEN
                zcoefn = -zcoef * hv(ji,jj) * e1v(ji,jj)/e2v(ji,jj)*(1.-vnmsk(ji,1))
@@ -150,82 +134,62 @@
             END IF
             gcp(ji,jj,4) = zcoefn
-
-            ! diagonal coefficient
-            gcdmat(ji,jj) = e1t(ji,jj)*e2t(ji,jj)*bmask(ji,jj) &
-                            - zcoefs -zcoefw -zcoefe -zcoefn
+            !
+            !                                    ! diagonal coefficient
+            gcdmat(ji,jj) = e1t(ji,jj)*e2t(ji,jj)*bmask(ji,jj)   &
+               &            - zcoefs -zcoefw -zcoefe -zcoefn
          END DO
       END DO
-
-#  else
-!!cr      ELSE
-
-      !   defined the coefficients for bsf elliptic system
-      
-      DO jj = 2, jpjm1
-         DO ji = 2, jpim1
-            zcoefs = -hur(ji  ,jj  ) * e1u(ji  ,jj  ) / e2u(ji  ,jj  ) * bmask(ji,jj)   ! south coefficient
-            zcoefw = -hvr(ji  ,jj  ) * e2v(ji  ,jj  ) / e1v(ji  ,jj  ) * bmask(ji,jj)   ! west coefficient
-            zcoefe = -hvr(ji+1,jj  ) * e2v(ji+1,jj  ) / e1v(ji+1,jj  ) * bmask(ji,jj)   ! east coefficient
-            zcoefn = -hur(ji  ,jj+1) * e1u(ji  ,jj+1) / e2u(ji  ,jj+1) * bmask(ji,jj)   ! north coefficient
-            gcp(ji,jj,1) = zcoefs
-            gcp(ji,jj,2) = zcoefw
-            gcp(ji,jj,3) = zcoefe
-            gcp(ji,jj,4) = zcoefn
-            gcdmat(ji,jj) = -zcoefs -zcoefw -zcoefe -zcoefn                             ! diagonal coefficient
+#endif
+
+#if defined key_agrif
+      IF( .NOT.AGRIF_ROOT() ) THEN
+         !
+         IF( nbondi == -1 .OR. nbondi == 2 )   bmask(2     ,:     ) = 0.e0
+         IF( nbondi ==  1 .OR. nbondi == 2 )   bmask(nlci-1,:     ) = 0.e0
+         IF( nbondj == -1 .OR. nbondj == 2 )   bmask(:     ,2     ) = 0.e0
+         IF( nbondj ==  1 .OR. nbondj == 2 )   bmask(:     ,nlcj-1) = 0.e0
+         !
+         DO jj = 2, jpjm1
+            DO ji = 2, jpim1
+               zcoef = z2dt * z2dt * grav * bmask(ji,jj)
+               !  south coefficient
+               IF( ( nbondj == -1 .OR. nbondj == 2 ) .AND. ( jj == 3 ) ) THEN
+                  zcoefs = -zcoef * hv(ji,jj-1) * e1v(ji,jj-1)/e2v(ji,jj-1)*(1.-vmask(ji,jj-1,1))
+               ELSE
+                  zcoefs = -zcoef * hv(ji,jj-1) * e1v(ji,jj-1)/e2v(ji,jj-1)
+               END IF
+               gcp(ji,jj,1) = zcoefs
+               ! 
+               !  west coefficient
+               IF( ( nbondi == -1 .OR. nbondi == 2 ) .AND. ( ji == 3 )  ) THEN
+                  zcoefw = -zcoef * hu(ji-1,jj) * e2u(ji-1,jj)/e1u(ji-1,jj)*(1.-umask(ji-1,jj,1))
+               ELSE
+                  zcoefw = -zcoef * hu(ji-1,jj) * e2u(ji-1,jj)/e1u(ji-1,jj)
+               END IF
+               gcp(ji,jj,2) = zcoefw
+               !
+               !   east coefficient
+               IF( ( nbondi == 1 .OR. nbondi == 2 ) .AND. ( ji == nlci-2 ) ) THEN
+                  zcoefe = -zcoef * hu(ji,jj) * e2u(ji,jj)/e1u(ji,jj)*(1.-umask(ji,jj,1))
+               ELSE
+                  zcoefe = -zcoef * hu(ji,jj) * e2u(ji,jj)/e1u(ji,jj)
+               END IF
+               gcp(ji,jj,3) = zcoefe
+               !
+               !   north coefficient
+               IF( ( nbondj == 1 .OR. nbondj == 2 ) .AND. ( jj == nlcj-2 ) ) THEN
+                  zcoefn = -zcoef * hv(ji,jj) * e1v(ji,jj)/e2v(ji,jj)*(1.-vmask(ji,jj,1))
+               ELSE
+                  zcoefn = -zcoef * hv(ji,jj) * e1v(ji,jj)/e2v(ji,jj)
+               END IF
+               gcp(ji,jj,4) = zcoefn
+               !
+               ! diagonal coefficient
+               gcdmat(ji,jj) = e1t(ji,jj)*e2t(ji,jj)*bmask(ji,jj)   &
+                  &            - zcoefs -zcoefw -zcoefe -zcoefn
+            END DO
          END DO
-      END DO
-      
-!!cr  ENDIF
-#endif
-#if defined key_agrif
-       IF (.NOT.AGRIF_ROOT()) THEN
-       
-       IF ( (nbondi == -1)  .OR. (nbondi == 2) ) bmask(2,:)=0.
-       IF ( (nbondi ==  1)  .OR. (nbondi == 2) ) bmask(nlci-1,:)=0.
-       IF ( (nbondj == -1)  .OR. (nbondj == 2) ) bmask(:,2)=0.
-       IF ( (nbondj ==  1)  .OR. (nbondj == 2) ) bmask(:,nlcj-1)=0.
-
-      DO jj = 2, jpjm1
-         DO ji = 2, jpim1
-            zcoef = z2dt * z2dt * grav * rnu * bmask(ji,jj)
-            !  south coefficient
-            IF( ((nbondj == -1)  .OR. (nbondj == 2)) .AND. ( jj == 3 ) ) THEN
-               zcoefs = -zcoef * hv(ji,jj-1) * e1v(ji,jj-1)/e2v(ji,jj-1)*(1.-vmask(ji,jj-1,1))
-            ELSE
-               zcoefs = -zcoef * hv(ji,jj-1) * e1v(ji,jj-1)/e2v(ji,jj-1)
-            END IF
-            gcp(ji,jj,1) = zcoefs
-
-            !  west coefficient
-	    IF( ( (nbondi == -1)  .OR. (nbondi == 2) ) .AND. ( ji == 3 )  ) THEN
-               zcoefw = -zcoef * hu(ji-1,jj) * e2u(ji-1,jj)/e1u(ji-1,jj)*(1.-umask(ji-1,jj,1))
-            ELSE
-               zcoefw = -zcoef * hu(ji-1,jj) * e2u(ji-1,jj)/e1u(ji-1,jj)
-            END IF
-            gcp(ji,jj,2) = zcoefw
-
-            !   east coefficient
-            IF( ((nbondi == 1)  .OR. (nbondi == 2)) .AND. ( ji == nlci-2 ) ) THEN
-               zcoefe = -zcoef * hu(ji,jj) * e2u(ji,jj)/e1u(ji,jj)*(1.-umask(ji,jj,1))
-            ELSE
-               zcoefe = -zcoef * hu(ji,jj) * e2u(ji,jj)/e1u(ji,jj)
-            END IF
-            gcp(ji,jj,3) = zcoefe
-
-            !   north coefficient
-            IF( ((nbondj == 1)  .OR. (nbondj == 2)) .AND. ( jj == nlcj-2 ) ) THEN
-               zcoefn = -zcoef * hv(ji,jj) * e1v(ji,jj)/e2v(ji,jj)*(1.-vmask(ji,jj,1))
-            ELSE
-               zcoefn = -zcoef * hv(ji,jj) * e1v(ji,jj)/e2v(ji,jj)
-            END IF
-            gcp(ji,jj,4) = zcoefn
-
-            ! diagonal coefficient
-            gcdmat(ji,jj) = e1t(ji,jj)*e2t(ji,jj)*bmask(ji,jj) &
-                            - zcoefs -zcoefw -zcoefe -zcoefn
-         END DO
-      END DO
-      
-       ENDIF
+         ! 
+      ENDIF
 #endif
 
@@ -244,17 +208,4 @@
       ! the diagonal coefficient of the southern grid points must be modify to
       ! account for the existence of the south symmetric bassin.
-      
-!!cr      IF( .NOT.lk_dynspg_flt ) THEN   !bug missing lk_dynspg_flt_atsk
-#if ! defined key_dynspg_flt
-      IF( nperio == 2 ) THEN
-         DO ji = 1, jpi
-            IF( bmask(ji,2) /= 0.e0 ) THEN
-               zcoefs = - hur(ji,2)*e1u(ji,2)/e2u(ji,2)
-               gcdmat(ji,2) = gcdmat(ji,2) - zcoefs
-            ENDIF
-         END DO
-      ENDIF
-!!cr      ENDIF
-#endif
       
       ! North fold boundary condition
@@ -276,7 +227,7 @@
       gcp(:,:,3) = gcp(:,:,3) * gcdprc(:,:)
       gcp(:,:,4) = gcp(:,:,4) * gcdprc(:,:)
-      IF( nsolv == 2 )  gccd(:,:) = sor * gcp(:,:,2)
-
-      IF( nsolv == 2 .AND. MAX( jpr2di, jpr2dj ) > 0) THEN
+      IF( nn_solv == 2 )  gccd(:,:) = rn_sor * gcp(:,:,2)
+
+      IF( nn_solv == 2 .AND. MAX( jpr2di, jpr2dj ) > 0) THEN
          CALL lbc_lnk_e( gcp   (:,:,1), c_solver_pt, 1. )   ! lateral boundary conditions
          CALL lbc_lnk_e( gcp   (:,:,2), c_solver_pt, 1. )   ! lateral boundary conditions
@@ -308,90 +259,77 @@
       !!                the total area strictly above the pivot point,
       !!                and on the semi-row of the pivot point   
-      !!                
-      !! History :
-      !!   9.0  !  05-09  (R. Benshila)  original routine
-      !!----------------------------------------------------------------------
-      !! * Arguments
-      CHARACTER(len=1) , INTENT( in ) ::   &
-         cd_type       ! define the nature of pt2d array grid-points
-         !             !  = T , U , V , F , W 
-         !             !  = S : T-point, north fold treatment
-         !             !  = G : F-point, north fold treatment
-         !             !  = I : sea-ice velocity at F-point with index shift
-      REAL(wp), DIMENSION(1-jpr2di:jpi+jpr2di,1-jpr2dj:jpj+jpr2dj,4), INTENT( inout ) ::   &
-         pt3d          ! 2D array on which the boundary condition is applied
-
-      !! * Local variables
-      INTEGER  ::   ji, jk      ! dummy loop indices
-      INTEGER  ::   iloc                ! temporary integers
-      REAL(wp), DIMENSION(1-jpr2di:jpi+jpr2di,1-jpr2dj:jpj+jpr2dj,4) ::   &
-         ztab          ! 2D array on which the boundary condition is applied
+      !!----------------------------------------------------------------------
+      CHARACTER(len=1) , INTENT( in ) ::   cd_type   ! define the nature of pt2d array grid-points
+         !                                           !  = T , U , V , F , W 
+         !                                           !  = S : T-point, north fold treatment
+         !                                           !  = G : F-point, north fold treatment
+         !                                           !  = I : sea-ice velocity at F-point with index shift
+      REAL(wp), DIMENSION(1-jpr2di:jpi+jpr2di,1-jpr2dj:jpj+jpr2dj,4), INTENT(inout) ::   pt3d   ! 2D field to be treated
+      !!
+      INTEGER  ::   ji, jk   ! dummy loop indices
+      INTEGER  ::   iloc     ! temporary integers
+      REAL(wp), DIMENSION(1-jpr2di:jpi+jpr2di,1-jpr2dj:jpj+jpr2dj,4) ::   ztab   ! 2D workspace
       !!----------------------------------------------------------------------
 
       ztab = pt3d
 
-      ! north fold treatment
-      ! -----------------------
-  
-      SELECT CASE ( npolj )
-         
-         CASE ( 3 , 4 )   !  T pivot
+      SELECT CASE ( npolj )            ! north fold type
+      ! 
+      CASE ( 3 , 4 )                        !==  T pivot  ==!
          iloc = jpiglo/2 +1 
-            
-            SELECT CASE ( cd_type )
-  
-            CASE ( 'T', 'S', 'U', 'W' )
-               DO jk =1, 4
-                  DO ji = 1-jpr2di, nlci+jpr2di
-                     pt3d(ji,nlcj:nlcj+jpr2dj,jk) = ztab(ji,nlcj:nlcj+jpr2dj,jk+3-2*MOD(jk+3,4))           
-                  ENDDO
-               ENDDO
-
-              DO jk =1, 4
-                  DO ji = nlci+jpr2di, 1-jpr2di,  -1
-                     IF( ( ji .LT. mi0(iloc) .AND. mi0(iloc) /= 1 ) &
-                       & .OR. ( mi0(iloc) == jpi+1 ) ) EXIT
+         !   
+         SELECT CASE ( cd_type )
+         ! 
+         CASE ( 'T', 'S', 'U', 'W' )
+            DO jk = 1, 4
+               DO ji = 1-jpr2di, nlci+jpr2di
+                  pt3d(ji,nlcj:nlcj+jpr2dj,jk) = ztab(ji,nlcj:nlcj+jpr2dj,jk+3-2*MOD(jk+3,4))           
+               END DO
+            END DO
+            DO jk =1, 4
+               DO ji = nlci+jpr2di, 1-jpr2di,  -1
+                  IF( ( ji .LT. mi0(iloc) .AND. mi0(iloc) /= 1 ) &
+                     & .OR. ( mi0(iloc) == jpi+1 ) ) EXIT
                      pt3d(ji,nlcj-1,jk) = ztab(ji,nlcj-1,jk+3-2*MOD(jk+3,4))
-                  ENDDO
-               ENDDO
-
-            CASE ( 'F' ,'G' , 'I', 'V' )
-               DO jk =1, 4
-                  DO ji = 1-jpr2di, nlci+jpr2di
-                     pt3d(ji,nlcj-1:nlcj+jpr2dj,jk) = ztab(ji,nlcj-1:nlcj+jpr2dj,jk+3-2*MOD(jk+3,4))           
-                  ENDDO
-               ENDDO
-
-            END SELECT   ! cd_type
-  
-         CASE ( 5 , 6 )                 ! F pivot
-          iloc=jpiglo/2
-
-            SELECT CASE (cd_type )
-
-            CASE ( 'T'  ,'S', 'U', 'W')
-               DO jk =1, 4
-                  DO ji = 1-jpr2di, nlci+jpr2di
-                     pt3d(ji,nlcj:nlcj+jpr2dj,jk) = ztab(ji,nlcj:nlcj+jpr2dj,jk+3-2*MOD(jk+3,4))           
-                  ENDDO
-               ENDDO
-
-            CASE ( 'F' ,'G' , 'I', 'V' )
-               DO jk =1, 4
-                  DO ji = 1-jpr2di, nlci+jpr2di
-                     pt3d(ji,nlcj:nlcj+jpr2dj,jk) = ztab(ji,nlcj:nlcj+jpr2dj,jk+3-2*MOD(jk+3,4))           
-                  ENDDO
-               ENDDO
-               DO jk =1, 4
-                  DO ji = nlci+jpr2di, 1-jpr2di,  -1
-                    IF ( ( ji .LT. mi0(iloc) .AND. mi0(iloc) /= 1 ) &
-                       & .OR. ( mi0(iloc) == jpi+1 ) ) EXIT
+               END DO
+            END DO
+            !
+         CASE ( 'F' ,'G' , 'I', 'V' )
+            DO jk =1, 4
+               DO ji = 1-jpr2di, nlci+jpr2di
+                  pt3d(ji,nlcj-1:nlcj+jpr2dj,jk) = ztab(ji,nlcj-1:nlcj+jpr2dj,jk+3-2*MOD(jk+3,4))           
+               END DO
+            END DO
+            !
+         END SELECT   ! cd_type
+          ! 
+      CASE ( 5 , 6 )                        !==  F pivot  ==!
+         iloc=jpiglo/2
+         !
+         SELECT CASE (cd_type )
+         !
+         CASE ( 'T'  ,'S', 'U', 'W')
+            DO jk =1, 4
+               DO ji = 1-jpr2di, nlci+jpr2di
+                  pt3d(ji,nlcj:nlcj+jpr2dj,jk) = ztab(ji,nlcj:nlcj+jpr2dj,jk+3-2*MOD(jk+3,4))           
+               END DO
+            END DO
+            !
+         CASE ( 'F' ,'G' , 'I', 'V' )
+            DO jk =1, 4
+               DO ji = 1-jpr2di, nlci+jpr2di
+                  pt3d(ji,nlcj:nlcj+jpr2dj,jk) = ztab(ji,nlcj:nlcj+jpr2dj,jk+3-2*MOD(jk+3,4))           
+               END DO
+            END DO
+            DO jk =1, 4
+               DO ji = nlci+jpr2di, 1-jpr2di,  -1
+                  IF( ( ji .LT. mi0(iloc) .AND. mi0(iloc) /= 1 ) .OR. ( mi0(iloc) == jpi+1 ) )   EXIT
                     pt3d(ji,nlcj-1,jk) = ztab(ji,nlcj-1,jk+3-2*MOD(jk+3,4))
-                  ENDDO
-               ENDDO
-
-            END SELECT   ! cd_type
-
-         END SELECT   ! npolj
+               END DO
+            END DO
+            !
+         END SELECT   ! cd_type
+         !
+      END SELECT   ! npolj
       !   
    END SUBROUTINE sol_exd
Index: trunk/NEMO/OPA_SRC/SOL/solpcg.F90
===================================================================
--- trunk/NEMO/OPA_SRC/SOL/solpcg.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/SOL/solpcg.F90	(revision 1601)
@@ -8,5 +8,4 @@
    !!   sol_pcg    : preconditionned conjugate gradient solver
    !!----------------------------------------------------------------------
-   !! * Modules used
    USE oce             ! ocean dynamics and tracers variables
    USE dom_oce         ! ocean space and time domain variables 
@@ -19,14 +18,12 @@
    PRIVATE
 
-   !! * Routine accessibility
-   PUBLIC sol_pcg              ! ???
+   PUBLIC   sol_pcg    ! 
 
    !! * Substitutions
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
-   !!----------------------------------------------------------------------
-   !!  OPA 9.0 , LOCEAN-IPSL (2005) 
+   !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) 
    !! $Id$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
 CONTAINS
@@ -85,11 +82,9 @@
       !!        !  08-01  (R. Benshila) mpp optimization
       !!----------------------------------------------------------------------
-      !! * Arguments
       INTEGER, INTENT( inout ) ::   kindic   ! solver indicator, < 0 if the conver-
       !                                      ! gence is not reached: the model is
       !                                      ! stopped in step
       !                                      ! set to zero before the call of solpcg
-
-      !! * Local declarations
+      !!
       INTEGER ::   ji, jj, jn                ! dummy loop indices
       REAL(wp) ::  zgcad                     ! temporary scalars
@@ -151,5 +146,5 @@
         
       !                                                !================
-      DO jn = 1, nmax                                  ! Iterative loop
+      DO jn = 1, nn_nmax                               ! Iterative loop
          !                                             !================
 
@@ -177,5 +172,5 @@
 
          ! test of convergence
-         IF( rnorme < epsr .OR. jn == nmax ) THEN
+         IF( rnorme < epsr .OR. jn == nn_nmax ) THEN
             res = SQRT( rnorme )
             niter = jn
@@ -200,5 +195,5 @@
         
          ! indicator of non-convergence or explosion
-         IF( jn == nmax .OR. SQRT(epsr)/eps > 1.e+20 ) kindic = -2
+         IF( jn == nn_nmax .OR. SQRT(epsr)/eps > 1.e+20 ) kindic = -2
          IF( ncut == 999 ) GOTO 999
 
Index: trunk/NEMO/OPA_SRC/SOL/solsor.F90
===================================================================
--- trunk/NEMO/OPA_SRC/SOL/solsor.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/SOL/solsor.F90	(revision 1601)
@@ -4,9 +4,15 @@
    !! Ocean solver :  Successive Over-Relaxation solver
    !!=====================================================================
+   !! History :  OPA  ! 1990-10  (G. Madec)  Original code
+   !!            7.1  ! 1993-04  (G. Madec)  time filter
+   !!                 ! 1996-05  (G. Madec)  merge sor and pcg formulations
+   !!                 ! 1996-11  (A. Weaver)  correction to preconditioning
+   !!   NEMO     1.0  ! 2003-04  (C. Deltel, G. Madec)  Red-Black SOR in free form
+   !!            2.0  ! 2005-09  (R. Benshila, G. Madec)  MPI optimization
+   !!----------------------------------------------------------------------
 
    !!----------------------------------------------------------------------
    !!   sol_sor     : Red-Black Successive Over-Relaxation solver
    !!----------------------------------------------------------------------
-   !! * Modules used
    USE oce             ! ocean dynamics and tracers variables
    USE dom_oce         ! ocean space and time domain variables 
@@ -20,11 +26,10 @@
    PRIVATE
 
-   !! * Routine accessibility
-   PUBLIC sol_sor              ! ???
+   PUBLIC   sol_sor    ! 
 
    !!----------------------------------------------------------------------
-   !!   OPA 9.0 , LOCEAN-IPSL (2005) 
+   !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) 
    !! $Id$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
 
@@ -49,41 +54,25 @@
       !!      conditions only when the inside domain is reached.
       !! 
-      !! References :
-      !!      Madec et al. 1988, Ocean Modelling, issue 78, 1-6.
-      !!      Beare and Stevens 1997 Ann. Geophysicae 15, 1369-1377
+      !! References :   Madec et al. 1988, Ocean Modelling, issue 78, 1-6.
+      !!                Beare and Stevens 1997 Ann. Geophysicae 15, 1369-1377
+      !!----------------------------------------------------------------------
+      INTEGER, INTENT(inout) ::   kindic   ! solver indicator, < 0 if the convergence is not reached:
+      !                                    ! the model is stopped in step (set to zero before the call of solsor)
       !!
-      !! History :
-      !!        !  90-10  (G. Madec)  Original code
-      !!        !  91-11  (G. Madec)
-      !!   7.1  !  93-04  (G. Madec)  time filter
-      !!        !  96-05  (G. Madec)  merge sor and pcg formulations
-      !!        !  96-11  (A. Weaver)  correction to preconditioning
-      !!   9.0  !  03-04  (C. Deltel, G. Madec)  Red-Black SOR in free form
-      !!   9.0  !  05-09  (R. Benshila, G. Madec)  MPI optimization
-      !!----------------------------------------------------------------------
-      !! * Arguments
-      INTEGER, INTENT( inout ) ::   kindic   ! solver indicator, < 0 if the conver-
-      !                                      ! gence is not reached: the model is
-      !                                      ! stopped in step
-      !                                      ! set to zero before the call of solsor
-      !! * Local declarations
       INTEGER  ::   ji, jj, jn               ! dummy loop indices
       INTEGER  ::   ishift, icount
+      INTEGER  ::   ijmppodd, ijmppeven, ijpr2d
       REAL(wp) ::   ztmp, zres, zres2
-
-      INTEGER  ::   ijmppodd, ijmppeven
-      INTEGER  ::   ijpr2d
       !!----------------------------------------------------------------------
       
-      ijmppeven = MOD(nimpp+njmpp+jpr2di+jpr2dj,2)
-      ijmppodd  = MOD(nimpp+njmpp+jpr2di+jpr2dj+1,2)
-      ijpr2d = MAX(jpr2di,jpr2dj)
+      ijmppeven = MOD( nimpp+njmpp+jpr2di+jpr2dj   , 2 )
+      ijmppodd  = MOD( nimpp+njmpp+jpr2di+jpr2dj+1 , 2 )
+      ijpr2d    = MAX( jpr2di , jpr2dj )
       icount = 0
       !                                                       ! ==============
-      DO jn = 1, nmax                                         ! Iterative loop 
+      DO jn = 1, nn_nmax                                      ! Iterative loop 
          !                                                    ! ==============
 
-         ! applied the lateral boundary conditions
-         IF( MOD(icount,ijpr2d+1) == 0 ) CALL lbc_lnk_e( gcx, c_solver_pt, 1. )   
+         IF( MOD(icount,ijpr2d+1) == 0 )   CALL lbc_lnk_e( gcx, c_solver_pt, 1. )   ! lateral boundary conditions
         
          ! Residus
@@ -103,11 +92,10 @@
                gcr(ji,jj) = zres * gcdmat(ji,jj) * zres
                ! Guess update
-               gcx(ji,jj) = sor * ztmp + (1-sor) * gcx(ji,jj)
+               gcx(ji,jj) = rn_sor * ztmp + (1-rn_sor) * gcx(ji,jj)
             END DO
          END DO
          icount = icount + 1 
  
-         ! applied the lateral boundary conditions
-         IF( MOD(icount,ijpr2d+1) == 0 ) CALL lbc_lnk_e( gcx, c_solver_pt, 1. )  
+         IF( MOD(icount,ijpr2d+1) == 0 )   CALL lbc_lnk_e( gcx, c_solver_pt, 1. )   ! lateral boundary conditions
 
          ! Guess red update
@@ -124,5 +112,5 @@
                gcr(ji,jj) = zres * gcdmat(ji,jj) * zres
                ! Guess update
-               gcx(ji,jj) = sor * ztmp + (1-sor) * gcx(ji,jj)
+               gcx(ji,jj) = rn_sor * ztmp + (1-rn_sor) * gcx(ji,jj)
             END DO
          END DO
@@ -130,12 +118,12 @@
 
          ! test of convergence
-         IF ( jn > nmin .AND. MOD( jn-nmin, nmod ) == 0 ) then
+         IF ( jn > nn_nmin .AND. MOD( jn-nn_nmin, nn_nmod ) == 0 ) THEN
 
-            SELECT CASE ( nsol_arp )
+            SELECT CASE ( nn_sol_arp )
             CASE ( 0 )                 ! absolute precision (maximum value of the residual)
                zres2 = MAXVAL( gcr(2:nlci-1,2:nlcj-1) )
                IF( lk_mpp )   CALL mpp_max( zres2 )   ! max over the global domain
                ! test of convergence
-               IF( zres2 < resmax .OR. jn == nmax ) THEN
+               IF( zres2 < rn_resmax .OR. jn == nn_nmax ) THEN
                   res = SQRT( zres2 )
                   niter = jn
@@ -146,5 +134,5 @@
                IF( lk_mpp )   CALL mpp_sum( rnorme )   ! sum over the global domain
                ! test of convergence
-               IF( rnorme < epsr .OR. jn == nmax ) THEN
+               IF( rnorme < epsr .OR. jn == nn_nmax ) THEN
                   res = SQRT( rnorme )
                   niter = jn
@@ -160,5 +148,5 @@
          ENDIF
          ! indicator of non-convergence or explosion
-         IF( jn == nmax .OR. SQRT(epsr)/eps > 1.e+20 ) kindic = -2
+         IF( jn == nn_nmax .OR. SQRT(epsr)/eps > 1.e+20 ) kindic = -2
          IF( ncut == 999 ) GOTO 999
          
@@ -169,11 +157,8 @@
 999   CONTINUE
       
-      
       !  Output in gcx
       !  -------------
-
       CALL lbc_lnk_e( gcx, c_solver_pt, 1. )    ! boundary conditions
-
-      
+      !
    END SUBROUTINE sol_sor
 
Index: trunk/NEMO/OPA_SRC/SOL/solver.F90
===================================================================
--- trunk/NEMO/OPA_SRC/SOL/solver.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/SOL/solver.F90	(revision 1601)
@@ -4,26 +4,34 @@
    !! Ocean solver :  initialization of ocean solver
    !!=====================================================================
-
+   !! History :  OPA  ! 1990-10  (G. Madec)  Original code           
+   !!                 ! 1993-02  (O. Marti)                         
+   !!                 ! 1997-02  (G. Madec)  local depth inverse computation
+   !!                 ! 1998-10  (G. Roullet, G. Madec)  free surface 
+   !!   NEMO     1.0  ! 2003-07  (G. Madec)  free form, F90
+   !!            3.2  ! 2009-07  (R. Benshila) suppression of rigid-lid & FETI solver
+   !!----------------------------------------------------------------------
+#if defined key_dynspg_flt   ||   defined key_esopa  
+   !!----------------------------------------------------------------------
+   !!   'key_dynspg_flt'                              filtered free surface
    !!----------------------------------------------------------------------
    !!   solver_init: solver initialization
    !!----------------------------------------------------------------------
-   !! * Modules used
    USE oce             ! ocean dynamics and tracers variables
    USE dom_oce         ! ocean space and time domain variables 
    USE zdf_oce         ! ocean vertical physics variables
    USE sol_oce         ! solver variables
-   USE solmat          ! ???
+   USE dynspg_oce      ! choice/control of key cpp for surface pressure gradient
+   USE solmat          ! matrix of the solver
    USE obc_oce         ! Lateral open boundary condition
    USE in_out_manager  ! I/O manager
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
    USE lib_mpp
-   USE dynspg_oce      ! choice/control of key cpp for surface pressure gradient
 
    IMPLICIT NONE
 
    !!----------------------------------------------------------------------
-   !!   OPA 9.0 , LOCEAN-IPSL (2005) 
+   !! NEMO/OPA 9.0 , LOCEAN-IPSL (2009) 
    !! $Id$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
 
@@ -34,108 +42,67 @@
       !!                  ***  ROUTINE solver_init  ***
       !!                   
-      !! ** Purpose :   Initialization for the solver of the elliptic equation:
-      !!       * lk_dynspg_flt = T : transport divergence system. 
+      !! ** Purpose :   Initialization of the elliptic solver
       !!      
-      !! ** Method :
-      !!       - Compute the local depth of the water column at u- and v-point
-      !!      The local depth of the water column is computed by summing 
-      !!      the vertical scale factors. For its inverse, the thickness of
-      !!      the first model level is imposed as lower bound. The inverse of
-      !!      this depth is THEN taken and masked, so that the inverse of the
-      !!      local depth is zero when the local depth is zero.
+      !! ** Method  :   a solver is required when using the filtered free
+      !!              surface. 
       !!
-      !! ** Action : - hur, hvr : masked inverse of the local depth at
-      !!                                u- and v-point.
-      !!             - hu, hv   : masked local depth at u- and v- points
-      !!             - c_solver_pt : nature of the gridpoint at which the
-      !!                                solver is applied
-      !! References :
-      !!      Jensen, 1986: adv. phys. oceanogr. num. mod.,ed. o brien,87-110.
-      !!      Madec & Marti, 1990: internal rep. LODYC, 90/03., 29pp.
+      !! ** Action  : - c_solver_pt : nature of the gridpoint at which the solver is applied
       !!
-      !! History :
-      !!        !  90-10  (G. Madec)  Original code           
-      !!        !  93-02  (O. Marti)                         
-      !!        !  97-02  (G. Madec)  local depth inverse computation
-      !!        !  98-10  (G. Roullet, G. Madec)  free surface 
-      !!   9.0  !  03-07  (G. Madec)  free form, F90
-      !!    "   !  05-11  (V. Garnier) Surface pressure gradient organization
+      !! References : Jensen, 1986: Adv. Phys. Oceanogr. Num. Mod.,Ed. O Brien,87-110.
       !!----------------------------------------------------------------------
-      !! * Arguments
       INTEGER, INTENT(in) :: kt
-
-      NAMELIST/namsol/ nsolv, nsol_arp, nmin, nmax, nmod, eps, resmax, sor, rnu
+      !!
+      NAMELIST/namsol/ nn_solv, nn_sol_arp, nn_nmin, nn_nmax, nn_nmod, rn_eps, rn_resmax, rn_sor
       !!----------------------------------------------------------------------
 
-      IF(lwp) THEN
+      IF(lwp) THEN                  !* open elliptic solver statistics file (only on the printing processors)
+         CALL ctl_opn( numsol, 'solver.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea )
+      ENDIF
+
+      REWIND( numnam )              !* Namelist namsol : elliptic solver / free surface
+      READ  ( numnam, namsol )
+
+      IF(lwp) THEN                  !* Control print
          WRITE(numout,*)
          WRITE(numout,*) 'solver_init : solver to compute the surface pressure gradient'
          WRITE(numout,*) '~~~~~~~~~~~'
-         
-         ! open elliptic solver statistics file
-         CALL ctl_opn( numsol, 'solver.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea )
-      ENDIF
-
-
-      ! 0. Define the solver parameters
-      !    ----------------------------
-      ! Namelist namsol : elliptic solver / free surface
-      REWIND( numnam )
-      READ  ( numnam, namsol )
-
-      ! 0. Parameter control and print
-      !    ---------------------------
-
-      ! Control print
-      IF(lwp) WRITE(numout,*) '          Namelist namsol : set solver parameters'
-
-      IF(lwp) THEN
-         WRITE(numout,*) '             type of elliptic solver            nsolv    = ', nsolv
-         WRITE(numout,*) '             absolute/relative (0/1) precision  nsol_arp = ', nsol_arp
-         WRITE(numout,*) '             minimum iterations for solver      nmin     = ', nmin
-         WRITE(numout,*) '             maximum iterations for solver      nmax     = ', nmax
-         WRITE(numout,*) '             frequency for test                 nmod     = ', nmod
-         WRITE(numout,*) '             absolute precision of solver       eps      = ', eps
-         WRITE(numout,*) '             absolute precision for SOR solver  resmax   = ', resmax
-         WRITE(numout,*) '             optimal coefficient of sor         sor      = ', sor
-         WRITE(numout,*) '             free surface parameter         rnu    = ', rnu
+         WRITE(numout,*) '   Namelist namsol : set solver parameters'
+         WRITE(numout,*) '      type of elliptic solver            nn_solv    = ', nn_solv
+         WRITE(numout,*) '      absolute/relative (0/1) precision  nn_sol_arp = ', nn_sol_arp
+         WRITE(numout,*) '      minimum iterations for solver      nn_nmin    = ', nn_nmin
+         WRITE(numout,*) '      maximum iterations for solver      nn_nmax    = ', nn_nmax
+         WRITE(numout,*) '      frequency for test                 nn_nmod    = ', nn_nmod
+         WRITE(numout,*) '      absolute precision of solver       rn_eps     = ', rn_eps
+         WRITE(numout,*) '      absolute precision for SOR solver  rn_resmax  = ', rn_resmax
+         WRITE(numout,*) '      optimal coefficient of sor         rn_sor     = ', rn_sor
          WRITE(numout,*)
       ENDIF
+      eps = rn_eps
 
-      IF( lk_dynspg_flt ) THEN
-         IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*) '          free surface formulation'
-      ELSE
-         CALL ctl_stop( '          Choose only one surface pressure gradient calculation: filtered ',   &
-              &         '          Should not call this routine if dynspg_exp or dynspg_ts has been chosen' )
-      ENDIF
-
-      SELECT CASE ( nsolv )
-
-      CASE ( 1 )                ! preconditioned conjugate gradient solver
-         IF(lwp) WRITE(numout,*) '          a preconditioned conjugate gradient solver is used'
-         IF( jpr2di /= 0 .AND. jpr2dj /= 0 ) &
-            CALL ctl_stop( ' jpr2di and jpr2dj should be equal to zero' )
-
-      CASE ( 2 )                ! successive-over-relaxation solver
-         IF(lwp) WRITE(numout,*) '          a successive-over-relaxation solver with extra outer halo is used'
-         IF(lwp) WRITE(numout,*) '          with jpr2di =', jpr2di, ' and  jpr2dj =', jpr2dj
+      SELECT CASE( nn_solv )          !* parameter check
+      !
+      CASE ( 1 )                          ! preconditioned conjugate gradient solver
+         IF(lwp) WRITE(numout,*) '   a preconditioned conjugate gradient solver is used'
+         IF( jpr2di /= 0 .AND. jpr2dj /= 0 )   CALL ctl_stop( ' jpr2di and jpr2dj should be equal to zero' )
+         !
+      CASE ( 2 )                          ! successive-over-relaxation solver
+         IF(lwp) WRITE(numout,*) '   a successive-over-relaxation solver with extra outer halo is used'
+         IF(lwp) WRITE(numout,*) '   with jpr2di =', jpr2di, ' and  jpr2dj =', jpr2dj
          IF( .NOT. lk_mpp .AND. jpr2di /= 0 .AND. jpr2dj /= 0 ) THEN
-             CALL ctl_stop( ' jpr2di and jpr2dj are not equal to zero',   &
-             &              ' In this case this algorithm should be used only with the key_mpp_... option' )
+             CALL ctl_stop( 'jpr2di and jpr2dj are not equal to zero',   &
+             &              'In this case the algorithm should be used only with the key_mpp_... option' )
          ELSE
             IF( ( ( jperio == 1 .OR. jperio == 4 .OR. jperio == 6 ) .OR. ( jpni /= 1 ) ) &
-              &  .AND. ( jpr2di /= jpr2dj ) ) CALL ctl_stop( '          jpr2di should be equal to jpr2dj' )
+              &  .AND. ( jpr2di /= jpr2dj ) )   CALL ctl_stop( 'jpr2di should be equal to jpr2dj' )
          ENDIF
-
-      CASE DEFAULT
-         WRITE(ctmp1,*) '          bad flag value for nsolv = ', nsolv
+         !
+      CASE DEFAULT                        ! error in parameter
+         WRITE(ctmp1,*) '          bad flag value for nn_solv = ', nn_solv
          CALL ctl_stop( ctmp1 )
-         
       END SELECT
-
-      IF( nbit_cmp == 1 ) THEN
-         IF( nsolv /= 2 ) THEN
-            CALL ctl_stop( ' Reproductibility tests (nbit_cmp=1) require the SOR solver: nsolv = 2' )
+      !
+      IF( nbit_cmp == 1 ) THEN            ! reproductibility test SOR required
+         IF( nn_solv /= 2 ) THEN
+            CALL ctl_stop( ' Reproductibility tests (nbit_cmp=1) require the SOR solver: nn_solv = 2' )
          ELSE IF( MAX( jpr2di, jpr2dj ) > 0 ) THEN
             CALL ctl_stop( ' Reproductibility tests (nbit_cmp=1) require jpr2di = jpr2dj = 0' )
@@ -143,19 +110,14 @@
       END IF
 
-      ! Grid-point at which the solver is applied
-      ! -----------------------------------------
-
-      IF( lk_mpp ) THEN
-         c_solver_pt = 'S'   ! S=T with special staff ??? which one?
-      ELSE
-         c_solver_pt = 'T'
+      !                             !* Grid-point at which the solver is applied
+!!gm  c_solver_pt should be removed: nomore bsf, only T-point is used
+      IF( lk_mpp ) THEN   ;    c_solver_pt = 'S'   ! S=T with special staff ??? which one?
+      ELSE                ;    c_solver_pt = 'T'
       ENDIF
 
-      ! Construction of the elliptic system matrix
-      ! ------------------------------------------
-
-      CALL sol_mat( kt )
+      CALL sol_mat( kt )            !* Construction of the elliptic system matrix
       !
    END SUBROUTINE solver_init
+#endif
 
    !!======================================================================
Index: trunk/NEMO/OPA_SRC/TRA/traadv.F90
===================================================================
--- trunk/NEMO/OPA_SRC/TRA/traadv.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/TRA/traadv.F90	(revision 1601)
@@ -31,5 +31,5 @@
    PUBLIC   tra_adv    ! routine called by step module
  
-   !!* Namelist nam_traadv
+   !                                                   !!* Namelist namtra_adv *
    LOGICAL, PUBLIC ::   ln_traadv_cen2   = .TRUE.       ! 2nd order centered scheme flag
    LOGICAL, PUBLIC ::   ln_traadv_tvd    = .FALSE.      ! TVD scheme flag
@@ -136,11 +136,11 @@
       INTEGER ::   ioptio
 
-      NAMELIST/nam_traadv/ ln_traadv_cen2 , ln_traadv_tvd,    &
+      NAMELIST/namtra_adv/ ln_traadv_cen2 , ln_traadv_tvd,    &
          &                 ln_traadv_muscl, ln_traadv_muscl2, &
          &                 ln_traadv_ubs  , ln_traadv_qck
       !!----------------------------------------------------------------------
 
-      REWIND ( numnam )               ! Read Namelist nam_traadv : tracer advection scheme
-      READ   ( numnam, nam_traadv )
+      REWIND ( numnam )               ! Read Namelist namtra_adv : tracer advection scheme
+      READ   ( numnam, namtra_adv )
 
       IF(lwp) THEN                    ! Namelist print
@@ -148,11 +148,11 @@
          WRITE(numout,*) 'tra_adv_ctl : choice/control of the tracer advection scheme'
          WRITE(numout,*) '~~~~~~~~~~~'
-         WRITE(numout,*) '       Namelist nam_traadv : chose a advection scheme for tracers'
-         WRITE(numout,*) '          2nd order advection scheme     ln_traadv_cen2   = ', ln_traadv_cen2
-         WRITE(numout,*) '          TVD advection scheme           ln_traadv_tvd    = ', ln_traadv_tvd
-         WRITE(numout,*) '          MUSCL  advection scheme        ln_traadv_muscl  = ', ln_traadv_muscl
-         WRITE(numout,*) '          MUSCL2 advection scheme        ln_traadv_muscl2 = ', ln_traadv_muscl2
-         WRITE(numout,*) '          UBS    advection scheme        ln_traadv_ubs    = ', ln_traadv_ubs
-         WRITE(numout,*) '          QUICKEST advection scheme      ln_traadv_qck    = ', ln_traadv_qck
+         WRITE(numout,*) '   Namelist namtra_adv : chose a advection scheme for tracers'
+         WRITE(numout,*) '      2nd order advection scheme     ln_traadv_cen2   = ', ln_traadv_cen2
+         WRITE(numout,*) '      TVD advection scheme           ln_traadv_tvd    = ', ln_traadv_tvd
+         WRITE(numout,*) '      MUSCL  advection scheme        ln_traadv_muscl  = ', ln_traadv_muscl
+         WRITE(numout,*) '      MUSCL2 advection scheme        ln_traadv_muscl2 = ', ln_traadv_muscl2
+         WRITE(numout,*) '      UBS    advection scheme        ln_traadv_ubs    = ', ln_traadv_ubs
+         WRITE(numout,*) '      QUICKEST advection scheme      ln_traadv_qck    = ', ln_traadv_qck
     ENDIF
 
@@ -166,5 +166,5 @@
       IF( lk_esopa         )   ioptio =          1
 
-      IF( ioptio /= 1 )   CALL ctl_stop( 'Choose ONE advection scheme in namelist nam_traadv' )
+      IF( ioptio /= 1 )   CALL ctl_stop( 'Choose ONE advection scheme in namelist namtra_adv' )
 
       IF( n_cla == 1 .AND. .NOT. ln_traadv_cen2 )   &
Index: trunk/NEMO/OPA_SRC/TRA/trabbc.F90
===================================================================
--- trunk/NEMO/OPA_SRC/TRA/trabbc.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/TRA/trabbc.F90	(revision 1601)
@@ -15,5 +15,4 @@
    !!   tra_bbc_init : initialization of geothermal heat flux trend
    !!----------------------------------------------------------------------
-   !! * Modules used
    USE oce             ! ocean dynamics and active tracers
    USE dom_oce         ! ocean space and time domain
@@ -32,7 +31,7 @@
    LOGICAL, PUBLIC, PARAMETER ::   lk_trabbc = .TRUE.   !: bbc flag
 
-   !!* Namelist nambbc: bottom boundary condition
-   INTEGER  ::   ngeo_flux       = 1            ! Geothermal flux (0:no flux, 1:constant flux, 2:read in file )
-   REAL(wp) ::   ngeo_flux_const = 86.4e-3      ! Constant value of geothermal heat flux
+   !                                         !!* Namelist nambbc: bottom boundary condition *
+   INTEGER  ::   nn_geoflx     = 1            ! Geothermal flux (0:no flux, 1:constant flux, 2:read in file )
+   REAL(wp) ::   rn_geoflx_cst = 86.4e-3      ! Constant value of geothermal heat flux
 
    INTEGER , DIMENSION(jpi,jpj) ::   nbotlevt   ! ocean bottom level index at T-pt
@@ -42,5 +41,5 @@
 #  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
-   !!  OPA 9.0 , LOCEAN-IPSL (2006) 
+   !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) 
    !! $Id$ 
    !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
@@ -54,9 +53,9 @@
       !!
       !! ** Purpose :   Compute the bottom boundary contition on temperature 
-      !!      associated with geothermal heating and add it to the general
-      !!      trend of temperature equations.
+      !!              associated with geothermal heating and add it to the 
+      !!              general trend of temperature equations.
       !!
       !! ** Method  :   The geothermal heat flux set to its constant value of 
-      !!       86.4 mW/m2 (Stein and Stein 1992, Huang 1999).
+      !!              86.4 mW/m2 (Stein and Stein 1992, Huang 1999).
       !!       The temperature trend associated to this heat flux through the
       !!       ocean bottom can be computed once and is added to the temperature
@@ -69,4 +68,5 @@
       !!
       !! References : Stein, C. A., and S. Stein, 1992, Nature, 359, 123-129.
+      !!              Emile-Geay and Madec, 2009, Ocean Science.
       !!----------------------------------------------------------------------
       USE oce, ONLY :   ztrdt => ua   ! use ua as 3D workspace   
@@ -75,9 +75,5 @@
       INTEGER, INTENT( in ) ::   kt   ! ocean time-step index
       !!
-#if defined key_vectopt_loop
-      INTEGER ::   ji       ! dummy loop indices
-#else
-      INTEGER ::   ji, jj   ! dummy loop indices
-#endif
+      INTEGER  ::   ji, jj    ! dummy loop indices
       REAL(wp) ::   zqgh_trd  ! geothermal heat flux trend
       !!----------------------------------------------------------------------
@@ -92,20 +88,18 @@
       ! Add the geothermal heat flux trend on temperature
 
-      SELECT CASE ( ngeo_flux )
+      SELECT CASE ( nn_geoflx )
       !
       CASE ( 1:2 )                !  geothermal heat flux
 #if defined key_vectopt_loop
-         DO ji = jpi+2, jpij-jpi-1   ! vector opt. (forced unrolling)
-            zqgh_trd = ro0cpr * qgh_trd0(ji,1) / fse3t(ji,1,nbotlevt(ji,1) )
-            ta(ji,1,nbotlevt(ji,1)) = ta(ji,1,nbotlevt(ji,1)) + zqgh_trd
-         END DO
+         DO jj = 1, 1
+            DO ji = jpi+2, jpij-jpi-1   ! vector opt. (forced unrolling)
 #else
          DO jj = 2, jpjm1
             DO ji = 2, jpim1
+#endif
                zqgh_trd = ro0cpr * qgh_trd0(ji,jj) / fse3t(ji,jj,nbotlevt(ji,jj))
                ta(ji,jj,nbotlevt(ji,jj)) = ta(ji,jj,nbotlevt(ji,jj)) + zqgh_trd
             END DO
          END DO
-#endif
       END SELECT
 
@@ -115,5 +109,5 @@
       ENDIF
       !
-      IF(ln_ctl)   CALL prt_ctl(tab3d_1=ta, clinfo1=' bbc  - Ta: ', mask1=tmask, clinfo3='tra-ta')
+      IF(ln_ctl)   CALL prt_ctl( tab3d_1=ta, clinfo1=' bbc  - Ta: ', mask1=tmask, clinfo3='tra-ta' )
       !
    END SUBROUTINE tra_bbc
@@ -124,10 +118,9 @@
       !!                  ***  ROUTINE tra_bbc_init  ***
       !!
-      !! ** Purpose :   Compute once for all the trend associated with geo-
-      !!      thermal heating that will be applied at each time step at the
-      !!      bottom ocean level
+      !! ** Purpose :   Compute once for all the trend associated with geothermal
+      !!              heating that will be applied at each time step at the
+      !!              last ocean level
       !!
       !! ** Method  :   Read the nambbc namelist and check the parameters.
-      !!      called at the first time step (nit000)
       !!
       !! ** Input   : - Namlist nambbc
@@ -141,6 +134,6 @@
       INTEGER  ::   ji, jj              ! dummy loop indices
       INTEGER  ::   inum                ! temporary logical unit
-
-      NAMELIST/nambbc/ngeo_flux, ngeo_flux_const 
+      !!
+      NAMELIST/nambbc/nn_geoflx, rn_geoflx_cst 
       !!----------------------------------------------------------------------
 
@@ -148,13 +141,13 @@
       READ   ( numnam, nambbc )
 
-      !                              ! Control print
-      IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) 'tra_bbc : tempearture Bottom Boundary Condition (bbc)'
-      IF(lwp) WRITE(numout,*) '~~~~~~~   Geothermal heatflux'
-      IF(lwp) WRITE(numout,*) '          Namelist nambbc : set bbc parameters'
-      IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) '             Geothermal flux           ngeo_flux       = ', ngeo_flux
-      IF(lwp) WRITE(numout,*) '             Constant geothermal flux  ngeo_flux_const = ', ngeo_flux_const
-      IF(lwp) WRITE(numout,*)
+      IF(lwp) THEN                   ! Control print
+         WRITE(numout,*)
+         WRITE(numout,*) 'tra_bbc : temperature Bottom Boundary Condition (bbc), Geothermal heatflux'
+         WRITE(numout,*) '~~~~~~~   '
+         WRITE(numout,*) '   Namelist nambbc : set bbc parameters'
+         WRITE(numout,*) '      Geothermal flux            nn_geoflx     = ', nn_geoflx
+         WRITE(numout,*) '      Constant geothermal flux   rn_geoflx_cst = ', rn_geoflx_cst
+         WRITE(numout,*)
+      ENDIF
 
       !                              ! level of the ocean bottom at T-point
@@ -165,31 +158,28 @@
       END DO
 
-      SELECT CASE ( ngeo_flux )      ! initialization of geothermal heat flux
+      SELECT CASE ( nn_geoflx )      ! initialization of geothermal heat flux
       !
       CASE ( 0 )                ! no geothermal heat flux
-         IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*) '             *** no geothermal heat flux'
+         IF(lwp) WRITE(numout,*) '      *** no geothermal heat flux'
          !
       CASE ( 1 )                ! constant flux
-         IF(lwp) WRITE(numout,*) '             *** constant heat flux  =   ', ngeo_flux_const
-         qgh_trd0(:,:) = ngeo_flux_const
+         IF(lwp) WRITE(numout,*) '      *** constant heat flux  =   ', rn_geoflx_cst
          !
-      CASE ( 2 )                ! variable geothermal heat flux
-         ! read the geothermal fluxes in mW/m2
+         qgh_trd0(:,:) = rn_geoflx_cst
          !
-         IF(lwp) WRITE(numout,*) '             *** variable geothermal heat flux'
+      CASE ( 2 )                ! variable geothermal heat flux : read the geothermal fluxes in mW/m2
+         IF(lwp) WRITE(numout,*) '      *** variable geothermal heat flux'
          CALL iom_open ( 'geothermal_heating.nc', inum )
-         CALL iom_get ( inum, jpdom_data, 'heatflow', qgh_trd0 )
-         CALL iom_close (inum)
+         CALL iom_get  ( inum, jpdom_data, 'heatflow', qgh_trd0 )
+         CALL iom_close( inum )
          !
          qgh_trd0(:,:) = qgh_trd0(:,:) * 1.e-3 ! conversion in W/m2
          !
       CASE DEFAULT
-         WRITE(ctmp1,*) '     bad flag value for ngeo_flux = ', ngeo_flux
+         WRITE(ctmp1,*) '     bad flag value for nn_geoflx = ', nn_geoflx
          CALL ctl_stop( ctmp1 )
          !
       END SELECT
-
-
+      !
    END SUBROUTINE tra_bbc_init
 
Index: trunk/NEMO/OPA_SRC/TRA/trabbl.F90
===================================================================
--- trunk/NEMO/OPA_SRC/TRA/trabbl.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/TRA/trabbl.F90	(revision 1601)
@@ -35,5 +35,5 @@
 
    !!* Namelist nambbl: bottom boundary layer
-   REAL(wp), PUBLIC ::   atrbbl = 1.e+3   !: lateral coeff. for bottom boundary layer scheme (m2/s)
+   REAL(wp), PUBLIC ::   rn_ahtbbl = 1.e+3   !: lateral coeff. for bottom boundary layer scheme (m2/s)
 
 # if defined key_trabbl_dif
@@ -108,17 +108,15 @@
       INTEGER, INTENT( in ) ::   kt   ! ocean time-step
       !!
-      INTEGER  ::   ji, jj                   ! dummy loop indices
+      INTEGER  ::   ji, jj                  ! dummy loop indices
       INTEGER  ::   ik
-      INTEGER  ::   ii0, ii1, ij0, ij1       ! temporary integers
+      INTEGER  ::   ii0, ii1, ij0, ij1      ! temporary integers
       INTEGER  ::   iku1, iku2, ikv1,ikv2   ! temporary intergers
       REAL(wp) ::   ze3u, ze3v              ! temporary scalars
       INTEGER  ::   iku, ikv
-      REAL(wp) ::   &
-         zsign, zt, zs, zh, zalbet,      &  ! temporary scalars
-         zgdrho, zbtr, zta, zsa
-      REAL(wp), DIMENSION(jpi,jpj) ::    &
-        zki, zkj, zkw, zkx, zky, zkz,    &  ! 2D workspace arrays
-        ztnb, zsnb, zdep,                &
-        ztbb, zsbb, zahu, zahv
+      REAL(wp) ::   zsign, zt, zs, zh, zalbet   ! temporary scalars
+      REAL(wp) ::   zgdrho, zbtr, zta, zsa
+      REAL(wp), DIMENSION(jpi,jpj) ::   zki, zkj, zkw, zkx, zky, zkz             ! 2D workspace
+      REAL(wp), DIMENSION(jpi,jpj) ::   ztnb, zsnb, zdep, ztbb, zsbb, zahu, zahv
+      !!
       REAL(wp) ::    fsalbt, pft, pfs, pfh   ! statement function
       !!----------------------------------------------------------------------
@@ -132,14 +130,14 @@
       fsalbt( pft, pfs, pfh ) =                                              &
          ( ( ( -0.255019e-07 * pft + 0.298357e-05 ) * pft                    &
-                                   - 0.203814e-03 ) * pft                    &
-                                   + 0.170907e-01 ) * pft                    &
-                                   + 0.665157e-01                            &
+         &                         - 0.203814e-03 ) * pft                    &
+         &                         + 0.170907e-01 ) * pft                    &
+         &                         + 0.665157e-01                            &
          +(-0.678662e-05 * pfs - 0.846960e-04 * pft + 0.378110e-02 ) * pfs   &
          +  ( ( - 0.302285e-13 * pfh                                         &
-                - 0.251520e-11 * pfs                                         &
-                + 0.512857e-12 * pft * pft          ) * pfh                  &
-                                     - 0.164759e-06   * pfs                  &
-             +(   0.791325e-08 * pft - 0.933746e-06 ) * pft                  &
-                                     + 0.380374e-04 ) * pfh   
+         &      - 0.251520e-11 * pfs                                         &
+         &      + 0.512857e-12 * pft * pft          ) * pfh                  &
+         &                           - 0.164759e-06   * pfs                  &
+         &   +(   0.791325e-08 * pft - 0.933746e-06 ) * pft                  &
+         &                           + 0.380374e-04 ) * pfh   
       !!----------------------------------------------------------------------
 
@@ -155,6 +153,6 @@
       ! mbathy= number of w-level, minimum value=1 (cf dommsk.F)
 #  if defined key_vectopt_loop
-      jj = 1
-      DO ji = 1, jpij   ! vector opt. (forced unrolling)
+      DO jj = 1, 1
+         DO ji = 1, jpij   ! vector opt. (forced unrolling)
 #  else
       DO jj = 1, jpj
@@ -167,13 +165,11 @@
             zsbb(ji,jj) = sb(ji,jj,ik) * tmask(ji,jj,1)
             zdep(ji,jj) = fsdept(ji,jj,ik)                ! depth of the ocean bottom T-level
-#  if ! defined key_vectopt_loop
-         END DO
-#  endif
+         END DO
       END DO
 
       IF( ln_zps ) THEN      ! partial steps correction 
 # if defined key_vectopt_loop
-         jj = 1
-         DO ji = 1, jpij-jpi   ! vector opt. (forced unrolling)
+         DO jj = 1, 1
+            DO ji = 1, jpij-jpi   ! vector opt. (forced unrolling)
 # else
          DO jj = 1, jpjm1
@@ -186,14 +182,12 @@
                ze3u = MIN( fse3u(ji,jj,iku1), fse3u(ji,jj,iku2) ) 
                ze3v = MIN( fse3v(ji,jj,ikv1), fse3v(ji,jj,ikv2) ) 
-               zahu(ji,jj) = atrbbl * e2u(ji,jj) * ze3u / e1u(ji,jj) * umask(ji,jj,1)
-               zahv(ji,jj) = atrbbl * e1v(ji,jj) * ze3v / e2v(ji,jj) * vmask(ji,jj,1)
-# if ! defined key_vectopt_loop
+               zahu(ji,jj) = rn_ahtbbl * e2u(ji,jj) * ze3u / e1u(ji,jj) * umask(ji,jj,1)
+               zahv(ji,jj) = rn_ahtbbl * e1v(ji,jj) * ze3v / e2v(ji,jj) * vmask(ji,jj,1)
             END DO
-# endif
          END DO
       ELSE                    ! z-coordinate - full steps or s-coordinate
 #   if defined key_vectopt_loop
-         jj = 1
-         DO ji = 1, jpij-jpi   ! vector opt. (forced unrolling)
+         DO jj = 1, 1
+            DO ji = 1, jpij-jpi   ! vector opt. (forced unrolling)
 #   else
          DO jj = 1, jpjm1
@@ -202,9 +196,7 @@
                iku = mbku(ji,jj)
                ikv = mbkv(ji,jj)
-               zahu(ji,jj) = atrbbl * e2u(ji,jj) * fse3u(ji,jj,iku) / e1u(ji,jj) * umask(ji,jj,1)
-               zahv(ji,jj) = atrbbl * e1v(ji,jj) * fse3v(ji,jj,ikv) / e2v(ji,jj) * vmask(ji,jj,1)
-#   if ! defined key_vectopt_loop
+               zahu(ji,jj) = rn_ahtbbl * e2u(ji,jj) * fse3u(ji,jj,iku) / e1u(ji,jj) * umask(ji,jj,1)
+               zahv(ji,jj) = rn_ahtbbl * e1v(ji,jj) * fse3v(ji,jj,ikv) / e2v(ji,jj) * vmask(ji,jj,1)
             END DO
-#   endif
          END DO
       ENDIF
@@ -215,135 +207,88 @@
       ! multiplied by the slope of the ocean bottom
 
-      SELECT CASE ( neos )
-
-      CASE ( 0 )                 ! Jackett and McDougall (1994) formulation
-
-#  if defined key_vectopt_loop
-      jj = 1
-      DO ji = 1, jpij-jpi   ! vector opt. (forced unrolling)
-#  else
-      DO jj = 1, jpjm1
-         DO ji = 1, jpim1
-#  endif
-            ! temperature, salinity anomalie and depth
-            zt = 0.5 * ( ztnb(ji,jj) + ztnb(ji+1,jj) )
-            zs = 0.5 * ( zsnb(ji,jj) + zsnb(ji+1,jj) ) - 35.0
-            zh = 0.5 * ( zdep(ji,jj) + zdep(ji+1,jj) )
-            ! masked ratio alpha/beta
-            zalbet = fsalbt( zt, zs, zh )*umask(ji,jj,1)
-            ! local density gradient along i-bathymetric slope
-            zgdrho = zalbet * ( ztnb(ji+1,jj) - ztnb(ji,jj) )   &
-                   -          ( zsnb(ji+1,jj) - zsnb(ji,jj) )
-            ! sign of local i-gradient of density multiplied by the i-slope
-            zsign = SIGN( 0.5, - zgdrho * ( zdep(ji+1,jj) - zdep(ji,jj) ) )
-            zki(ji,jj) = ( 0.5 - zsign ) * zahu(ji,jj)
-#  if ! defined key_vectopt_loop
-         END DO
-#  endif
-      END DO
-
-#  if defined key_vectopt_loop
-      jj = 1
-      DO ji = 1, jpij-jpi   ! vector opt. (forced unrolling)
-#  else
-      DO jj = 1, jpjm1
-         DO ji = 1, jpim1
-#  endif
-            ! temperature, salinity anomalie and depth
-            zt = 0.5 * ( ztnb(ji,jj+1) + ztnb(ji,jj) )
-            zs = 0.5 * ( zsnb(ji,jj+1) + zsnb(ji,jj) ) - 35.0
-            zh = 0.5 * ( zdep(ji,jj+1) + zdep(ji,jj) )
-            ! masked ratio alpha/beta
-            zalbet = fsalbt( zt, zs, zh )*vmask(ji,jj,1)
-            ! local density gradient along j-bathymetric slope
-            zgdrho = zalbet * ( ztnb(ji,jj+1) - ztnb(ji,jj) )   &
-                   -          ( zsnb(ji,jj+1) - zsnb(ji,jj) )
-            ! sign of local j-gradient of density multiplied by the j-slope
-            zsign = sign( 0.5, -zgdrho * ( zdep(ji,jj+1) - zdep(ji,jj) ) )
-            zkj(ji,jj) = ( 0.5 - zsign ) * zahv(ji,jj)
-#  if ! defined key_vectopt_loop
-         END DO
-#  endif
-      END DO
-
-      CASE ( 1 )               ! Linear formulation function of temperature only
-                               ! 
-#  if defined key_vectopt_loop
-      jj = 1
-      DO ji = 1, jpij-jpi   ! vector opt. (forced unrolling)
-#  else
-      DO jj = 1, jpjm1
-         DO ji = 1, jpim1
-#  endif
-            ! local 'density/temperature' gradient along i-bathymetric slope
-            zgdrho =  ztnb(ji+1,jj) - ztnb(ji,jj) 
-            ! sign of local i-gradient of density multiplied by the i-slope
-            zsign = SIGN( 0.5, - zgdrho * ( zdep(ji+1,jj) - zdep(ji,jj) ) )
-            zki(ji,jj) = ( 0.5 - zsign ) * zahu(ji,jj)
-#  if ! defined key_vectopt_loop
-         END DO
-#  endif
-      END DO
-
-#  if defined key_vectopt_loop
-      jj = 1
-      DO ji = 1, jpij-jpi   ! vector opt. (forced unrolling)
-#  else
-      DO jj = 1, jpjm1
-         DO ji = 1, jpim1
-#  endif
-            ! local density gradient along j-bathymetric slope
-            zgdrho =  ztnb(ji,jj+1) - ztnb(ji,jj) 
-            ! sign of local j-gradient of density multiplied by the j-slope
-            zsign = sign( 0.5, -zgdrho * ( zdep(ji,jj+1) - zdep(ji,jj) ) )
-            zkj(ji,jj) = ( 0.5 - zsign ) * zahv(ji,jj)
-#  if ! defined key_vectopt_loop
-         END DO
-#  endif
-      END DO
-
-      CASE ( 2 )               ! Linear formulation function of temperature and salinity
-
-#  if defined key_vectopt_loop
-      jj = 1
-      DO ji = 1, jpij-jpi   ! vector opt. (forced unrolling)
-#  else
-      DO jj = 1, jpjm1
-         DO ji = 1, jpim1
+      SELECT CASE ( nn_eos )
+      !
+      CASE ( 0 )                 !==  Jackett and McDougall (1994) formulation  ==!
+#  if defined key_vectopt_loop
+         DO jj = 1, 1
+            DO ji = 1, jpij-jpi   ! vector opt. (forced unrolling)
+#  else
+         DO jj = 1, jpjm1
+            DO ji = 1, jpim1
+#  endif
+               ! temperature, salinity anomalie and depth
+               zt = 0.5 * ( ztnb(ji,jj) + ztnb(ji+1,jj) )
+               zs = 0.5 * ( zsnb(ji,jj) + zsnb(ji+1,jj) ) - 35.0
+               zh = 0.5 * ( zdep(ji,jj) + zdep(ji+1,jj) )
+               ! masked ratio alpha/beta
+               zalbet = fsalbt( zt, zs, zh )*umask(ji,jj,1)
+               ! local density gradient along i-bathymetric slope
+               zgdrho = zalbet * ( ztnb(ji+1,jj) - ztnb(ji,jj) )   &
+                      -          ( zsnb(ji+1,jj) - zsnb(ji,jj) )
+               ! sign of local i-gradient of density multiplied by the i-slope
+               zsign = SIGN( 0.5, - zgdrho * ( zdep(ji+1,jj) - zdep(ji,jj) ) )
+               zki(ji,jj) = ( 0.5 - zsign ) * zahu(ji,jj)
+               !
+               ! temperature, salinity anomalie and depth
+               zt = 0.5 * ( ztnb(ji,jj+1) + ztnb(ji,jj) )
+               zs = 0.5 * ( zsnb(ji,jj+1) + zsnb(ji,jj) ) - 35.0
+               zh = 0.5 * ( zdep(ji,jj+1) + zdep(ji,jj) )
+               ! masked ratio alpha/beta
+               zalbet = fsalbt( zt, zs, zh )*vmask(ji,jj,1)
+               ! local density gradient along j-bathymetric slope
+               zgdrho = zalbet * ( ztnb(ji,jj+1) - ztnb(ji,jj) )   &
+                      -          ( zsnb(ji,jj+1) - zsnb(ji,jj) )
+               ! sign of local j-gradient of density multiplied by the j-slope
+               zsign = sign( 0.5, -zgdrho * ( zdep(ji,jj+1) - zdep(ji,jj) ) )
+               zkj(ji,jj) = ( 0.5 - zsign ) * zahv(ji,jj)
+            END DO
+         END DO
+         !
+      CASE ( 1 )               !==  Linear formulation function of temperature only  ==!
+#  if defined key_vectopt_loop
+         DO jj = 1, 1
+            DO ji = 1, jpij-jpi   ! vector opt. (forced unrolling)
+#  else
+         DO jj = 1, jpjm1
+            DO ji = 1, jpim1
+#  endif
+               ! local 'density/temperature' gradient along i-bathymetric slope
+               zgdrho =  ztnb(ji+1,jj) - ztnb(ji,jj) 
+               ! sign of local i-gradient of density multiplied by the i-slope
+               zsign = SIGN( 0.5, - zgdrho * ( zdep(ji+1,jj) - zdep(ji,jj) ) )
+               zki(ji,jj) = ( 0.5 - zsign ) * zahu(ji,jj)
+               !
+               ! local density gradient along j-bathymetric slope
+               zgdrho =  ztnb(ji,jj+1) - ztnb(ji,jj) 
+               ! sign of local j-gradient of density multiplied by the j-slope
+               zsign = sign( 0.5, -zgdrho * ( zdep(ji,jj+1) - zdep(ji,jj) ) )
+               zkj(ji,jj) = ( 0.5 - zsign ) * zahv(ji,jj)
+            END DO
+         END DO
+         !
+      CASE ( 2 )               !==  Linear formulation function of temperature and salinity  ==!
+#  if defined key_vectopt_loop
+         DO jj = 1, 1
+            DO ji = 1, jpij-jpi   ! vector opt. (forced unrolling)
+#  else
+         DO jj = 1, jpjm1
+            DO ji = 1, jpim1
 #  endif      
-            ! local density gradient along i-bathymetric slope
-            zgdrho = - ( rbeta*( zsnb(ji+1,jj) - zsnb(ji,jj) )   &
-                     -  ralpha*( ztnb(ji+1,jj) - ztnb(ji,jj) ) )
-            ! sign of local i-gradient of density multiplied by the i-slope
-            zsign = SIGN( 0.5, - zgdrho * ( zdep(ji+1,jj) - zdep(ji,jj) ) )
-            zki(ji,jj) = ( 0.5 - zsign ) * zahu(ji,jj)
-#  if ! defined key_vectopt_loop
-         END DO
-#  endif
-      END DO
-
-#  if defined key_vectopt_loop
-      jj = 1
-      DO ji = 1, jpij-jpi   ! vector opt. (forced unrolling)
-#  else
-      DO jj = 1, jpjm1
-         DO ji = 1, jpim1
-#  endif     
-            ! local density gradient along j-bathymetric slope
-            zgdrho = - ( rbeta*( zsnb(ji,jj+1) - zsnb(ji,jj) )   &
-                     -  ralpha*( ztnb(ji,jj+1) - ztnb(ji,jj) ) )   
-            ! sign of local j-gradient of density multiplied by the j-slope
-            zsign = sign( 0.5, -zgdrho * ( zdep(ji,jj+1) - zdep(ji,jj) ) )
-            zkj(ji,jj) = ( 0.5 - zsign ) * zahv(ji,jj)
-#  if ! defined key_vectopt_loop
-         END DO
-#  endif
-      END DO
-      
-      CASE DEFAULT
-
-         WRITE(ctmp1,*) '          bad flag value for neos = ', neos
-         CALL ctl_stop(ctmp1)
-
+               ! local density gradient along i-bathymetric slope
+               zgdrho = - ( rn_beta *( zsnb(ji+1,jj) - zsnb(ji,jj) )   &
+                  &       - rn_alpha*( ztnb(ji+1,jj) - ztnb(ji,jj) ) )
+               ! sign of local i-gradient of density multiplied by the i-slope
+               zsign = SIGN( 0.5, - zgdrho * ( zdep(ji+1,jj) - zdep(ji,jj) ) )
+               zki(ji,jj) = ( 0.5 - zsign ) * zahu(ji,jj)
+               !
+               ! local density gradient along j-bathymetric slope
+               zgdrho = - ( rn_beta *( zsnb(ji,jj+1) - zsnb(ji,jj) )   &
+                  &       - rn_alpha*( ztnb(ji,jj+1) - ztnb(ji,jj) ) )   
+               ! sign of local j-gradient of density multiplied by the j-slope
+               zsign = sign( 0.5, -zgdrho * ( zdep(ji,jj+1) - zdep(ji,jj) ) )
+               zkj(ji,jj) = ( 0.5 - zsign ) * zahv(ji,jj)
+            END DO
+         END DO
+         !
       END SELECT
 
@@ -403,6 +348,6 @@
       ! second derivative (divergence) and add to the general tracer trend
 #  if defined key_vectopt_loop
-      jj = 1
-      DO ji = jpi+2, jpij-jpi-1   ! vector opt. (forced unrolling)
+      DO jj = 1, 1
+         DO ji = jpi+2, jpij-jpi-1   ! vector opt. (forced unrolling)
 #  else
       DO jj = 2, jpjm1
@@ -417,7 +362,5 @@
             ta(ji,jj,ik) = ta(ji,jj,ik) + zta
             sa(ji,jj,ik) = sa(ji,jj,ik) + zsa
-#  if ! defined key_vectopt_loop
-         END DO
-#  endif
+         END DO
       END DO
 
@@ -460,5 +403,5 @@
       REAL(wp),  DIMENSION(jpi,jpj) :: zmbk  
 
-      NAMELIST/nambbl/ atrbbl
+      NAMELIST/nambbl/ rn_ahtbbl
       !!----------------------------------------------------------------------
 
@@ -470,8 +413,8 @@
          WRITE(numout,*) 'tra_bbl_init : '
          WRITE(numout,*) '~~~~~~~~~~~~'
-         IF (lk_trabbl_dif )   WRITE(numout,*) '               * Diffusive Bottom Boundary Layer'
+         IF( lk_trabbl_dif )   WRITE(numout,*) '               * Diffusive Bottom Boundary Layer'
          IF( lk_trabbl_adv )   WRITE(numout,*) '               * Advective Bottom Boundary Layer'
          WRITE(numout,*) '       Namelist nambbl : set bbl parameters'
-         WRITE(numout,*) '          bottom boundary layer coef.    atrbbl = ', atrbbl
+         WRITE(numout,*) '          bottom boundary layer coef.    rn_ahtbbl = ', rn_ahtbbl
       ENDIF
  
Index: trunk/NEMO/OPA_SRC/TRA/trabbl_adv.h90
===================================================================
--- trunk/NEMO/OPA_SRC/TRA/trabbl_adv.h90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/TRA/trabbl_adv.h90	(revision 1601)
@@ -101,6 +101,6 @@
 
 #if defined key_vectopt_loop
-      jj = 1
-      DO ji = 1, jpij   ! vector opt. (forced unrolling)
+      DO jj = 1, 1
+         DO ji = 1, jpij   ! vector opt. (forced unrolling)
 #else
       DO jj = 1, jpj
@@ -116,7 +116,5 @@
             zunb(ji,jj) = un(ji,jj,mbku(ji,jj)) 
             zvnb(ji,jj) = vn(ji,jj,mbkv(ji,jj)) 
-#if ! defined key_vectopt_loop
-         END DO
-#endif
+         END DO
       END DO
 
@@ -127,91 +125,83 @@
       ! multiplied by the slope of the ocean bottom
 
-      SELECT CASE ( neos )
+      SELECT CASE ( nn_eos )
       !
       CASE ( 0 )               ! Jackett and McDougall (1994) formulation
-      !
-      DO jj = 1, jpjm1
-         DO ji = 1, fs_jpim1   ! vector opt.
-            !   ... temperature, salinity anomalie and depth
-            zt = 0.5 * ( ztnb(ji,jj) + ztnb(ji+1,jj) )
-            zs = 0.5 * ( zsnb(ji,jj) + zsnb(ji+1,jj) ) - 35.0
-            zh = 0.5 * ( zdep(ji,jj) + zdep(ji+1,jj) )
-            !   ... masked ratio alpha/beta
-            zalbet = fsalbt( zt, zs, zh ) * umask(ji,jj,1)
-            !   ... local density gradient along i-bathymetric slope
-            zgdrho = zalbet * ( ztnb(ji+1,jj) - ztnb(ji,jj) )   &
-               &       -      ( zsnb(ji+1,jj) - zsnb(ji,jj) )
-            zgdrho = zgdrho * umask(ji,jj,1)
-            !   ... sign of local i-gradient of density multiplied by the i-slope
-            zsign = SIGN( 0.5, -zgdrho     * ( zdep(ji+1,jj) - zdep(ji,jj) ) )
-            zsigna= SIGN( 0.5, zunb(ji,jj) * ( zdep(ji+1,jj) - zdep(ji,jj) ) )
-            zalphax(ji,jj)=( 0.5 + zsigna ) * ( 0.5 - zsign ) * umask(ji,jj,1)
-         END DO
-      END DO
-      !
-      DO jj = 1, jpjm1
-         DO ji = 1, fs_jpim1   ! vector opt.
-            !   ... temperature, salinity anomalie and depth
-            zt = 0.5 * ( ztnb(ji,jj+1) + ztnb(ji,jj) )
-            zs = 0.5 * ( zsnb(ji,jj+1) + zsnb(ji,jj) ) - 35.0
-            zh = 0.5 * ( zdep(ji,jj+1) + zdep(ji,jj) )
-            !   ... masked ratio alpha/beta
-            zalbet = fsalbt( zt, zs, zh ) * vmask(ji,jj,1)
-            !   ... local density gradient along j-bathymetric slope
-            zgdrho = zalbet * ( ztnb(ji,jj+1) - ztnb(ji,jj) )   &
-               &       -      ( zsnb(ji,jj+1) - zsnb(ji,jj) )
-            zgdrho = zgdrho*vmask(ji,jj,1)
-            !   ... sign of local j-gradient of density multiplied by the j-slope
-            zsign = SIGN( 0.5, -zgdrho     * ( zdep(ji,jj+1) - zdep(ji,jj) ) )
-            zsigna= SIGN( 0.5, zvnb(ji,jj) * ( zdep(ji,jj+1) - zdep(ji,jj) ) )
-            zalphay(ji,jj)=( 0.5 + zsigna ) * ( 0.5 - zsign ) * vmask(ji,jj,1)
-         END DO
-      END DO
-      !
+         !
+         DO jj = 1, jpjm1
+            DO ji = 1, fs_jpim1   ! vector opt.
+               !   ... temperature, salinity anomalie and depth
+               zt = 0.5 * ( ztnb(ji,jj) + ztnb(ji+1,jj) )
+               zs = 0.5 * ( zsnb(ji,jj) + zsnb(ji+1,jj) ) - 35.0
+               zh = 0.5 * ( zdep(ji,jj) + zdep(ji+1,jj) )
+               !   ... masked ratio alpha/beta
+               zalbet = fsalbt( zt, zs, zh ) * umask(ji,jj,1)
+               !   ... local density gradient along i-bathymetric slope
+               zgdrho = zalbet * ( ztnb(ji+1,jj) - ztnb(ji,jj) )   &
+                  &       -      ( zsnb(ji+1,jj) - zsnb(ji,jj) )
+               zgdrho = zgdrho * umask(ji,jj,1)
+               !   ... sign of local i-gradient of density multiplied by the i-slope
+               zsign = SIGN( 0.5, -zgdrho     * ( zdep(ji+1,jj) - zdep(ji,jj) ) )
+               zsigna= SIGN( 0.5, zunb(ji,jj) * ( zdep(ji+1,jj) - zdep(ji,jj) ) )
+               zalphax(ji,jj)=( 0.5 + zsigna ) * ( 0.5 - zsign ) * umask(ji,jj,1)
+               !
+               !   ... temperature, salinity anomalie and depth
+               zt = 0.5 * ( ztnb(ji,jj+1) + ztnb(ji,jj) )
+               zs = 0.5 * ( zsnb(ji,jj+1) + zsnb(ji,jj) ) - 35.0
+               zh = 0.5 * ( zdep(ji,jj+1) + zdep(ji,jj) )
+               !   ... masked ratio alpha/beta
+               zalbet = fsalbt( zt, zs, zh ) * vmask(ji,jj,1)
+               !   ... local density gradient along j-bathymetric slope
+               zgdrho = zalbet * ( ztnb(ji,jj+1) - ztnb(ji,jj) )   &
+                  &       -      ( zsnb(ji,jj+1) - zsnb(ji,jj) )
+               zgdrho = zgdrho*vmask(ji,jj,1)
+               !   ... sign of local j-gradient of density multiplied by the j-slope
+               zsign = SIGN( 0.5, -zgdrho     * ( zdep(ji,jj+1) - zdep(ji,jj) ) )
+               zsigna= SIGN( 0.5, zvnb(ji,jj) * ( zdep(ji,jj+1) - zdep(ji,jj) ) )
+               zalphay(ji,jj)=( 0.5 + zsigna ) * ( 0.5 - zsign ) * vmask(ji,jj,1)
+            END DO
+         END DO
+         !
       CASE ( 1 )               ! Linear formulation function of temperature only
-      !
-      DO jj = 1, jpjm1
-         DO ji = 1, fs_jpim1   ! vector opt.
-            ! local 'density/temperature' gradient along i-bathymetric slope
-            zgdrho =  ( ztnb(ji+1,jj) - ztnb(ji,jj) )
-            ! sign of local i-gradient of density multiplied by the i-slope
-            zsign = SIGN( 0.5, - zgdrho    * ( zdep(ji+1,jj) - zdep(ji,jj) ) )
-            zsigna= SIGN( 0.5, zunb(ji,jj) * ( zdep(ji+1,jj) - zdep(ji,jj) ) )
-            zalphax(ji,jj)=( 0.5 + zsigna ) * ( 0.5 - zsign ) * umask(ji,jj,1)
-
-            ! local density gradient along j-bathymetric slope
-            zgdrho =  ( ztnb(ji,jj+1) - ztnb(ji,jj) )
-            ! sign of local j-gradient of density multiplied by the j-slope
-            zsign = SIGN( 0.5, -zgdrho     * ( zdep(ji,jj+1) - zdep(ji,jj) ) )
-            zsigna= SIGN( 0.5, zvnb(ji,jj) * ( zdep(ji,jj+1) - zdep(ji,jj) ) )
-            zalphay(ji,jj)=( 0.5 + zsigna ) * ( 0.5 - zsign ) * vmask(ji,jj,1)
-         END DO
-      END DO
-      !
+         !
+         DO jj = 1, jpjm1
+            DO ji = 1, fs_jpim1   ! vector opt.
+               ! local 'density/temperature' gradient along i-bathymetric slope
+               zgdrho =  ( ztnb(ji+1,jj) - ztnb(ji,jj) )
+               ! sign of local i-gradient of density multiplied by the i-slope
+               zsign = SIGN( 0.5, - zgdrho    * ( zdep(ji+1,jj) - zdep(ji,jj) ) )
+               zsigna= SIGN( 0.5, zunb(ji,jj) * ( zdep(ji+1,jj) - zdep(ji,jj) ) )
+               zalphax(ji,jj)=( 0.5 + zsigna ) * ( 0.5 - zsign ) * umask(ji,jj,1)
+               ! 
+               ! local density gradient along j-bathymetric slope
+               zgdrho =  ( ztnb(ji,jj+1) - ztnb(ji,jj) )
+               ! sign of local j-gradient of density multiplied by the j-slope
+               zsign = SIGN( 0.5, -zgdrho     * ( zdep(ji,jj+1) - zdep(ji,jj) ) )
+               zsigna= SIGN( 0.5, zvnb(ji,jj) * ( zdep(ji,jj+1) - zdep(ji,jj) ) )
+               zalphay(ji,jj)=( 0.5 + zsigna ) * ( 0.5 - zsign ) * vmask(ji,jj,1)
+            END DO
+         END DO
+         !
       CASE ( 2 )               ! Linear formulation function of temperature and salinity
-      !
-      DO jj = 1, jpjm1
-         DO ji = 1, fs_jpim1   ! vector opt.            
-            ! local density gradient along i-bathymetric slope
-            zgdrho = - ( rbeta*( zsnb(ji+1,jj) - zsnb(ji,jj) )   &
-               &     -  ralpha*( ztnb(ji+1,jj) - ztnb(ji,jj) ) )
-            ! sign of local i-gradient of density multiplied by the i-slope
-            zsign = SIGN( 0.5, - zgdrho    * ( zdep(ji+1,jj) - zdep(ji,jj) ) )
-            zsigna= SIGN( 0.5, zunb(ji,jj) * ( zdep(ji+1,jj) - zdep(ji,jj) ) )
-            zalphax(ji,jj) = ( 0.5 + zsigna ) * ( 0.5 - zsign ) * umask(ji,jj,1)
-
-            ! local density gradient along j-bathymetric slope
-            zgdrho = - ( rbeta*( zsnb(ji,jj+1) - zsnb(ji,jj) )   &
-                   -    ralpha*( ztnb(ji,jj+1) - ztnb(ji,jj) ) )   
-            ! sign of local j-gradient of density multiplied by the j-slope
-            zsign = SIGN( 0.5, - zgdrho    * ( zdep(ji,jj+1) - zdep(ji,jj) ) )
-            zsigna= SIGN( 0.5, zvnb(ji,jj) * ( zdep(ji,jj+1) - zdep(ji,jj) ) )
-            zalphay(ji,jj) = ( 0.5 + zsigna ) * ( 0.5 - zsign ) * vmask(ji,jj,1)
-         END DO
-      END DO
-      !
-      CASE DEFAULT
-         WRITE(ctmp1,*) '          bad flag value for neos = ', neos
-         CALL ctl_stop( ctmp1 )
+         !
+         DO jj = 1, jpjm1
+            DO ji = 1, fs_jpim1   ! vector opt.            
+               ! local density gradient along i-bathymetric slope
+               zgdrho = - ( rn_beta *( zsnb(ji+1,jj) - zsnb(ji,jj) )   &
+                  &       - rn_alpha*( ztnb(ji+1,jj) - ztnb(ji,jj) ) )
+               ! sign of local i-gradient of density multiplied by the i-slope
+               zsign = SIGN( 0.5, - zgdrho    * ( zdep(ji+1,jj) - zdep(ji,jj) ) )
+               zsigna= SIGN( 0.5, zunb(ji,jj) * ( zdep(ji+1,jj) - zdep(ji,jj) ) )
+               zalphax(ji,jj) = ( 0.5 + zsigna ) * ( 0.5 - zsign ) * umask(ji,jj,1)
+               ! 
+               ! local density gradient along j-bathymetric slope
+               zgdrho = - ( rn_beta *( zsnb(ji,jj+1) - zsnb(ji,jj) )   &
+                  &       - rn_alpha*( ztnb(ji,jj+1) - ztnb(ji,jj) ) )   
+               ! sign of local j-gradient of density multiplied by the j-slope
+               zsign = SIGN( 0.5, - zgdrho    * ( zdep(ji,jj+1) - zdep(ji,jj) ) )
+               zsigna= SIGN( 0.5, zvnb(ji,jj) * ( zdep(ji,jj+1) - zdep(ji,jj) ) )
+               zalphay(ji,jj) = ( 0.5 + zsigna ) * ( 0.5 - zsign ) * vmask(ji,jj,1)
+            END DO
+         END DO
          !
       END SELECT
@@ -231,6 +221,6 @@
       
 # if defined key_vectopt_loop
-         jj = 1
-         DO ji = 1, jpij-jpi   ! vector opt. (forced unrolling)
+         DO jj = 1, 1
+            DO ji = 1, jpij-jpi   ! vector opt. (forced unrolling)
 # else   
          DO jj = 1, jpjm1
@@ -250,7 +240,5 @@
                   v_bbl(ji,jj,ikv) = zalphay(ji,jj) * vn(ji,jj,ikv) * ze3v / fse3v(ji,jj,ikv)       
                ENDIF
-# if ! defined key_vectopt_loop
-            END DO
-# endif
+            END DO
          END DO
 
@@ -261,6 +249,6 @@
 
 #if defined key_vectopt_loop
-         jj = 1
-         DO ji = 1, jpij   ! vector opt. (forced unrolling)
+         DO jj = 1, 1
+            DO ji = 1, jpij   ! vector opt. (forced unrolling)
 #else
          DO jj = 1, jpj
@@ -273,11 +261,9 @@
                   v_bbl(ji,jj,ikv) = zalphay(ji,jj) * vn(ji,jj,ikv)       
                ENDIF
-#if ! defined key_vectopt_loop
-            END DO
-#endif
+            END DO
          END DO
        
       ENDIF
-	  
+
 
       ! 5. Along sigma advective trend
@@ -286,6 +272,6 @@
 
 # if defined key_vectopt_loop
-      jj = 1
-      DO ji = 1, jpij-jpi   ! vector opt. (forced unrolling)
+      DO jj = 1, 1
+         DO ji = 1, jpij-jpi   ! vector opt. (forced unrolling)
 # else
       DO jj = 1, jpjm1
@@ -310,11 +296,9 @@
             zwz(ji,jj) = ( ( zfvj + ABS( zfvj ) ) * zsbb(ji  ,jj  )   &
                &          +( zfvj - ABS( zfvj ) ) * zsbb(ji  ,jj+1) ) * 0.5
-#if ! defined key_vectopt_loop
-         END DO
-#endif
-        END DO
-# if defined key_vectopt_loop
-      jj = 1
-      DO ji = jpi+2, jpij-jpi-1   ! vector opt. (forced unrolling)
+         END DO
+      END DO
+# if defined key_vectopt_loop
+      DO jj = 1, 1
+         DO ji = jpi+2, jpij-jpi-1   ! vector opt. (forced unrolling)
 # else
       DO jj = 2, jpjm1
@@ -332,7 +316,5 @@
             ta(ji,jj,ik) = ta(ji,jj,ik) + zta
             sa(ji,jj,ik) = sa(ji,jj,ik) + zsa
-#if ! defined key_vectopt_loop
-         END DO
-#endif
+         END DO
       END DO
 
@@ -365,8 +347,8 @@
 
       IF( ln_zps ) THEN
-	  
-# if defined key_vectopt_loop
-         jj = 1
-         DO ji = 1, jpij-jpi   ! vector opt. (forced unrolling)
+ 
+# if defined key_vectopt_loop
+         DO jj = 1, 1
+            DO ji = 1, jpij-jpi   ! vector opt. (forced unrolling)
 # else
          DO jj = 1, jpjm1
@@ -381,17 +363,15 @@
                ze3u = MIN( fse3u(ji,jj,iku1), fse3u(ji,jj,iku2) ) 
                ze3v = MIN( fse3v(ji,jj,ikv1), fse3v(ji,jj,ikv2) ) 
-	       
+
                zwu(ji,jj) = zalphax(ji,jj) * e2u(ji,jj) * ze3u  
                zwv(ji,jj) = zalphay(ji,jj) * e1v(ji,jj) * ze3v
-#if ! defined key_vectopt_loop
-            END DO
-#endif
+            END DO
          END DO  
-	
+         !
       ELSE
-
-# if defined key_vectopt_loop
-         jj = 1
-         DO ji = 1, jpij-jpi   ! vector opt. (forced unrolling)
+         !
+# if defined key_vectopt_loop
+         DO jj = 1, 1
+            DO ji = 1, jpij-jpi   ! vector opt. (forced unrolling)
 # else
          DO jj = 1, jpjm1
@@ -402,15 +382,13 @@
                zwu(ji,jj) = zalphax(ji,jj) * e2u(ji,jj) * fse3u(ji,jj,iku) 
                zwv(ji,jj) = zalphay(ji,jj) * e1v(ji,jj) * fse3v(ji,jj,ikv) 
-#if ! defined key_vectopt_loop
-            END DO
-#endif
-         END DO
-
+            END DO
+         END DO
+         !
       ENDIF
  
 
 # if defined key_vectopt_loop
-      jj = 1
-      DO ji = jpi+2, jpij-jpi-1   ! vector opt. (forced unrolling)
+      DO jj = 1, 1
+         DO ji = jpi+2, jpij-jpi-1   ! vector opt. (forced unrolling)
 # else
       DO jj = 2, jpjm1
@@ -426,8 +404,6 @@
                &   ) / zbt
 
-# if ! defined key_vectopt_loop
-         END DO
-# endif
-        END DO
+         END DO
+      END DO
 
       ! 7. compute additional vertical velocity to be used in t boxes
@@ -442,7 +418,5 @@
          END DO
       END DO
-
-      ! Boundary condition on w_bbl   (unchanged sign)
-      CALL lbc_lnk( w_bbl, 'W', 1. )
+      CALL lbc_lnk( w_bbl, 'W', 1. )      ! Boundary condition on w_bbl   (unchanged sign)
 
       CALL iom_put( "uoce_bbl", u_bbl )   ! bbl i-current      
Index: trunk/NEMO/OPA_SRC/TRA/tradmp.F90
===================================================================
--- trunk/NEMO/OPA_SRC/TRA/tradmp.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/TRA/tradmp.F90	(revision 1601)
@@ -4,17 +4,17 @@
    !! Ocean physics: internal restoring trend on active tracers (T and S)
    !!======================================================================
-   !! History :  5.0  !  91-03  (O. Marti, G. Madec)  Original code
-   !!                 !  92-06  (M. Imbard)  doctor norme
-   !!                 !  96-01  (G. Madec)  statement function for e3
-   !!                 !  97-05  (G. Madec)  macro-tasked on jk-slab
-   !!                 !  98-07  (M. Imbard, G. Madec) ORCA version
-   !!            7.0  !  01-02  (M. Imbard)  cofdis, Original code
-   !!            8.1  !  01-02  (G. Madec, E. Durand)  cleaning
-   !!            8.5  !  02-08  (G. Madec, E. Durand)  free form + modules
+   !! History :  OPA  ! 1991-03  (O. Marti, G. Madec)  Original code
+   !!                 ! 1992-06  (M. Imbard)  doctor norme
+   !!                 ! 1996-01  (G. Madec)  statement function for e3
+   !!                 ! 1997-05  (G. Madec)  macro-tasked on jk-slab
+   !!                 ! 1998-07  (M. Imbard, G. Madec) ORCA version
+   !!            7.0  ! 2001-02  (M. Imbard)  cofdis, Original code
+   !!            8.1  ! 2001-02  (G. Madec, E. Durand)  cleaning
+   !!  NEMO      1.0  ! 2002-08  (G. Madec, E. Durand)  free form + modules
+   !!            3.2  ! 2009-08  (G. Madec, C. Talandier)  DOCTOR norm for namelist parameter
    !!----------------------------------------------------------------------
 #if   defined key_tradmp   ||   defined key_esopa
    !!----------------------------------------------------------------------
    !!   key_tradmp                                         internal damping
-   !!----------------------------------------------------------------------
    !!----------------------------------------------------------------------
    !!   tra_dmp      : update the tracer trend with the internal damping
@@ -29,9 +29,9 @@
    USE trdmod_oce      ! ocean variables trends
    USE zdf_oce         ! ocean vertical physics
-   USE in_out_manager  ! I/O manager
    USE phycst          ! Define parameters for the routines
    USE dtatem          ! temperature data
    USE dtasal          ! salinity data
    USE zdfmxl          ! mixed layer depth
+   USE in_out_manager  ! I/O manager
    USE lib_mpp         ! distribued memory computing
    USE prtctl          ! Print control
@@ -40,5 +40,5 @@
    PRIVATE
 
-   PUBLIC tra_dmp      ! routine called by step.F90
+   PUBLIC   tra_dmp    ! routine called by step.F90
 
 #if ! defined key_agrif
@@ -49,11 +49,11 @@
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   resto    !: restoring coeff. on T and S (s-1)
    
-   !!* newtonian damping namelist (mandmp) 
-   INTEGER  ::   ndmp   =   -1    ! = 0/-1/'latitude' for damping over T and S
-   INTEGER  ::   ndmpf  =    2    ! = 1 create a damping.coeff NetCDF file 
-   INTEGER  ::   nmldmp =    0    ! = 0/1/2 flag for damping in the mixed layer
-   REAL(wp) ::   sdmp   =   50.   ! surface time scale for internal damping (days)
-   REAL(wp) ::   bdmp   =  360.   ! bottom time scale for internal damping (days)
-   REAL(wp) ::   hdmp   =  800.   ! depth of transition between sdmp and bdmp (meters)
+   !                             !!* Namelist namtra_dmp : T & S newtonian damping *
+   INTEGER  ::   nn_hdmp =   -1   ! = 0/-1/'latitude' for damping over T and S
+   INTEGER  ::   nn_zdmp =    0   ! = 0/1/2 flag for damping in the mixed layer
+   REAL(wp) ::   rn_surf =   50.  ! surface time scale for internal damping        [days]
+   REAL(wp) ::   rn_bot  =  360.  ! bottom time scale for internal damping         [days]
+   REAL(wp) ::   rn_dep  =  800.  ! depth of transition between rn_surf and rn_bot [meters]
+   INTEGER  ::   nn_file =    2   ! = 1 create a damping.coeff NetCDF file 
 
    !! * Substitutions
@@ -61,5 +61,5 @@
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
-   !!   OPA 9.0 , LOCEAN-IPSL (2006) 
+   !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) 
    !! $Id$ 
    !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
@@ -84,15 +84,12 @@
       !!      below the well mixed layer (nlmdmp=2)
       !!
-      !! ** Action  : - update the tracer trends (ta,sa) with the newtonian 
-      !!                damping trends.
-      !!              - save the trends in (ttrd,strd) ('key_trdtra')
+      !! ** Action  : - (ta,sa)   tracer trends updated with the damping trend
       !!----------------------------------------------------------------------
       USE oce, ONLY :   ztrdt => ua   ! use ua as 3D workspace   
       USE oce, ONLY :   ztrds => va   ! use va as 3D workspace   
       !!
-      INTEGER, INTENT( in ) ::   kt   ! ocean time-step index
-      !!
-      INTEGER  ::   ji, jj, jk            ! dummy loop indices
-      REAL(wp) ::   ztest, zta, zsa       ! temporary scalars
+      INTEGER, INTENT(in) ::   kt   ! ocean time-step index
+      !!
+      INTEGER ::   ji, jj, jk   ! dummy loop indices
       !!----------------------------------------------------------------------
 
@@ -104,59 +101,36 @@
       ENDIF
 
-      ! 1. Newtonian damping trends on tracer fields
-      ! --------------------------------------------
-      !    compute the newtonian damping trends depending on nmldmp
-
-      SELECT CASE ( nmldmp )
+      SELECT CASE ( nn_zdmp ) 
       !
-      CASE( 0 )                ! newtonian damping throughout the water column
+      CASE( 0 )                   !==  newtonian damping throughout the water column  ==!
          DO jk = 1, jpkm1
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  zta = resto(ji,jj,jk) * ( t_dta(ji,jj,jk) - tb(ji,jj,jk) )
-                  zsa = resto(ji,jj,jk) * ( s_dta(ji,jj,jk) - sb(ji,jj,jk) )
-                  ! add the trends to the general tracer trends
-                  ta(ji,jj,jk) = ta(ji,jj,jk) + zta
-                  sa(ji,jj,jk) = sa(ji,jj,jk) + zsa
-                  ! save the salinity trend (used in flx to close the salt budget)
+                  ta(ji,jj,jk) = ta(ji,jj,jk) + resto(ji,jj,jk) * ( t_dta(ji,jj,jk) - tb(ji,jj,jk) )
+                  sa(ji,jj,jk) = sa(ji,jj,jk) + resto(ji,jj,jk) * ( s_dta(ji,jj,jk) - sb(ji,jj,jk) )
                END DO
             END DO
          END DO
          !
-      CASE ( 1 )                ! no damping in the turbocline (avt > 5 cm2/s)
+      CASE ( 1 )                  !==  no damping in the turbocline (avt > 5 cm2/s)  ==!
          DO jk = 1, jpkm1
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  ztest = avt(ji,jj,jk) - 5.e-4
-                  IF( ztest < 0. ) THEN
-                     zta = resto(ji,jj,jk) * ( t_dta(ji,jj,jk) - tb(ji,jj,jk) )
-                     zsa = resto(ji,jj,jk) * ( s_dta(ji,jj,jk) - sb(ji,jj,jk) )
-                  ELSE
-                     zta = 0.e0
-                     zsa = 0.e0
+                  IF( avt(ji,jj,jk) <= 5.e-4 ) THEN
+                     ta(ji,jj,jk) = ta(ji,jj,jk) + resto(ji,jj,jk) * ( t_dta(ji,jj,jk) - tb(ji,jj,jk) )
+                     sa(ji,jj,jk) = sa(ji,jj,jk) + resto(ji,jj,jk) * ( s_dta(ji,jj,jk) - sb(ji,jj,jk) )
                   ENDIF
-                  ! add the trends to the general tracer trends
-                  ta(ji,jj,jk) = ta(ji,jj,jk) + zta
-                  sa(ji,jj,jk) = sa(ji,jj,jk) + zsa
-                  ! save the salinity trend (used in flx to close the salt budget)
                END DO
             END DO
          END DO
          !
-      CASE ( 2 )                ! no damping in the mixed layer 
+      CASE ( 2 )                  !==  no damping in the mixed layer   ==!
          DO jk = 1, jpkm1
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
                   IF( fsdept(ji,jj,jk) >= hmlp (ji,jj) ) THEN
-                     zta = resto(ji,jj,jk) * ( t_dta(ji,jj,jk) - tb(ji,jj,jk) )
-                     zsa = resto(ji,jj,jk) * ( s_dta(ji,jj,jk) - sb(ji,jj,jk) )
-                  ELSE
-                     zta = 0.e0
-                     zsa = 0.e0
+                     ta(ji,jj,jk) = ta(ji,jj,jk) + resto(ji,jj,jk) * ( t_dta(ji,jj,jk) - tb(ji,jj,jk) )
+                     sa(ji,jj,jk) = sa(ji,jj,jk) + resto(ji,jj,jk) * ( s_dta(ji,jj,jk) - sb(ji,jj,jk) )
                   ENDIF
-                  ! add the trends to the general tracer trends
-                  ta(ji,jj,jk) = ta(ji,jj,jk) + zta
-                  sa(ji,jj,jk) = sa(ji,jj,jk) + zsa
-                  ! save the salinity trend (used in flx to close the salt budget)
                END DO
             END DO
@@ -165,10 +139,10 @@
       END SELECT
 
-      IF( l_trdtra )   THEN          ! save the damping tracer trends for diagnostic
+      IF( l_trdtra )   THEN       ! trend diagnostic
          ztrdt(:,:,:) = ta(:,:,:) - ztrdt(:,:,:)
          ztrds(:,:,:) = sa(:,:,:) - ztrds(:,:,:)
-         CALL trd_mod(ztrdt, ztrds, jptra_trd_dmp, 'TRA', kt)
+         CALL trd_mod( ztrdt, ztrds, jptra_trd_dmp, 'TRA', kt )
       ENDIF
-      !                              ! Control print
+      !                           ! Control print
       IF(ln_ctl)   CALL prt_ctl( tab3d_1=ta, clinfo1=' dmp  - Ta: ', mask1=tmask,   &
          &                       tab3d_2=sa, clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' )
@@ -184,12 +158,11 @@
       !!
       !! ** Method  :   read the nammbf namelist and check the parameters
-      !!      called by tra_dmp at the first timestep (nit000)
-      !!----------------------------------------------------------------------
-      NAMELIST/namtdp/ ndmp, ndmpf, nmldmp, sdmp, bdmp, hdmp
-      !!----------------------------------------------------------------------
-
-      REWIND ( numnam )                  ! Read Namelist namtdp : temperature and salinity damping term
-      READ   ( numnam, namtdp )
-      IF( lzoom )   nmldmp = 0           ! restoring to climatology at closed north or south boundaries
+      !!----------------------------------------------------------------------
+      NAMELIST/namtra_dmp/ nn_hdmp, nn_zdmp, rn_surf, rn_bot, rn_dep, nn_file
+      !!----------------------------------------------------------------------
+
+      REWIND ( numnam )                  ! Read Namelist namtra_dmp : temperature and salinity damping term
+      READ   ( numnam, namtra_dmp )
+      IF( lzoom )   nn_zdmp = 0           ! restoring to climatology at closed north or south boundaries
 
       IF(lwp) THEN                       ! Namelist print
@@ -197,27 +170,27 @@
          WRITE(numout,*) 'tra_dmp : T and S newtonian damping'
          WRITE(numout,*) '~~~~~~~'
-         WRITE(numout,*) '       Namelist namtdp : set damping parameter'
-         WRITE(numout,*) '          T and S damping option         ndmp   = ', ndmp
-         WRITE(numout,*) '          create a damping.coeff file    ndmpf  = ', ndmpf
-         WRITE(numout,*) '          mixed layer damping option     nmldmp = ', nmldmp, '(zoom: forced to 0)'
-         WRITE(numout,*) '          surface time scale (days)      sdmp   = ', sdmp
-         WRITE(numout,*) '          bottom time scale (days)       bdmp   = ', bdmp
-         WRITE(numout,*) '          depth of transition (meters)   hdmp   = ', hdmp
+         WRITE(numout,*) '   Namelist namtra_dmp : set damping parameter'
+         WRITE(numout,*) '      T and S damping option         nn_hdmp = ', nn_hdmp
+         WRITE(numout,*) '      mixed layer damping option     nn_zdmp = ', nn_zdmp, '(zoom: forced to 0)'
+         WRITE(numout,*) '      surface time scale (days)      rn_surf = ', rn_surf
+         WRITE(numout,*) '      bottom time scale (days)       rn_bot  = ', rn_bot
+         WRITE(numout,*) '      depth of transition (meters)   rn_dep  = ', rn_dep
+         WRITE(numout,*) '      create a damping.coeff file    nn_file = ', nn_file
       ENDIF
 
-      SELECT CASE ( ndmp )
-      CASE (  -1  )   ;   IF(lwp) WRITE(numout,*) '          tracer damping in the Med & Red seas only'
-      CASE ( 1:90 )   ;   IF(lwp) WRITE(numout,*) '          tracer damping poleward of', ndmp, ' degrees'
+      SELECT CASE ( nn_hdmp )
+      CASE (  -1  )   ;   IF(lwp) WRITE(numout,*) '   tracer damping in the Med & Red seas only'
+      CASE ( 1:90 )   ;   IF(lwp) WRITE(numout,*) '   tracer damping poleward of', nn_hdmp, ' degrees'
       CASE DEFAULT
-         WRITE(ctmp1,*) '          bad flag value for ndmp = ', ndmp
+         WRITE(ctmp1,*) '          bad flag value for nn_hdmp = ', nn_hdmp
          CALL ctl_stop(ctmp1)
       END SELECT
 
-      SELECT CASE ( nmldmp )
-      CASE ( 0 )   ;   IF(lwp) WRITE(numout,*) '          tracer damping throughout the water column'
-      CASE ( 1 )   ;   IF(lwp) WRITE(numout,*) '          no tracer damping in the turbocline (avt > 5 cm2/s)'
-      CASE ( 2 )   ;   IF(lwp) WRITE(numout,*) '          no tracer damping in the mixed layer'
+      SELECT CASE ( nn_zdmp )
+      CASE ( 0 )   ;   IF(lwp) WRITE(numout,*) '   tracer damping throughout the water column'
+      CASE ( 1 )   ;   IF(lwp) WRITE(numout,*) '   no tracer damping in the turbocline (avt > 5 cm2/s)'
+      CASE ( 2 )   ;   IF(lwp) WRITE(numout,*) '   no tracer damping in the mixed layer'
       CASE DEFAULT
-         WRITE(ctmp1,*) '          bad flag value for nmldmp = ', nmldmp
+         WRITE(ctmp1,*) 'bad flag value for nn_zdmp = ', nn_zdmp
          CALL ctl_stop(ctmp1)
       END SELECT
@@ -241,7 +214,7 @@
       !!
       !! ** Method  : - set along closed boundary due to zoom a damping over
-      !!      6 points with a max time scale of 5 days.
+      !!                6 points with a max time scale of 5 days.
       !!              - ORCA arctic/antarctic zoom: set the damping along
-      !!      south/north boundary over a latitude strip.
+      !!                south/north boundary over a latitude strip.
       !!
       !! ** Action  : - resto, the damping coeff. for T and S
@@ -270,34 +243,25 @@
       END DO
 
-
-      IF( lzoom_arct .AND. lzoom_anta ) THEN
-         !
-         ! ====================================================
-         !  ORCA configuration : arctic zoom or antarctic zoom
-         ! ====================================================
-
+      !                                           ! ====================================================
+      IF( lzoom_arct .AND. lzoom_anta ) THEN      !  ORCA configuration : arctic zoom or antarctic zoom
+         !                                        ! ====================================================
          IF(lwp) WRITE(numout,*)
          IF(lwp .AND. lzoom_arct ) WRITE(numout,*) '              dtacof_zoom : ORCA    Arctic zoom'
          IF(lwp .AND. lzoom_arct ) WRITE(numout,*) '              dtacof_zoom : ORCA Antarctic zoom'
          IF(lwp) WRITE(numout,*)
-
-         ! ... Initialization : 
-         !     zlat0 : latitude strip where resto decreases
-         !     zlat1 : resto = 1 before zlat1
-         !     zlat2 : resto decreases from 1 to 0 between zlat1 and zlat2
+         !
+         !                          ! Initialization : 
          resto(:,:,:) = 0.e0
-         zlat0 = 10.
-         zlat1 = 30.
-         zlat2 = zlat1 + zlat0
-
-         ! ... Compute arrays resto ; value for internal damping : 5 days
-         DO jk = 2, jpkm1
+         zlat0 = 10.                     ! zlat0 : latitude strip where resto decreases
+         zlat1 = 30.                     ! zlat1 : resto = 1 before zlat1
+         zlat2 = zlat1 + zlat0           ! zlat2 : resto decreases from 1 to 0 between zlat1 and zlat2
+
+         DO jk = 2, jpkm1           ! Compute arrays resto ; value for internal damping : 5 days
             DO jj = 1, jpj
                DO ji = 1, jpi
                   zlat = ABS( gphit(ji,jj) )
-                  IF ( zlat1 <= zlat .AND. zlat <= zlat2 ) THEN
-                     resto(ji,jj,jk) = 0.5 * ( 1./(5.*rday) ) *   &
-                        ( 1. - cos(rpi*(zlat2-zlat)/zlat0) ) 
-                  ELSE IF ( zlat < zlat1 ) THEN
+                  IF( zlat1 <= zlat .AND. zlat <= zlat2 ) THEN
+                     resto(ji,jj,jk) = 0.5 * ( 1./(5.*rday) ) * ( 1. - cos(rpi*(zlat2-zlat)/zlat0) ) 
+                  ELSEIF( zlat < zlat1 ) THEN
                      resto(ji,jj,jk) = 1./(5.*rday)
                   ENDIF
@@ -307,6 +271,5 @@
          !
       ENDIF
-
-      ! ... Mask resto array
+      !                             ! Mask resto array
       resto(:,:,:) = resto(:,:,:) * tmask(:,:,:)
       !
@@ -321,6 +284,6 @@
       !!
       !! ** Method  :   Arrays defining the damping are computed for each grid
-      !!      point for temperature and salinity (resto)
-      !!      Damping depends on distance to coast, depth and latitude
+      !!                point for temperature and salinity (resto)
+      !!                Damping depends on distance to coast, depth and latitude
       !!
       !! ** Action  : - resto, the damping coeff. for T and S
@@ -330,10 +293,10 @@
       !!
       INTEGER ::   ji, jj, jk                   ! dummy loop indices
-      INTEGER ::   ii0, ii1, ij0, ij1           !    "          "
+      INTEGER ::   ii0, ii1, ij0, ij1           !    -          -
       INTEGER ::   inum0                        ! logical unit for file restoring damping term
       INTEGER ::   icot                         ! logical unit for file distance to the coast
       REAL(wp) ::   zinfl, zlon                 ! temporary scalars
-      REAL(wp) ::   zlat, zlat0, zlat1, zlat2   !    "         "
-      REAL(wp) ::   zsdmp, zbdmp                !    "         "
+      REAL(wp) ::   zlat, zlat0, zlat1, zlat2   !    -         -
+      REAL(wp) ::   zsdmp, zbdmp                !    -         -
       REAL(wp), DIMENSION(jpk)         ::   zhfac
       REAL(wp), DIMENSION(jpi,jpj)     ::   zmrs
@@ -350,42 +313,26 @@
 
       ! ... Initialization : 
-      !   zdct()      : distant to the coastline
-      !   resto()     : array of restoring coeff. on T and S
-
       resto(:,:,:) = 0.e0
 
-      IF ( ndmp > 0 ) THEN
-
-         !    ------------------------------------
-         !     Damping poleward of 'ndmp' degrees
-         !    ------------------------------------
-
+      !                           !-----------------------------------------!
+      IF( nn_hdmp > 0 ) THEN      !  Damping poleward of 'nn_hdmp' degrees  !
+         !                        !-----------------------------------------!
          IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*) '              Damping poleward of ', ndmp,' deg.'
-         IF(lwp) WRITE(numout,*)
-
-         ! ... Distance to coast (zdct)
-
-         IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*) ' dtacof : distance to coast file'
+         IF(lwp) WRITE(numout,*) '              Damping poleward of ', nn_hdmp,' deg.'
+         !
          CALL iom_open ( 'dist.coast.nc', icot, ldstop = .FALSE. )
-         IF( icot > 0 ) THEN
-            CALL iom_get ( icot, jpdom_data, 'Tcoast', zdct )
-            CALL iom_close (icot)
-         ELSE
-            !   ... Compute and save the distance-to-coast array (output in zdct)
+         !
+         IF( icot > 0 ) THEN          ! distance-to-coast read in file
+            CALL iom_get  ( icot, jpdom_data, 'Tcoast', zdct )
+            CALL iom_close( icot )
+         ELSE                         ! distance-to-coast computed and saved in file (output in zdct)
             CALL cofdis( zdct )
          ENDIF
 
-         ! ... Compute arrays resto 
-         !      zinfl : distance of influence for damping term
-         !      zlat0 : latitude strip where resto decreases
-         !      zlat1 : resto = 0 between -zlat1 and zlat1
-         !      zlat2 : resto increases from 0 to 1 between |zlat1| and |zlat2|
-         !          and resto = 1 between |zlat2| and 90 deg.
-         zinfl = 1000.e3
-         zlat0 = 10
-         zlat1 = ndmp
-         zlat2 = zlat1 + zlat0
+         !                            ! Compute arrays resto 
+         zinfl = 1000.e3                   ! distance of influence for damping term
+         zlat0 = 10.                       ! latitude strip where resto decreases
+         zlat1 = REAL( nn_hdmp )           ! resto = 0 between -zlat1 and zlat1
+         zlat2 = zlat1 + zlat0             ! resto increases from 0 to 1 between |zlat1| and |zlat2|
 
          DO jj = 1, jpj
@@ -400,13 +347,11 @@
          END DO
 
-         !   ... North Indian ocean (20N/30N x 45E/100E) : resto=0
-         IF ( ndmp == 20 ) THEN
+         IF ( nn_hdmp == 20 ) THEN       ! North Indian ocean (20N/30N x 45E/100E) : resto=0
             DO jj = 1, jpj
                DO ji = 1, jpi
                   zlat = gphit(ji,jj)
                   zlon = MOD( glamt(ji,jj), 360. )
-                  IF ( zlat1 < zlat .AND. zlat < zlat2 .AND.   &
-                     45.  < zlon .AND. zlon < 100. ) THEN
-                     resto(ji,jj,1) = 0.
+                  IF ( zlat1 < zlat .AND. zlat < zlat2 .AND. 45. < zlon .AND. zlon < 100. ) THEN
+                     resto(ji,jj,1) = 0.e0
                   ENDIF
                END DO
@@ -414,6 +359,6 @@
          ENDIF
 
-         zsdmp = 1./(sdmp * rday)
-         zbdmp = 1./(bdmp * rday)
+         zsdmp = 1./(rn_surf * rday)
+         zbdmp = 1./(rn_bot  * rday)
          DO jk = 2, jpkm1
             DO jj = 1, jpj
@@ -423,5 +368,5 @@
                   resto(ji,jj,jk) = resto(ji,jj,1) * 0.5 * ( 1. - COS( rpi*zdct(ji,jj,jk)/zinfl) )
                   !   ... Vertical variation from zsdmp (sea surface) to zbdmp (bottom)
-                  resto(ji,jj,jk) = resto(ji,jj,jk)      * ( zbdmp + (zsdmp-zbdmp)*EXP(-fsdept(ji,jj,jk)/hdmp) )
+                  resto(ji,jj,jk) = resto(ji,jj,jk)      * ( zbdmp + (zsdmp-zbdmp)*EXP(-fsdept(ji,jj,jk)/rn_dep) )
                END DO
             END DO
@@ -431,5 +376,5 @@
 
 
-      IF( cp_cfg == "orca" .AND. ( ndmp > 0 .OR. ndmp == -1 ) ) THEN
+      IF( cp_cfg == "orca" .AND. ( nn_hdmp > 0 .OR. nn_hdmp == -1 ) ) THEN
 
          !                                         ! =========================
@@ -520,8 +465,8 @@
                zmrs( ji , mj0(ij0):mj1(ij1) ) = 0.1 * ABS( FLOAT(ji - mi1(ii1)) )
             END DO 
-            zsdmp = 1./(sdmp * rday)
-            zbdmp = 1./(bdmp * rday)
+            zsdmp = 1./(rn_surf * rday)
+            zbdmp = 1./(rn_bot * rday)
             DO jk = 1, jpk
-               zhfac (jk) = ( zbdmp + (zsdmp-zbdmp) * EXP(-fsdept(1,1,jk)/hdmp) )
+               zhfac (jk) = ( zbdmp + (zsdmp-zbdmp) * EXP(-fsdept(1,1,jk)/rn_dep) )
             END DO
             !                                       ! ========================
@@ -540,19 +485,13 @@
          resto(:,:, 1 ) = 0.e0
          resto(:,:,jpk) = 0.e0
-
-      ELSE
-         !    ------------
-         !     No damping
-         !    ------------
-         CALL ctl_stop( 'Choose a correct value of ndmp or DO NOT defined key_tradmp' )
+         !                         !--------------------!
+      ELSE                         !     No damping     !
+         !                         !--------------------!
+         CALL ctl_stop( 'Choose a correct value of nn_hdmp or DO NOT defined key_tradmp' )
       ENDIF
 
-      !    ----------------------------
-      !     Create Print damping array
-      !    ----------------------------
-
-      ! ndmpf   : = 1 create a damping.coeff NetCDF file
-
-      IF( ndmpf == 1 ) THEN
+      !                            !--------------------------------!
+      IF( nn_file == 1 ) THEN      !  save damping coef. in a file  !
+         !                         !--------------------------------!
          IF(lwp) WRITE(numout,*) '              create damping.coeff.nc file'
          CALL iom_open  ( 'damping.coeff', inum0, ldwrt = .TRUE., kiolib = jprstlib )
Index: trunk/NEMO/OPA_SRC/TRA/traldf.F90
===================================================================
--- trunk/NEMO/OPA_SRC/TRA/traldf.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/TRA/traldf.F90	(revision 1601)
@@ -113,5 +113,5 @@
       !! ** Purpose :   Choice of the operator for the lateral tracer diffusion
       !!
-      !! ** Method  :   set nldf from the nam_traldf logicals
+      !! ** Method  :   set nldf from the namtra_ldf logicals
       !!      nldf == -1   ESOPA test: ALL operators are used
       !!      nldf ==  0   laplacian operator
@@ -122,7 +122,7 @@
       INTEGER ::   ioptio, ierr         ! temporary integers 
 !      
-!     NAMELIST/nam_traldf/ ln_traldf_lap  , ln_traldf_bilap,                &
-!        &                 ln_traldf_level, ln_traldf_hor, ln_traldf_iso,   &
-!        &                 aht0, ahtb0, aeiv0
+!     NAMELIST/namtra_ldf/ ln_traldf_lap  , ln_traldf_bilap,                  &
+!        &                 ln_traldf_level, ln_traldf_hor  , ln_traldf_iso,   &
+!        &                 rn_aht_0       , rn_ahtb_0      , rn_aeiv_0
       !!----------------------------------------------------------------------
 
@@ -130,8 +130,6 @@
       ! ===============================================
     
-      ! Namelist nam_traldf already read in ldftra module
-!     ! Read Namelist nam_traldf : Lateral physics on tracers
-!     REWIND( numnam )
-!     READ  ( numnam, nam_traldf )
+!     REWIND( numnam )                ! Namelist namtra_ldf already read in ldftra module
+!     READ  ( numnam, namtra_ldf )    
 
       IF(lwp) THEN                    ! Namelist print
@@ -139,10 +137,10 @@
          WRITE(numout,*) 'tra:ldf_ctl : lateral tracer diffusive operator'
          WRITE(numout,*) '~~~~~~~~~~~'
-         WRITE(numout,*) '       Namelist nam_traldf : set lateral mixing parameters (type, direction, coefficients)'
-         WRITE(numout,*) '          laplacian operator          ln_traldf_lap   = ', ln_traldf_lap
-         WRITE(numout,*) '          bilaplacian operator        ln_traldf_bilap = ', ln_traldf_bilap
-         WRITE(numout,*) '          iso-level                   ln_traldf_level = ', ln_traldf_level
-         WRITE(numout,*) '          horizontal (geopotential)   ln_traldf_hor   = ', ln_traldf_hor
-         WRITE(numout,*) '          iso-neutral                 ln_traldf_iso   = ', ln_traldf_iso
+         WRITE(numout,*) '   Namelist namtra_ldf : set lateral mixing parameters (type, direction, coefficients)'
+         WRITE(numout,*) '      laplacian operator          ln_traldf_lap   = ', ln_traldf_lap
+         WRITE(numout,*) '      bilaplacian operator        ln_traldf_bilap = ', ln_traldf_bilap
+         WRITE(numout,*) '      iso-level                   ln_traldf_level = ', ln_traldf_level
+         WRITE(numout,*) '      horizontal (geopotential)   ln_traldf_hor   = ', ln_traldf_hor
+         WRITE(numout,*) '      iso-neutral                 ln_traldf_iso   = ', ln_traldf_iso
       ENDIF
 
Index: trunk/NEMO/OPA_SRC/TRA/tranxt.F90
===================================================================
--- trunk/NEMO/OPA_SRC/TRA/tranxt.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/TRA/tranxt.F90	(revision 1601)
@@ -26,5 +26,6 @@
    USE zdf_oce         ! ???
    USE domvvl          ! variable volume
-   USE dynspg_oce      ! surface pressure gradient variables
+   USE dynspg_oce      ! surface     pressure gradient variables
+   USE dynhpg          ! hydrostatic pressure gradient 
    USE trdmod_oce      ! ocean variables trends
    USE trdmod          ! ocean active tracers trends 
Index: trunk/NEMO/OPA_SRC/TRA/traqsr.F90
===================================================================
--- trunk/NEMO/OPA_SRC/TRA/traqsr.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/TRA/traqsr.F90	(revision 1601)
@@ -33,5 +33,5 @@
    PUBLIC   tra_qsr        ! routine called by step.F90 (ln_traqsr=T)
 
-   !                                           !!* Namelist namqsr: penetrative solar radiation
+   !                                           !!* Namelist namtra_qsr: penetrative solar radiation
    LOGICAL , PUBLIC ::   ln_traqsr  = .TRUE.    !: light absorption (qsr) flag
    LOGICAL , PUBLIC ::   ln_qsr_rgb = .FALSE.   !: Red-Green-Blue light absorption flag  
@@ -220,5 +220,5 @@
       !! ** Method  :   The profile of solar radiation within the ocean is set
       !!      from two length scale of penetration (rn_si0,rn_si1) and a ratio
-      !!      (rn_abs). These parameters are read in the namqsr namelist. The
+      !!      (rn_abs). These parameters are read in the namtra_qsr namelist. The
       !!      default values correspond to clear water (type I in Jerlov' 
       !!      (1968) classification.
@@ -240,6 +240,6 @@
       CHARACTER(len=100) ::   cn_dir   ! Root directory for location of ssr files
       TYPE(FLD_N)        ::   sn_chl   ! informations about the chlorofyl field to be read
-      NAMELIST/namqsr/  sn_chl, cn_dir, ln_traqsr, ln_qsr_rgb, ln_qsr_2bd, ln_qsr_bio,   &
-         &              nn_chldta, rn_abs, rn_si0, rn_si1, rn_si2
+      NAMELIST/namtra_qsr/  sn_chl, cn_dir, ln_traqsr, ln_qsr_rgb, ln_qsr_2bd, ln_qsr_bio,   &
+         &                  nn_chldta, rn_abs, rn_si0, rn_si1, rn_si2
       !!----------------------------------------------------------------------
 
@@ -250,6 +250,6 @@
       sn_chl = FLD_N( 'chlorophyll' ,    -1     ,  'CHLA'    ,  .true.     , .true.  ,   'yearly'  , ''       , ''         )
       !
-      REWIND( numnam )            ! Read Namelist namqsr : ratio and length of penetration
-      READ  ( numnam, namqsr )
+      REWIND( numnam )            ! Read Namelist namtra_qsr : ratio and length of penetration
+      READ  ( numnam, namtra_qsr )
       !
       IF(lwp) THEN                ! control print
@@ -257,21 +257,21 @@
          WRITE(numout,*) 'tra_qsr_init : penetration of the surface solar radiation'
          WRITE(numout,*) '~~~~~~~~~~~~'
-         WRITE(numout,*) '    Namelist namqsr : set the parameter of penetration'
-         WRITE(numout,*) '        Light penetration (T) or not (F)         ln_traqsr  = ', ln_traqsr
-         WRITE(numout,*) '        RGB (Red-Green-Blue) light penetration   ln_qsr_rgb = ', ln_qsr_rgb
-         WRITE(numout,*) '        2 band               light penetration   ln_qsr_2bd = ', ln_qsr_2bd
-         WRITE(numout,*) '        bio-model            light penetration   ln_qsr_bio = ', ln_qsr_bio
-         WRITE(numout,*) '        RGB : Chl data (=1) or cst value (=0)    nn_chldta  = ', nn_chldta
-         WRITE(numout,*) '        RGB & 2 bands: fraction of light (rn_si1)    rn_abs = ', rn_abs
-         WRITE(numout,*) '        RGB & 2 bands: shortess depth of extinction  rn_si0 = ', rn_si0
-         WRITE(numout,*) '        2 bands: longest depth of extinction         rn_si1 = ', rn_si1
-         WRITE(numout,*) '        3 bands: longest depth of extinction         rn_si2 = ', rn_si2
+         WRITE(numout,*) '   Namelist namtra_qsr : set the parameter of penetration'
+         WRITE(numout,*) '      Light penetration (T) or not (F)         ln_traqsr  = ', ln_traqsr
+         WRITE(numout,*) '      RGB (Red-Green-Blue) light penetration   ln_qsr_rgb = ', ln_qsr_rgb
+         WRITE(numout,*) '      2 band               light penetration   ln_qsr_2bd = ', ln_qsr_2bd
+         WRITE(numout,*) '      bio-model            light penetration   ln_qsr_bio = ', ln_qsr_bio
+         WRITE(numout,*) '      RGB : Chl data (=1) or cst value (=0)    nn_chldta  = ', nn_chldta
+         WRITE(numout,*) '      RGB & 2 bands: fraction of light (rn_si1)    rn_abs = ', rn_abs
+         WRITE(numout,*) '      RGB & 2 bands: shortess depth of extinction  rn_si0 = ', rn_si0
+         WRITE(numout,*) '      2 bands: longest depth of extinction         rn_si1 = ', rn_si1
+         WRITE(numout,*) '      3 bands: longest depth of extinction         rn_si2 = ', rn_si2
       ENDIF
 
       IF( ln_traqsr ) THEN     ! control consistency
          !                      
-         IF( .NOT. lk_qsr_bio  ) THEN 
+         IF( .NOT.lk_qsr_bio .AND. ln_qsr_bio )   THEN
+            CALL ctl_warn( 'No bio model : force ln_qsr_bio = FALSE ' )
             ln_qsr_bio = .FALSE.
-            CALL ctl_warn( 'No bio model ;  force bio-model light penetration ln_qsr_bio  = FALSE ' )
          ENDIF
          !
@@ -286,5 +286,5 @@
             ln_qsr_2bd = .FALSE.
             ln_qsr_bio = .FALSE.
-            CALL ctl_warn( '          Choose ONE type of light penetration in namelist namqsr',   &
+            CALL ctl_warn( '          Choose ONE type of light penetration in namelist namtra_qsr',   &
            &               ' otherwise, we force the model to run with RGB light penetration' )
          ENDIF
@@ -335,5 +335,5 @@
                !                                        ! fill sf_chl with sn_chl and control print
                CALL fld_fill( sf_chl, (/ sn_chl /), cn_dir, 'tra_qsr_init',   &
-                  &                                         'Solar penetration function of read chlorophyll', 'namqsr' )
+                  &                                         'Solar penetration function of read chlorophyll', 'namtra_qsr' )
                !
             ELSE                                !* constant Chl : compute once for all the distribution of light (etot3)
Index: trunk/NEMO/OPA_SRC/TRD/trdicp.F90
===================================================================
--- trunk/NEMO/OPA_SRC/TRD/trdicp.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/TRD/trdicp.F90	(revision 1601)
@@ -60,5 +60,5 @@
       !! 
       !! ** Purpose : verify the basin averaged properties of tracers and/or
-      !!              momentum equations at every time step frequency ntrd.
+      !!              momentum equations at every time step frequency nn_trd.
       !!----------------------------------------------------------------------
       REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) ::   ptrd2dx             ! Temperature or U trend 
@@ -186,5 +186,5 @@
       !! 
       !! ** Purpose : verify the basin averaged properties of tracers and/or
-      !!              momentum equations at every time step frequency ntrd.
+      !!              momentum equations at every time step frequency nn_trd.
       !!----------------------------------------------------------------------
       REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) ::   ptrd3dx            ! Temperature or U trend 
@@ -386,5 +386,5 @@
       ! -------------------
 
-      IF( MOD(kt,ntrd) == 0 .OR. kt == nit000 .OR. kt == nitend ) THEN
+      IF( MOD(kt,nn_trd) == 0 .OR. kt == nit000 .OR. kt == nitend ) THEN
 
          ! I.1 Conversion potential energy - kinetic energy
@@ -588,5 +588,5 @@
       ! -----------------
 
-      IF( MOD(kt,ntrd) == 0 .OR. kt == nit000 .OR. kt == nitend ) THEN
+      IF( MOD(kt,nn_trd) == 0 .OR. kt == nit000 .OR. kt == nitend ) THEN
 
          ! I.1 Sums over the global domain
Index: trunk/NEMO/OPA_SRC/TRD/trdicp_oce.F90
===================================================================
--- trunk/NEMO/OPA_SRC/TRD/trdicp_oce.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/TRD/trdicp_oce.F90	(revision 1601)
@@ -14,5 +14,4 @@
    PUBLIC
 
-   !! * Shared module variables
 #if  defined key_trdtra   &&   defined key_trddyn    ||   defined key_esopa
    LOGICAL, PARAMETER ::   lk_trdtra = .TRUE.    !: tracers  trend flag
@@ -29,41 +28,37 @@
 #endif
 
-   !! Tracers trends diagnostics parameters
-   !!---------------------------------------------------------------------
-   INTEGER, PARAMETER ::   &  !: => tracer trends indexes <=
-        jpicpt_xad =  1,   &  !: x- horizontal advection
-        jpicpt_yad =  2,   &  !: y- horizontal advection
-        jpicpt_zad =  3,   &  !: z- vertical   advection
-        jpicpt_ldf =  4,   &  !: lateral       diffusion
-        jpicpt_zdf =  5,   &  !: vertical diffusion (Kz)
-        jpicpt_bbc =  6,   &  !: Bottom Boundary Condition (geoth. flux) 
-        jpicpt_bbl =  7,   &  !: Bottom Boundary Layer (diffusive/convective)
-        jpicpt_npc =  8,   &  !: static instability mixing
-        jpicpt_dmp =  9,   &  !: damping
-        jpicpt_qsr = 10,   &  !: penetrative solar radiation
-        jpicpt_nsr = 11,   &  !: non solar radiation
-        jpicpt_zl1 = 12       !: first level vertical flux
+   !                                        !!! => tracer trends indexes <=
+   INTEGER, PARAMETER ::   jpicpt_xad =  1   !: x- horizontal advection
+   INTEGER, PARAMETER ::   jpicpt_yad =  2   !: y- horizontal advection
+   INTEGER, PARAMETER ::   jpicpt_zad =  3   !: z- vertical   advection
+   INTEGER, PARAMETER ::   jpicpt_ldf =  4   !: lateral       diffusion
+   INTEGER, PARAMETER ::   jpicpt_zdf =  5   !: vertical diffusion (Kz)
+   INTEGER, PARAMETER ::   jpicpt_bbc =  6   !: Bottom Boundary Condition (geoth. flux) 
+   INTEGER, PARAMETER ::   jpicpt_bbl =  7   !: Bottom Boundary Layer (diffusive/convective)
+   INTEGER, PARAMETER ::   jpicpt_npc =  8   !: static instability mixing
+   INTEGER, PARAMETER ::   jpicpt_dmp =  9   !: damping
+   INTEGER, PARAMETER ::   jpicpt_qsr = 10   !: penetrative solar radiation
+   INTEGER, PARAMETER ::   jpicpt_nsr = 11   !: non solar radiation
+   INTEGER, PARAMETER ::   jpicpt_zl1 = 12   !: first level vertical flux
 
-   INTEGER, PARAMETER ::   &  !: => Total tracer trends indexes <=
-        jptot_tra = 12        !: change it when adding/removing one indice above
+   !                                        !!! => Total tracer trends indexes <=
+   INTEGER, PARAMETER ::   jptot_tra  = 12   !: change it when adding/removing one indice above
    
-   !! Momentum trends diagnostics parameters
-   !!---------------------------------------------------------------------
-   INTEGER, PARAMETER ::   &  !: => dynamic trends indexes <=
-        jpicpd_hpg =  1,   &  !: hydrostatic pressure gradient 
-        jpicpd_keg =  2,   &  !: kinetic energy gradient
-        jpicpd_rvo =  3,   &  !: relative vorticity
-        jpicpd_pvo =  4,   &  !: planetary vorticity
-        jpicpd_ldf =  5,   &  !: lateral diffusion
-        jpicpd_had =  6,   &  !: horizontal advection
-        jpicpd_zad =  7,   &  !: vertical advection
-        jpicpd_zdf =  8,   &  !: vertical diffusion
-        jpicpd_spg =  9,   &  !: surface pressure gradient
-        jpicpd_dat = 10,   &  !: damping term
-        jpicpd_swf = 11,   &  !: surface wind forcing
-        jpicpd_bfr = 12       !: bottom friction 
+   !                                        !!! => dynamic trends indexes <=
+   INTEGER, PARAMETER ::   jpicpd_hpg =  1   !: hydrostatic pressure gradient 
+   INTEGER, PARAMETER ::   jpicpd_keg =  2   !: kinetic energy gradient
+   INTEGER, PARAMETER ::   jpicpd_rvo =  3   !: relative vorticity
+   INTEGER, PARAMETER ::   jpicpd_pvo =  4   !: planetary vorticity
+   INTEGER, PARAMETER ::   jpicpd_ldf =  5   !: lateral diffusion
+   INTEGER, PARAMETER ::   jpicpd_had =  6   !: horizontal advection
+   INTEGER, PARAMETER ::   jpicpd_zad =  7   !: vertical advection
+   INTEGER, PARAMETER ::   jpicpd_zdf =  8   !: vertical diffusion
+   INTEGER, PARAMETER ::   jpicpd_spg =  9   !: surface pressure gradient
+   INTEGER, PARAMETER ::   jpicpd_dat = 10   !: damping term
+   INTEGER, PARAMETER ::   jpicpd_swf = 11   !: surface wind forcing
+   INTEGER, PARAMETER ::   jpicpd_bfr = 12   !: bottom friction 
 
-   INTEGER, PARAMETER ::   &  !: => Total dynamic trends indexes <=
-        jptot_dyn = 12        !: change it when adding/removing one indice above
+   !                                        !!! => Total dynamic trends indexes <=
+   INTEGER, PARAMETER ::   jptot_dyn  = 12   !: change it when adding/removing one indice above
    
 #if   defined key_trdtra   ||   defined key_trddyn   ||   defined key_esopa
@@ -89,5 +84,5 @@
 #endif
    !!----------------------------------------------------------------------
-   !!  OPA 9.0 , LOCEAN-IPSL (2005) 
+   !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) 
    !! $Id$ 
    !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
Index: trunk/NEMO/OPA_SRC/TRD/trdmld.F90
===================================================================
--- trunk/NEMO/OPA_SRC/TRD/trdmld.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/TRD/trdmld.F90	(revision 1601)
@@ -75,8 +75,8 @@
       !!      The control surface can be either a mixed layer depth (time varying)
       !!      or a fixed surface (jk level or bowl). 
-      !!      Choose control surface with nctls in namelist NAMTRD :
-      !!        nctls = 0  : use mixed layer with density criterion 
-      !!        nctls = 1  : read index from file 'ctlsurf_idx'
-      !!        nctls > 1  : use fixed level surface jk = nctls
+      !!      Choose control surface with nn_ctls in namelist NAMTRD :
+      !!        nn_ctls = 0  : use mixed layer with density criterion 
+      !!        nn_ctls = 1  : read index from file 'ctlsurf_idx'
+      !!        nn_ctls > 1  : use fixed level surface jk = nn_ctls
       !!      Note: in the remainder of the routine, the volume between the 
       !!            surface and the control surface is called "mixed-layer"
@@ -100,11 +100,11 @@
          
          ! ... Set nmld(ji,jj) = index of first T point below control surf. or outside mixed-layer
-         IF( nctls == 0 ) THEN       ! * control surface = mixed-layer with density criterion 
+         IF( nn_ctls == 0 ) THEN       ! * control surface = mixed-layer with density criterion 
             nmld(:,:) = nmln(:,:)    ! array nmln computed in zdfmxl.F90
-         ELSE IF( nctls == 1 ) THEN  ! * control surface = read index from file 
+         ELSE IF( nn_ctls == 1 ) THEN  ! * control surface = read index from file 
             nmld(:,:) = nbol(:,:)
-         ELSE IF( nctls >= 2 ) THEN  ! * control surface = model level
-            nctls = MIN( nctls, jpktrd - 1 )
-            nmld(:,:) = nctls + 1
+         ELSE IF( nn_ctls >= 2 ) THEN  ! * control surface = model level
+            nn_ctls = MIN( nn_ctls, jpktrd - 1 )
+            nmld(:,:) = nn_ctls + 1
          ENDIF
 
@@ -193,5 +193,5 @@
       !!          1) to explain the difference between initial and final 
       !!             mixed-layer T & S (where initial and final relate to the
-      !!             current analysis window, defined by ntrd in the namelist)
+      !!             current analysis window, defined by nn_trd in the namelist)
       !!          2) to explain the difference between the current and previous 
       !!             TIME-AVERAGED mixed-layer T & S (where time-averaging is
@@ -199,9 +199,9 @@
       !!
       !! ** Consistency check : 
-      !!        If the control surface is fixed ( nctls > 1 ), the residual term (dh/dt
+      !!        If the control surface is fixed ( nn_ctls > 1 ), the residual term (dh/dt
       !!        entrainment) should be zero, at machine accuracy. Note that in the case
       !!        of time-averaged mixed-layer fields, this residual WILL NOT BE ZERO
       !!        over the first two analysis windows (except if restart).
-      !!        N.B. For ORCA2_LIM, use e.g. ntrd=5, ucf=1., nctls=8
+      !!        N.B. For ORCA2_LIM, use e.g. nn_trd=5, rn_ucf=1., nn_ctls=8
       !!             for checking residuals.
       !!             On a NEC-SX5 computer, this typically leads to:
@@ -351,5 +351,5 @@
       !
       !     o---[--o-----o-----o-----o--]-[--o-----o-----o-----o-----o--]---o-----o--> time steps
-      !                            ntrd                             2*ntrd       etc.
+      !                          nn_trd                           2*nn_trd       etc.
       !     1      2     3     4    =5 e.g.                          =10
       !
@@ -386,6 +386,6 @@
       ! N.B. It may be useful to check IOIPSL time averaging with :
       !      tmltrd (:,:,:) = 1. ; smltrd (:,:,:) = 1.
-      tmltrd(:,:,:) = tmltrd(:,:,:) * ucf   ! (actually needed for 1:jpltrd-1, but trdmld(:,:,jpltrd)
-      smltrd(:,:,:) = smltrd(:,:,:) * ucf   !  is no longer used, and is reset to 0. at next time step)
+      tmltrd(:,:,:) = tmltrd(:,:,:) * rn_ucf   ! (actually needed for 1:jpltrd-1, but trdmld(:,:,jpltrd)
+      smltrd(:,:,:) = smltrd(:,:,:) * rn_ucf   !  is no longer used, and is reset to 0. at next time step)
       
       ! define time axis
@@ -393,5 +393,5 @@
       itmod = kt - nit000 + 1
 
-      MODULO_NTRD : IF( MOD( itmod, ntrd ) == 0 ) THEN        ! nitend MUST be multiple of ntrd
+      MODULO_NTRD : IF( MOD( itmod, nn_trd ) == 0 ) THEN        ! nitend MUST be multiple of nn_trd
          !
          ztmltot (:,:) = 0.e0   ;   zsmltot (:,:) = 0.e0   ! reset arrays to zero
@@ -519,13 +519,13 @@
 
          !    ... temperature ...                         ... salinity ...
-         ztmltot (:,:)   = ztmltot(:,:)   * ucf/zfn  ; zsmltot (:,:)   = zsmltot(:,:)   * ucf/zfn
-         ztmlres (:,:)   = ztmlres(:,:)   * ucf/zfn  ; zsmlres (:,:)   = zsmlres(:,:)   * ucf/zfn
-         ztmlatf (:,:)   = ztmlatf(:,:)   * ucf/zfn  ; zsmlatf (:,:)   = zsmlatf(:,:)   * ucf/zfn
+         ztmltot (:,:)   = ztmltot(:,:)   * rn_ucf/zfn  ; zsmltot (:,:)   = zsmltot(:,:)   * rn_ucf/zfn
+         ztmlres (:,:)   = ztmlres(:,:)   * rn_ucf/zfn  ; zsmlres (:,:)   = zsmlres(:,:)   * rn_ucf/zfn
+         ztmlatf (:,:)   = ztmlatf(:,:)   * rn_ucf/zfn  ; zsmlatf (:,:)   = zsmlatf(:,:)   * rn_ucf/zfn
 
          tml_sum (:,:)   = tml_sum (:,:)  /  (2*zfn) ; sml_sum (:,:)   = sml_sum (:,:)  /  (2*zfn)
-         ztmltot2(:,:)   = ztmltot2(:,:)  * ucf/zfn2 ; zsmltot2(:,:)   = zsmltot2(:,:)  * ucf/zfn2
-         ztmltrd2(:,:,:) = ztmltrd2(:,:,:)* ucf/zfn2 ; zsmltrd2(:,:,:) = zsmltrd2(:,:,:)* ucf/zfn2
-         ztmlatf2(:,:)   = ztmlatf2(:,:)  * ucf/zfn2 ; zsmlatf2(:,:)   = zsmlatf2(:,:)  * ucf/zfn2
-         ztmlres2(:,:)   = ztmlres2(:,:)  * ucf/zfn2 ; zsmlres2(:,:)   = zsmlres2(:,:)  * ucf/zfn2
+         ztmltot2(:,:)   = ztmltot2(:,:)  * rn_ucf/zfn2 ; zsmltot2(:,:)   = zsmltot2(:,:)  * rn_ucf/zfn2
+         ztmltrd2(:,:,:) = ztmltrd2(:,:,:)* rn_ucf/zfn2 ; zsmltrd2(:,:,:) = zsmltrd2(:,:,:)* rn_ucf/zfn2
+         ztmlatf2(:,:)   = ztmlatf2(:,:)  * rn_ucf/zfn2 ; zsmlatf2(:,:)   = zsmlatf2(:,:)  * rn_ucf/zfn2
+         ztmlres2(:,:)   = ztmlres2(:,:)  * rn_ucf/zfn2 ; zsmlres2(:,:)   = zsmlres2(:,:)  * rn_ucf/zfn2
 
          rmld_sum(:,:)   = rmld_sum(:,:)  /  (2*zfn)  ! similar to tml_sum and sml_sum
@@ -578,10 +578,10 @@
 #if defined key_dimgout
 
-      IF( MOD( itmod, ntrd ) == 0 ) THEN
+      IF( MOD( itmod, nn_trd ) == 0 ) THEN
          iyear =  ndastp/10000
          imon  = (ndastp-iyear*10000)/100
          iday  =  ndastp - imon*100 - iyear*10000
          WRITE(clname,9000) TRIM(cexper),'MLDiags',iyear,imon,iday
-         WRITE(clmode,'(f5.1,a)') ntrd*rdt/86400.,' days average'
+         WRITE(clmode,'(f5.1,a)') nn_trd*rdt/86400.,' days average'
          cltext = TRIM(cexper)//' mld diags'//TRIM(clmode)
          CALL dia_wri_dimg (clname, cltext, smltrd, jpltrd, '2')
@@ -595,5 +595,5 @@
       ! ----------------------------------
 
-      IF( lwp .AND. MOD( itmod , ntrd ) == 0 ) THEN
+      IF( lwp .AND. MOD( itmod , nn_trd ) == 0 ) THEN
          WRITE(numout,*) ' '
          WRITE(numout,*) 'trd_mld : write trends in the NetCDF file :'
@@ -685,5 +685,5 @@
 #endif
 
-      IF( MOD( itmod, ntrd ) == 0 ) THEN
+      IF( MOD( itmod, nn_trd ) == 0 ) THEN
          !
          ! III.5 Reset cumulative arrays to zero
@@ -744,9 +744,9 @@
       ! -------------------------------------------------
 
-      IF( ( lk_trdmld ) .AND. ( MOD( nitend, ntrd ) /= 0 ) ) THEN
+      IF( ( lk_trdmld ) .AND. ( MOD( nitend, nn_trd ) /= 0 ) ) THEN
          WRITE(numout,cform_err)
          WRITE(numout,*) '                Your nitend parameter, nitend = ', nitend
          WRITE(numout,*) '                is no multiple of the trends diagnostics frequency        '
-         WRITE(numout,*) '                          you defined, ntrd   = ', ntrd
+         WRITE(numout,*) '                          you defined, nn_trd   = ', nn_trd
          WRITE(numout,*) '                This will not allow you to restart from this simulation.  '
          WRITE(numout,*) '                You should reconsider this choice.                        ' 
@@ -797,5 +797,5 @@
       ! ----------------------------------------------
  
-      IF( nctls == 1 ) THEN
+      IF( nn_ctls == 1 ) THEN
          CALL ctl_opn( numbol, 'ctlsurf_idx', 'OLD', 'UNFORMATTED', 'SEQUENTIAL', -1, numout, lwp )
          READ ( numbol ) nbol
@@ -811,10 +811,10 @@
 #else
       ! clmxl = legend root for netCDF output
-      IF( nctls == 0 ) THEN      ! control surface = mixed-layer with density criterion
+      IF( nn_ctls == 0 ) THEN      ! control surface = mixed-layer with density criterion
          clmxl = 'Mixed Layer '  !                   (array nmln computed in zdfmxl.F90)
-      ELSE IF( nctls == 1 ) THEN ! control surface = read index from file 
+      ELSE IF( nn_ctls == 1 ) THEN ! control surface = read index from file 
          clmxl = '      Bowl '
-      ELSE IF( nctls >= 2 ) THEN ! control surface = model level
-         WRITE(clmxl,'(A10,I2,1X)') 'Levels 1 -', nctls
+      ELSE IF( nn_ctls >= 2 ) THEN ! control surface = model level
+         WRITE(clmxl,'(A10,I2,1X)') 'Levels 1 -', nn_ctls
       END IF
 
@@ -828,5 +828,5 @@
          CALL ctl_stop( 'trd_mld : this was never checked. Comment this line to proceed...' )
       END IF
-      zsto = ntrd * rdt
+      zsto = nn_trd * rdt
       clop = "inst("//TRIM(clop)//")"
 #  else
@@ -834,9 +834,9 @@
          zsto = rdt                 ! inst. diags : we use IOIPSL time averaging
       ELSE
-         zsto = ntrd * rdt          ! mean  diags : we DO NOT use any IOIPSL time averaging
+         zsto = nn_trd * rdt          ! mean  diags : we DO NOT use any IOIPSL time averaging
       END IF
       clop = "ave("//TRIM(clop)//")"
 #  endif
-      zout = ntrd * rdt
+      zout = nn_trd * rdt
 
       IF(lwp) WRITE (numout,*) '                netCDF initialization'
@@ -870,5 +870,5 @@
                                                                   
       !-- Create a NetCDF file and enter the define mode 
-      CALL dia_nam( clhstnam, ntrd, 'trends' )
+      CALL dia_nam( clhstnam, nn_trd, 'trends' )
       IF(lwp) WRITE(numout,*) ' Name of NETCDF file ', clhstnam
       CALL histbeg( clhstnam, jpi, glamt, jpj, gphit,                                            &
@@ -880,11 +880,9 @@
 
       !-- Define physical units
-      IF( ucf == 1. ) THEN
-         cltu = "degC/s"     ;   clsu = "p.s.u./s"
-      ELSEIF ( ucf == 3600.*24.) THEN
-         cltu = "degC/day"   ;   clsu = "p.s.u./day"
-      ELSE
-         cltu = "unknown?"   ;   clsu = "unknown?"
-      END IF
+      IF     ( rn_ucf == 1.       ) THEN   ;   cltu = "degC/s"     ;   clsu = "p.s.u./s"
+      ELSEIF ( rn_ucf == 3600.*24.) THEN   ;   cltu = "degC/day"   ;   clsu = "p.s.u./day"
+      ELSE                                 ;   cltu = "unknown?"   ;   clsu = "unknown?"
+      END IF
+
 
       !-- Define miscellaneous T and S mixed-layer variables 
Index: trunk/NEMO/OPA_SRC/TRD/trdmod.F90
===================================================================
--- trunk/NEMO/OPA_SRC/TRD/trdmod.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/TRD/trdmod.F90	(revision 1601)
@@ -80,5 +80,5 @@
       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 
-      IF( ( mod(kt,ntrd) == 0 .OR. kt == nit000 .OR. kt == nitend) )   THEN
+      IF( ( mod(kt,nn_trd) == 0 .OR. kt == nit000 .OR. kt == nitend) )   THEN
          !
          IF( lk_trdtra .AND. ctype == 'TRA' )   THEN       ! active tracer trends
@@ -281,5 +281,5 @@
       USE in_out_manager          ! I/O manager
 
-      NAMELIST/namtrd/ ntrd, nctls, cn_trdrst_in, cn_trdrst_out, ln_trdmld_restart, ucf, ln_trdmld_instant
+      NAMELIST/namtrd/ nn_trd, nn_ctls, cn_trdrst_in, cn_trdrst_out, ln_trdmld_restart, rn_ucf, ln_trdmld_instant
       !!----------------------------------------------------------------------
 
@@ -292,10 +292,10 @@
             WRITE(numout,*) ' trd_mod_init : Momentum/Tracers trends'
             WRITE(numout,*) ' ~~~~~~~~~~~~~'
-            WRITE(numout,*) '       Namelist namtrd : set trends parameters'
-            WRITE(numout,*) '           * frequency of trends diagnostics   ntrd               = ', ntrd
-            WRITE(numout,*) '           * control surface type              nctls              = ', nctls
-            WRITE(numout,*) '           * restart for ML diagnostics        ln_trdmld_restart  = ', ln_trdmld_restart
-            WRITE(numout,*) '           * instantaneous or mean ML T/S      ln_trdmld_instant  = ', ln_trdmld_instant
-            WRITE(numout,*) '           * unit conversion factor            ucf                = ', ucf
+            WRITE(numout,*) '   Namelist namtrd : set trends parameters'
+            WRITE(numout,*) '      frequency of trends diagnostics   nn_trd             = ', nn_trd
+            WRITE(numout,*) '      control surface type              nn_ctls            = ', nn_ctls
+            WRITE(numout,*) '      restart for ML diagnostics        ln_trdmld_restart  = ', ln_trdmld_restart
+            WRITE(numout,*) '      instantaneous or mean ML T/S      ln_trdmld_instant  = ', ln_trdmld_instant
+            WRITE(numout,*) '      unit conversion factor            rn_ucf             = ', rn_ucf
         ENDIF
       ENDIF
Index: trunk/NEMO/OPA_SRC/TRD/trdmod_oce.F90
===================================================================
--- trunk/NEMO/OPA_SRC/TRD/trdmod_oce.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/TRD/trdmod_oce.F90	(revision 1601)
@@ -13,8 +13,8 @@
    PUBLIC
 
-   !!* Namelist namtrd:  diagnostics on dynamics/tracer trends
-   INTEGER , PUBLIC  ::   ntrd  = 10                      !: time step frequency dynamics and tracers trends
-   INTEGER , PUBLIC  ::   nctls =  0                      !: control surface type for trends vertical integration
-   REAL(wp), PUBLIC  ::   ucf   = 1.                      !: unit conversion factor (for netCDF trends outputs)
+   !                                                     !!* Namelist namtrd:  diagnostics on dynamics/tracer trends *
+   INTEGER , PUBLIC  ::   nn_trd  = 10                    !: time step frequency dynamics and tracers trends
+   INTEGER , PUBLIC  ::   nn_ctls =  0                    !: control surface type for trends vertical integration
+   REAL(wp), PUBLIC  ::   rn_ucf   = 1.                   !: unit conversion factor (for netCDF trends outputs)
                                                           !: =1. (=86400.) for degC/s (degC/day) and psu/s (psu/day)
    CHARACTER(len=32) ::   cn_trdrst_in  = "restart_mld"   !: suffix of ocean restart name (input)
@@ -23,5 +23,4 @@
    LOGICAL , PUBLIC  ::   ln_trdmld_restart = .FALSE.     !: flag to restart mixed-layer diagnostics
 
-   !!* Control parameters
 # if defined key_trdtra   ||   defined key_trdmld
    LOGICAL , PUBLIC ::   l_trdtra = .TRUE.              !: tracers  trend flag
@@ -35,5 +34,5 @@
 # endif
 
-   !!* Active tracers trends indexes
+   !                                                   !!! Active tracers trends indexes
    INTEGER, PUBLIC, PARAMETER ::   jptra_trd_xad =  1   !: x- horizontal advection
    INTEGER, PUBLIC, PARAMETER ::   jptra_trd_yad =  2   !: y- horizontal advection
@@ -49,5 +48,5 @@
    INTEGER, PUBLIC, PARAMETER ::   jptra_trd_atf = 12   !: Asselin correction
    
-   !!* Momentum trends indexes
+   !                                                   !!! Momentum trends indexes
    INTEGER, PUBLIC, PARAMETER ::   jpdyn_trd_hpg =  1   !: hydrostatic pressure gradient 
    INTEGER, PUBLIC, PARAMETER ::   jpdyn_trd_keg =  2   !: kinetic energy gradient
@@ -64,5 +63,5 @@
 
    !!----------------------------------------------------------------------
-   !!  OPA 9.0 , LOCEAN-IPSL (2006) 
+   !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) 
    !! $Id$ 
    !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
Index: trunk/NEMO/OPA_SRC/TRD/trdvor.F90
===================================================================
--- trunk/NEMO/OPA_SRC/TRD/trdvor.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/TRD/trdvor.F90	(revision 1601)
@@ -409,5 +409,5 @@
       itmod = kt - nit000 + 1
 
-      IF( MOD( it, ntrd ) == 0 ) THEN
+      IF( MOD( it, nn_trd ) == 0 ) THEN
 
          ! III.1 compute total trend
@@ -456,5 +456,5 @@
       IF( kt >=  nit000+1 ) THEN
 
-         IF( lwp .AND. MOD( itmod, ntrd ) == 0 ) THEN
+         IF( lwp .AND. MOD( itmod, nn_trd ) == 0 ) THEN
             WRITE(numout,*) ''
             WRITE(numout,*) 'trd_vor : write trends in the NetCDF file at kt = ', kt
@@ -483,5 +483,5 @@
       ENDIF
       !
-      IF( MOD( it, ntrd ) == 0 ) rotot(:,:)=0
+      IF( MOD( it, nn_trd ) == 0 ) rotot(:,:)=0
       !
       IF( kt == nitend )   CALL histclo( nidvor )
@@ -551,5 +551,5 @@
       clop = "ave("//TRIM(clop)//")"
 #endif
-      zout = ntrd*rdt
+      zout = nn_trd*rdt
 
       IF(lwp) WRITE(numout,*) '               netCDF initialization'
@@ -566,5 +566,5 @@
       ! II.3 Define the T grid trend file (nidvor)
       ! ---------------------------------
-      CALL dia_nam( clhstnam, ntrd, 'vort' )                  ! filename
+      CALL dia_nam( clhstnam, nn_trd, 'vort' )                  ! filename
       IF(lwp) WRITE(numout,*) ' Name of NETCDF file ', clhstnam
       CALL histbeg( clhstnam, jpi, glamf, jpj, gphif,1, jpi,   &  ! Horizontal grid : glamt and gphit
Index: trunk/NEMO/OPA_SRC/ZDF/zdf_oce.F90
===================================================================
--- trunk/NEMO/OPA_SRC/ZDF/zdf_oce.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/ZDF/zdf_oce.F90	(revision 1601)
@@ -18,5 +18,5 @@
 #endif
 
-   !                                           !!* namelist nam_zdf: vertical diffusion *
+   !                                           !!* namelist namzdf: vertical diffusion *
    REAL(wp), PUBLIC ::   rn_avm0   = 1.e-4_wp   !: vertical eddy viscosity (m2/s)
    REAL(wp), PUBLIC ::   rn_avt0   = 1.e-5_wp   !: vertical eddy diffusivity (m2/s)
Index: trunk/NEMO/OPA_SRC/ZDF/zdfbfr.F90
===================================================================
--- trunk/NEMO/OPA_SRC/ZDF/zdfbfr.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/ZDF/zdfbfr.F90	(revision 1601)
@@ -4,12 +4,12 @@
    !! Ocean physics: Bottom friction
    !!======================================================================
+   !! History :  8.0  ! 1997-06  (G. Madec, A.-M. Treguier)  Original code
+   !!   NEMO     1.0  ! 2002-06  (G. Madec)  F90: Free form and module
+   !!----------------------------------------------------------------------
 
    !!----------------------------------------------------------------------
-   !!   zdf_bfr      : update momentum Kz at the ocean bottom due to the
-   !!                  type of bottom friction chosen
-   !!   zdf_bfr_init : read in namelist and control the bottom friction
-   !!                  parameters.
+   !!   zdf_bfr      : update momentum Kz at the ocean bottom due to the type of bottom friction chosen
+   !!   zdf_bfr_init : read in namelist and control the bottom friction parameters.
    !!----------------------------------------------------------------------
-   !! * Modules used
    USE oce             ! ocean dynamics and tracers variables
    USE dom_oce         ! ocean space and time domain variables 
@@ -22,21 +22,18 @@
    PRIVATE
 
-   !! * Routine accessibility
-   PUBLIC zdf_bfr    ! called by step.F90
+   PUBLIC   zdf_bfr    ! called by step.F90
 
-   !! * Module variables
-   INTEGER ::             & !!! ** bottom friction namelist (nambfr) **
-      nbotfr = 0             ! = 0/1/2/3 type of bottom friction 
-   REAL(wp) ::            & !!! ** bottom friction namelist (nambfr) **
-      bfri1 = 4.0e-4_wp,  &  ! bottom drag coefficient (linear case) 
-      bfri2 = 1.0e-3_wp,  &  ! bottom drag coefficient (non linear case)
-      bfeb2 = 2.5e-3_wp      ! background bottom turbulent kinetic energy  (m2/s2)
+   !                                   !!* Namelist nambfr: bottom friction namelist *
+   INTEGER  ::   nn_bfr   = 0           ! = 0/1/2/3 type of bottom friction 
+   REAL(wp) ::   rn_bfri1 = 4.0e-4_wp   ! bottom drag coefficient (linear case) 
+   REAL(wp) ::   rn_bfri2 = 1.0e-3_wp   ! bottom drag coefficient (non linear case)
+   REAL(wp) ::   rn_bfeb2 = 2.5e-3_wp   ! background bottom turbulent kinetic energy  [m2/s2]
 
    !! * Substitutions
 #  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
-   !!   OPA 9.0 , LOCEAN-IPSL (2005) 
+   !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) 
    !! $Id$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
 
@@ -48,39 +45,27 @@
       !!                 
       !! ** Purpose :   Applied the bottom friction through a specification of 
-      !!      Kz at the ocean bottom.
+      !!              Kz at the ocean bottom.
       !!
       !! ** Method  :   Update the value of avmu and avmv at the ocean bottom 
       !!       level following the chosen friction type (no-slip, free-slip, 
       !!       linear, or quadratic)
+      !!----------------------------------------------------------------------
+      INTEGER, INTENT( in ) ::   kt   ! ocean time-step index
       !!
-      !! History :
-      !!   8.0  !  97-06  (G. Madec, A.-M. Treguier)  Original code
-      !!   8.5  !  02-06  (G. Madec)  F90: Free form and module
+      INTEGER  ::   ji, jj   ! dummy loop indexes
+      INTEGER  ::   ikbu, ikbv, ikbum1, ikbvm1   ! temporary integers
+      REAL(wp) ::   zvu, zuv, zecu, zecv         ! temporary scalars
       !!----------------------------------------------------------------------
-      !! * Arguments
-      INTEGER, INTENT( in ) ::   kt   ! ocean time-step index
-
-      !! * Local declarations
-      INTEGER ::   &
-         ji, jj,                   &  ! dummy loop indexes
-         ikbu, ikbv,               &  ! temporary integers
-         ikbum1, ikbvm1               !
-      REAL(wp) ::   &
-         zvu, zuv, zecu, zecv         ! temporary scalars
-      !!----------------------------------------------------------------------
-
 
       IF( kt == nit000 )   CALL zdf_bfr_init
 
-
-      ! Compute avmu, avmv at the ocean bottom
-      ! --------------------------------------
-
-      SELECT CASE (nbotfr)
-
-      CASE( 0 )                 ! no-slip boundary condition
+      !                               ! --------------------------------------
+      SELECT CASE (nn_bfr)            ! Compute avmu, avmv at the ocean bottom
+      !                               ! --------------------------------------
+      !
+      CASE( 0 )                            !==  no-slip boundary condition  ==!
 # if defined key_vectopt_loop
-         jj = 1
-         DO ji = jpi+2, jpij-jpi-1   ! vector opt. (forced unrolling)
+         DO jj = 1, 1
+            DO ji = jpi+2, jpij-jpi-1   ! vector opt. (forced unrolling)
 # else
          DO jj = 2, jpjm1
@@ -93,13 +78,11 @@
                avmu(ji,jj,ikbu) = 2. * avmu(ji,jj,ikbum1)
                avmv(ji,jj,ikbv) = 2. * avmv(ji,jj,ikbvm1)
-# if ! defined key_vectopt_loop
             END DO
-# endif
          END DO
 
-      CASE( 1 )                 ! linear botton friction
+      CASE( 1 )                            !==  linear botton friction  ==!
 # if defined key_vectopt_loop
-         jj = 1
-         DO ji = jpi+2, jpij-jpi-1   ! vector opt. (forced unrolling)
+         DO jj = 1, 1
+            DO ji = jpi+2, jpij-jpi-1   ! vector opt. (forced unrolling)
 # else
          DO jj = 2, jpjm1
@@ -108,16 +91,14 @@
                ikbu = MIN( mbathy(ji+1,jj), mbathy(ji,jj) )
                ikbv = MIN( mbathy(ji,jj+1), mbathy(ji,jj) )
-               avmu(ji,jj,ikbu) = bfri1 * fse3uw(ji,jj,ikbu)
-               avmv(ji,jj,ikbv) = bfri1 * fse3vw(ji,jj,ikbv)
-# if ! defined key_vectopt_loop
+               avmu(ji,jj,ikbu) = rn_bfri1 * fse3uw(ji,jj,ikbu)
+               avmv(ji,jj,ikbv) = rn_bfri1 * fse3vw(ji,jj,ikbv)
             END DO
-# endif
          END DO
 
-      CASE( 2 )                 ! quadratic botton friction
+      CASE( 2 )                            !==  quadratic botton friction  ==!
 # if defined key_vectopt_loop
-         jj = 1
+         DO jj = 1, 1
 !CDIR NOVERRCHK
-         DO ji = jpi+2, jpij-jpi-1   ! vector opt. (forced unrolling)
+            DO ji = jpi+2, jpij-jpi-1   ! vector opt. (forced unrolling)
 # else
 !CDIR NOVERRCHK
@@ -137,18 +118,16 @@
                               + un(ji,jj+1,ikbvm1) + un(ji-1,jj+1,ikbvm1)  )
                
-               zecu = SQRT(  un(ji,jj,ikbum1) * un(ji,jj,ikbum1) + zvu*zvu + bfeb2  )
-               zecv = SQRT(  vn(ji,jj,ikbvm1) * vn(ji,jj,ikbvm1) + zuv*zuv + bfeb2  )
+               zecu = SQRT(  un(ji,jj,ikbum1) * un(ji,jj,ikbum1) + zvu*zvu + rn_bfeb2  )
+               zecv = SQRT(  vn(ji,jj,ikbvm1) * vn(ji,jj,ikbvm1) + zuv*zuv + rn_bfeb2  )
                
-               avmu(ji,jj,ikbu) = bfri2 * zecu * fse3uw(ji,jj,ikbu)
-               avmv(ji,jj,ikbv) = bfri2 * zecv * fse3vw(ji,jj,ikbv)
-# if ! defined key_vectopt_loop
+               avmu(ji,jj,ikbu) = rn_bfri2 * zecu * fse3uw(ji,jj,ikbu)
+               avmv(ji,jj,ikbv) = rn_bfri2 * zecv * fse3vw(ji,jj,ikbv)
             END DO
-# endif
          END DO
 
-      CASE( 3 )                 ! free-slip boundary condition
+      CASE( 3 )                            !==  free-slip boundary condition  ==!
 # if defined key_vectopt_loop
-         jj = 1
-         DO ji = jpi+2, jpij-jpi-1   ! vector opt. (forced unrolling)
+         DO jj = 1, 1
+            DO ji = jpi+2, jpij-jpi-1   ! vector opt. (forced unrolling)
 # else
          DO jj = 2, jpjm1
@@ -159,21 +138,13 @@
                avmu(ji,jj,ikbu) = 0.e0
                avmv(ji,jj,ikbv) = 0.e0
-# if ! defined key_vectopt_loop
             END DO
-# endif
          END DO
+         !
+      END SELECT
+      CALL lbc_lnk( avmu, 'U', 1. )   ;    CALL lbc_lnk( avmv, 'V', 1. )   ! Lateral boundary condition   (unchanged sign)
 
-      END SELECT
-
-      ! Lateral boundary condition on (avmu,avmv)   (unchanged sign)
-      ! ------------------------------===========
-      CALL lbc_lnk( avmu, 'U', 1. )
-      CALL lbc_lnk( avmv, 'V', 1. )
-
-      IF(ln_ctl)  THEN
-         CALL prt_ctl(tab3d_1=avmu, clinfo1=' bfr  - u: ', mask1=umask, &
-            &         tab3d_2=avmv, clinfo2=       ' v: ', mask2=vmask,ovlap=1, kdim=jpk)
-      ENDIF
-
+      IF(ln_ctl)   CALL prt_ctl( tab3d_1=avmu, clinfo1=' bfr  - u: ', mask1=umask,             &
+         &                       tab3d_2=avmv, clinfo2=       ' v: ', mask2=vmask,ovlap=1, kdim=jpk )
+      !
    END SUBROUTINE zdf_bfr
 
@@ -186,49 +157,39 @@
       !!
       !! ** Method  :   Read the nammbf namelist and check their consistency
-      !!      called at the first timestep (nit000)
-      !!
-      !! History :
-      !!   9.0  !  02-06  (G. Madec)  Original code
       !!----------------------------------------------------------------------
-      !! * Local declarations
-      NAMELIST/nambfr/ nbotfr, bfri1, bfri2, bfeb2
+      NAMELIST/nambfr/ nn_bfr, rn_bfri1, rn_bfri2, rn_bfeb2
       !!----------------------------------------------------------------------
 
-      ! Read Namelist nambfr : bottom momentum boundary condition
-      ! --------------------
-      REWIND ( numnam )
-      READ   ( numnam, nambfr )
+      REWIND( numnam )              ! Read Namelist nambfr : bottom momentum boundary condition
+      READ  ( numnam, nambfr )
 
-
-      ! Parameter control and print
-      ! ---------------------------
-      IF(lwp) WRITE(numout,*)
+      IF(lwp) WRITE(numout,*)       ! Parameter print
       IF(lwp) WRITE(numout,*) 'zdf_bfr : momentum bottom friction'
       IF(lwp) WRITE(numout,*) '~~~~~~~'
-      IF(lwp) WRITE(numout,*) '          Namelist nambfr : set bottom friction parameters'
+      IF(lwp) WRITE(numout,*) '   Namelist nambfr : set bottom friction parameters'
 
-      SELECT CASE (nbotfr)
-
+      SELECT CASE (nn_bfr)          ! Parameter control
+      !
       CASE( 0 )
-         IF(lwp) WRITE(numout,*) '            no-slip '
-
+         IF(lwp) WRITE(numout,*) '      no-slip '
+         !
       CASE( 1 )
-         IF(lwp) WRITE(numout,*) '            linear botton friction'
-         IF(lwp) WRITE(numout,*) '            friction coef.   bfri1  = ', bfri1
-
+         IF(lwp) WRITE(numout,*) '      linear botton friction      nn_bfr    = ', nn_bfr
+         IF(lwp) WRITE(numout,*) '      friction coef.              rn_bfri1  = ', rn_bfri1
+         !
       CASE( 2 )
-         IF(lwp) WRITE(numout,*) '            quadratic botton friction'
-         IF(lwp) WRITE(numout,*) '            friction coef.   bfri2  = ', bfri2
-         IF(lwp) WRITE(numout,*) '            background tke   bfeb2  = ', bfeb2
-
+         IF(lwp) WRITE(numout,*) '      quadratic botton friction   nn_bfr    = ', nn_bfr
+         IF(lwp) WRITE(numout,*) '      friction coef.              rn_bfri2  = ', rn_bfri2
+         IF(lwp) WRITE(numout,*) '      background KE               rn_bfeb2  = ', rn_bfeb2
+         !
       CASE( 3 )
-         IF(lwp) WRITE(numout,*) '            free-slip '
-
+         IF(lwp) WRITE(numout,*) '      free-slip '
+         !
       CASE DEFAULT
-         WRITE(ctmp1,*) '         bad flag value for nbotfr = ', nbotfr
+         WRITE(ctmp1,*) 'bad flag value for nn_bfr = ', nn_bfr
          CALL ctl_stop( ctmp1 )
-
+         !
       END SELECT
-
+      !
    END SUBROUTINE zdf_bfr_init
 
Index: trunk/NEMO/OPA_SRC/ZDF/zdfddm.F90
===================================================================
--- trunk/NEMO/OPA_SRC/ZDF/zdfddm.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/ZDF/zdfddm.F90	(revision 1601)
@@ -4,4 +4,7 @@
    !! Ocean physics : double diffusion mixing parameterization
    !!======================================================================
+   !! History :  OPA  ! 2000-08  (G. Madec)  double diffusive mixing
+   !!   NEMO     1.0  ! 2002-06  (G. Madec)  F90: Free form and module
+   !!----------------------------------------------------------------------
 #if defined key_zdfddm   ||   defined key_esopa
    !!----------------------------------------------------------------------
@@ -28,5 +31,5 @@
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   rrau   !: heat/salt buoyancy flux ratio
 
-   !                                  !!* Namelist nam_ddm : double diffusive mixing *
+   !                                  !!* Namelist namzdf_ddm : double diffusive mixing *
    REAL(wp) ::   rn_avts  = 1.e-4_wp   ! maximum value of avs for salt fingering
    REAL(wp) ::   rn_hsbfr = 1.6_wp     ! heat/salt buoyancy flux ratio
@@ -47,5 +50,5 @@
       !!                    
       !! ** Purpose :   Add to the vertical eddy diffusivity coefficient the 
-      !!      effect of salt fingering and diffusive convection. 
+      !!              effect of salt fingering and diffusive convection. 
       !!
       !! ** Method  :   Diapycnal mixing is increased in case of double
@@ -70,33 +73,19 @@
       !!      avmu, avmv are required to remain at least above avt and avs.
       !!      
-      !! ** Action  :   avt, avs : update vertical eddy diffusivity coef.
-      !!                           for temperature and salinity
-      !!
-      !! References :
-      !!      Merryfield et al., JPO, 29, 1124-1142, 1999.
-      !! History :
-      !!        !  00-08  (G. Madec)  double diffusive mixing
-      !!   8.5  !  02-06  (G. Madec)  F90: Free form and module
-      !!----------------------------------------------------------------------
-      !! * Arguments
-      INTEGER, INTENT( in ) ::   kt         ! ocean time-step indexocean time step
-
-      !! * Local declarations
-      INTEGER ::   ji, jj , jk              ! dummy loop indices
-      REAL(wp), DIMENSION(jpi,jpj) ::   &
-         zmsks, zmskf,                    & ! temporary workspace 
-         zmskd1, zmskd2, zmskd3             !    "           "
-      REAL(wp) ::   &
-         zinr, zrr,                       & ! temporary scalars
-         zavft, zavfs,                    & !    "         "
-         zavdt, zavds                       !    "         "
-      !!----------------------------------------------------------------------
-
+      !! ** Action  :   avt, avs : updated vertical eddy diffusivity coef. for T & S
+      !!
+      !! References :   Merryfield et al., JPO, 29, 1124-1142, 1999.
+      !!----------------------------------------------------------------------
+      INTEGER, INTENT(in) ::   kt   ! ocean time-step indexocean time step
+      !!
+      INTEGER  ::   ji, jj , jk     ! dummy loop indices
+      REAL(wp) ::   zinr, zrr       ! temporary scalars
+      REAL(wp) ::   zavft, zavfs    !    -         -
+      REAL(wp) ::   zavdt, zavds    !    -         -
+      REAL(wp), DIMENSION(jpi,jpj) ::   zmsks, zmskf, zmskd1, zmskd2, zmskd3   ! 2D workspace 
+      !!----------------------------------------------------------------------
 
       IF ( kt == nit000 )   CALL zdf_ddm_init          ! Initialization (first time-step only)
 
-
-      ! Compute avs
-      ! -----------
       !                                                ! ===============
       DO jk = 2, jpkm1                                 ! Horizontal slab
@@ -104,9 +93,7 @@
          ! Define the mask 
          ! ---------------
-         ! only retains positive value of rrau
-         rrau(:,:,jk) = MAX( 1.e-20, rrau(:,:,jk) )
-
-         ! indicators:
-         DO jj = 1, jpj
+         rrau(:,:,jk) = MAX( 1.e-20, rrau(:,:,jk) )         ! only retains positive value of rrau
+
+         DO jj = 1, jpj                                     ! indicators:
             DO ji = 1, jpi
                ! stability indicator: msks=1 if rn2>0; 0 elsewhere
@@ -158,12 +145,10 @@
                zrr = rrau(ji,jj,jk)/rn_hsbfr
                zrr = zrr * zrr
-               zavfs = rn_avts / ( 1 + zrr*zrr*zrr ) * zmsks(ji,jj) *zmskf(ji,jj)
+               zavfs = rn_avts / ( 1 + zrr*zrr*zrr ) * zmsks(ji,jj) * zmskf(ji,jj)
                zavft = 0.7 * zavfs * zinr
                ! diffusive layering
-               zavdt = 1.3635e-6 * EXP(4.6*EXP(-0.54*(zinr-1.) ) )   &
-                                 * zmsks(ji,jj) * zmskd1(ji,jj)
-               zavds = zavdt * zmsks(ji,jj)   &
-                     * ( (1.85 * rrau(ji,jj,jk) - 0.85 ) * zmskd3(ji,jj)   &
-                       +  0.15 * rrau(ji,jj,jk)          * zmskd2(ji,jj)  )
+               zavdt = 1.3635e-6 * EXP(  4.6 * EXP( -0.54*(zinr-1.) )  ) * zmsks(ji,jj) * zmskd1(ji,jj)
+               zavds = zavdt * zmsks(ji,jj) * (  (1.85 * rrau(ji,jj,jk) - 0.85 ) * zmskd3(ji,jj)   &
+                  &                            +  0.15 * rrau(ji,jj,jk)          * zmskd2(ji,jj)  )
                ! add to the eddy viscosity coef. previously computed
                avs (ji,jj,jk) = avt(ji,jj,jk) + zavfs + zavds
@@ -180,11 +165,9 @@
             DO ji = 1, fs_jpim1   ! vector opt.
                avmu(ji,jj,jk) = MAX( avmu(ji,jj,jk),    &
-                                     avt(ji,jj,jk), avt(ji+1,jj,jk),   &
-                                     avs(ji,jj,jk), avs(ji+1,jj,jk) )   &
-                              * umask(ji,jj,jk)
+                  &                  avt(ji,jj,jk), avt(ji+1,jj,jk),   &
+                  &                  avs(ji,jj,jk), avs(ji+1,jj,jk) )  * umask(ji,jj,jk)
                avmv(ji,jj,jk) = MAX( avmv(ji,jj,jk),    &
-                                     avt(ji,jj,jk), avt(ji,jj+1,jk),   &
-                                     avs(ji,jj,jk), avs(ji,jj+1,jk) )   &
-                              * vmask(ji,jj,jk)
+                  &                  avt(ji,jj,jk), avt(ji,jj+1,jk),   &
+                  &                  avs(ji,jj,jk), avs(ji,jj+1,jk) )  * vmask(ji,jj,jk)
             END DO
          END DO
@@ -192,8 +175,6 @@
       END DO                                              !   End of slab
       !                                                   ! ===============
-      
-      ! Lateral boundary conditions on ( avt, avs, avmu, avmv )   (unchanged sign)
-      ! -------------------------------========================
-      CALL lbc_lnk( avt , 'W', 1. )
+      !
+      CALL lbc_lnk( avt , 'W', 1. )        ! Lateral boundary conditions   (unchanged sign)
       CALL lbc_lnk( avs , 'W', 1. )
       CALL lbc_lnk( avm , 'W', 1. )
@@ -206,5 +187,5 @@
             &         tab3d_2=avmv, clinfo2=       ' v: ', mask2=vmask, ovlap=1, kdim=jpk)
       ENDIF
-      
+      !
    END SUBROUTINE zdf_ddm
    
@@ -216,14 +197,12 @@
       !! ** Purpose :   Initialization of double diffusion mixing scheme
       !!
-      !! ** Method  :   Read the nam_ddm namelist and check the parameter values
+      !! ** Method  :   Read the namzdf_ddm namelist and check the parameter values
       !!              called by zdf_ddm at the first timestep (nit000)
-      !!
-      !! History :  8.5  !  02-08  (G. Madec)  Original code
-      !!----------------------------------------------------------------------
-      NAMELIST/nam_ddm/ rn_avts, rn_hsbfr
-      !!----------------------------------------------------------------------
-      !
-      REWIND ( numnam )               ! Read Namelist nam_ddm : double diffusion mixing scheme
-      READ   ( numnam, nam_ddm )
+      !!----------------------------------------------------------------------
+      NAMELIST/namzdf_ddm/ rn_avts, rn_hsbfr
+      !!----------------------------------------------------------------------
+      !
+      REWIND ( numnam )               ! Read Namelist namzdf_ddm : double diffusion mixing scheme
+      READ   ( numnam, namzdf_ddm )
       !
       IF(lwp) THEN                    ! Parameter print
@@ -231,5 +210,5 @@
          WRITE(numout,*) 'zdf_ddm : double diffusive mixing'
          WRITE(numout,*) '~~~~~~~'
-         WRITE(numout,*) '   Namelist nam_ddm : set dd mixing parameter'
+         WRITE(numout,*) '   Namelist namzdf_ddm : set dd mixing parameter'
          WRITE(numout,*) '      maximum avs for dd mixing      rn_avts   = ', rn_avts
          WRITE(numout,*) '      heat/salt buoyancy flux ratio  rn_hsbfr  = ', rn_hsbfr
Index: trunk/NEMO/OPA_SRC/ZDF/zdfini.F90
===================================================================
--- trunk/NEMO/OPA_SRC/ZDF/zdfini.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/ZDF/zdfini.F90	(revision 1601)
@@ -54,10 +54,10 @@
       INTEGER ::   ioptio       ! temporary scalar
       !!
-      NAMELIST/nam_zdf/ rn_avm0, rn_avt0, nn_avb, nn_havtb, ln_zdfexp, nn_zdfexp,   &
+      NAMELIST/namzdf/ rn_avm0, rn_avt0, nn_avb, nn_havtb, ln_zdfexp, nn_zdfexp,   &
          &              ln_zdfevd, nn_evdm, rn_avevd, ln_zdfnpc, nn_npc, nn_npcp
       !!----------------------------------------------------------------------
 
-      REWIND( numnam )           !* Read nam_zdf namelist : vertical mixing parameters
-      READ  ( numnam, nam_zdf )
+      REWIND( numnam )           !* Read namzdf namelist : vertical mixing parameters
+      READ  ( numnam, namzdf )
 
       IF(lwp) THEN               !* Parameter print
@@ -65,5 +65,5 @@
          WRITE(numout,*) 'zdf_init: vertical physics'
          WRITE(numout,*) '~~~~~~~~'
-         WRITE(numout,*) '   Namelist nam_zdf : set vertical mixing mixing parameters'
+         WRITE(numout,*) '   Namelist namzdf : set vertical mixing mixing parameters'
          WRITE(numout,*) '      vertical eddy viscosity             rn_avm0   = ', rn_avm0
          WRITE(numout,*) '      vertical eddy diffusivity           rn_avt0   = ', rn_avt0
Index: trunk/NEMO/OPA_SRC/ZDF/zdfkpp.F90
===================================================================
--- trunk/NEMO/OPA_SRC/ZDF/zdfkpp.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/ZDF/zdfkpp.F90	(revision 1601)
@@ -38,11 +38,10 @@
    LOGICAL , PUBLIC, PARAMETER ::   lk_zdfkpp = .TRUE.    !: KPP vertical mixing flag
 
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   ghats   !: non-local scalar mixing term (gamma/<ws>o)
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   & 
-      wt0                   ,  &  !: surface temperature flux for non local flux
-      ws0                   ,  &  !: surface salinity flux for non local flux
-      hkpp                        !: boundary layer depht
-
-   !                                        !!* Namelist nam_zdfkpp *
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   ghats    !: non-local scalar mixing term (gamma/<ws>o)
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj)     ::   wt0      !: surface temperature flux for non local flux
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj)     ::   ws0      !: surface salinity flux for non local flux
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj)     ::   hkpp     !: boundary layer depht
+
+   !                                        !!* Namelist namzdf_kpp *
    REAL(wp) ::   rn_difmiw  =  1.2e-04_wp    ! constant internal wave viscosity (m2/s)
    REAL(wp) ::   rn_difsiw  =  1.2e-05_wp    ! constant internal wave diffusivity (m2/s)
@@ -59,6 +58,5 @@
       difsdc  = 1.5e-06_wp       ! maximum diffusive convection mixing
 #endif
-   LOGICAL  ::                 &
-      ln_kpprimix  = .TRUE.       ! Shear instability mixing 
+   LOGICAL  ::   ln_kpprimix  = .TRUE.       ! Shear instability mixing 
 
    REAL(wp) ::                 & !!! ** General constants  **
@@ -92,6 +90,5 @@
 
 #if ! defined key_kppcustom
-   REAL(wp), DIMENSION(jpk,jpk) ::   & 
-      del                         ! array for reference mean values of vertical integration 
+   REAL(wp), DIMENSION(jpk,jpk) ::   del   ! array for reference mean values of vertical integration 
 #endif
 
@@ -103,7 +100,6 @@
       njlktbm1 = njlktb - 1       !
 
-   REAL(wp), DIMENSION(nilktb,njlktb) ::  &
-      wmlktb                ,  &  ! lookup table for the turbulent vertical velocity scale for momentum
-      wslktb                       ! lookup table for the turbulent vertical velocity scale for tracers
+   REAL(wp), DIMENSION(nilktb,njlktb) ::   wmlktb   ! lookup table for the turbulent vertical velocity scale for momentum
+   REAL(wp), DIMENSION(nilktb,njlktb) ::   wslktb   ! lookup table for the turbulent vertical velocity scale for tracers
 
    REAL(wp) ::                 &
@@ -115,7 +111,6 @@
       deustar                     ! delta ustar in lookup table
 #endif
-   REAL(wp), DIMENSION(jpk) :: &  !!! attenuation coef  
-      ratt        
-   !! already defines in module traqsr, but only if the solar radiation penetration is considered
+   REAL(wp), DIMENSION(jpk) ::   ratt   ! attenuation coef  (already defines in module traqsr, 
+   !                                    ! but only if the solar radiation penetration is considered)
    REAL(wp) ::                 & !!! * penetrative solar radiation coefficient *
       rabs = 0.58_wp        ,  &  ! fraction associated with xsi1
@@ -135,10 +130,8 @@
       buof                  ,  &  ! buoyancy forcing
       mols                        ! moning-Obukhov length scale 
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   &
-      ekdp                        ! Ekman depth
-#endif
-
-   INTEGER  ::  &                 !
-      jip = 62 , jjp = 111
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   ekdp   ! Ekman depth
+#endif
+
+   INTEGER  ::   jip = 62 , jjp = 111
 
    !! * Substitutions
@@ -147,5 +140,5 @@
 #  include  "zdfddm_substitute.h90"
    !!----------------------------------------------------------------------
-   !!   OPA 9.0 , LOCEAN-IPSL   (2005)
+   !! NEMO/OPA 3.2 , LOCEAN-IPSL   (2009)
    !! $Id$
    !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
@@ -419,5 +412,5 @@
       DO jj = 2, jpjm1
          DO ji = fs_2, fs_jpim1     
-            IF( neos < 1) THEN   
+            IF( nn_eos < 1) THEN   
                zt     = tn(ji,jj,1)
                zs     = sn(ji,jj,1) - 35.0
@@ -454,6 +447,6 @@
             ELSE
                zrhos    = rhop(ji,jj,1) + rau0 * ( 1. - tmask(ji,jj,1) )
-               zthermal = ralpha / ( rcp * zrhos + epsln )
-               zhalin   = rbeta * sn(ji,jj,1) * rcs
+               zthermal = rn_alpha / ( rcp * zrhos + epsln )
+               zhalin   = rn_beta * sn(ji,jj,1) * rcs
             ENDIF
             ! Radiative surface buoyancy force
@@ -468,5 +461,5 @@
       ENDDO
 
-      zflageos = 0.5 + SIGN( 0.5, neos - 1. ) 
+      zflageos = 0.5 + SIGN( 0.5, nn_eos - 1. ) 
       !  Compute surface buoyancy forcing, Monin Obukhov and Ekman depths  
       !------------------------------------------------------------------    
@@ -597,5 +590,5 @@
                ! potential density of water(ztref,zsref at level jk):
                ! compute volumic mass pure water at atm pressure
-               IF ( neos < 1 ) THEN
+               IF ( nn_eos < 1 ) THEN
                   zr1= ( ( ( ( 6.536332e-9*zt-1.120083e-6 )*zt+1.001685e-4)*zt   &
                      &       -9.095290e-3 )*zt+6.793952e-2 )*zt+999.842594
@@ -1345,9 +1338,9 @@
          ll_kpplktb                ! Lookup table for turbul. velocity scales 
       !!
-      NAMELIST/nam_kpp/ ln_kpprimix, rn_difmiw, rn_difsiw, rn_riinfty, rn_difri, rn_bvsqcon, rn_difcon, nn_ave
+      NAMELIST/namzdf_kpp/ ln_kpprimix, rn_difmiw, rn_difsiw, rn_riinfty, rn_difri, rn_bvsqcon, rn_difcon, nn_ave
       !!----------------------------------------------------------------------
 
       REWIND ( numnam )               ! Read Namelist namkpp : K-Profile Parameterisation
-      READ   ( numnam, nam_kpp )
+      READ   ( numnam, namzdf_kpp )
 
       IF(lwp) THEN                    ! Control print
@@ -1355,5 +1348,5 @@
          WRITE(numout,*) 'zdf_kpp_init : K-Profile Parameterisation'
          WRITE(numout,*) '~~~~~~~~~~~~'
-         WRITE(numout,*) '   Namelist nam_kpp : set tke mixing parameters'
+         WRITE(numout,*) '   Namelist namzdf_kpp : set tke mixing parameters'
          WRITE(numout,*) '     Shear instability mixing                      ln_kpprimix = ', ln_kpprimix
          WRITE(numout,*) '     max. internal wave viscosity                  rn_difmiw   = ', rn_difmiw
Index: trunk/NEMO/OPA_SRC/ZDF/zdfric.F90
===================================================================
--- trunk/NEMO/OPA_SRC/ZDF/zdfric.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/ZDF/zdfric.F90	(revision 1601)
@@ -5,4 +5,10 @@
    !!                 Richardson number dependent formulation
    !!======================================================================
+   !! History :  OPA  ! 1987-09  (P. Andrich)  Original code
+   !!            4.0  ! 1991-11  (G. Madec)
+   !!            7.0  ! 1996-01  (G. Madec)  complet rewriting of multitasking suppression of common work arrays
+   !!            8.0  ! 1997-06 (G. Madec)  complete rewriting of zdfmix
+   !!   NEMO     1.0  ! 2002-06  (G. Madec)  F90: Free form and module
+   !!----------------------------------------------------------------------
 #if defined key_zdfric   ||   defined key_esopa
    !!----------------------------------------------------------------------
@@ -26,6 +32,6 @@
    LOGICAL, PUBLIC, PARAMETER ::   lk_zdfric = .TRUE.   !: Richardson vertical mixing flag
 
-   !                                    !!* Namelist nam_ric : Richardson number dependent Kz *
-   INTEGER  ::   nn_ric  = 2             ! coefficient of the parameterization
+   !                                    !!* Namelist namzdf_ric : Richardson number dependent Kz *
+   INTEGER  ::   nn_ric   = 2            ! coefficient of the parameterization
    REAL(wp) ::   rn_avmri = 100.e-4_wp   ! maximum value of the vertical eddy viscosity
    REAL(wp) ::   rn_alp   =   5._wp      ! coefficient of the parameterization
@@ -47,35 +53,25 @@
       !!                    
       !! ** Purpose :   Compute the before eddy viscosity and diffusivity as
-      !!      a function of the local richardson number.
+      !!              a function of the local richardson number.
       !!
       !! ** Method  :   Local richardson number dependent formulation of the 
-      !!      vertical eddy viscosity and diffusivity coefficients. the eddy
-      !!      coefficients are given by:
-      !!              avm = avm0 + avmb
-      !!              avt = avm0 / (1 + rn_alp*ri)
-      !!      with    ri  = N^2 / dz(u)**2
-      !!                  = e3w**2 * rn2/[ mi( dk(ub) )+mj( dk(vb) ) ]
-      !!              avm0= rn_avmri / (1 + rn_alp*ri)**nn_ric
-      !!      Where ri is the before local Richardson number, rn_avmri the maximum
-      !!      value reaches by the vertical eddy coefficients, avmb and avtb
-      !!      the background (or minimum) values of these coefficients for
-      !!      momemtum and tracers, and rn_alp, nn_ric are adjustable parameters.
-      !!      typical values used are : avm0=1.e-2 m2/s, avmb=1.e-6 m2/s
+      !!              vertical eddy viscosity and diffusivity coefficients. 
+      !!                The eddy coefficients are given by:
+      !!                    avm = avm0 + avmb
+      !!                    avt = avm0 / (1 + rn_alp*ri)
+      !!              with ri  = N^2 / dz(u)**2
+      !!                       = e3w**2 * rn2/[ mi( dk(ub) )+mj( dk(vb) ) ]
+      !!                   avm0= rn_avmri / (1 + rn_alp*ri)**nn_ric
+      !!      Where ri is the before local Richardson number,
+      !!            rn_avmri is the maximum value reaches by avm and avt 
+      !!            avmb and avtb are the background (or minimum) values
+      !!            and rn_alp, nn_ric are adjustable parameters.
+      !!      Typical values used are : avm0=1.e-2 m2/s, avmb=1.e-6 m2/s
       !!      avtb=1.e-7 m2/s, rn_alp=5. and nn_ric=2.
-      !!      this formulation needs ri>=0 : ri is set to zero if dz(rau)<0.
       !!      a numerical threshold is impose on the vertical shear (1.e-20)
       !!        N.B. the mask are required for implicit scheme, and surface
-      !!      and bottom value already set in inimix.F
-      !!
-      !! References :
-      !!      pacanowski & philander 1981, j. phys. oceanogr., 1441-1451.
-      !! History :
-      !!        !  87-09  (P. Andrich)  Original code
-      !!        !  91-11  (G. Madec)
-      !!        !  93-03  (M. Guyon)  symetrical conditions
-      !!        !  96-01  (G. Madec)  complet rewriting of multitasking
-      !!                                  suppression of common work arrays
-      !!        !  97-06 (G. Madec)  complete rewriting of zdfmix
-      !!   8.5  !  02-06  (G. Madec)  F90: Free form and module
+      !!      and bottom value already set in zdfini.F90
+      !!
+      !! References : Pacanowski & Philander 1981, JPO, 1441-1451.
       !!----------------------------------------------------------------------
       INTEGER, INTENT( in ) ::   kt         ! ocean time-step indexocean time step
@@ -93,28 +89,24 @@
          ! Richardson number (put in zwx(ji,jj))
          ! -----------------
-         ! minimum value set to zero
          DO jj = 2, jpjm1
             DO ji = 2, jpim1
                zcoef = 0.5 / fse3w(ji,jj,jk)
-               ! shear of horizontal velocity
+               !                                            ! shear of horizontal velocity
                zdku = zcoef * (  ub(ji-1,jj,jk-1) + ub(ji,jj,jk-1)   &
                   &             -ub(ji-1,jj,jk  ) - ub(ji,jj,jk  )  )
                zdkv = zcoef * (  vb(ji,jj-1,jk-1) + vb(ji,jj,jk-1)   &
                   &             -vb(ji,jj-1,jk  ) - vb(ji,jj,jk  )  )
-               ! richardson number (minimum value set to zero)
+               !                                            ! richardson number (minimum value set to zero)
                zri = rn2(ji,jj,jk) / ( zdku*zdku + zdkv*zdkv + 1.e-20 )
                zwx(ji,jj) = MAX( zri, 0.e0 )
             END DO
          END DO
-
-         ! Boundary condition on zwx   (sign unchanged)
-         CALL lbc_lnk( zwx, 'W', 1. )
+         CALL lbc_lnk( zwx, 'W', 1. )                       ! Boundary condition   (sign unchanged)
 
 
          ! Vertical eddy viscosity and diffusivity coefficients
          ! -------------------------------------------------------
-         ! Eddy viscosity coefficients
          z05alp = 0.5 * rn_alp
-         DO jj = 1, jpjm1
+         DO jj = 1, jpjm1                                   ! Eddy viscosity coefficients (avm)
             DO ji = 1, jpim1
                avmu(ji,jj,jk) = umask(ji,jj,jk)   &
@@ -124,7 +116,5 @@
             END DO
          END DO
-
-         ! Eddy diffusivity coefficients
-         DO jj = 2, jpjm1
+         DO jj = 2, jpjm1                                   ! Eddy diffusivity coefficients (avt)
             DO ji = 2, jpim1
                avt(ji,jj,jk) = tmric(ji,jj,jk) / ( 1. + rn_alp * zwx(ji,jj) )   &
@@ -132,10 +122,5 @@
                   &             + avmv(ji,jj,jk) + avmv( ji ,jj-1,jk)  )     &
                   &          + avtb(jk) * tmask(ji,jj,jk)
-            END DO
-         END DO
-
-         ! Add the background coefficient on eddy viscosity
-         DO jj = 2, jpjm1
-            DO ji = 2, jpim1
+               !                                            ! Add the background coefficient on eddy viscosity
                avmu(ji,jj,jk) = avmu(ji,jj,jk) + avmb(jk) * umask(ji,jj,jk)
                avmv(ji,jj,jk) = avmv(ji,jj,jk) + avmb(jk) * vmask(ji,jj,jk)
@@ -145,11 +130,8 @@
       END DO                                           !   End of slab
       !                                                ! ===============
-
-      ! Boundary conditions on (avt,avmu,avmv)   (unchanged sign)
-      ! -----------------------===============
-      CALL lbc_lnk( avt , 'W', 1. )
-      CALL lbc_lnk( avmu, 'U', 1. )
-      CALL lbc_lnk( avmv, 'V', 1. )
-
+      !
+      CALL lbc_lnk( avt , 'W', 1. )                         ! Boundary conditions   (unchanged sign)
+      CALL lbc_lnk( avmu, 'U', 1. )   ;   CALL lbc_lnk( avmv, 'V', 1. )
+      !
    END SUBROUTINE zdf_ric
 
@@ -162,50 +144,45 @@
       !!      viscosity coef. for the Richardson number dependent formulation.
       !!
-      !! ** Method  :   Read the namric namelist and check the parameter values
-      !!
-      !! ** input   :   Namelist namric
+      !! ** Method  :   Read the namzdf_ric namelist and check the parameter values
+      !!
+      !! ** input   :   Namelist namzdf_ric
       !!
       !! ** Action  :   increase by 1 the nstop flag is setting problem encounter
-      !!
-      !! history :
-      !!  8.5  !  02-06  (G. Madec)  original code
       !!----------------------------------------------------------------------
       INTEGER :: ji, jj, jk        ! dummy loop indices
       !!
-      NAMELIST/nam_ric/ rn_avmri, rn_alp, nn_ric
-      !!----------------------------------------------------------------------
-
-      REWIND ( numnam )               ! Read Namelist nam_ric : richardson number dependent Kz
-      READ   ( numnam, nam_ric )
-
-      IF(lwp) THEN                    ! Control print
+      NAMELIST/namzdf_ric/ rn_avmri, rn_alp, nn_ric
+      !!----------------------------------------------------------------------
+      !
+      REWIND( numnam )               ! Read Namelist namzdf_ric : richardson number dependent Kz
+      READ  ( numnam, namzdf_ric )
+      !
+      IF(lwp) THEN                   ! Control print
          WRITE(numout,*)
          WRITE(numout,*) 'zdf_ric : Ri depend vertical mixing scheme'
          WRITE(numout,*) '~~~~~~~'
-         WRITE(numout,*) '   Namelist namric : set Kz(Ri) parameters'
+         WRITE(numout,*) '   Namelist namzdf_ric : set Kz(Ri) parameters'
          WRITE(numout,*) '      maximum vertical viscosity     rn_avmri = ', rn_avmri
          WRITE(numout,*) '      coefficient                    rn_alp   = ', rn_alp
          WRITE(numout,*) '      coefficient                    nn_ric   = ', nn_ric
       ENDIF
-
-      ! weighting mean array tmric for 4 T-points which accounts for coastal boundary conditions.
-      DO jk = 1, jpk
-         DO jj = 2, jpj
+      !
+      DO jk = 1, jpk                 ! weighting mean array tmric for 4 T-points which accounts for coastal boundary conditions.
+         DO jj = 2, jpj              
             DO ji = 2, jpi
                tmric(ji,jj,jk) =  tmask(ji,jj,jk)                                  &
-                               / MAX( 1.,  umask(ji-1,jj  ,jk) + umask(ji,jj,jk)   &
-                                         + vmask(ji  ,jj-1,jk) + vmask(ji,jj,jk)  )
+                  &            / MAX( 1.,  umask(ji-1,jj  ,jk) + umask(ji,jj,jk)   &
+                  &                      + vmask(ji  ,jj-1,jk) + vmask(ji,jj,jk)  )
             END DO
          END DO
       END DO
       tmric(:,1,:) = 0.e0
-
-      ! Initialization of vertical eddy coef. to the background value
-      DO jk = 1, jpk
+      !
+      DO jk = 1, jpk                 ! Initialization of vertical eddy coef. to the background value
          avt (:,:,jk) = avtb(jk) * tmask(:,:,jk)
          avmu(:,:,jk) = avmb(jk) * umask(:,:,jk)
          avmv(:,:,jk) = avmb(jk) * vmask(:,:,jk)
       END DO
-
+      !
    END SUBROUTINE zdf_ric_init
 
Index: trunk/NEMO/OPA_SRC/ZDF/zdftke.F90
===================================================================
--- trunk/NEMO/OPA_SRC/ZDF/zdftke.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/ZDF/zdftke.F90	(revision 1601)
@@ -63,5 +63,5 @@
 #endif
 
-   !                                       !!! ** Namelist  nam_tke  **
+   !                                       !!! ** Namelist  namzdf_tke  **
    LOGICAL  ::   ln_mxl0  = .FALSE.         ! mixing length scale surface value as function of wind stress or not
    INTEGER  ::   nn_mxl   =  2              ! type of mixing length (=0/1/2/3)
@@ -616,8 +616,8 @@
       !!              viscosity when using a tke turbulent closure scheme
       !!
-      !! ** Method  :   Read the nam_tke namelist and check the parameters
+      !! ** Method  :   Read the namzdf_tke namelist and check the parameters
       !!              called at the first timestep (nit000)
       !!
-      !! ** input   :   Namlist nam_tke
+      !! ** input   :   Namlist namzdf_tke
       !!
       !! ** Action  :   Increase by 1 the nstop flag is setting problem encounter
@@ -625,12 +625,12 @@
       INTEGER ::   ji, jj, jk   ! dummy loop indices
       !!
-      NAMELIST/nam_tke/ rn_ediff, rn_ediss , rn_ebb, rn_emin,   &
-         &              rn_emin0, rn_bshear, nn_mxl, ln_mxl0,   &
-         &              rn_lmin , rn_lmin0 , nn_pdl, nn_etau,   &
-         &              nn_htau , rn_efr   , ln_lc , rn_lc 
-      !!----------------------------------------------------------------------
-
-      REWIND ( numnam )               !* Read Namelist nam_tke : Turbulente Kinetic Energy
-      READ   ( numnam, nam_tke )
+      NAMELIST/namzdf_tke/ rn_ediff, rn_ediss , rn_ebb, rn_emin,   &
+         &                 rn_emin0, rn_bshear, nn_mxl, ln_mxl0,   &
+         &                 rn_lmin , rn_lmin0 , nn_pdl, nn_etau,   &
+         &                 nn_htau , rn_efr   , ln_lc , rn_lc 
+      !!----------------------------------------------------------------------
+
+      REWIND ( numnam )               !* Read Namelist namzdf_tke : Turbulente Kinetic Energy
+      READ   ( numnam, namzdf_tke )
       
       ri_cri = 2. / ( 2. + rn_ediss / rn_ediff )      ! resulting critical Richardson number
@@ -640,23 +640,23 @@
          WRITE(numout,*) 'zdf_tke : tke turbulent closure scheme - initialisation'
          WRITE(numout,*) '~~~~~~~~'
-         WRITE(numout,*) '          Namelist nam_tke : set tke mixing parameters'
-         WRITE(numout,*) '             coef. to compute avt                      rn_ediff = ', rn_ediff
-         WRITE(numout,*) '             Kolmogoroff dissipation coef.             rn_ediss = ', rn_ediss
-         WRITE(numout,*) '             tke surface input coef.                   rn_ebb   = ', rn_ebb
-         WRITE(numout,*) '             minimum value of tke                      rn_emin  = ', rn_emin
-         WRITE(numout,*) '             surface minimum value of tke              rn_emin0 = ', rn_emin0
-         WRITE(numout,*) '             background shear (>0)                     rn_bshear= ', rn_bshear
-         WRITE(numout,*) '             mixing length type                        nn_mxl   = ', nn_mxl
-         WRITE(numout,*) '             prandl number flag                        nn_pdl   = ', nn_pdl
-         WRITE(numout,*) '             surface mixing length = F(stress) or not  ln_mxl0  = ', ln_mxl0
-         WRITE(numout,*) '             surface  mixing length minimum value      rn_lmin0 = ', rn_lmin0
-         WRITE(numout,*) '             interior mixing length minimum value      rn_lmin0 = ', rn_lmin0
-         WRITE(numout,*) '             test param. to add tke induced by wind    nn_etau  = ', nn_etau
-         WRITE(numout,*) '             flag for computation of exp. tke profile  nn_htau  = ', nn_htau
-         WRITE(numout,*) '             % of rn_emin0 which pene. the thermocline rn_efr   = ', rn_efr
-         WRITE(numout,*) '             flag to take into acc.  Langmuir circ.    ln_lc    = ', ln_lc
-         WRITE(numout,*) '             coef to compute verticla velocity of LC   rn_lc    = ', rn_lc
+         WRITE(numout,*) '   Namelist namzdf_tke : set tke mixing parameters'
+         WRITE(numout,*) '      coef. to compute avt                        rn_ediff = ', rn_ediff
+         WRITE(numout,*) '      Kolmogoroff dissipation coef.               rn_ediss = ', rn_ediss
+         WRITE(numout,*) '      tke surface input coef.                     rn_ebb   = ', rn_ebb
+         WRITE(numout,*) '      minimum value of tke                        rn_emin  = ', rn_emin
+         WRITE(numout,*) '      surface minimum value of tke                rn_emin0 = ', rn_emin0
+         WRITE(numout,*) '      background shear (>0)                       rn_bshear= ', rn_bshear
+         WRITE(numout,*) '      mixing length type                          nn_mxl   = ', nn_mxl
+         WRITE(numout,*) '      prandl number flag                          nn_pdl   = ', nn_pdl
+         WRITE(numout,*) '      surface mixing length = F(stress) or not    ln_mxl0  = ', ln_mxl0
+         WRITE(numout,*) '      surface  mixing length minimum value        rn_lmin0 = ', rn_lmin0
+         WRITE(numout,*) '      interior mixing length minimum value        rn_lmin0 = ', rn_lmin0
+         WRITE(numout,*) '      test param. to add tke induced by wind      nn_etau  = ', nn_etau
+         WRITE(numout,*) '      flag for computation of exp. tke profile    nn_htau  = ', nn_htau
+         WRITE(numout,*) '      % of rn_emin0 which pene. the thermocline   rn_efr   = ', rn_efr
+         WRITE(numout,*) '      flag to take into acc.  Langmuir circ.      ln_lc    = ', ln_lc
+         WRITE(numout,*) '      coef to compute verticla velocity of LC     rn_lc    = ', rn_lc
          WRITE(numout,*)
-         WRITE(numout,*) '             critical Richardson nb with your choice of coefs.  = ', ri_cri
+         WRITE(numout,*) '      critical Richardson nb with your parameters  ri_cri = ', ri_cri
       ENDIF
 
@@ -671,5 +671,5 @@
       !                               !* depth of penetration of surface tke
       IF( nn_etau /= 0 ) THEN      
-         SELECT CASE( nn_htau )           ! Choice of the depth of penetration
+         SELECT CASE( nn_htau )             ! Choice of the depth of penetration
          CASE( 0 )                                    ! constant depth penetration (here 10 meters)
             htau(:,:) = 10.e0
@@ -760,10 +760,10 @@
         !                                   ! -------------------
         IF(lwp) WRITE(numout,*) '---- tke-rst ----'
-        CALL iom_rstput( kt, nitrst, numrow, 'en'   , en     )
-        CALL iom_rstput( kt, nitrst, numrow, 'avt'  , avt    )
-        CALL iom_rstput( kt, nitrst, numrow, 'avm'  , avm    )
-        CALL iom_rstput( kt, nitrst, numrow, 'avmu' , avmu   )
-        CALL iom_rstput( kt, nitrst, numrow, 'avmv' , avmv   )
-        CALL iom_rstput( kt, nitrst, numrow, 'dissl', dissl  )
+        CALL iom_rstput( kt, nitrst, numrow, 'en'   , en    )
+        CALL iom_rstput( kt, nitrst, numrow, 'avt'  , avt   )
+        CALL iom_rstput( kt, nitrst, numrow, 'avm'  , avm   )
+        CALL iom_rstput( kt, nitrst, numrow, 'avmu' , avmu  )
+        CALL iom_rstput( kt, nitrst, numrow, 'avmv' , avmv  )
+        CALL iom_rstput( kt, nitrst, numrow, 'dissl', dissl )
         !
      ENDIF
Index: trunk/NEMO/OPA_SRC/ZDF/zdftke_old.F90
===================================================================
--- trunk/NEMO/OPA_SRC/ZDF/zdftke_old.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/ZDF/zdftke_old.F90	(revision 1601)
@@ -65,5 +65,5 @@
 #endif
 
-   !                                       !!! ** Namelist  nam_tke  **
+   !                                       !!! ** Namelist  namzdf_tke  **
    LOGICAL  ::   ln_rstke = .FALSE.         ! =T restart with tke from a run without tke
    LOGICAL  ::   ln_mxl0  = .FALSE.         ! mixing length scale surface value as function of wind stress or not
@@ -710,8 +710,8 @@
       !!      viscosity when using a tke turbulent closure scheme
       !!
-      !! ** Method  :   Read the nam_tke namelist and check the parameters
+      !! ** Method  :   Read the namzdf_tke namelist and check the parameters
       !!      called at the first timestep (nit000)
       !!
-      !! ** input   :   Namlist nam_tke
+      !! ** input   :   Namlist namzdf_tke
       !!
       !! ** Action  :   Increase by 1 the nstop flag is setting problem encounter
@@ -727,14 +727,14 @@
 # endif
       !!
-      NAMELIST/nam_tke/ ln_rstke, rn_ediff, rn_ediss, rn_ebb  , rn_efave, rn_emin,   &
-         &              rn_emin0, rn_cri  , nn_itke , nn_mxl  , nn_pdl  , nn_ave ,   &
-         &              ln_mxl0 , rn_lmin , rn_lmin0, nn_etau,   &
-         &              nn_htau , rn_efr  , ln_lc   , rn_lc 
+      NAMELIST/namzdf_tke/ ln_rstke, rn_ediff, rn_ediss, rn_ebb  , rn_efave, rn_emin,   &
+         &                 rn_emin0, rn_cri  , nn_itke , nn_mxl  , nn_pdl  , nn_ave ,   &
+         &                 ln_mxl0 , rn_lmin , rn_lmin0, nn_etau,   &
+         &                 nn_htau , rn_efr  , ln_lc   , rn_lc 
       !!----------------------------------------------------------------------
 
-      ! Read Namelist nam_tke : Turbulente Kinetic Energy
+      ! Read Namelist namzdf_tke : Turbulente Kinetic Energy
       ! --------------------
       REWIND ( numnam )
-      READ   ( numnam, nam_tke )
+      READ   ( numnam, namzdf_tke )
 
       ! Compute boost associated with the Richardson critic
@@ -752,5 +752,5 @@
          WRITE(numout,*) 'zdf_tke_init : tke turbulent closure scheme (old scheme)'
          WRITE(numout,*) '~~~~~~~~~~~~'
-         WRITE(numout,*) '          Namelist nam_tke : set tke mixing parameters'
+         WRITE(numout,*) '          Namelist namzdf_tke : set tke mixing parameters'
          WRITE(numout,*) '             restart with tke from no tke              ln_rstke = ', ln_rstke
          WRITE(numout,*) '             coef. to compute avt                      rn_ediff = ', rn_ediff
Index: trunk/NEMO/OPA_SRC/ZDF/zdftmx.F90
===================================================================
--- trunk/NEMO/OPA_SRC/ZDF/zdftmx.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/ZDF/zdftmx.F90	(revision 1601)
@@ -31,5 +31,5 @@
    LOGICAL, PUBLIC, PARAMETER ::   lk_zdftmx = .TRUE.    !: tidal mixing flag
 
-   !                                  !!* Namelist  namtmx : tidal mixing *
+   !                                  !!* Namelist  namzdf_tmx : tidal mixing *
    REAL(wp) ::  rn_htmx    = 500.      ! vertical decay scale for turbulence (meters)
    REAL(wp) ::  rn_n2min   = 1.e-8     ! threshold of the Brunt-Vaisala frequency (s-1)
@@ -88,5 +88,5 @@
       !!              Koch-Larrouy et al. 2007, GRL.
       !!----------------------------------------------------------------------
-      USE oce,   zav_tide  =>   ua   ! use ua as workspace
+      USE oce, zav_tide  =>   ua    ! use ua as workspace
       !!
       INTEGER, INTENT(in) ::   kt   ! ocean time-step 
@@ -329,9 +329,9 @@
       REAL(wp), DIMENSION(jpi,jpj,jpk) ::  zpc      ! power consumption
       !!
-      NAMELIST/nam_tmx/ rn_htmx, rn_n2min, rn_tfe, rn_me, ln_tmx_itf, rn_tfe_itf
-      !!----------------------------------------------------------------------
-
-      REWIND ( numnam )              ! Read Namelist namtmx : Tidal Mixing
-      READ   ( numnam, nam_tmx )
+      NAMELIST/namzdf_tmx/ rn_htmx, rn_n2min, rn_tfe, rn_me, ln_tmx_itf, rn_tfe_itf
+      !!----------------------------------------------------------------------
+
+      REWIND( numnam )               ! Read Namelist namtmx : Tidal Mixing
+      READ  ( numnam, namzdf_tmx )
 
       IF(lwp) THEN                   ! Control print
@@ -339,5 +339,5 @@
          WRITE(numout,*) 'zdf_tmx_init : tidal mixing'
          WRITE(numout,*) '~~~~~~~~~~~~'
-         WRITE(numout,*) '   Namelist namtmx : set tidal mixing parameters'
+         WRITE(numout,*) '   Namelist namzdf_tmx : set tidal mixing parameters'
          WRITE(numout,*) '      Vertical decay scale for turbulence   = ', rn_htmx 
          WRITE(numout,*) '      Brunt-Vaisala frequency threshold     = ', rn_n2min
Index: trunk/NEMO/OPA_SRC/eosbn2.F90
===================================================================
--- trunk/NEMO/OPA_SRC/eosbn2.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/eosbn2.F90	(revision 1601)
@@ -9,5 +9,4 @@
    !!            6.0  ! 1994-08  (G. Madec)  Add Jackett & McDougall eos
    !!            7.0  ! 1996-01  (G. Madec)  statement function for e3
-   !!            8.1  ! 1997-07  (G. Madec)  introduction of neos, OPA8.1
    !!            8.1  ! 1997-07  (G. Madec)  density instead of volumic mass
    !!             -   ! 1999-02  (G. Madec, N. Grima) semi-implicit pressure gradient
@@ -51,8 +50,9 @@
    PUBLIC   tfreez     ! called by sbcice_... modules
 
-   !                                      !!* Namelist (nameos) *
-   INTEGER , PUBLIC ::   neos   = 0        !: = 0/1/2 type of eq. of state and Brunt-Vaisala frequ.
-   REAL(wp), PUBLIC ::   ralpha = 2.0e-4   !: thermal expension coeff. (linear equation of state)
-   REAL(wp), PUBLIC ::   rbeta  = 7.7e-4   !: saline  expension coeff. (linear equation of state)
+   !                                        !!* Namelist (nameos) *
+   INTEGER , PUBLIC ::   nn_eos   = 0        !: = 0/1/2 type of eq. of state and Brunt-Vaisala frequ.
+   REAL(wp), PUBLIC ::   rn_alpha = 2.0e-4   !: thermal expension coeff. (linear equation of state)
+   REAL(wp), PUBLIC ::   rn_beta  = 7.7e-4   !: saline  expension coeff. (linear equation of state)
+
    REAL(wp), PUBLIC ::   ralpbet           !: alpha / beta ratio
    
@@ -74,8 +74,8 @@
       !! ** Purpose :   Compute the in situ density (ratio rho/rau0) from 
       !!       potential temperature and salinity using an equation of state
-      !!       defined through the namelist parameter neos.
+      !!       defined through the namelist parameter nn_eos.
       !!
       !! ** Method  :   3 cases:
-      !!      neos = 0 : Jackett and McDougall (1994) equation of state.
+      !!      nn_eos = 0 : Jackett and McDougall (1994) equation of state.
       !!         the in situ density is computed directly as a function of
       !!         potential temperature relative to the surface (the opa t
@@ -92,9 +92,9 @@
       !!         Check value: rho = 1060.93298 kg/m**3 for p=10000 dbar,
       !!          t = 40 deg celcius, s=40 psu
-      !!      neos = 1 : linear equation of state function of temperature only
-      !!              prd(t) = 0.0285 - ralpha * t
-      !!      neos = 2 : linear equation of state function of temperature and
+      !!      nn_eos = 1 : linear equation of state function of temperature only
+      !!              prd(t) = 0.0285 - rn_alpha * t
+      !!      nn_eos = 2 : linear equation of state function of temperature and
       !!               salinity
-      !!              prd(t,s) = rbeta * s - ralpha * tn - 1.
+      !!              prd(t,s) = rn_beta * s - rn_alpha * tn - 1.
       !!      Note that no boundary condition problem occurs in this routine
       !!      as (ptem,psal) are defined over the whole domain.
@@ -118,5 +118,5 @@
       !!----------------------------------------------------------------------
 
-      SELECT CASE( neos )
+      SELECT CASE( nn_eos )
       !
       CASE( 0 )                !==  Jackett and McDougall (1994) formulation  ==!
@@ -169,15 +169,11 @@
       CASE( 1 )                !==  Linear formulation function of temperature only  ==!
          DO jk = 1, jpkm1
-            prd(:,:,jk) = ( 0.0285 - ralpha * ptem(:,:,jk) ) * tmask(:,:,jk)
+            prd(:,:,jk) = ( 0.0285 - rn_alpha * ptem(:,:,jk) ) * tmask(:,:,jk)
          END DO
          !
       CASE( 2 )                !==  Linear formulation function of temperature and salinity  ==!
          DO jk = 1, jpkm1
-            prd(:,:,jk) = ( rbeta  * psal(:,:,jk) - ralpha * ptem(:,:,jk) ) * tmask(:,:,jk)
-         END DO
-         !
-      CASE DEFAULT
-         WRITE(ctmp1,*) '          bad flag value for neos = ', neos
-         CALL ctl_stop( ctmp1 )
+            prd(:,:,jk) = ( rn_beta  * psal(:,:,jk) - rn_alpha * ptem(:,:,jk) ) * tmask(:,:,jk)
+         END DO
          !
       END SELECT
@@ -195,8 +191,8 @@
       !!      potential volumic mass (Kg/m3) from potential temperature and
       !!      salinity fields using an equation of state defined through the 
-      !!     namelist parameter neos.
+      !!     namelist parameter nn_eos.
       !!
       !! ** Method  :
-      !!      neos = 0 : Jackett and McDougall (1994) equation of state.
+      !!      nn_eos = 0 : Jackett and McDougall (1994) equation of state.
       !!         the in situ density is computed directly as a function of
       !!         potential temperature relative to the surface (the opa t
@@ -216,12 +212,12 @@
       !!          t = 40 deg celcius, s=40 psu
       !!
-      !!      neos = 1 : linear equation of state function of temperature only
-      !!              prd(t) = ( rho(t) - rau0 ) / rau0 = 0.028 - ralpha * t
+      !!      nn_eos = 1 : linear equation of state function of temperature only
+      !!              prd(t) = ( rho(t) - rau0 ) / rau0 = 0.028 - rn_alpha * t
       !!              rhop(t,s)  = rho(t,s)
       !!
-      !!      neos = 2 : linear equation of state function of temperature and
+      !!      nn_eos = 2 : linear equation of state function of temperature and
       !!               salinity
       !!              prd(t,s) = ( rho(t,s) - rau0 ) / rau0 
-      !!                       = rbeta * s - ralpha * tn - 1.
+      !!                       = rn_beta * s - rn_alpha * tn - 1.
       !!              rhop(t,s)  = rho(t,s)
       !!      Note that no boundary condition problem occurs in this routine
@@ -245,5 +241,5 @@
       !!----------------------------------------------------------------------
 
-      SELECT CASE ( neos )
+      SELECT CASE ( nn_eos )
       !
       CASE( 0 )                !==  Jackett and McDougall (1994) formulation  ==!
@@ -299,5 +295,5 @@
       CASE( 1 )                !==  Linear formulation = F( temperature )  ==!
          DO jk = 1, jpkm1
-            prd  (:,:,jk) = ( 0.0285 - ralpha * ptem(:,:,jk) )        * tmask(:,:,jk)
+            prd  (:,:,jk) = ( 0.0285 - rn_alpha * ptem(:,:,jk) )        * tmask(:,:,jk)
             prhop(:,:,jk) = ( 1.e0   +          prd (:,:,jk) ) * rau0 * tmask(:,:,jk)
          END DO
@@ -305,11 +301,7 @@
       CASE( 2 )                !==  Linear formulation = F( temperature , salinity )  ==!
          DO jk = 1, jpkm1
-            prd  (:,:,jk) = ( rbeta  * psal(:,:,jk) - ralpha * ptem(:,:,jk) )        * tmask(:,:,jk)
+            prd  (:,:,jk) = ( rn_beta  * psal(:,:,jk) - rn_alpha * ptem(:,:,jk) )        * tmask(:,:,jk)
             prhop(:,:,jk) = ( 1.e0   + prd (:,:,jk) )                         * rau0 * tmask(:,:,jk)
          END DO
-         !
-      CASE DEFAULT
-         WRITE(ctmp1,*) '          bad flag value for neos = ', neos
-         CALL ctl_stop( ctmp1 )
          !
       END SELECT
@@ -326,8 +318,8 @@
       !! ** Purpose :   Compute the in situ density (ratio rho/rau0) from 
       !!      potential temperature and salinity using an equation of state
-      !!      defined through the namelist parameter neos. * 2D field case
+      !!      defined through the namelist parameter nn_eos. * 2D field case
       !!
       !! ** Method :
-      !!      neos = 0 : Jackett and McDougall (1994) equation of state.
+      !!      nn_eos = 0 : Jackett and McDougall (1994) equation of state.
       !!         the in situ density is computed directly as a function of
       !!         potential temperature relative to the surface (the opa t
@@ -344,9 +336,9 @@
       !!         Check value: rho = 1060.93298 kg/m**3 for p=10000 dbar,
       !!          t = 40 deg celcius, s=40 psu
-      !!      neos = 1 : linear equation of state function of temperature only
-      !!              prd(t) = 0.0285 - ralpha * t
-      !!      neos = 2 : linear equation of state function of temperature and
+      !!      nn_eos = 1 : linear equation of state function of temperature only
+      !!              prd(t) = 0.0285 - rn_alpha * t
+      !!      nn_eos = 2 : linear equation of state function of temperature and
       !!               salinity
-      !!              prd(t,s) = rbeta * s - ralpha * tn - 1.
+      !!              prd(t,s) = rn_beta * s - rn_alpha * tn - 1.
       !!      Note that no boundary condition problem occurs in this routine
       !!      as (ptem,psal) are defined over the whole domain.
@@ -369,5 +361,5 @@
       prd(:,:) = 0.e0
 
-      SELECT CASE( neos )
+      SELECT CASE( nn_eos )
       !
       CASE( 0 )                !==  Jackett and McDougall (1994) formulation  ==!
@@ -424,5 +416,5 @@
          DO jj = 1, jpjm1
             DO ji = 1, fs_jpim1   ! vector opt.
-               prd(ji,jj) = ( 0.0285 - ralpha * ptem(ji,jj) ) * tmask(ji,jj,1)
+               prd(ji,jj) = ( 0.0285 - rn_alpha * ptem(ji,jj) ) * tmask(ji,jj,1)
             END DO
          END DO
@@ -431,11 +423,7 @@
          DO jj = 1, jpjm1
             DO ji = 1, fs_jpim1   ! vector opt.
-               prd(ji,jj) = ( rbeta * psal(ji,jj) - ralpha * ptem(ji,jj) ) * tmask(ji,jj,1) 
-            END DO
-         END DO
-         !
-      CASE DEFAULT
-         WRITE(ctmp1,*) '          bad flag value for neos = ', neos
-         CALL ctl_stop( ctmp1 )
+               prd(ji,jj) = ( rn_beta * psal(ji,jj) - rn_alpha * ptem(ji,jj) ) * tmask(ji,jj,1) 
+            END DO
+         END DO
          !
       END SELECT
@@ -454,5 +442,5 @@
       !!      
       !! ** Method :
-      !!       * neos = 0  : UNESCO sea water properties
+      !!       * nn_eos = 0  : UNESCO sea water properties
       !!         The brunt-vaisala frequency is computed using the polynomial
       !!      polynomial expression of McDougall (1987):
@@ -461,11 +449,11 @@
       !!      computed and used in zdfddm module :
       !!              Rrau = alpha/beta * ( dk[ t ] / dk[ s ] )
-      !!       * neos = 1  : linear equation of state (temperature only)
-      !!            N^2 = grav * ralpha * dk[ t ]/e3w
-      !!       * neos = 2  : linear equation of state (temperature & salinity)
-      !!            N^2 = grav * (ralpha * dk[ t ] - rbeta * dk[ s ] ) / e3w
+      !!       * nn_eos = 1  : linear equation of state (temperature only)
+      !!            N^2 = grav * rn_alpha * dk[ t ]/e3w
+      !!       * nn_eos = 2  : linear equation of state (temperature & salinity)
+      !!            N^2 = grav * (rn_alpha * dk[ t ] - rn_beta * dk[ s ] ) / e3w
       !!      The use of potential density to compute N^2 introduces e r r o r
       !!      in the sign of N^2 at great depths. We recommand the use of 
-      !!      neos = 0, except for academical studies.
+      !!      nn_eos = 0, except for academical studies.
       !!        Macro-tasked on horizontal slab (jk-loop)
       !!      N.B. N^2 is set to zero at the first level (JK=1) in inidtr
@@ -490,5 +478,5 @@
       ! -------------------------- 
       !
-      SELECT CASE( neos )
+      SELECT CASE( nn_eos )
       !
       CASE( 0 )                !==  Jackett and McDougall (1994) formulation  ==!
@@ -541,11 +529,11 @@
       CASE( 1 )                !==  Linear formulation = F( temperature )  ==!
          DO jk = 2, jpkm1
-            pn2(:,:,jk) = grav * ralpha * ( ptem(:,:,jk-1) - ptem(:,:,jk) ) / fse3w(:,:,jk) * tmask(:,:,jk)
+            pn2(:,:,jk) = grav * rn_alpha * ( ptem(:,:,jk-1) - ptem(:,:,jk) ) / fse3w(:,:,jk) * tmask(:,:,jk)
          END DO
          !
       CASE( 2 )                !==  Linear formulation = F( temperature , salinity )  ==!
          DO jk = 2, jpkm1
-            pn2(:,:,jk) = grav * (  ralpha * ( ptem(:,:,jk-1) - ptem(:,:,jk) )      &
-               &                  - rbeta  * ( psal(:,:,jk-1) - psal(:,:,jk) )  )   &
+            pn2(:,:,jk) = grav * (  rn_alpha * ( ptem(:,:,jk-1) - ptem(:,:,jk) )      &
+               &                  - rn_beta  * ( psal(:,:,jk-1) - psal(:,:,jk) )  )   &
                &               / fse3w(:,:,jk) * tmask(:,:,jk)
          END DO 
@@ -561,9 +549,4 @@
          END DO
 #endif
-         !
-      CASE DEFAULT
-         WRITE(ctmp1,*) '          bad flag value for neos = ', neos
-         CALL ctl_stop( ctmp1 )
-         !
       END SELECT
 
@@ -606,5 +589,5 @@
       !! ** Method  :   Read the namelist nameos and control the parameters
       !!----------------------------------------------------------------------
-      NAMELIST/nameos/ neos, ralpha, rbeta
+      NAMELIST/nameos/ nn_eos, rn_alpha, rn_beta
       !!----------------------------------------------------------------------
       !
@@ -617,29 +600,29 @@
          WRITE(numout,*) '~~~~~~~~'
          WRITE(numout,*) '          Namelist nameos : set eos parameters'
-         WRITE(numout,*) '             flag for eq. of state and N^2  neos   = ', neos
-         WRITE(numout,*) '             thermal exp. coef. (linear)    ralpha = ', ralpha
-         WRITE(numout,*) '             saline  exp. coef. (linear)    rbeta  = ', rbeta
+         WRITE(numout,*) '             flag for eq. of state and N^2  nn_eos   = ', nn_eos
+         WRITE(numout,*) '             thermal exp. coef. (linear)    rn_alpha = ', rn_alpha
+         WRITE(numout,*) '             saline  exp. coef. (linear)    rn_beta  = ', rn_beta
       ENDIF
       !
-      SELECT CASE( neos )
-      !
-      CASE( 0 )                   !==  Jackett and McDougall (1994) formulation  ==!
+      SELECT CASE( nn_eos )         ! check option
+      !
+      CASE( 0 )                        !==  Jackett and McDougall (1994) formulation  ==!
          IF(lwp) WRITE(numout,*)
          IF(lwp) WRITE(numout,*) '          use of Jackett & McDougall (1994) equation of state and'
          IF(lwp) WRITE(numout,*) '                 McDougall (1987) Brunt-Vaisala frequency'
          !
-      CASE( 1 )                   !==  Linear formulation = F( temperature )  ==!
+      CASE( 1 )                        !==  Linear formulation = F( temperature )  ==!
          IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*) '          use of linear eos rho(T) = rau0 * ( 1.0285 - ralpha * T )'
+         IF(lwp) WRITE(numout,*) '          use of linear eos rho(T) = rau0 * ( 1.0285 - rn_alpha * T )'
          IF( lk_zdfddm ) CALL ctl_stop( '          double diffusive mixing parameterization requires',   &
               &                         ' that T and S are used as state variables' )
          !
-      CASE( 2 )                   !==  Linear formulation = F( temperature , salinity )  ==!
-         ralpbet = ralpha / rbeta
+      CASE( 2 )                        !==  Linear formulation = F( temperature , salinity )  ==!
+         ralpbet = rn_alpha / rn_beta
          IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*) '          use of linear eos rho(T,S) = rau0 * ( rbeta * S - ralpha * T )'
-         !
-      CASE DEFAULT                !==  ERROR in neos  ==!
-         WRITE(ctmp1,*) '          bad flag value for neos = ', neos
+         IF(lwp) WRITE(numout,*) '          use of linear eos rho(T,S) = rau0 * ( rn_beta * S - rn_alpha * T )'
+         !
+      CASE DEFAULT                     !==  ERROR in nn_eos  ==!
+         WRITE(ctmp1,*) '          bad flag value for nn_eos = ', nn_eos
          CALL ctl_stop( ctmp1 )
          !
Index: trunk/NEMO/OPA_SRC/lib_cray.f90
===================================================================
--- trunk/NEMO/OPA_SRC/lib_cray.f90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/lib_cray.f90	(revision 1601)
@@ -4,22 +4,10 @@
 !  check their existence
 !  
-!  sdot
 !  wheneq
-!  saxpy
-!  isrchne
-   !!----------------------------------------------------------------------
-   !!  OPA 9.0 , LOCEAN-IPSL (2005) 
-   !! $Id$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
-   !!----------------------------------------------------------------------
-!---------------------------------------------------------
-     FUNCTION sdot( I, X, J, Y, K )
-        DIMENSION X(1), Y(1)
-        SDOT = 0.
-        DO N = 1, I
-        SDOT = SDOT + X(1+(N-1)*J) * Y(1+(N-1)*K)
-        END DO
-     END FUNCTION sdot
-!---------------------------------------------------------
+!!----------------------------------------------------------------------
+!!  OPA 9.0 , LOCEAN-IPSL (2005) 
+!! $Id$ 
+!! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
+!!----------------------------------------------------------------------
      SUBROUTINE wheneq ( i, x, j, t, ind, nn )
         IMPLICIT NONE
@@ -41,21 +29,2 @@
 
      END SUBROUTINE wheneq
-!---------------------------------------------------------
-     SUBROUTINE saxpy( I, A, X, J, Y, K )
-        DIMENSION X(1),Y(1)
-        DO N = 1, I
-           Y(1+(N-1)*K)=A*X(1+(N-1)*J)+Y(1+(N-1)*K)
-        END DO
-     END SUBROUTINE saxpy
-!---------------------------------------------------------
-     FUNCTION isrchne( K, X, I, B )
-        DIMENSION X(1)
-        DO N = 1, K
-           IF( X(1+(N-1)*I) /= B ) THEN
-              ISRCHNE = N
-              RETURN
-           ELSE
-              ISRCHNE = N + 1
-           ENDIF
-        END DO
-     END FUNCTION isrchne
Index: trunk/NEMO/OPA_SRC/lib_mpp.F90
===================================================================
--- trunk/NEMO/OPA_SRC/lib_mpp.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/lib_mpp.F90	(revision 1601)
@@ -139,6 +139,6 @@
 
    ! Type of send : standard, buffered, immediate
-   CHARACTER(len=1) ::   c_mpi_send = 'S'    ! type od mpi send/recieve (S=standard, B=bsend, I=isend)
-   LOGICAL          ::   l_isend = .FALSE.   ! isend use indicator (T if c_mpi_send='I')
+   CHARACTER(len=1) ::   cn_mpi_send = 'S'    ! type od mpi send/recieve (S=standard, B=bsend, I=isend)
+   LOGICAL          ::   l_isend = .FALSE.   ! isend use indicator (T if cn_mpi_send='I')
    INTEGER          ::   nn_buffer = 0       ! size of the buffer in case of mpi_bsend 
       
@@ -177,5 +177,5 @@
       LOGICAL ::   mpi_was_called
       
-      NAMELIST/nam_mpp/ c_mpi_send, nn_buffer
+      NAMELIST/nammpp/ cn_mpi_send, nn_buffer
       !!----------------------------------------------------------------------
       !
@@ -183,11 +183,11 @@
       WRITE(ldtxt(2),*) 'mynode : mpi initialisation'
       WRITE(ldtxt(3),*) '~~~~~~ '
-      WRITE(ldtxt(4),*)
       !
       REWIND( numnam )               ! Namelist namrun : parameters of the run
-      READ  ( numnam, nam_mpp )
+      READ  ( numnam, nammpp )
       !                              ! control print
-      WRITE(ldtxt(5),*) '        Namelist nam_mpp'
-      WRITE(ldtxt(6),*) '           mpi send type            c_mpi_send = ', c_mpi_send
+      WRITE(ldtxt(4),*) '   Namelist nammpp'
+      WRITE(ldtxt(5),*) '      mpi send type                      cn_mpi_send = ', cn_mpi_send
+      WRITE(ldtxt(6),*) '      size in bytes of exported buffer   nn_buffer   = ', nn_buffer
 
 #if defined key_agrif
@@ -205,5 +205,5 @@
          IF( PRESENT(localComm) .and. mpi_was_called ) THEN
             mpi_comm_opa = localComm
-            SELECT CASE ( c_mpi_send )
+            SELECT CASE ( cn_mpi_send )
             CASE ( 'S' )                ! Standard mpi send (blocking)
                WRITE(ldtxt(7),*) '           Standard blocking mpi send (send)'
@@ -216,5 +216,5 @@
             CASE DEFAULT
                WRITE(ldtxt(7),cform_err)
-               WRITE(ldtxt(8),*) '           bad value for c_mpi_send = ', c_mpi_send
+               WRITE(ldtxt(8),*) '           bad value for cn_mpi_send = ', cn_mpi_send
                nstop = nstop + 1
             END SELECT
@@ -225,5 +225,5 @@
          ELSE
 #endif
-            SELECT CASE ( c_mpi_send )
+            SELECT CASE ( cn_mpi_send )
             CASE ( 'S' )                ! Standard mpi send (blocking)
                WRITE(ldtxt(7),*) '           Standard blocking mpi send (send)'
@@ -238,5 +238,5 @@
             CASE DEFAULT
                WRITE(ldtxt(7),cform_err)
-               WRITE(ldtxt(8),*) '           bad value for c_mpi_send = ', c_mpi_send
+               WRITE(ldtxt(8),*) '           bad value for cn_mpi_send = ', cn_mpi_send
                nstop = nstop + 1
             END SELECT
@@ -254,5 +254,5 @@
 #if defined key_agrif
       ELSE
-         SELECT CASE ( c_mpi_send )
+         SELECT CASE ( cn_mpi_send )
          CASE ( 'S' )                ! Standard mpi send (blocking)
             WRITE(ldtxt(7),*) '           Standard blocking mpi send (send)'
@@ -264,5 +264,5 @@
          CASE DEFAULT
             WRITE(ldtxt(7),cform_err)
-            WRITE(ldtxt(8),*) '           bad value for c_mpi_send = ', c_mpi_send
+            WRITE(ldtxt(8),*) '           bad value for cn_mpi_send = ', cn_mpi_send
             nstop = nstop + 1
          END SELECT
@@ -1044,5 +1044,5 @@
       !!----------------------------------------------------------------------
       !
-      SELECT CASE ( c_mpi_send )
+      SELECT CASE ( cn_mpi_send )
       CASE ( 'S' )                ! Standard mpi send (blocking)
          CALL mpi_send ( pmess, kbytes, mpi_double_precision, kdest , ktyp, mpi_comm_opa        , iflag )
Index: trunk/NEMO/OPA_SRC/mppini_2.h90
===================================================================
--- trunk/NEMO/OPA_SRC/mppini_2.h90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/mppini_2.h90	(revision 1601)
@@ -39,9 +39,7 @@
       !!   9.0  !  04-01  (G. Madec, J.M Molines)  F90 : free form , north fold jpni > 1
       !!----------------------------------------------------------------------
-      !! * Modules used
       USE in_out_manager  ! I/O Manager
       USE iom
-   
-      !! Local variables
+      !! 
       INTEGER :: ji, jj, jn, jproc, jarea     ! dummy loop indices
       INTEGER ::  inum                        ! temporary logical unit
@@ -71,5 +69,5 @@
 
       ! read namelist for ln_zco
-      NAMELIST/nam_zgr/ ln_zco, ln_zps, ln_sco
+      NAMELIST/namzgr/ ln_zco, ln_zps, ln_sco
 
       !!----------------------------------------------------------------------
@@ -78,8 +76,7 @@
       !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
       !!----------------------------------------------------------------------
-      ! Read Namelist nam_zgr : vertical coordinate'
-      ! ---------------------
-      REWIND ( numnam )
-      READ   ( numnam, nam_zgr )
+      
+      REWIND ( numnam )              ! Read Namelist namzgr : vertical coordinate'
+      READ   ( numnam, namzgr )
 
       IF(lwp)WRITE(numout,*)
Index: trunk/NEMO/OPA_SRC/oce.F90
===================================================================
--- trunk/NEMO/OPA_SRC/oce.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/oce.F90	(revision 1601)
@@ -13,9 +13,5 @@
    PRIVATE
 
-   !! Physics and algorithm flags
-   !! ---------------------------
    LOGICAL, PUBLIC ::   l_traldf_rot    = .FALSE.  !: rotated laplacian operator for lateral diffusion
-   LOGICAL, PUBLIC ::   ln_dynhpg_imp   = .FALSE.  !: semi-implicite hpg flag
-   INTEGER, PUBLIC ::   nn_dynhpg_rst   = 0        !: add dynhpg implicit variables in restart ot not
 
    !! dynamics and tracer fields             !  before  !  now     !  after   ! the after trends becomes the fields
Index: trunk/NEMO/OPA_SRC/opa.F90
===================================================================
--- trunk/NEMO/OPA_SRC/opa.F90	(revision 1598)
+++ trunk/NEMO/OPA_SRC/opa.F90	(revision 1601)
@@ -47,4 +47,5 @@
    USE istate          ! initial state setting          (istate_init routine)
    USE eosbn2          ! equation of state                 (eos_init routine)
+   USE dynhpg          ! hydrostatic pressure gradient
    USE ldfdyn          ! lateral viscosity setting      (ldfdyn_init routine)
    USE ldftra          ! lateral diffusivity setting    (ldftra_init routine)
@@ -176,6 +177,6 @@
       INTEGER                         ::   ji   ! local loop indices
       !!
-      NAMELIST/namctl/ ln_ctl, nprint, nictls, nictle,   &
-         &             isplt , jsplt , njctls, njctle, nbench, nbit_cmp
+      NAMELIST/namctl/ ln_ctl  , nn_print, nn_ictls, nn_ictle,   &
+         &             nn_isplt, nn_jsplt, nn_jctls, nn_jctle, nn_bench, nn_bit_cmp
       !!----------------------------------------------------------------------
       !
@@ -283,23 +284,35 @@
       !!              - Read in namilist namflg logical flags
       !!----------------------------------------------------------------------
-      NAMELIST/namflg/ ln_dynhpg_imp, nn_dynhpg_rst
-      !!----------------------------------------------------------------------
-
-      IF(lwp) THEN                ! Parameter print
+      NAMELIST/namdyn_hpg/ ln_hpg_zco   , ln_hpg_zps   , ln_hpg_sco, ln_hpg_hel,   &
+         &                 ln_hpg_wdj   , ln_hpg_djc   , ln_hpg_rot, rn_gamma  ,   &
+         &                 ln_dynhpg_imp, nn_dynhpg_rst
+      !!----------------------------------------------------------------------
+
+      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
+         WRITE(numout,*) '      run control (for debugging)     ln_ctl     = ', ln_ctl
+         WRITE(numout,*) '      level of print                  nn_print   = ', nn_print
+         WRITE(numout,*) '      Start i indice for SUM control  nn_ictls   = ', nn_ictls
+         WRITE(numout,*) '      End i indice for SUM control    nn_ictle   = ', nn_ictle
+         WRITE(numout,*) '      Start j indice for SUM control  nn_jctls   = ', nn_jctls
+         WRITE(numout,*) '      End j indice for SUM control    nn_jctle   = ', nn_jctle
+         WRITE(numout,*) '      number of proc. following i     nn_isplt   = ', nn_isplt
+         WRITE(numout,*) '      number of proc. following j     nn_jsplt   = ', nn_jsplt
+         WRITE(numout,*) '      benchmark parameter (0/1)       nn_bench   = ', nn_bench
+         WRITE(numout,*) '      bit comparison mode (0/1)       nn_bit_cmp = ', nn_bit_cmp
+      ENDIF
+
+      nprint    = nn_print          ! convert DOCTOR namelist names into OLD names
+      nictls    = nn_ictls
+      nictle    = nn_ictle
+      njctls    = nn_jctls
+      njctle    = nn_jctle
+      isplt     = nn_isplt
+      jsplt     = nn_jsplt
+      nbench    = nn_bench
+      nbit_cmp  = nn_bit_cmp
 
       !                           ! Parameter control
@@ -355,18 +368,6 @@
       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 : 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
+      REWIND( numnam )              ! Read Namelist namdyn_hpg : ln_dynhpg_imp must be read at the initialisation phase
+      READ  ( numnam, namdyn_hpg )
       !
    END SUBROUTINE opa_flg
