Index: trunk/NEMO/OPA_SRC/cla.F90
===================================================================
--- trunk/NEMO/OPA_SRC/cla.F90	(revision 14)
+++ trunk/NEMO/OPA_SRC/cla.F90	(revision 15)
@@ -164,9 +164,5 @@
          END DO
       END DO
-
-      ! mpp
-# if defined key_mpp
-      CALL mpp_sum( zempred )
-# endif
+      IF( lk_mpp )   CALL mpp_sum( zempred )      ! sum with other processors value
 
       ! convert in m3
@@ -370,9 +366,6 @@
          END DO
       END DO
-
-      ! mpp
-# if defined key_mpp
-      CALL mpp_sum( zempmed )
-# endif
+      IF( lk_mpp )   CALL mpp_sum( zempmed )      ! sum with other processors value
+
 
       ! minus 2 points in Red Sea and 3 in Atlantic ocean
Index: trunk/NEMO/OPA_SRC/cla_div.F90
===================================================================
--- trunk/NEMO/OPA_SRC/cla_div.F90	(revision 14)
+++ trunk/NEMO/OPA_SRC/cla_div.F90	(revision 15)
@@ -126,9 +126,6 @@
          END DO
       END DO
-
-      ! mpp
-# if defined key_mpp
-      CALL mpp_sum( zempred )
-# endif
+      IF( lk_mpp )   CALL mpp_sum( zempred )      ! sum with other processors value
+
 
       ! convert in m3
@@ -239,9 +236,5 @@
          END DO
       END DO
-
-      ! mpp
-# if defined key_mpp
-      CALL mpp_sum( zempmed )
-# endif
+      IF( lk_mpp )   CALL mpp_sum( zempmed )      ! sum with other processors value
 
       ! minus 2 points in Red Sea and 3 in Atlantic 
@@ -536,9 +529,9 @@
 #else
    !!----------------------------------------------------------------------
-   !!   Default key                                            Empty module
+   !!   Default key                                            Dummy module
    !!----------------------------------------------------------------------
 CONTAINS
    SUBROUTINE div_cla( kt )
-      WRITE(*,*) kt                         ! suppress compilation warning
+      WRITE(*,*) 'div_cla: You should have not see this print! error?', kt
    END SUBROUTINE div_cla
 #endif
Index: trunk/NEMO/OPA_SRC/cla_dynspg.F90
===================================================================
--- trunk/NEMO/OPA_SRC/cla_dynspg.F90	(revision 14)
+++ trunk/NEMO/OPA_SRC/cla_dynspg.F90	(revision 15)
@@ -1,6 +1,6 @@
 MODULE cla_dynspg
-   !!----------------------------------------------------------------------
-   !!                 ***  dynspg_freesurf_cstvol.h90  ***
-   !!----------------------------------------------------------------------
+   !!======================================================================
+   !!                       ***  cla_dynspg  ***
+   !!======================================================================
    !!   dyn_spg      : update the momentum trend with the surface pressure
    !!                  gradient in the free surface constant volume case
@@ -59,5 +59,6 @@
       INTEGER, INTENT( in ) ::   kt           ! ocean time-step
       !! * Local declarations
-      INTEGER ::   ji, jj, jk                 ! dummy loop indices
+      INTEGER  ::   ji, jj, jk                ! dummy loop indices
+      INTEGER  ::   ii0, ii1, ij0, ij1        ! temporary integer
       REAL(wp) ::    &    
          zempmed, zempred,   &                ! EMP on Med Sea ans Red Sea
@@ -83,19 +84,19 @@
       zempmed = 0.e0
       zwei = 0.e0
-      DO jj = mj0(96), mj1(110)
-         DO ji = mi0(141),mi1(181)
+      ij0 =  96   ;   ij1 = 110
+      ii0 = 141   ;   ii1 = 181
+      DO jj = mj0(ij0), mj1(ij1)
+         DO ji = mi0(ii0),mi1(ii1)
             zwei    = tmask(ji,jj,1) * e1t(ji,jj) * e2t(ji,jj)
             zempmed = zempmed + emp(ji,jj) * zwei
          END DO
       END DO
-
-      ! mpp
-# if defined key_mpp
-      CALL mpp_sum( zempmed )
-# endif
+      IF( lk_mpp )   CALL mpp_sum( zempmed )      ! sum with other processors value
 
       ! minus 2 points in Red Sea and 3 in Atlantic 
-      DO jj = mj0(96), mj1(96)
-         DO ji = mi0(148),mi1(148)
+      ij0 =  96   ;   ij1 =  96
+      ii0 = 148   ;   ii1 = 148
+      DO jj = mj0(ij0), mj1(ij1)
+         DO ji = mi0(ii0),mi1(ii1)
             zempmed = zempmed - emp(ji  ,jj) * tmask(ji  ,jj,1) * e1t(ji  ,jj) * e2t(ji  ,jj)   &
                &              - emp(ji+1,jj) * tmask(ji+1,jj,1) * e1t(ji+1,jj) * e2t(ji+1,jj)   
@@ -108,15 +109,13 @@
       zempred = 0.e0
       zwei = 0.e0
-      DO jj = mj0(87), mj1(96)
-         DO ji = mi0(148), mi1(160) 
+      ij0 =  87   ;   ij1 =  96
+      ii0 = 148   ;   ii1 = 160
+      DO jj = mj0(ij0), mj1(ij1)
+         DO ji = mi0(ii0),mi1(ii1)
             zwei      = tmask(ji,jj,1) * e1t(ji,jj) * e2t(ji,jj)
             zempred   = zempred + emp(ji,jj) * zwei
          END DO
       END DO
-
-      ! mpp
-# if defined key_mpp
-      CALL mpp_sum( zempred )
-# endif
+      IF( lk_mpp )   CALL mpp_sum( zempred )      ! sum with other processors value
 
       ! we convert in m3
@@ -143,24 +142,23 @@
       ! Bab el Mandeb
       ! -------------
-      DO jj = mj0(88), mj1(88) 
-         DO ji = mi0(160), mi1(160) 
+      ! 160,88 north point Bab el Mandeb
+      ij0 =  88   ;   ij1 =  88
+      ii0 = 160   ;   ii1 = 160
+      DO jj = mj0(ij0), mj1(ij1)
+         DO ji = mi0(ii0),mi1(ii1)
             ua(ji,jj  ,: ) = 0.e0  !  North East Bab el Mandeb 
-            ua(ji,jj-1,: ) = 0.e0  !  South East Bab el Mandeb
-         END DO
-      END DO
- 
-      ! 160,87 north point Bab el Mandeb
-      ! surface
+         END DO
+      END DO
+      !                              ! surface
       DO jk = 1,  8                                      
-         DO jj = mj0(88), mj1(88) 
-            DO ji = mi0(160), mi1(160) 
+         DO jj = mj0(ij0), mj1(ij1)
+            DO ji = mi0(ii0),mi1(ii1)
                ua(ji, jj,jk) = -( ( zisw_rs + zempred ) / 8. ) / ( e2u(ji, jj) * fse3t(ji, jj,jk) )     
             END DO
          END DO
       END DO
-
-      ! deeper
-      DO jj = mj0(88), mj1(88) 
-         DO ji = mi0(160), mi1(160) 
+      !                              ! deeper
+      DO jj = mj0(ij0), mj1(ij1)
+         DO ji = mi0(ii0),mi1(ii1)
             ua(ji, jj,21) = - zbrw_rs / ( e2u(ji, jj) * fse3t(ji, jj,21) )
          END DO
@@ -168,6 +166,13 @@
 
       ! 160,87 south point Bab el Mandeb
-      DO jj = mj0(87), mj1(87) 
-         DO ji = mi0(160), mi1(160) 
+      ij0 =  87   ;   ij1 =  87
+      ii0 = 160   ;   ii1 = 160
+      DO jj = mj0(ij0), mj1(ij1)
+         DO ji = mi0(ii0),mi1(ii1)
+            ua(ji,jj  ,: ) = 0.e0  !  South East Bab el Mandeb 
+         END DO
+      END DO
+      DO jj = mj0(ij0), mj1(ij1)
+         DO ji = mi0(ii0),mi1(ii1)
             ua(ji, jj,21) =  ( zisw_rs + zbrw_rs ) / ( e2u(ji,jj )*fse3t(ji, jj,21) )      
          END DO
@@ -178,33 +183,32 @@
 
       ! initialisation of velocity at concerned points 
-      DO jj = mj0(101), mj1(101) 
-         DO ji = mi0(139), mi1(139) 
+      ! 139, 101 south point in Gibraltar 
+      ij0 = 101   ;   ij1 = 101
+      ii0 = 139   ;   ii1 = 139
+      DO jj = mj0(ij0), mj1(ij1)
+         DO ji = mi0(ii0),mi1(ii1)
             ua(ji,jj  ,: ) = 0.e0  !  South West Gibraltar
             ua(ji,jj+1,: ) = 0.e0  !  North West Gibraltar
          END DO
       END DO
-
-      ! 139, 101 south point in Gibraltar 
-      ! surface
+      !                            ! surface
       DO jk = 1, 14                      
-         DO jj = mj0(101), mj1(101) 
-            DO ji = mi0(139), mi1(139) 
+         DO jj = mj0(ij0), mj1(ij1)
+            DO ji = mi0(ii0),mi1(ii1)
                ua(ji,jj,jk) =  ( ( zisw_ms + zempmed ) / 14. ) / ( e2u(ji,jj) * fse3t(ji,jj,jk) ) 
             END DO
          END DO
       END DO
-
-      ! middle circulation
+      !                            ! middle circulation
       DO jk = 15, 20                      
-         DO jj = mj0(101), mj1(101) 
-            DO ji = mi0(139), mi1(139) 
+         DO jj = mj0(ij0), mj1(ij1)
+            DO ji = mi0(ii0),mi1(ii1)
                ua(ji,jj,jk) =  ( zmrw_ms / 6. ) / ( e2u(ji,jj) * fse3t(ji,jj,jk) ) 
             END DO
          END DO
       END DO
-
-      ! deeper 
-      DO jj = mj0(101), mj1(101) 
-         DO ji = mi0(139), mi1(139) 
+      !                            ! deeper 
+      DO jj = mj0(ij0), mj1(ij1)
+         DO ji = mi0(ii0),mi1(ii1)
             ua(ji,jj,21) =             zurw_ms   / ( e2u(ji,jj) * fse3t(ji,jj,21) )
             ua(ji,jj,22) = ( zbrw_ms - zurw_ms ) / ( e2u(ji,jj) * fse3t(ji,jj,22) )
@@ -213,15 +217,21 @@
 
       ! 139,102 north point in Gibraltar
+      ij0 = 102   ;   ij1 = 102
+      ii0 = 139   ;   ii1 = 139
+      DO jj = mj0(ij0), mj1(ij1)
+         DO ji = mi0(ii0),mi1(ii1)
+            ua(ji,jj  ,: ) = 0.e0  !  North West Gibraltar
+         END DO
+      END DO
       DO jk = 15, 20                      
-         DO jj = mj0(102), mj1(102) 
-            DO ji = mi0(139), mi1(139) 
+         DO jj = mj0(ij0), mj1(ij1)
+            DO ji = mi0(ii0),mi1(ii1)
                ua(ji,jj,jk) = -( zmrw_ms / 6. ) / ( e2u(ji,jj) * fse3t(ji,jj,jk) ) 
             END DO
          END DO
       END DO
-
-      ! deeper
-      DO jj = mj0(102), mj1(102) 
-         DO ji = mi0(139), mi1(139) 
+      !                            ! deeper
+      DO jj = mj0(ij0), mj1(ij1)
+         DO ji = mi0(ii0),mi1(ii1)
             ua(ji,jj,22) = -( zisw_ms + zbrw_ms ) / ( e2u(ji,jj) * fse3t(ji,jj,22) )
          END DO
@@ -229,3 +239,5 @@
 
    END SUBROUTINE dyn_spg_cla
+
+   !!======================================================================
 END MODULE cla_dynspg
Index: trunk/NEMO/OPA_SRC/cpl.F90
===================================================================
--- trunk/NEMO/OPA_SRC/cpl.F90	(revision 14)
+++ trunk/NEMO/OPA_SRC/cpl.F90	(revision 15)
@@ -773,5 +773,5 @@
    END SUBROUTINE cpl_init
    SUBROUTINE cpl_step( kt )       ! Dummy routine
-      WRITE(*,*) kt
+      WRITE(*,*) 'cpl_step: You should have not see this print! error?', kt
    END SUBROUTINE cpl_step
 #endif
Index: trunk/NEMO/OPA_SRC/daymod.F90
===================================================================
--- trunk/NEMO/OPA_SRC/daymod.F90	(revision 14)
+++ trunk/NEMO/OPA_SRC/daymod.F90	(revision 15)
@@ -20,24 +20,24 @@
 
    !! * Shared module variables
-   INTEGER, PUBLIC ::         &
-      nyear   ,               &  ! current year
-      nmonth  ,               &  ! current month
-      nday    ,               &  ! current day of the month
-      nday_year ,             &  ! curent day counted from jan 1st of the current year
-      ndastp                     ! time step date in year/month/day aammjj
-
-    REAL(wp), PUBLIC ::     &
-          adatrj ,          &   ! (non integer) number of elapsed days since the begining of the experiment
-          adatrj0               !  value of adatrj at nit000-1 (before the present run).
-                                ! it is the accumulated duration of previous runs
-                                ! that may have been run with different time steps.
-
+   INTEGER , PUBLIC ::   &  !:
+      nyear     ,   &  !: current year
+      nmonth    ,   &  !: current month
+      nday      ,   &  !: current day of the month
+      nday_year ,   &  !: curent day counted from jan 1st of the current year
+      ndastp           !: time step date in year/month/day aammjj
+   REAL(wp), PUBLIC ::   &  !:
+       adatrj   ,   &  !: number of elapsed days since the begining of the run
+       adatrj0         !: value of adatrj at nit000-1 (before the present run).
+       !               !  it is the accumulated duration of previous runs
+       !               !  that may have been run with different time steps.
+   !!----------------------------------------------------------------------
+   !!  OPA 9, LODYC-IPSL (2004)
    !!----------------------------------------------------------------------
 
 CONTAINS
 
-   SUBROUTINE day ( kt )
+   SUBROUTINE day( kt )
       !!----------------------------------------------------------------------
-      !!                  ***  ROUTINE day  ***
+      !!                      ***  ROUTINE day  ***
       !! 
       !! ** Purpose :   Compute the date with a day iteration IF necessary.
@@ -50,6 +50,5 @@
       !!              - nday_year : current day of the year nyear
       !!              - ndastp    : =nyear*10000+nmonth*100+nday
-      !!              - adatrj    : date in days since the beginning
-      !!                            of the experiment
+      !!              - adatrj    : date in days since the beginning of the run
       !!
       !! History :
@@ -69,6 +68,4 @@
       REAL(wp) :: zadatrjn, zadatrjb     ! adatrj at timestep kt-1 and kt-2 
       !!----------------------------------------------------------------------
-      !!  OPA 9, LODYC-IPSL (2004)
-      !!----------------------------------------------------------------------
 
       ! 0.  initialization of adatrj0 and nday, nmonth,nyear, nday_year.
@@ -76,7 +73,7 @@
       !-----------------------------------------------------------------
 
-      IF (  kt == nit000 ) THEN
+      IF( kt == nit000 ) THEN
 
-         IF ( .NOT.ln_rstart )   adatrj0 = 0.e0      ! adatrj0 initialized in rst_read when restart 
+         IF( .NOT.ln_rstart )   adatrj0 = 0.e0      ! adatrj0 initialized in rst_read when restart 
 
          adatrj  = adatrj0
@@ -115,5 +112,5 @@
       iday1 = INT( zadatrjn )
 
-      if ( iday1 - iday0 >= 1 .AND. ( kt /= nit000 .OR. nrstdt == 2 ) ) THEN
+      IF( iday1 - iday0 >= 1 .AND. ( kt /= nit000 .OR. nrstdt == 2 ) ) THEN
 
          ! increase calendar
Index: trunk/NEMO/OPA_SRC/eosbn2.F90
===================================================================
--- trunk/NEMO/OPA_SRC/eosbn2.F90	(revision 14)
+++ trunk/NEMO/OPA_SRC/eosbn2.F90	(revision 15)
@@ -37,11 +37,11 @@
 
    !! * Share module variables
-   INTEGER, PUBLIC ::   & !!! nameos : ocean physical parameters
-      neos     ,        &  ! = 0/1/2 type of eq. of state and Brunt-Vaisala frequ.
-      neos_init = 0        ! control flag for initialization
-
-   REAL(wp), PUBLIC ::   & !!! nameos : ocean physical parameters
-      ralpha,            &  ! thermal expension coeff. (linear equation of state)
-      rbeta                 ! saline  expension coeff. (linear equation of state)
+   INTEGER , PUBLIC ::   &  !: nameos : ocean physical parameters
+      neos          ,    &  !: = 0/1/2 type of eq. of state and Brunt-Vaisala frequ.
+      neos_init = 0         !: control flag for initialization
+
+   REAL(wp), PUBLIC ::   &  !: nameos : ocean physical parameters
+      ralpha        ,    &  !: thermal expension coeff. (linear equation of state)
+      rbeta                 !: saline  expension coeff. (linear equation of state)
    
    !! * Substitutions
@@ -594,12 +594,12 @@
       !!         The brunt-vaisala frequency is computed using the polynomial
       !!      polynomial expression of McDougall (1987):
-      !!            N^2 = g * beta * ( alpha/beta*dk[ t ] - dk[ s ] )/e3w
+      !!            N^2 = grav * beta * ( alpha/beta*dk[ t ] - dk[ s ] )/e3w
       !!      If lk_zdfddm=T, the heat/salt buoyancy flux ratio Rrau is
       !!      computed and used in zdfddm module :
       !!              Rrau = alpha/beta * ( dk[ t ] / dk[ s ] )
       !!       * neos = 1  : linear equation of state (temperature only)
-      !!            N^2 = g * ralpha * dk[ t ]/e3w
+      !!            N^2 = grav * ralpha * dk[ t ]/e3w
       !!       * neos = 2  : linear equation of state (temperature & salinity)
-      !!            N^2 = g * (ralpha * dk[ t ] - rbeta * dk[ s ] ) / e3w
+      !!            N^2 = grav * (ralpha * dk[ t ] - rbeta * 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 
@@ -631,5 +631,8 @@
       REAL(wp) ::   &
          zgde3w, zt, zs, zh,  &  ! temporary scalars 
-         zalbet, zbeta, zds      !    "         "
+         zalbet, zbeta           !    "         "
+#if defined key_zdfddm
+      REAL(wp) ::   zds          ! temporary scalars
+#endif
       !!----------------------------------------------------------------------
       !!  OPA8.5, LODYC-IPSL (2002)
@@ -653,8 +656,8 @@
             DO jj = 1, jpj
                DO ji = 1, jpi
-                  zgde3w = g/fse3w(ji,jj,jk)
-                  zt = 0.5*( ptem(ji,jj,jk) + ptem(ji,jj,jk-1) )          ! potential temperature at w-point
-                  zs = 0.5*( psal(ji,jj,jk) + psal(ji,jj,jk-1) ) - 35.0   ! salinity anomaly (s-35) at w-point
-                  zh = fsdepw(ji,jj,jk)                                   ! depth in meters  at w-point
+                  zgde3w = grav / fse3w(ji,jj,jk)
+                  zt = 0.5 * ( ptem(ji,jj,jk) + ptem(ji,jj,jk-1) )          ! potential temperature at w-point
+                  zs = 0.5 * ( psal(ji,jj,jk) + psal(ji,jj,jk-1) ) - 35.0   ! salinity anomaly (s-35) at w-point
+                  zh = fsdepw(ji,jj,jk)                                     ! depth in meters  at w-point
 
                   zalbet = ( ( ( - 0.255019e-07 * zt + 0.298357e-05 ) * zt   &   ! ratio alpha/beta
@@ -706,5 +709,5 @@
             DO jj = 1, jpj
                DO ji = 1, jpi
-                  zgde3w = g/fse3w(ji,jj,jk) * tmask(ji,jj,jk)
+                  zgde3w = grav / fse3w(ji,jj,jk) * tmask(ji,jj,jk)
                   pn2(ji,jj,jk) = zgde3w * ralpha * ( ptem(ji,jj,jk-1) - ptem(ji,jj,jk) )
                END DO
@@ -722,5 +725,5 @@
             DO jj = 1, jpj
                DO ji = 1, jpi
-                  zgde3w = g/fse3w(ji,jj,jk) * tmask(ji,jj,jk)
+                  zgde3w = grav / fse3w(ji,jj,jk) * tmask(ji,jj,jk)
                   pn2(ji,jj,jk) = zgde3w * (  ralpha * ( ptem(ji,jj,jk-1) - ptem(ji,jj,jk) )   &
                      &                      - rbeta  * ( psal(ji,jj,jk-1) - psal(ji,jj,jk) )  )
Index: trunk/NEMO/OPA_SRC/ice_oce.F90
===================================================================
--- trunk/NEMO/OPA_SRC/ice_oce.F90	(revision 14)
+++ trunk/NEMO/OPA_SRC/ice_oce.F90	(revision 15)
@@ -17,9 +17,9 @@
    USE blk_oce         ! bulk parameters
 
-
    IMPLICIT NONE
+   PRIVATE
  
    !! Shared module variables
-   LOGICAL, PUBLIC, PARAMETER ::   lk_ice_lim = .TRUE.    ! LIM ice model
+   LOGICAL, PUBLIC, PARAMETER ::   lk_ice_lim = .TRUE.    !: LIM ice model
 
    !!----------------------------------------------------------------------
@@ -27,33 +27,27 @@
    !!----------------------------------------------------------------------
 # if defined key_coupled
-   REAL(wp), DIMENSION(jpiglo,jpjglo)    ::   & ! cumulated fields
-      fqsr_oce ,     &   ! Net short wave heat flux on free ocean 
-      fqsr_ice ,     &   ! Net short wave het flux on sea ice 
-      fqnsr_oce,     &   ! Net longwave heat flux on free ocean
-      fqnsr_ice,     &   ! Net longwave heat flux on sea ice
-      fdqns_ice,     &   ! Derivative of non solar heat flux on sea ice
-      ftprecip ,     &   ! Water flux (liquid precipitation - evaporation) 
-      fsprecip ,     &   ! Solid (snow) precipitation
-      frunoff  ,     &   ! runoff
-      fcalving           ! Iceberg calving 
+   REAL(wp), PUBLIC, DIMENSION(jpiglo,jpjglo) ::   &  !: cumulated fields
+      fqsr_oce ,      &   !: Net short wave heat flux on free ocean 
+      fqsr_ice ,      &   !: Net short wave het flux on sea ice 
+      fqnsr_oce,      &   !: Net longwave heat flux on free ocean
+      fqnsr_ice,      &   !: Net longwave heat flux on sea ice
+      fdqns_ice,      &   !: Derivative of non solar heat flux on sea ice
+      ftprecip ,      &   !: Water flux (liquid precipitation - evaporation) 
+      fsprecip ,      &   !: Solid (snow) precipitation
+      frunoff  ,      &   !: runoff
+      fcalving            !: Iceberg calving 
 # endif
 
-   REAL(wp), DIMENSION(jpi,jpj)    ::   & ! field exchanges with ice model to ocean
-      sst_io  ,      &   ! sea surface temperature
-      sss_io  ,      &   ! sea surface salinity
-      u_io    ,      &   ! i-horizontal velocity at ice surface
-      v_io    ,      &   ! j-horizontal velocity at ice surface
-      fsolar  ,      &   ! solar heat flux
-      fnsolar ,      &   ! total non-solar heat flux
-      fsalt   ,      &   ! salt flux
-      fmass   ,      &   ! freshwater flux
-      ftaux   ,      &   ! i-horizontal wind stress 
-      ftauy   ,      &   ! j-horizontal wind stress 
-      gtaux   ,      &   ! i-horizontal wind stress 
-      gtauy              ! i-horizontal wind stress 
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   &  !: field exchanges with ice model to ocean
+      sst_io, sss_io , &  !: sea surface temperature (C) and salinity (PSU)
+      u_io  , v_io   , &  !: velocity at ice surface (m/s)
+      fsolar, fnsolar, &  !: solar and non-solar heat fluxes (W/m2)
+      fsalt , fmass  , &  !: salt and freshwater fluxes
+      ftaux , ftauy  , &  !: wind stresses
+      gtaux , gtauy       !: wind stresses
    
-   REAL(wp) ::       &
-      rdt_ice,       &  ! ice time step
-      dtsd2              ! ice time step divide by 2
+   REAL(wp), PUBLIC ::   &  !:
+      rdt_ice,           &  !: ice time step
+      dtsd2                 !: ice time step divide by 2
 
 #else
@@ -61,9 +55,9 @@
    !!   Default option                                 NO LIM sea-ice model
    !!----------------------------------------------------------------------
-   LOGICAL, PUBLIC, PARAMETER ::   lk_ice_lim = .FALSE.        ! No LIM ice model
+   LOGICAL, PUBLIC, PARAMETER ::   lk_ice_lim = .FALSE.  !: No LIM ice model
 #endif
 
-   INTEGER ::         & !!! namdom : space/time domain (namlist)
-      nfice =  5         ! coupling frequency OPA ICELLN  nfice 
+   INTEGER, PUBLIC ::   &  !: namdom : space/time domain (namlist)
+      nfice =  5           !: coupling frequency OPA ICELLN  nfice 
 
    !!----------------------------------------------------------------------
Index: trunk/NEMO/OPA_SRC/in_out_manager.F90
===================================================================
--- trunk/NEMO/OPA_SRC/in_out_manager.F90	(revision 14)
+++ trunk/NEMO/OPA_SRC/in_out_manager.F90	(revision 15)
@@ -4,78 +4,86 @@
    USE par_kind
 
+   PUBLIC
+
    !!----------------------------------------------------------------------
    !! namelist parameters
    !! -------------------------------------
    ! namrun:  parameters of the run
-   CHARACTER (len=16) ::    &
-      cexper = "exp0"          ! experiment name used for output filename
+   CHARACTER (len=16) ::    &   !:
+      cexper = "exp0"           !: experiment name used for output filename
    
-   LOGICAL ::   &              !!! * namelist namrun *
-      ln_rstart = .FALSE. ,  &  ! start from (F) rest or (T) a restart file
-      ln_ctl    = .FALSE.       ! run control for debugging
+   LOGICAL ::   &              !!: * namelist namrun *
+      ln_rstart = .FALSE. ,  &  !: start from (F) rest or (T) a restart file
+      ln_ctl    = .FALSE.       !: run control for debugging
    
-   INTEGER ::                & !!! * namelist namrun *
-      no     = 0        ,    &  ! job number
-      nrstdt = 0        ,    &  ! control of the time step (0, 1 or 2)
-      nit000 = 1        ,    &  ! index of the first time step
-      nitend = 10       ,    &  ! index of the last time step
-      ndate0 = 961115   ,    &  ! initial calendar date aammjj
-      nleapy = 0        ,    &  ! Leap year calendar flag (0/1 or 30)
-      ninist = 0                ! initial state output flag (0/1)
+   INTEGER ::                & !!: * namelist namrun *
+      no     = 0        ,    &  !: job number
+      nrstdt = 0        ,    &  !: control of the time step (0, 1 or 2)
+      nit000 = 1        ,    &  !: index of the first time step
+      nitend = 10       ,    &  !: index of the last time step
+      ndate0 = 961115   ,    &  !: initial calendar date aammjj
+      nleapy = 0        ,    &  !: Leap year calendar flag (0/1 or 30)
+      ninist = 0                !: initial state output flag (0/1)
    !!----------------------------------------------------------------------
    !!                          Run control  
    !!----------------------------------------------------------------------
    
-   INTEGER ::                &  !
-      nstop = 0 ,            &  ! e r r o r  flag (=number of reason for a
-      !                         !                  prematurely stop the run)
-      nwarn = 0                 ! w a r n i n g  flag (=number of warning
-      !                         !                      found during the run)
+   INTEGER ::                &  !:
+      nstop = 0 ,            &  !: e r r o r  flag (=number of reason for a
+      !                         !                   prematurely stop the run)
+      nwarn = 0                 !: w a r n i n g  flag (=number of warning
+      !                         !                       found during the run)
 
    
-   CHARACTER (len=64) ::        &
-      cform_err="(/,' ===>>> : E R R O R',     /,'         ===========',/)"    ,   &
-      cform_war="(/,' ===>>> : W A R N I N G', /,'         ===============',/)"
+   CHARACTER (len=64) ::        &                                                    !:
+      cform_err="(/,' ===>>> : E R R O R',     /,'         ===========',/)"    ,   & !:
+      cform_war="(/,' ===>>> : W A R N I N G', /,'         ===============',/)"      !:
    !!----------------------------------------------------------------------
    !! output monitoring
    !! -----------------------------------
 
-   LOGICAL ::   &
-      lwp                ,   &  ! boolean : true on the 1st processor only
-      l_ctl                     ! = ln_ctl.AND.lwp (print control on the 1st proc)
+   LOGICAL ::   &               !:
+      lwp                ,   &  !: boolean : true on the 1st processor only
+      l_ctl                     !: = ln_ctl.AND.lwp (print control on the 1st proc)
 
-   INTEGER ::                &
-      nstock = 10 ,          &  ! restart file frequency
-      nprint =  0 ,          &  ! level of print (0 no print)
-      nwrite = 10               ! restart file frequency
+   INTEGER ::                &  !:
+      nstock = 10 ,          &  !: restart file frequency
+      nprint =  0 ,          &  !: level of print (0 no print)
+      nwrite = 10               !: restart file frequency
    !!----------------------------------------------------------------------
    !! logical units
    !! ------------------------------
-   INTEGER ::                &
-      numstp     =  1 ,      &  ! logical unit for time step
-      numout     =  2 ,      &  ! logical unit for output print
-      numnam     =  3 ,      &  ! logical unit for namelist
-      numnam_ice =  4 ,      &  ! logical unit for ice namelist
-      nummpp     =  8 ,      &  ! logical unit for mpp test print
-      numevo_ice = 17 ,      &  ! logical unit for ice variables (temp. evolution)
-      numsol     = 25 ,      &  ! logical unit for solver statistics
-      numwri     = 40 ,      &  ! logical unit for output write
-      numisp     = 41 ,      &  ! logical unit for island statistics
-      numwrs     = 46 ,      &  ! logical unit for output restart
-      numtdt     = 62 ,      &  ! logical unit for data temperature
-      numsdt     = 63 ,      &  ! logical unit for data salinity
-      numwso     = 71 ,      &  ! logical unit for 2d output write
-      numwvo     = 72 ,      &  ! logical unit for 3d output write
-      numsst     = 65 ,      &  ! logical unit for surface temperature data
-      numgap     = 45 ,      &  ! logical unit for differences diagnostic
-      numbol     = 67 ,      &  ! logical unit for "bol" diagnostics
-      numptr     = 68 ,      &  ! logical unit for Poleward TRansports
-      numflo     = 69           ! logical unit for drifting floats
+   INTEGER ::                &  !:
+      numstp     =  1 ,      &  !: logical unit for time step
+      numout     =  2 ,      &  !: logical unit for output print
+      numnam     =  3 ,      &  !: logical unit for namelist
+      numnam_ice =  4 ,      &  !: logical unit for ice namelist
+      nummpp     =  8 ,      &  !: logical unit for mpp test print
+      numevo_ice = 17 ,      &  !: logical unit for ice variables (temp. evolution)
+      numsol     = 25 ,      &  !: logical unit for solver statistics
+      numwri     = 40 ,      &  !: logical unit for output write
+      numisp     = 41 ,      &  !: logical unit for island statistics
+      numwrs     = 46 ,      &  !: logical unit for output restart
+      numtdt     = 62 ,      &  !: logical unit for data temperature
+      numsdt     = 63 ,      &  !: logical unit for data salinity
+      numwso     = 71 ,      &  !: logical unit for 2d output write
+      numwvo     = 72 ,      &  !: logical unit for 3d output write
+      numsst     = 65 ,      &  !: logical unit for surface temperature data
+      numgap     = 45 ,      &  !: logical unit for differences diagnostic
+      numbol     = 67 ,      &  !: logical unit for "bol" diagnostics
+      numptr     = 68 ,      &  !: logical unit for Poleward TRansports
+      numflo     = 69 ,      &  !: logical unit for drifting floats
+      !                         !: * coupled units
+      numlhf     = 71 ,      &  !: unit to transfer fluxes
+      numlws     = 72 ,      &  !: unit to transfer stress
+      numlts     = 73 ,      &  !: unit to transfer sst
+      numlic     = 74           !: unit to transfer ice cover
+
 
    !! Contral/debugging
    !! -----------------
-   REAL(wp) ::               &
-      u_ctl, v_ctl,          &  ! sum of ua and va trend
-      t_ctl, s_ctl              ! sum of ta and sa trend
+   REAL(wp) ::               &  !:
+      u_ctl, v_ctl,          &  !: sum of ua and va trend
+      t_ctl, s_ctl              !: sum of ta and sa trend
 
 END MODULE in_out_manager
Index: trunk/NEMO/OPA_SRC/istate.F90
===================================================================
--- trunk/NEMO/OPA_SRC/istate.F90	(revision 14)
+++ trunk/NEMO/OPA_SRC/istate.F90	(revision 15)
@@ -74,8 +74,19 @@
       rhop (:,:,:) = 0.e0
       rn2  (:,:,:) = 0.e0 
-  
-
-
-      IF( ln_rstart ) THEN                       ! Restart from a file
+
+#if defined key_dynspg_fsc
+      ! free surface formulation
+      sshb(:,:) = 0.e0      ! before sea-surface height
+      sshn(:,:) = 0.e0      ! now    sea-surface height
+#endif
+#if defined key_dynspg_rl
+      ! rigid-lid formulation
+      bsfb(:,:) = 0.e0      ! before barotropic stream-function
+      bsfn(:,:) = 0.e0      ! now    barotropic stream-function
+      bsfd(:,:) = 0.e0      ! barotropic stream-function trend
+#endif 
+
+
+      IF( ln_rstart ) THEN                    ! Restart from a file
          !                                    ! -------------------
          neuler = 1                              ! Set time-step indicator at nit000 (leap-frog)
@@ -148,6 +159,6 @@
             DO ji = 1, jpi
                tn(ji,jj,jk) = (  ( ( 7.5 - 0.*ABS(gphit(ji,jj))/30. )   &
-                                  *( 1.-TANH((fsdept(ji,jj,jk)-80.)/30.) )   &
-                               + 10.*(5000.-fsdept(ji,jj,jk))/5000.)  ) * tmask(ji,jj,jk)
+                  &               *( 1.-TANH((fsdept(ji,jj,jk)-80.)/30.) )   &
+                  &            + 10.*(5000.-fsdept(ji,jj,jk))/5000.)  ) * tmask(ji,jj,jk)
                tb(ji,jj,jk) = tn(ji,jj,jk)
           END DO
@@ -283,5 +294,5 @@
 
             DO jj = 1, jpjglo
-               zssh(:,jj) = ( .22 - ( float(jj-3) * (0.44) ) / 99. )
+               zssh(:,jj) = ( .22 - ( FLOAT(jj-3) * (0.44) ) / 99. )
             END DO
             DO jj = 1, nlcj
@@ -403,5 +414,5 @@
       ! ------------------------------------
 
-      zalfg = 0.5 * g * rau0
+      zalfg = 0.5 * grav * rau0
       ! Surface value
       zprn(:,:,1) = zalfg * fse3w(:,:,1) * ( 1 + rhd(:,:,1) )
Index: trunk/NEMO/OPA_SRC/lbclnk.F90
===================================================================
--- trunk/NEMO/OPA_SRC/lbclnk.F90	(revision 14)
+++ trunk/NEMO/OPA_SRC/lbclnk.F90	(revision 15)
@@ -4,7 +4,9 @@
    !! Ocean        : lateral boundary conditions
    !!=====================================================================
-#if defined key_mpp
-   !!----------------------------------------------------------------------
-   !!   'key_mpp'  :                           distributed memory computing
+#if   defined key_mpp_mpi   ||   defined key_mpp_shmem
+   !!----------------------------------------------------------------------
+   !!   'key_mpp_mpi'     OR      MPI massively parallel processing library
+   !!   'key_mpp_shmem'         SHMEM massively parallel processing library
+   !!----------------------------------------------------------------------
    !!----------------------------------------------------------------------
    !!   lbc_lnk      : generic interface for mpp_lnk_3d and mpp_lnk_2d
Index: trunk/NEMO/OPA_SRC/lib_io_fdir.F90
===================================================================
--- trunk/NEMO/OPA_SRC/lib_io_fdir.F90	(revision 14)
+++ trunk/NEMO/OPA_SRC/lib_io_fdir.F90	(revision 15)
@@ -61,5 +61,5 @@
          krec            ! record unit for direct access file
 
-#if defined key_mpp
+#if defined key_mpp_mpi   ||   defined key_mpp_shmem
    !! * Local declarations
       INTEGER ji, jj, jproc   ! dummy loop indices
@@ -139,5 +139,5 @@
          krec            ! record unit for direct access file
 
-#if defined key_mpp
+#if defined key_mpp_mpi   ||   defined key_mpp_shmem
       INTEGER ji, jj, jproc
       INTEGER imess, ic
@@ -221,5 +221,5 @@
          krec            ! record unit for direct access file
 
-#if defined key_mpp
+#if defined key_mpp_mpi   ||   defined key_mpp_shmem
       INTEGER ji, jj, jk, jproc
       INTEGER ikloc, ikpe
@@ -313,5 +313,5 @@
          krec            ! record unit for direct access file
 
-#if defined key_mpp
+#if defined key_mpp_mpi   ||   defined key_mpp_shmem
       INTEGER ji, jj, jk, jproc
       INTEGER ikloc, ikpe
@@ -405,5 +405,5 @@
          krec            ! record unit for direct access file
 
-#if defined key_mpp
+#if defined key_mpp_mpi   ||   defined key_mpp_shmem
       INTEGER ji,jj,jproc
       INTEGER ildi,ilei,ildj,ilej
@@ -488,5 +488,5 @@
          krec            ! record unit for direct access file
 
-#if defined key_mpp
+#if defined key_mpp_mpi   ||   defined key_mpp_shmem
       INTEGER ji,jj,jk,jproc
       INTEGER ikloc,ikpe
@@ -584,5 +584,5 @@
          ptab            ! variable array
 
-#if defined key_mpp
+#if defined key_mpp_mpi   ||   defined key_mpp_shmem
    !! * Local declarations
       INTEGER jk, jproc
Index: trunk/NEMO/OPA_SRC/module_example
===================================================================
--- trunk/NEMO/OPA_SRC/module_example	(revision 14)
+++ trunk/NEMO/OPA_SRC/module_example	(revision 15)
@@ -24,5 +24,5 @@
 
    !! * Share Module variables
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   &
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   &  !:
       var1    ,   &  !: var1 description (CAUTION always use !: to describe a 
       !              !  PUBLIC variable simplify the search of where it is declared
@@ -103,5 +103,5 @@
 
 
-      IF( kt == nit000  )   CALL zdf_tke_init    ! Initialization (first time-step only)
+      IF( kt == nit000  )   CALL exa_mpl_init    ! Initialization (first time-step only)
 
       ! Local constant initialization
@@ -193,5 +193,5 @@
       ENDIF
 
-   END SUBROUTINE zdf_tke_init
+   END SUBROUTINE exa_mpl_init
 
 #else
Index: trunk/NEMO/OPA_SRC/mppini.F90
===================================================================
--- trunk/NEMO/OPA_SRC/mppini.F90	(revision 14)
+++ trunk/NEMO/OPA_SRC/mppini.F90	(revision 15)
@@ -31,5 +31,5 @@
 CONTAINS
 
-#if ! defined key_mpp
+#if ! defined key_mpp_mpi   &&   ! defined key_mpp_shmem
    !!----------------------------------------------------------------------
    !!   Default option :                            shared memory computing
@@ -47,6 +47,4 @@
       !! History :
       !!   9.0  !  04-01  (G. Madec, J.M. Molines)  F90 : free form, north fold jpni >1
-      !!----------------------------------------------------------------------
-      !!  OPA 9.0, LODYC-IPSL (2004)
       !!----------------------------------------------------------------------
       ! No mpp computation
@@ -88,5 +86,6 @@
 #else
    !!----------------------------------------------------------------------
-   !!   'key_mpp' :                            distributed memory computing
+   !!   'key_mpp_mpi'          OR         MPI massively parallel processing
+   !!   'key_mpp_shmem'                 SHMEM massively parallel processing
    !!----------------------------------------------------------------------
 
@@ -140,9 +139,4 @@
       !!----------------------------------------------------------------------
 
-#if defined key_mpp_pvm
-      IF(lwp)WRITE(numout,*)
-      IF(lwp)WRITE(numout,*) 'mpp_init : Message Passing PVM'
-      IF(lwp)WRITE(numout,*) '~~~~~~~~'
-#endif
 #if defined key_mpp_shmem
       IF(lwp)WRITE(numout,*)
@@ -156,9 +150,4 @@
       IF(lwp)WRITE(numout,*)
       IF(lwp)WRITE(numout,*) 'mpp_init : Message Passing MPI'
-      IF(lwp)WRITE(numout,*) '~~~~~~~~'
-#endif
-#if ! defined key_mpp_pvm &&  ! defined key_mpp_mpi && ! defined key_mpp_shmem
-      IF(lwp)WRITE(numout,*)
-      IF(lwp)WRITE(numout,*) 'mpp_init : Message Passing PVM onto T3E'
       IF(lwp)WRITE(numout,*) '~~~~~~~~'
 #endif
Index: trunk/NEMO/OPA_SRC/mppini_2.h90
===================================================================
--- trunk/NEMO/OPA_SRC/mppini_2.h90	(revision 14)
+++ trunk/NEMO/OPA_SRC/mppini_2.h90	(revision 15)
@@ -70,9 +70,4 @@
       !!----------------------------------------------------------------------
 
-#if defined key_mpp_pvm
-      IF(lwp)WRITE(numout,*)
-      IF(lwp)WRITE(numout,*) 'mpp_init : Message Passing PVM'
-      IF(lwp)WRITE(numout,*) '~~~~~~~~'
-#endif
 #if defined key_mpp_shmem
       IF(lwp)WRITE(numout,*)
@@ -89,9 +84,4 @@
       IF(lwp)WRITE(numout,*) '~~~~~~~~'
       IF(lwp)WRITE(numout,*) ' '
-#endif
-#if ! defined key_mpp_pvm &&  ! defined key_mpp_mpi && ! defined key_mpp_shmem
-      IF(lwp)WRITE(numout,*)
-      IF(lwp)WRITE(numout,*) 'mpp_init : Message Passing PVM onto T3E'
-      IF(lwp)WRITE(numout,*) '~~~~~~~~'
 #endif
 
Index: trunk/NEMO/OPA_SRC/oce.F90
===================================================================
--- trunk/NEMO/OPA_SRC/oce.F90	(revision 14)
+++ trunk/NEMO/OPA_SRC/oce.F90	(revision 15)
@@ -1,5 +1,5 @@
 MODULE oce
    !!======================================================================
-   !!             ***  MODULE  oce  ***
+   !!                      ***  MODULE  oce  ***
    !! Ocean        :  dynamics and active tracers defined in memory 
    !!======================================================================
@@ -13,18 +13,13 @@
 
    IMPLICIT NONE
+   PRIVATE
 
    !! Physics and algorithm flags
    !! ---------------------------
-#if defined key_vectopt_memory
-   LOGICAL ::   l_vopt   = .TRUE.   !: memory vector optimization flag
-#else
-   LOGICAL ::   l_vopt   = .FALSE.  !: memory vector optimization flag
-#endif
-
-   LOGICAL ::   ln_dynhpg_imp   = .FALSE.  ! semi-implicite hpg flag
+   LOGICAL, PUBLIC ::   ln_dynhpg_imp   = .FALSE.  !: semi-implicite hpg flag
 
    !! dynamics and tracer fields
    !! --------------------------
-   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   &
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   &   !:
       ! before !  now      !  after  !
       ub       ,  un       ,  ua     ,   &  !: i-horizontal velocity (m/s)
@@ -35,5 +30,5 @@
       tb       ,  tn       ,  ta     ,   &  !: potential temperature (celcius)
       sb       ,  sn       ,  sa            !: salinity (psu)
-   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   &
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   &   !:
       rhd ,                              &  !: in situ density anomalie rhd=(rho-rau0)/rau0 (no units)
       rhop,                              &  !: potential volumic mass (kg/m3)
@@ -42,5 +37,5 @@
    !! surface pressure gradient
    !! -------------------------
-   REAL(wp), DIMENSION(jpi,jpj) ::   &
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   &   !:
       spgu, spgv             !: horizontal surface pressure gradient
 
@@ -48,9 +43,9 @@
    !! interpolated gradient
    !! ---------------------
-   REAL(wp), DIMENSION(jpi,jpj) ::   &
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   &   !:
       gtu, gsu, gru,      &  !: t-, s- and rd horizontal gradient at u- and 
       gtv, gsv, grv          !: v-points at bottom ocean level 
 #else
-   REAL(wp) ::   &
+   REAL(wp), PUBLIC ::   &   !:
       gtu, gsu, gru,      &  !: dummy scalars
       gtv, gsv, grv          !:
@@ -60,10 +55,11 @@
    !! free surface - constant volume formulation
    !! ------------------------------------------
-   REAL(wp), DIMENSION(jpi,jpj) ::   &
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   &   !:
       sshb, sshn,         &  !: before, now sea surface height (meters)
       hu, hv                 !: depth at u- and v-points (meters)
 # if defined key_obc
-   REAL(wp) obcsurftot       !: Total lateral surface of open boundaries
-   REAL(wp), DIMENSION(jpi,jpj) ::   &
+   REAL(wp), PUBLIC ::    &  !:
+      obcsurftot       !: Total lateral surface of open boundaries
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   &   !:
       obcumask, obcvmask     !: u-, v- Force filtering mask for the open 
       !                      !  boundary condition on grad D
@@ -73,5 +69,5 @@
    !! rigid-lid formulation
    !! ---------------------
-   REAL(wp), DIMENSION(jpi,jpj) ::   &
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   &   !:
       hur, hvr,           &  !: inverse of u and v-points ocean depth (1/m)
       bsfb, bsfn,         &  !: before, now barotropic streamfunction (m3/s)
Index: trunk/NEMO/OPA_SRC/ocfzpt.F90
===================================================================
--- trunk/NEMO/OPA_SRC/ocfzpt.F90	(revision 14)
+++ trunk/NEMO/OPA_SRC/ocfzpt.F90	(revision 15)
@@ -17,5 +17,5 @@
 
    !! * Shared module variables   
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   &
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   &  !:
       freeze, freezn,  &  !: after and now ice mask (0 or 1)
       fzptb, fzptn        !: before and now freezing point
Index: trunk/NEMO/OPA_SRC/opa.F90
===================================================================
--- trunk/NEMO/OPA_SRC/opa.F90	(revision 14)
+++ trunk/NEMO/OPA_SRC/opa.F90	(revision 15)
@@ -106,7 +106,5 @@
          OPEN( UNIT=numout, FILE='ocean.output', FORM='FORMATTED' )
       ENDIF
-#if defined key_mpp
-      OPEN( UNIT=nummpp, FILE='mpp.output', FORM='FORMATTED' )
-#endif
+      IF( lk_mpp )   OPEN( UNIT=nummpp, FILE='mpp.output', FORM='FORMATTED' )
 
 
@@ -222,9 +220,8 @@
       ENDIF
 
-#if defined key_mpp
-      CALL mppstop                          ! Close all files (mpp)
-#endif
+      IF( lk_mpp )   CALL mppstop                          ! Close all files (mpp)
 
    END SUBROUTINE opa_model
+
 
    SUBROUTINE opa_flg
Index: trunk/NEMO/OPA_SRC/par_EEL_R2.h90
===================================================================
--- trunk/NEMO/OPA_SRC/par_EEL_R2.h90	(revision 14)
+++ trunk/NEMO/OPA_SRC/par_EEL_R2.h90	(revision 15)
@@ -3,36 +3,37 @@
    !!   Ocean Domain : 2 km resolution Channel (EEL_R2 configuration)
    !!---------------------------------------------------------------------
-   CHARACTER (len=16), PARAMETER ::   &
-      cp_cfg = "eel"            ! name of the configuration
-   INTEGER, PARAMETER ::     &
-      jp_cfg = 2   ,         &  ! resolution of the configuration (km)
+   CHARACTER (len=16), PARAMETER ::   &  !:
+      cp_cfg = "eel"            !: name of the configuration
+   INTEGER, PARAMETER ::     &  !:
+      jp_cfg = 2   ,         &  !: resolution of the configuration (km)
 
       ! data size              !!! * size of all the input files *
-      jpidta  = 83,          &  ! 1st horizontal dimension ( >= jpi )
-      jpjdta  = 242,         &  ! 2nd    "            "    ( >= jpj )
-      jpkdta  = 30,          &  ! number of levels         ( >= jpk )
+      jpidta  = 83,          &  !: 1st horizontal dimension ( >= jpi )
+      jpjdta  = 242,         &  !: 2nd    "            "    ( >= jpj )
+      jpkdta  = 30,          &  !: number of levels         ( >= jpk )
 
       ! global domain size     !!! * full domain *
-      jpiglo  = jpidta,      &  ! 1st dimension of global domain --> i
-      jpjglo  = jpjdta,      &  ! 2nd    "                  "    --> j
-      jpk     = jpkdta,      &  ! number of vertical levels
+      jpiglo  = jpidta,      &  !: 1st dimension of global domain --> i
+      jpjglo  = jpjdta,      &  !: 2nd    "                  "    --> j
+      jpk     = jpkdta,      &  !: number of vertical levels
       ! zoom starting position
-      jpizoom =   1   ,      &  ! left bottom (i,j) indices of the zoom
-      jpjzoom =   1   ,      &  ! in data indices
+      jpizoom =   1   ,      &  !: left bottom (i,j) indices of the zoom
+      jpjzoom =   1   ,      &  !: in data indices
 
       ! Domain characteristics
-      jperio  =     1 ,      &  ! lateral cond. type (between 0 and 6)
-      jpisl   =     1 ,      &  ! number of islands
-      jpnisl  = jpiglo          ! maximum number of points per island
+      jperio  =     1 ,      &  !: lateral cond. type (between 0 and 6)
+      jpisl   =     1 ,      &  !: number of islands
+      jpnisl  = jpiglo          !: maximum number of points per island
 
    !!  Values set to pp_not_used indicates that this parameter is not used in THIS config.
    !!  Values set to pp_to_be_computed  indicates that variables will be computed in domzgr
-   REAL(wp), PARAMETER      ::  pp_not_used = 999999_wp  , &
-      &                    pp_to_be_computed = 0._wp
+   REAL(wp), PARAMETER ::   &  !:
+      pp_not_used       = 999999._wp  , & !: ???
+      pp_to_be_computed =      0._wp      !: ???
    !!
    !! Coefficients associated with the horizontal coordinate system (jphgr_msh /= 0 )
    !!
-   INTEGER,PARAMETER   ::    & !
-      jphgr_msh = 3            ! type of horizontal mesh
+   INTEGER,PARAMETER   ::    & !:
+      jphgr_msh = 3            !: type of horizontal mesh
       !                        ! = 0 curvilinear coordinate on the sphere
       !                        !     read in coordinate.nc file
@@ -47,26 +48,26 @@
       !   The mercator grid starts only approximately at gphi0 because
       !   of the constraint that the equator be a T point.
-   REAL(wp) ,PARAMETER ::     &  !
-      ppglam0  =    0.0_wp,   &  ! longitude of first raw and column T-point (jphgr_msh = 1)
-      ppgphi0  =  -35.0_wp,   &  ! latitude  of first raw and column T-point (jphgr_msh = 1)
+   REAL(wp) ,PARAMETER ::     &  !:
+      ppglam0  =    0.0_wp,   &  !: longitude of first raw and column T-point (jphgr_msh = 1)
+      ppgphi0  =  -35.0_wp,   &  !: latitude  of first raw and column T-point (jphgr_msh = 1)
       !                          ! latitude for the Coriolis or Beta parameter (jphgr_msh = 2 or 3)
-      ppe1_deg = pp_not_used ,   &  ! zonal      grid-spacing (degrees)
-      ppe2_deg = pp_not_used ,   &  ! meridional grid-spacing (degrees)
+      ppe1_deg = pp_not_used ,   &  !: zonal      grid-spacing (degrees)
+      ppe2_deg = pp_not_used ,   &  !: meridional grid-spacing (degrees)
       !
-      ppe1_m   = 2000.0_wp,   &  ! zonal      grid-spacing (meters )
-      ppe2_m   = 2000.0_wp       ! meridional grid-spacing (meters )
+      ppe1_m   = 2000.0_wp,   &  !: zonal      grid-spacing (meters )
+      ppe2_m   = 2000.0_wp       !: meridional grid-spacing (meters )
    !!
    !!  Coefficients associated with the vertical coordinate system
    !!
 
-   REAL(wp), PARAMETER  ::       &
-      &     ppsur = -2033.194295283385_wp   ,  &  ! Computed in domzgr
-      &     ppa0  =  155.8325369664153_wp   ,  &  !
-      &     ppa1  =  146.3615918601890_wp   ,  &  !
+   REAL(wp), PARAMETER  ::       &  !:
+      &     ppsur = -2033.194295283385_wp   ,  &  !: Computed in domzgr
+      &     ppa0  =  155.8325369664153_wp   ,  &  !:
+      &     ppa1  =  146.3615918601890_wp   ,  &  !:
       !
-      &     ppkth =  17.28520372419791_wp   ,  &  ! (non dimensional): gives the approximate
+      &     ppkth =  17.28520372419791_wp   ,  &  !: (non dimensional): gives the approximate
       !                                           !    layer number above which  stretching will
       !                                           !    be maximum. Usually of order jpk/2.
-      &     ppacr =  5.000000000000000_wp         ! (non dimensional): stretching factor
+      &     ppacr =  5.000000000000000_wp         !: (non dimensional): stretching factor
       !                                           !    for the grid. The highest zacr, the smallest
       !                                           !    the stretching.
@@ -76,8 +77,8 @@
    !!  they are computed from ppdzmin, pphmax , ppkth, ppacr in dom_zgr
    !!
-   REAL(wp), PARAMETER ::        &
-      &     ppdzmin = pp_not_used              ,  &  ! (meters): depth of the top (first) model layer
+   REAL(wp), PARAMETER ::        &   !:
+      &     ppdzmin = pp_not_used              ,  &  !: (meters): depth of the top (first) model layer
       !                                           !           depth of second "w" level
-      &     pphmax  = pp_not_used                    ! (meters):  maximum depth of the ocean
+      &     pphmax  = pp_not_used                    !: (meters):  maximum depth of the ocean
       !                                           !            depth of the last "w" level
 
Index: trunk/NEMO/OPA_SRC/par_EEL_R5.h90
===================================================================
--- trunk/NEMO/OPA_SRC/par_EEL_R5.h90	(revision 14)
+++ trunk/NEMO/OPA_SRC/par_EEL_R5.h90	(revision 15)
@@ -3,30 +3,30 @@
    !!   Ocean Domain : 5 km resolution Channel (EEL_R5 configuration)
    !!---------------------------------------------------------------------
-   CHARACTER (len=16), PARAMETER ::   &
-      cp_cfg = "eel"            ! name of the configuration
-   INTEGER, PARAMETER ::     &
-      jp_cfg = 5      ,      &  ! resolution of the configuration (km)
+   CHARACTER (len=16), PARAMETER ::   &  !:
+      cp_cfg = "eel"            !: name of the configuration
+   INTEGER, PARAMETER ::     &  !:
+      jp_cfg = 5      ,      &  !: resolution of the configuration (km)
 
       ! data size              !!! * size of all the input files
-      jpidta  = 202   ,      &  ! first horizontal dimension > or = to jpi
-      jpjdta  = 104   ,      &  ! second                     > or = to jpj
-      jpkdta  =  40   ,      &  ! number of levels           > or = to jpk
+      jpidta  = 202   ,      &  !: first horizontal dimension > or = to jpi
+      jpjdta  = 104   ,      &  !: second                     > or = to jpj
+      jpkdta  =  40   ,      &  !: number of levels           > or = to jpk
 
       ! total domain size      !!! * full domain *
-      jpiglo  = jpidta,      &  ! first  dimension of global domain --> i
-      jpjglo  = jpjdta,      &  ! second dimension of global domain --> j
-      jpk     = jpkdta,      &  ! number of vertical levels
+      jpiglo  = jpidta,      &  !: first  dimension of global domain --> i
+      jpjglo  = jpjdta,      &  !: second dimension of global domain --> j
+      jpk     = jpkdta,      &  !: number of vertical levels
       ! zoom starting position
-      jpizoom =   1   ,      &  ! left bottom (i,j) indices of the zoom
-      jpjzoom =   1   ,      &  ! in data indices
+      jpizoom =   1   ,      &  !: left bottom (i,j) indices of the zoom
+      jpjzoom =   1   ,      &  !: in data indices
 
       ! Domain characteristics
-      jperio  =   0   ,      &  ! lateral cond. type (between 0 and 6)
-      jpisl   =   1   ,      &  ! number of islands
-      jpnisl  = jpiglo          ! maximum number of points per island
+      jperio  =   0   ,      &  !: lateral cond. type (between 0 and 6)
+      jpisl   =   1   ,      &  !: number of islands
+      jpnisl  = jpiglo          !: maximum number of points per island
 
    !!  Values set to pp_not_used indicates that this parameter is not used in THIS config.
    !!  Values set to pp_to_be_computed  indicates that variables will be computed in domzgr
-   REAL(wp), PARAMETER ::   &
+   REAL(wp), PARAMETER ::   &  !:
       pp_not_used       = 999999._wp ,  &  !:
       pp_to_be_computed =      0._wp       !:
@@ -34,6 +34,6 @@
    !! Coefficients associated with the horizontal coordinate system (jphgr_msh /= 0 )
 
-   INTEGER,PARAMETER   ::    & !
-      jphgr_msh = 2            ! type of horizontal mesh
+   INTEGER,PARAMETER   ::    & !:
+      jphgr_msh = 2            !: type of horizontal mesh
       !                        ! = 0 curvilinear coordinate on the sphere
       !                        !     read in coordinate.nc file
@@ -48,25 +48,25 @@
       !   The mercator grid starts only approximately at gphi0 because
       !   of the constraint that the equator be a T point.
-   REAL(wp) ,PARAMETER ::     &  !
-      ppglam0  =    0.0_wp,   &  ! longitude of first raw and column T-point (jphgr_msh = 1)
-      ppgphi0  =  -35.0_wp,   &  ! latitude  of first raw and column T-point (jphgr_msh = 1)
+   REAL(wp) ,PARAMETER ::     &  !:
+      ppglam0  =    0.0_wp,   &  !: longitude of first raw and column T-point (jphgr_msh = 1)
+      ppgphi0  =  -35.0_wp,   &  !: latitude  of first raw and column T-point (jphgr_msh = 1)
       !                          ! latitude for the Coriolis or Beta parameter (jphgr_msh = 2 or 3)
-      ppe1_deg = pp_not_used,   &  ! zonal      grid-spacing (degrees)
-      ppe2_deg = pp_not_used,   &  ! meridional grid-spacing (degrees)
+      ppe1_deg = pp_not_used,   &  !: zonal      grid-spacing (degrees)
+      ppe2_deg = pp_not_used,   &  !: meridional grid-spacing (degrees)
       !
-      ppe1_m   = 5000.0_wp,   &  ! zonal      grid-spacing (meters)
-      ppe2_m   = 5000.0_wp       ! meridional grid-spacing (meters)
+      ppe1_m   = 5000.0_wp,   &  !: zonal      grid-spacing (meters)
+      ppe2_m   = 5000.0_wp       !: meridional grid-spacing (meters)
    !!
    !!  Coefficients associated with the vertical coordinate system
    !!
-   REAL(wp), PARAMETER  ::       &
-      &     ppsur = pp_to_be_computed       ,  &  ! Computed in domzgr, set ppdzmin, pphmax below
-      &     ppa0  = pp_to_be_computed       ,  &  !
-      &     ppa1  = pp_to_be_computed       ,  &  !
+   REAL(wp), PARAMETER  ::       &   !:
+      &     ppsur = pp_to_be_computed       ,  &  !: Computed in domzgr, set ppdzmin, pphmax below
+      &     ppa0  = pp_to_be_computed       ,  &  !:
+      &     ppa1  = pp_to_be_computed       ,  &  !:
       !
-      &     ppkth = 20._wp                  ,  &  ! (non dimensional): gives the approximate
+      &     ppkth = 20._wp                  ,  &  !: (non dimensional): gives the approximate
       !                                           !    layer number above which  stretching will
       !                                           !    be maximum. Usually of order jpk/2.
-      &     ppacr = 16.00000000000_wp             ! (non dimensional): stretching factor
+      &     ppacr = 16.00000000000_wp             !: (non dimensional): stretching factor
       !                                           !    for the grid. The highest zacr, the smallest
       !                                           !    the stretching.
@@ -76,8 +76,8 @@
    !!  they are computed from ppdzmin, pphmax , ppkth, ppacr in dom_zgr
    !!
-   REAL(wp), PARAMETER ::        &
-      &     ppdzmin = 120._wp               ,  &  ! (meters): depth of the top (first) model layer
+   REAL(wp), PARAMETER ::        &  !:
+      &     ppdzmin = 120._wp               ,  &  !: (meters): depth of the top (first) model layer
       !                                           !           depth of second "w" level
-      &     pphmax  = 4000._wp                    ! (meters):  maximum depth of the ocean
+      &     pphmax  = 4000._wp                    !: (meters):  maximum depth of the ocean
       !                                           !            depth of the last "w" level
    !!---------------------------------------------------------------------
Index: trunk/NEMO/OPA_SRC/par_EEL_R6.h90
===================================================================
--- trunk/NEMO/OPA_SRC/par_EEL_R6.h90	(revision 14)
+++ trunk/NEMO/OPA_SRC/par_EEL_R6.h90	(revision 15)
@@ -3,37 +3,37 @@
    !!   Ocean Domain : 6 km resolution Channel (EEL_R6 configuration)
    !!---------------------------------------------------------------------
-   CHARACTER (len=16), PARAMETER ::   &
-      cp_cfg = "eel"            ! name of the configuration
-   INTEGER, PARAMETER ::     &
-      jp_cfg = 6      ,      &  ! resolution of the configuration (km)
+   CHARACTER (len=16), PARAMETER ::   &  !:
+      cp_cfg = "eel"            !: name of the configuration
+   INTEGER, PARAMETER ::     &  !:
+      jp_cfg = 6      ,      &  !: resolution of the configuration (km)
 
       ! data size              !!! * size of all the input files *
-      jpidta  = 29,          &  ! 1st lateral dimension ( >= jpi )
-      jpjdta  = 83,          &  ! 2nd    "         "    ( >= jpj )
-      jpkdta  = 30,          &  ! number of levels      ( >= jpk )
+      jpidta  = 29,          &  !: 1st lateral dimension ( >= jpi )
+      jpjdta  = 83,          &  !: 2nd    "         "    ( >= jpj )
+      jpkdta  = 30,          &  !: number of levels      ( >= jpk )
 
       ! global domain size     !!! * full domain *
-      jpiglo  = jpidta,      &  ! 1st dimension of global domain --> i
-      jpjglo  = jpjdta,      &  ! 2nd    "                  "    --> j
-      jpk     = jpkdta,      &  ! number of vertical levels
+      jpiglo  = jpidta,      &  !: 1st dimension of global domain --> i
+      jpjglo  = jpjdta,      &  !: 2nd    "                  "    --> j
+      jpk     = jpkdta,      &  !: number of vertical levels
       ! starting position of the zoom
-      jpizoom =   1   ,      &  ! left bottom (i,j) indices of the zoom
-      jpjzoom =   1   ,      &  ! in data domain indices
+      jpizoom =   1   ,      &  !: left bottom (i,j) indices of the zoom
+      jpjzoom =   1   ,      &  !: in data domain indices
 
       ! Domain characteristics
-      jperio  =      1,      &  ! lateral cond. type (between 0 and 6)
-      jpisl   =      1,      &  ! number of islands
-      jpnisl  = jpiglo          ! maximum number of points per island
+      jperio  =      1,      &  !: lateral cond. type (between 0 and 6)
+      jpisl   =      1,      &  !: number of islands
+      jpnisl  = jpiglo          !: maximum number of points per island
 
    !!  Values set to pp_not_used indicates that this parameter is not used in THIS config.
    !!  Values set to pp_to_be_computed  indicates that variables will be computed in domzgr
-   REAL(wp), PARAMETER      ::  pp_not_used = 999999_wp , &
-      &                    pp_to_be_computed = 0._wp
-   !!
+   REAL(wp), PARAMETER ::   &  !:
+      pp_not_used       = 999999._wp ,  &  !: ???
+      pp_to_be_computed =      0._wp       !: ???
+
    !! Coefficients associated with the horizontal coordinate system (jphgr_msh /= 0 )
-   !!
 
-   INTEGER,PARAMETER   ::    & !
-      jphgr_msh = 3            ! type of horizontal mesh
+   INTEGER,PARAMETER   ::    & !:
+      jphgr_msh = 3            !: type of horizontal mesh
       !                        ! = 0 curvilinear coordinate on the sphere
       !                        !     read in coordinate.nc file
@@ -48,36 +48,36 @@
       !   The mercator grid starts only approximately at gphi0 because
       !   of the constraint that the equator be a T point.
-   REAL(wp) ,PARAMETER ::     &  !
-      ppglam0  =    0.0_wp,   &  ! longitude of first raw and column T-point (jphgr_msh = 1)
-      ppgphi0  =  -35.0_wp,   &  ! latitude  of first raw and column T-point (jphgr_msh = 1)
-      !                          ! latitude for the Coriolis or Beta parameter (jphgr_msh = 2 or 3)
-      ppe1_deg = pp_not_used,   &  ! zonal      grid-spacing (degrees)
-      ppe2_deg = pp_not_used,   &  ! meridional grid-spacing (degrees)
+   REAL(wp) ,PARAMETER ::     &  !:
+      ppglam0  =    0.0_wp,   &  !: longitude of first raw and column T-point (jphgr_msh = 1)
+      ppgphi0  =  -35.0_wp,   &  !: latitude  of first raw and column T-point (jphgr_msh = 1)
+      !                          !  latitude for the Coriolis or Beta parameter (jphgr_msh = 2 or 3)
+      ppe1_deg = pp_not_used,   &  !: zonal      grid-spacing (degrees)
+      ppe2_deg = pp_not_used,   &  !: meridional grid-spacing (degrees)
       !
-      ppe1_m   = 6000.0_wp,   &  ! zonal      grid-spacing (meters )
-      ppe2_m   = 6000.0_wp       ! meridional grid-spacing (meters )
-   !!
+      ppe1_m   = 6000.0_wp,   &  !: zonal      grid-spacing (meters )
+      ppe2_m   = 6000.0_wp       !: meridional grid-spacing (meters )
+
    !!  Coefficients associated with the vertical coordinate system
-   !!
-   REAL(wp), PARAMETER  ::       &
-      &     ppsur = -2033.194295283385_wp   ,  &  ! Computed in domzgr
-      &     ppa0  =  155.8325369664153_wp   ,  &  !
-      &     ppa1  =  146.3615918601890_wp   ,  &  !
+
+   REAL(wp), PARAMETER  ::       &  !:
+      &     ppsur = -2033.194295283385_wp   ,  &  !: Computed in domzgr
+      &     ppa0  =  155.8325369664153_wp   ,  &  !:
+      &     ppa1  =  146.3615918601890_wp   ,  &  !:
       !
-      &     ppkth =  17.28520372419791_wp   ,  &  ! (non dimensional): gives the approximate
-      !                                           !    layer number above which  stretching will
-      !                                           !    be maximum. Usually of order jpk/2.
-      &     ppacr =  5.000000000000000_wp         ! (non dimensional): stretching factor
-      !                                           !    for the grid. The highest zacr, the smallest
-      !                                           !    the stretching.
+      &     ppkth =  17.28520372419791_wp   ,  &  !: (non dimensional): gives the approximate
+      !                                           !     layer number above which  stretching will
+      !                                           !     be maximum. Usually of order jpk/2.
+      &     ppacr =  5.000000000000000_wp         !: (non dimensional): stretching factor
+      !                                           !     for the grid. The highest zacr, the smallest
+      !                                           !     the stretching.
 
-   !!
+
    !!  If both ppa0 ppa1 and ppsur are specified to 0, then
    !!  they are computed from ppdzmin, pphmax , ppkth, ppacr in dom_zgr
-   !!
-   REAL(wp), PARAMETER ::        &
-      &     ppdzmin = pp_not_used           ,  &  ! (meters): depth of the top (first) model layer
-      !                                           !           depth of second "w" level
-      &     pphmax  = pp_not_used                 ! (meters):  maximum depth of the ocean
-      !                                           !            depth of the last "w" level
+
+   REAL(wp), PARAMETER ::        &  !:
+      &     ppdzmin = pp_not_used           ,  &  !: (meters): depth of the top (first) model layer
+      !                                           !            depth of second "w" level
+      &     pphmax  = pp_not_used                 !: (meters):  maximum depth of the ocean
+      !                                           !             depth of the last "w" level
    !!---------------------------------------------------------------------
Index: trunk/NEMO/OPA_SRC/par_kind.F90
===================================================================
--- trunk/NEMO/OPA_SRC/par_kind.F90	(revision 14)
+++ trunk/NEMO/OPA_SRC/par_kind.F90	(revision 15)
@@ -13,5 +13,5 @@
    PRIVATE
 
-   INTEGER, PUBLIC, PARAMETER ::    &
+   INTEGER, PUBLIC, PARAMETER ::    &  !:
       jpbyt   = 8       ,           &  !: real size for mpp communications
       jpbytda = 4       ,           &  !: real size in input data files 4 or 8
@@ -25,10 +25,10 @@
    !            exponent = 37     exponent = 307
 
-   INTEGER, PUBLIC, PARAMETER ::        &  !  Floating point section
-      sp = SELECTED_REAL_KIND(6,37)  ,  &  !: single precision (real 4)
+   INTEGER, PUBLIC, PARAMETER ::        &  !: Floating point section
+      sp = SELECTED_REAL_KIND( 6, 37),  &  !: single precision (real 4)
       dp = SELECTED_REAL_KIND(12,307),  &  !: double precision (real 8)
       wp = dp                              !: working precision
 
-   INTEGER, PUBLIC, PARAMETER ::        &  !  Integer section
+   INTEGER, PUBLIC, PARAMETER ::        &  !: Integer section
       i4 = SELECTED_INT_KIND(9) ,       &  !: single precision (integer 4)
       i8 = SELECTED_INT_KIND(14)           !: double precision (integer 8)
Index: trunk/NEMO/OPA_SRC/par_oce.F90
===================================================================
--- trunk/NEMO/OPA_SRC/par_oce.F90	(revision 14)
+++ trunk/NEMO/OPA_SRC/par_oce.F90	(revision 15)
@@ -11,5 +11,5 @@
    !!----------------------------------------------------------------------
    !! * Modules used
-   USE par_kind          !: kind parameters
+   USE par_kind          ! kind parameters
 
    IMPLICIT NONE
@@ -22,5 +22,5 @@
    !!      so jpiglo=jpi and jpjglo=jpj
 
-   INTEGER, PARAMETER ::            &
+   INTEGER, PUBLIC, PARAMETER ::    &  !:
       jpni   = 1,                   &  !: number of processors following i 
       jpnj   = 1,                   &  !: number of processors following j
@@ -75,7 +75,7 @@
    !!   default option  :                               small closed basin
    !!---------------------------------------------------------------------
-   CHARACTER (len=16), PARAMETER :: &
+   CHARACTER(len=16), PUBLIC, PARAMETER ::   &  !:
       cp_cfg = "default"               !: name of the configuration
-   INTEGER, PARAMETER ::            &
+   INTEGER, PARAMETER ::            &  !:
       jp_cfg = 0  ,                 &  !: resolution of the configuration
 
@@ -98,8 +98,15 @@
       jpnisl  =  0                     !: maximum number of points per island
 
+      !!  Values set to pp_not_used indicates that this parameter is not used in THIS config.
+      !!  Values set to pp_to_be_computed  indicates that variables will be computed in domzgr
+      REAL(wp), PARAMETER ::   &  !:
+         pp_not_used       = 999999._wp , &  !:
+         pp_to_be_computed = 999999._wp      !:
+
+
    !! Horizontal grid parameters for domhgr
    !! =====================================
 
-   INTEGER, PARAMETER   ::   & !
+   INTEGER, PUBLIC, PARAMETER   ::   &  !:
       jphgr_msh = 0            !: type of horizontal mesh
       !                        !  = 0 curvilinear coordinate on the sphere
@@ -112,5 +119,5 @@
       !                        !      isotropic resolution (e1_deg)
 
-   REAL(wp) , PARAMETER ::    &  !
+   REAL(wp) , PUBLIC, PARAMETER ::   &   !:
       ppglam0  =    0.0_wp,   &  !: longitude of first raw and column T-point (jphgr_msh = 1)
       ppgphi0  =  -35.0_wp,   &  !: latitude  of first raw and column T-point (jphgr_msh = 1)
@@ -121,22 +128,20 @@
       ppe2_m   = 5000.0_wp       !: meridional grid-spacing (degrees)
 
-
-   !!
    !! Vertical grid parameter for domzgr
    !! ==================================
-   !!
-   REAL(wp), PARAMETER  ::       &
-      &     ppsur = -4762.96143546300_wp    ,  &  !: ORCA r4, r2 and r05 coefficients
-      &     ppa0  =   255.58049070440_wp    ,  &  !: (default coefficients)
-      &     ppa1  =   245.58132232490_wp    ,  &  !:
-      &     ppkth =    21.43336197938_wp    ,  &  !:
-      &     ppacr =     3.00000000000_wp          !:
+
+   REAL(wp), PUBLIC, PARAMETER  ::   &  !:
+      &     ppsur = -4762.96143546300_wp ,  &  !: ORCA r4, r2 and r05 coefficients
+      &     ppa0  =   255.58049070440_wp ,  &  !: (default coefficients)
+      &     ppa1  =   245.58132232490_wp ,  &  !:
+      &     ppkth =    21.43336197938_wp ,  &  !:
+      &     ppacr =     3.00000000000_wp       !:
 
    !!  If both ppa0 ppa1 and ppsur are specified to 0, then
    !!  they are computed from ppdzmin, pphmax , ppkth, ppacr in dom_zgr
 
-   REAL(wp), PARAMETER ::        &
-      &     ppdzmin = 10._wp                ,  &  !: Minimum vertical spacing
-      &     pphmax  = 5000._wp                    !: Maximum depth
+   REAL(wp), PUBLIC, PARAMETER ::   &  !:
+      &     ppdzmin = 10._wp             ,  &  !: Minimum vertical spacing
+      &     pphmax  = 5000._wp                 !: Maximum depth
 
    !!---------------------------------------------------------------------
@@ -146,21 +151,31 @@
    !! Domain Matrix size
    !!---------------------------------------------------------------------
-   INTEGER, PARAMETER ::            &
-      jpi = ( jpiglo-2*jpreci + (jpni-1) ) / jpni + 2*jpreci ,   &
-      !                                !: first  dimension of grid --> i
-      jpj = ( jpjglo-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj ,   &
-      !                                !: second dimension of grid --> j
-      jpim1 = jpi-1,                &  !:  jpi - 1
-      jpjm1 = jpj-1,                &  !:  jpj - 1
-      jpkm1 = jpk-1,                &  !:  jpk - 1
-      jpij  = jpi*jpj                  !:  jpi x jpj
+   INTEGER, PUBLIC, PARAMETER ::   &  !:
+      jpi = ( jpiglo-2*jpreci + (jpni-1) ) / jpni + 2*jpreci ,   &  !: first  dimension
+      jpj = ( jpjglo-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj ,   &  !: second dimension
+      jpim1 = jpi-1,                                             &  !: inner domain indices
+      jpjm1 = jpj-1,                                             &  !:   "            "
+      jpkm1 = jpk-1,                                             &  !:   "            "
+      jpij  = jpi*jpj                                               !:  jpi x jpj
 
    !!---------------------------------------------------------------------
-   !! ESOPA control
+   !! Optimization/control flags
    !!---------------------------------------------------------------------
 #if defined key_esopa
-   LOGICAL, PARAMETER ::   lk_esopa = .TRUE.   !: flag to activate the all options
+   LOGICAL, PUBLIC, PARAMETER ::   lk_esopa     = .TRUE.   !: flag to activate the all options
 #else
-   LOGICAL, PARAMETER ::   lk_esopa = .FALSE.  !: flag to activate the all options
+   LOGICAL, PUBLIC, PARAMETER ::   lk_esopa     = .FALSE.  !: flag to activate the all options
+#endif
+
+#if defined key_vectopt_memory
+   LOGICAL, PUBLIC, PARAMETER ::   lk_vopt_mem  = .TRUE.   !: vector optimization flag
+#else
+   LOGICAL, PUBLIC, PARAMETER ::   lk_vopt_mem  = .FALSE.  !: vector optimization flag
+#endif
+
+#if defined key_vectopt_loop
+   LOGICAL, PUBLIC, PARAMETER ::   lk_vopt_loop = .TRUE.   !: vector optimization flag
+#else
+   LOGICAL, PUBLIC, PARAMETER ::   lk_vopt_loop = .FALSE.  !: vector optimization flag
 #endif
 
Index: trunk/NEMO/OPA_SRC/phycst.F90
===================================================================
--- trunk/NEMO/OPA_SRC/phycst.F90	(revision 14)
+++ trunk/NEMO/OPA_SRC/phycst.F90	(revision 15)
@@ -15,5 +15,5 @@
 
    !! * Shared module variables
-   INTEGER, PUBLIC, DIMENSION(12) ::   &
+   INTEGER, PUBLIC, DIMENSION(12) ::   &  !:
       nbiss = (/ 31, 29, 31, 30, 31, 30,      &  !: number of days per month
          &       31, 31, 30, 31, 30, 31 /) ,  &  !  (leap-year)
@@ -21,10 +21,10 @@
          &       31, 31, 30, 31, 30, 31 /)       !  (365 days a year)
    
-   REAL(wp), PUBLIC ::                        &
+   REAL(wp), PUBLIC ::                        &  !:
       rpi = 3.141592653589793_wp           ,  &  !: pi
       rad = 3.141592653589793_wp / 180._wp ,  &  !: conversion from degre into radian
       rsmall = 0.5 * EPSILON( 1. )               !: smallest real computer value
    
-   REAL(wp), PUBLIC ::          &
+   REAL(wp), PUBLIC ::          & !:
       rday = 24.*60.*60.  ,     & !: day (s)
       rsiyea              ,     & !: sideral year (s)
@@ -41,7 +41,7 @@
       omega               ,    &  !: earth rotation parameter
       ra    = 6371229._wp ,    &  !: earth radius (meter)
-      g     = 9.80665_wp          !: gravity (m/s2)
-   
-   REAL(wp), PUBLIC ::         &
+      grav  = 9.80665_wp          !: gravity (m/s2)
+   
+   REAL(wp), PUBLIC ::         &  !:
       rtt      = 273.16_wp  ,  &  !: triple point of temperature (Kelvin)
       rt0      = 273.15_wp  ,  &  !: freezing point of water (Kelvin)
@@ -53,5 +53,5 @@
       ro0cpr                      !: = 1. / ( rau0 * rcp )
 
-   REAL(wp), PUBLIC ::            &
+   REAL(wp), PUBLIC ::            &  !:
       rcdsn   =   0.22_wp     ,   &  !: conductivity of the snow
       rcdic   =   2.034396_wp ,   &  !: conductivity of the ice
@@ -154,6 +154,6 @@
 
       IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) ' earth radius ra = ', ra, ' m'
-      IF(lwp) WRITE(numout,*) ' gravity      g  = ', g , ' m/s2'
+      IF(lwp) WRITE(numout,*) ' earth radius ra   = ', ra, ' m'
+      IF(lwp) WRITE(numout,*) ' gravity      grav = ', grav , ' m/s2'
 
       IF(lwp) WRITE(numout,*)
Index: trunk/NEMO/OPA_SRC/restart.F90
===================================================================
--- trunk/NEMO/OPA_SRC/restart.F90	(revision 14)
+++ trunk/NEMO/OPA_SRC/restart.F90	(revision 15)
@@ -45,8 +45,11 @@
 #  include "restart_fdir.h90"
 
-#elif defined key_mpp
-   !!----------------------------------------------------------------------
-   !!                       direct acces file one per processor
-   !!                  (merging/splitting is done off-line, eventually)
+#elif  ( defined key_mpp_mpi   ||   defined key_mpp_shmem )
+   !!----------------------------------------------------------------------
+   !!   'key_mpp_mpi'     OR      MPI massively parallel processing library
+   !!   'key_mpp_shmem'         SHMEM massively parallel processing library
+   !!----------------------------------------------------------------------
+   !!                 direct acces file one per processor
+   !!          (merging/splitting is done off-line, eventually)
    !!-----------------------------------------------------------------------
 #  include "restart_mpp.h90"
@@ -79,10 +82,8 @@
       LOGICAL ::   llbon
       CHARACTER (len=50) ::   clname, cln
-      INTEGER ::   &
-         ic, jc, itime
-      REAL(wp) :: zdate0, zinfo(10)
-
-      REAL(wp), DIMENSION(1) ::  &
-         zfice, zfblk                       ! used only in case of ice , bulk
+      INTEGER ::   ic, jc, itime
+      REAL(wp) ::   zdate0
+      REAL(wp), DIMENSION( 1) ::   zfice, zfblk   ! used only in case of ice & bulk
+      REAL(wp), DIMENSION(10) ::   zinfo(10)
       !!----------------------------------------------------------------------
       !!  OPA 8.5, LODYC-IPSL (2002)
Index: trunk/NEMO/OPA_SRC/restart_mpp.h90
===================================================================
--- trunk/NEMO/OPA_SRC/restart_mpp.h90	(revision 14)
+++ trunk/NEMO/OPA_SRC/restart_mpp.h90	(revision 15)
@@ -1,40 +1,46 @@
-  SUBROUTINE rst_write(kt)
-    !!---------------------------------------------------------------------
-    !!                  ***  ROUTINE rst_write  ***
-    !! 
-    !! ** Purpose :   Write restart fields in direct access format in mpp.
-    !!      one per process
-    !!
-    !! ** Method  :   each nstock time step , save fields which are necessary
-    !!      for restart
-    !!      Record #1 hold general information on the state of the run
-    !!      Data fields (either 3D or 2D ) starts ar record #2
-    !!
-    !! History :
-    !!        !  91-03  ()  original code
-    !!        !  91-11  (G. Madec)
-    !!        !  92-06  (M. Imbard)  correction restart file
-    !!        !  92-07  (M. Imbard)  split into diawri and rstwri
-    !!        !  98-02  (M. Guyon)  FETI method
-    !!        !  98-05  (G. Roullet)  free surface
-    !!        !  99-11  (M. Imbard)  NetCDF FORMAT with ioipsl
-    !!   8.5  !  03-06  (J.M. Molines)  F90: Free form, mpp support
-    !!----------------------------------------------------------------------
-    !! * Arguments 
-    INTEGER, INTENT( in ) ::   kt         ! ocean time-step
-
-    !! * Local declarations
-    INTEGER :: ino0, it0, ipcg0, isor0, itke0
-    INTEGER :: irecl8, irec
-    INTEGER :: ji,jj, jk
-    INTEGER :: inum = 11        ! temporary logical unit
-    INTEGER :: ios1 , ios2      ! flag for ice and bulk in the current run
-    INTEGER :: ios3             ! flag for free surface.  0 = none 1 = yes.  0 = none 1 = yes
-    INTEGER :: ios4             ! flag for coupled (1) or not (0)
-
-    CHARACTER(LEN=80)  :: clres
-    !!----------------------------------------------------------------------
-    !!  OPA 8.5, LODYC-IPSL (2002)
-    !!----------------------------------------------------------------------
+   !!---------------------------------------------------------------------
+   !!                     ***  restart_mpp.h90  *** 
+   !!---------------------------------------------------------------------
+
+   SUBROUTINE rst_write(kt)
+     !!---------------------------------------------------------------------
+     !!                  ***  ROUTINE rst_write  ***
+     !! 
+     !! ** Purpose :   Write restart fields in direct access format in mpp.
+     !!      one per process
+     !!
+     !! ** Method  :   each nstock time step , save fields which are necessary
+     !!      for restart
+     !!      Record #1 hold general information on the state of the run
+     !!      Data fields (either 3D or 2D ) starts ar record #2
+     !!
+     !! History :
+     !!        !  91-03  ()  original code
+     !!        !  91-11  (G. Madec)
+     !!        !  92-06  (M. Imbard)  correction restart file
+     !!        !  92-07  (M. Imbard)  split into diawri and rstwri
+     !!        !  98-02  (M. Guyon)  FETI method
+     !!        !  98-05  (G. Roullet)  free surface
+     !!        !  99-11  (M. Imbard)  NetCDF FORMAT with ioipsl
+     !!   8.5  !  03-06  (J.M. Molines)  F90: Free form, mpp support
+     !!----------------------------------------------------------------------
+     !! * Arguments 
+     INTEGER, INTENT( in ) ::   kt         ! ocean time-step
+
+     !! * Local declarations
+     INTEGER :: ino0, it0, ipcg0, isor0, itke0
+     INTEGER :: irecl8, irec
+     INTEGER :: jk               ! dummy loop indices
+     INTEGER :: inum = 11        ! temporary logical unit
+     INTEGER :: ios1 , ios2      ! flag for ice and bulk in the current run
+     INTEGER :: ios3             ! flag for free surface.  0 = none 1 = yes.  0 = none 1 = yes
+     INTEGER :: ios4             ! flag for coupled (1) or not (0)
+
+     CHARACTER(LEN=80)  :: clres
+
+     REAL(wp), DIMENSION( 1) ::   zfice, zfblk   ! used only in case of ice & bulk
+     !!----------------------------------------------------------------------
+     !!  OPA 8.5, LODYC-IPSL (2002)
+     !!----------------------------------------------------------------------
 
     IF( MOD( kt, nstock ) == 0 .OR. kt == nitend ) THEN
@@ -197,8 +203,10 @@
 
 #if defined key_ice_lim
-          WRITE(inum,REC=irec) fsst(:,:)  ; irec = irec + 1
-          WRITE(inum,REC=irec) fsss(:,:)  ; irec = irec + 1
-          WRITE(inum,REC=irec) fun (:,:)  ; irec = irec + 1
-          WRITE(inum,REC=irec) fvn (:,:)  ; irec = irec + 1
+          zfice(1) = FLOAT( nfice )                                      ! Louvain La Neuve Sea Ice Model
+          WRITE(inum,REC=irec) zfice(:)     ; irec = irec + 1
+          WRITE(inum,REC=irec) sst_io(:,:)  ; irec = irec + 1
+          WRITE(inum,REC=irec) sss_io(:,:)  ; irec = irec + 1
+          WRITE(inum,REC=irec) u_io  (:,:)  ; irec = irec + 1
+          WRITE(inum,REC=irec) v_io  (:,:)  ; irec = irec + 1
 #    if defined key_coupled
           WRITE(inum,REC=irec) alb_ice(:,:)  ; irec = irec + 1
@@ -206,4 +214,6 @@
 #endif
 # if defined key_flx_bulk_monthly || defined key_flx_bulk_daily
+          zfblk(1) = FLOAT( nfbulk )                                 ! Bulk
+          WRITE(inum,REC=irec) zfblk(:)   ; irec = irec + 1
           WRITE(inum,REC=irec) gsst(:,:)  ; irec = irec + 1
 # endif
@@ -245,5 +255,5 @@
     INTEGER :: irecl8, irec
     INTEGER :: ji,jj,jk
-    INTEGER :: ick, iwork, inum
+    INTEGER :: ick, inum
     INTEGER :: ios1, ios2, ios3, ios4
 
@@ -251,4 +261,6 @@
 
     LOGICAL   :: lstop
+
+      REAL(wp), DIMENSION( 1) ::   zfice, zfblk   ! used only in case of ice & bulk
 
     !!----------------------------------------------------------------------
@@ -330,7 +342,5 @@
 
     ick = narea -iarea
-#if defined key_mpp
-    CALL mpp_sum(ick)
-#endif
+    CALL mpp_sum( ick )
 
     IF (ick /= 0 ) THEN
@@ -495,26 +505,23 @@
     ! check if it was in the previous run
     IF ( ios1 == 1 ) THEN
-       READ(inum,REC=irec) fsst(:,:) ; irec = irec + 1
-       READ(inum,REC=irec) fsss(:,:) ; irec = irec + 1
-       READ(inum,REC=irec) fun (:,:) ; irec = irec + 1
-       READ(inum,REC=irec) fvn (:,:) ; irec = irec + 1
+       READ(inum,REC=irec) zfice(:)    ; irec = irec + 1
+       READ(inum,REC=irec) sst_io(:,:) ; irec = irec + 1
+       READ(inum,REC=irec) sss_io(:,:) ; irec = irec + 1
+       READ(inum,REC=irec) u_io  (:,:) ; irec = irec + 1
+       READ(inum,REC=irec) v_io  (:,:) ; irec = irec + 1
 #  if defined key_coupled
        READ(inum,REC=irec) alb_ice(:,:) ; irec = irec + 1
 #  endif
     ENDIF
-    IF ( iice1 /= nfice .OR. ios1 == 0 ) THEN
+    IF ( zfice(1) /= FLOAT(nfice) .OR. ios1 == 0 ) THEN
          IF(lwp) WRITE(numout,*)
          IF(lwp) WRITE(numout,*) 'rst_read :  LLN sea Ice Model => Ice initialization'
          IF(lwp) WRITE(numout,*)
-         fsst(:,:) = 0.
-         fsss(:,:) = 0.
-         fun (:,:) = 0.
-         fvn (:,:) = 0.
-         fsst(:,:) = fsst(:,:) + ( nfice-1 )*( tn(:,:,1) + rt0 )
-         fsss(:,:) = fsss(:,:) + ( nfice-1 )*  sn(:,:,1)
+         sst_io(:,:) = sst_io(:,:) + ( nfice-1 )*( tn(:,:,1) + rt0 )
+         sss_io(:,:) = sss_io(:,:) + ( nfice-1 )*  sn(:,:,1)
          DO jj = 2, jpj
             DO ji = 2, jpi
-               fun(ji,jj) = fun(ji,jj) + (nfice-1)*0.5*( un(ji-1,jj,1)+un(ji-1,jj-1,1) )
-               fvn(ji,jj) = fvn(ji,jj) + (nfice-1)*0.5*( vn(ji,jj-1,1)+vn(ji-1,jj-1,1) )
+               u_io(ji,jj) = u_io(ji,jj) + (nfice-1)*0.5*( un(ji-1,jj,1)+un(ji-1,jj-1,1) )
+               v_io(ji,jj) = v_io(ji,jj) + (nfice-1)*0.5*( vn(ji,jj-1,1)+vn(ji-1,jj-1,1) )
             END DO
          END DO
@@ -528,11 +535,12 @@
       ! bulk forcing 
       IF( ios2 == 1 ) THEN
+         READ(inum,REC=irec) zfblk(:)   ; irec = irec + 1
          READ(inum,REC=irec) gsst (:,:) ; irec = irec + 1
       ENDIF
-      IF( ibulk1 /= nfbulk  .OR. ios2 == 0 ) THEN
+      IF( zfblk(1) /= FLOAT(nfbulk)  .OR. ios2 == 0 ) THEN
          IF(lwp) WRITE(numout,*)
          IF(lwp) WRITE(numout,*) 'rst_read :  Bulk forcing ==> Initialization '
          IF(lwp) WRITE(numout,*)
-         gsst(:,:) = 0.
+         gsst(:,:) = 0.e0
          gsst(:,:) = gsst(:,:) + ( nfbulk-1 )*( tn(:,:,1) + rt0 )
       ENDIF
Index: trunk/NEMO/OPA_SRC/step.F90
===================================================================
--- trunk/NEMO/OPA_SRC/step.F90	(revision 14)
+++ trunk/NEMO/OPA_SRC/step.F90	(revision 15)
@@ -168,4 +168,5 @@
       !! * local declarations
       INTEGER ::   indic    ! error indicator if < 0
+      INTEGER ::   ii0, ii1, ij0, ij1   ! temporary integers
       !! ---------------------------------------------------------------------
 
@@ -245,13 +246,15 @@
             CASE ( 05 )                         ! ORCA R2 configuration
                avt  (:,:,2) = avt  (:,:,2) + 1.e-3 * upsrnfh(:,:)   ! increase diffusivity of rivers mouths
-               IF( lk_zdfddm )   fsavs(:,:,2) = fsavs(:,:,2) + 1.e-3 * upsrnfh(:,:)   
             CASE ( 2  )                         ! ORCA R2 configuration
-               avt( mi0(140):mi1(140) , mj0(102):mj1(102) , 2:jpkm1 ) =    &   ! Strait of Gibraltar
-               avt( mi0(140):mi1(140) , mj0(102):mj1(102) , 2:jpkm1 ) / 5.e0    
-               avt( mi0(161):mi1(161) , mj0( 88):mj1( 88) , 2:jpkm1 ) =    &   ! Strait of Bab el Mandeb
-               avt( mi0(161):mi1(161) , mj0( 88):mj1( 88) , 2:jpkm1 ) / 5.e0
+               ij0 = 102   ;   ij1 = 102   ;   ii0 = 140   ;   ii1 = 140
+               avt( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) , 2:jpkm1 ) =    &   ! Strait of Gibraltar
+               avt( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) , 2:jpkm1 ) / 5.e0    
+               ij0 =  88   ;   ij1 =  88   ;   ii0 = 161   ;   ii1 = 161
+               avt( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) , 2:jpkm1 ) =    &   ! Strait of Bab el Mandeb
+               avt( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) , 2:jpkm1 ) / 5.e0
             CASE ( 4  )                         ! ORCA R4 configuration
-               avt( mi0( 71):mi1( 71) , mj0( 52):mj1( 52) , 2:jpkm1 ) =    &   ! Strait of Gibraltar
-               avt( mi0( 71):mi1( 71) , mj0( 52):mj1( 52) , 2:jpkm1 ) / 5.e0
+               ij0 =  52   ;   ij1 =  52   ;   ii0 =  71   ;   ii1 =  71
+               avt( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) , 2:jpkm1 ) =    &   ! Strait of Gibraltar
+               avt( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) , 2:jpkm1 ) / 5.e0
          END SELECT
       ENDIF
@@ -332,7 +335,7 @@
 
       !                                                        ! vertical diffusion
-      IF( l_trazdf_exp      )   CALL tra_zdf_exp( kstp )               ! explicit time stepping (time splitting scheme)
-      IF( l_trazdf_imp      )   CALL tra_zdf_imp( kstp )               ! implicit time stepping (euler backward)
-      IF( l_trazdf_iso      )   CALL tra_zdf_iso( kstp )               ! isopycnal
+      IF( l_trazdf_exp      )   CALL tra_zdf_exp     ( kstp )          ! explicit time stepping (time splitting scheme)
+      IF( l_trazdf_imp      )   CALL tra_zdf_imp     ( kstp )          ! implicit time stepping (euler backward)
+      IF( l_trazdf_iso      )   CALL tra_zdf_iso     ( kstp )          ! isopycnal
       IF( l_trazdf_iso_vo   )   CALL tra_zdf_iso_vopt( kstp )          ! vector opt. isopycnal
 
@@ -377,8 +380,8 @@
 
       !                                                     ! horizontal gradient of Hydrostatic pressure 
-      IF( l_dyn_hpg     )   CALL dyn_hpg     ( kstp )             ! default case  (k-j-i loop)
-      IF( l_dyn_hpg_tsk )   CALL dyn_hpg_atsk( kstp )             ! autatask case (j-k-i loop)
-
-                            CALL dyn_zad    ( kstp )        ! vertical advection       
+      IF( lk_dynhpg        )   CALL dyn_hpg     ( kstp )             ! default case  (k-j-i loop)
+      IF( lk_dynhpg_tsk    )   CALL dyn_hpg_atsk( kstp )             ! autatask case (j-k-i loop)
+
+                               CALL dyn_zad    ( kstp )     ! vertical advection       
 
       !                                                     ! vertical diffusion
Index: trunk/NEMO/OPA_SRC/stpctl.F90
===================================================================
--- trunk/NEMO/OPA_SRC/stpctl.F90	(revision 14)
+++ trunk/NEMO/OPA_SRC/stpctl.F90	(revision 15)
@@ -55,8 +55,4 @@
       INTEGER, DIMENSION(3) ::   ilocu      ! 
       INTEGER, DIMENSION(2) ::   ilocs      ! 
-#if defined key_dynspg_rl
-      INTEGER  ::   jni                     ! dummy loop indice
-      REAL(wp) ::   zfact                   ! temporary scalar
-#endif
       !!----------------------------------------------------------------------
       !!  OPA 8.5, LODYC-IPSL (2002)
@@ -115,7 +111,6 @@
         END DO 
       END DO        
-#if defined key_mpp    
-      CALL mpp_max( zumax )
-#endif
+      IF( lk_mpp )   CALL mpp_max( zumax )   ! max over the global domain
+
       IF( MOD( kt, nwrite ) == 1 ) THEN
          IF(lwp) WRITE(numout,*) ' ==>> time-step= ',kt,' abs(U) max: ', zumax
@@ -126,9 +121,9 @@
          ij = ilocu(2) + njmpp - 1
          ik = ilocu(3)
-#if defined key_mpp
-         CALL mpp_isl( ii )
-         CALL mpp_isl( ij )
-         CALL mpp_isl( ik )
-#endif
+         IF( lk_mpp ) THEN
+            CALL mpp_isl( ii )
+            CALL mpp_isl( ij )
+            CALL mpp_isl( ik )
+         ENDIF
          IF(lwp) THEN
             WRITE(numout,cform_err)
@@ -155,7 +150,6 @@
          END DO
       END DO
-#if defined key_mpp    
-      CALL mpp_min( zsmin )
-#endif
+      IF( lk_mpp )   CALL mpp_min( zsmin )   ! min over the global domain
+
       IF( MOD( kt, nwrite ) == 1 ) THEN
          IF(lwp) WRITE(numout,*) ' ==>> time-step= ',kt,' SSS min:', zsmin
@@ -165,8 +159,7 @@
          ii = ilocs(1) + nimpp - 1
          ij = ilocs(2) + njmpp - 1
-#if defined key_mpp
-         CALL mpp_isl( ii )
-         CALL mpp_isl( ij )
-#endif
+         IF( lk_mpp )   CALL mpp_isl( ii )
+         IF( lk_mpp )   CALL mpp_isl( ij )
+
          IF(lwp) THEN
             WRITE(numout,cform_err)
