Index: /trunk/NEMO/C1D_SRC/diawri1d.F90
===================================================================
--- /trunk/NEMO/C1D_SRC/diawri1d.F90	(revision 358)
+++ /trunk/NEMO/C1D_SRC/diawri1d.F90	(revision 359)
@@ -87,4 +87,5 @@
       !!   8.5  !  02-09  (G. Madec)  F90: Free form and module
       !!   9.0  !  04-10  (C. Ethe)   1D Configuration
+      !!    "   !  05-11  (V. Garnier) Surface pressure gradient organization
       !!----------------------------------------------------------------------
       !! * Modules used
@@ -193,5 +194,5 @@
             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
 
-#if defined key_dynspg_fsc && defined key_ice_lim
+#if ! defined key_dynspg_rl && defined key_ice_lim
          ! sowaflup = sowaflep + sorunoff + sowafldp + a term associated to
          !    internal damping to Levitus that can be diagnosed from others
@@ -364,5 +365,5 @@
       CALL histwrite( nid_T, "sosstsst", it, tn(:,:,1)     , ndim_hT, ndex_hT )   ! sea surface temperature
       CALL histwrite( nid_T, "sosaline", it, sn(:,:,1)     , ndim_hT, ndex_hT )   ! sea surface salinity
-#if defined key_dynspg_fsc && defined key_ice_lim
+#if ! defined key_dynspg_rl && defined key_ice_lim
       CALL histwrite( nid_T, "iowaflup", it, fsalt(:,:)    , ndim_hT, ndex_hT )   ! ice=>ocean water flux
       CALL histwrite( nid_T, "sowaflep", it, fmass(:,:)    , ndim_hT, ndex_hT )   ! atmos=>ocean water flux
Index: /trunk/NEMO/C1D_SRC/icestp1d.F90
===================================================================
--- /trunk/NEMO/C1D_SRC/icestp1d.F90	(revision 358)
+++ /trunk/NEMO/C1D_SRC/icestp1d.F90	(revision 359)
@@ -227,4 +227,5 @@
       !!        !  01-03  (D. Ludicone, E. Durand, G. Madec) free surf.
       !!   2.0  !  02-09  (G. Madec, C. Ethe)  F90: Free form and module
+      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization
       !!----------------------------------------------------------------------
       !! * arguments
@@ -246,5 +247,5 @@
          emps   (:,:) = 0.e0
          erp    (:,:) = 0.e0
-#if defined key_dynspg_fsc 
+#if ! defined key_dynspg_rl 
          dmp    (:,:) = 0.e0
 #endif
@@ -262,5 +263,5 @@
       qsr (:,:) = fsolar(:,:)                     ! solar flux
       
-#if defined key_dynspg_fsc     
+#if ! defined key_dynspg_rl     
       ! total concentration/dilution effect (use on SSS)
       emps(:,:) = fmass(:,:) + fsalt(:,:) + runoff(:,:) + erp(:,:) + empold
@@ -313,9 +314,10 @@
       !! History :
       !!   9.0  !  04-01  (G. Madec, C. Ethe)  Original code
+      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization
       !!----------------------------------------------------------------------
       !! * Local declarations
       INTEGER ::   ji, jj                   ! dummy loop indices
       REAL(wp) ::   zerp, ztrp, zsrp
-#if defined key_dynspg_fsc
+#if ! defined key_dynspg_rl
       REAL(wp) ::   zwei
       REAL(wp) ::   zerpplus(jpi,jpj), zerpminus(jpi,jpj)
@@ -342,5 +344,5 @@
       zsrp  = ztrp * ro0cpr * rauw   ! (Kg/m2/s2) 
 
-#if defined key_dynspg_fsc 
+#if ! defined key_dynspg_rl 
       ! Free-surface
          
Index: /trunk/NEMO/LIM_SRC/limflx.F90
===================================================================
--- /trunk/NEMO/LIM_SRC/limflx.F90	(revision 358)
+++ /trunk/NEMO/LIM_SRC/limflx.F90	(revision 359)
@@ -72,11 +72,13 @@
       REAL(wp) ::   &
          zinda  ,              &  ! switch for testing the values of ice concentration
-         z1mthcm,              &  ! 1 - thcm
+         z1mthcm                  ! 1 - thcm
 !!         zfcm1  ,              &  ! solar  heat fluxes
 !!         zfcm2  ,              &  !  non solar heat fluxes
 #if defined key_lim_fdd   
+      REAL(wp) ::   &
          zfons,                &  ! salt exchanges at the ice/ocean interface
          zpme                     ! freshwater exchanges at the ice/ocean interface
 #else
+      REAL(wp) ::   &
          zprs  , zfons,        &  ! salt exchanges at the ice/ocean interface
          zpmess                   ! freshwater exchanges at the ice/ocean interface
Index: /trunk/NEMO/OPA_SRC/DIA/diafwb.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/DIA/diafwb.F90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/DIA/diafwb.F90	(revision 359)
@@ -4,7 +4,7 @@
    !! Ocean diagnostics: freshwater budget
    !!======================================================================
-#if ( defined key_orca_r2 || defined  key_orca_r4 ) && defined key_dynspg_fsc && ! defined key_coupled
-   !!----------------------------------------------------------------------
-   !!   "key_dynspg_fsc" and "key_orca_r2 or 4"
+#if ( defined key_orca_r2 || defined  key_orca_r4 ) && ! defined key_dynspg_rl && ! defined key_coupled
+   !!----------------------------------------------------------------------
+   !!   NOT "key_dynspg_rl" and "key_orca_r2 or 4"
    !!----------------------------------------------------------------------
    !!   dia_fwb     : freshwater budget for global ocean configurations
@@ -61,4 +61,5 @@
       !!   8.2  !  01-02  (E. Durand)  Original code
       !!   8.5  !  02-06  (G. Madec)  F90: Free form and module
+      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization
       !!----------------------------------------------------------------------
       !! * Arguments
Index: /trunk/NEMO/OPA_SRC/DIA/diaspr.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/DIA/diaspr.F90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/DIA/diaspr.F90	(revision 359)
@@ -96,4 +96,5 @@
       !!        !  98-02  (M. Guyon)  FETI method
       !!   8.5  !  02-06  (G. Madec)  F90: Free form and module
+      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization
       !!----------------------------------------------------------------------
       !! * Arguments
@@ -140,5 +141,5 @@
 
          ! control
-# if defined key_dynspg_fsc
+# if ! defined key_dynspg_rl
       IF(lwp) WRITE(numout,cform_err)
       IF(lwp) WRITE(numout,*) '          surface pressure already explicitly computed !!'
Index: /trunk/NEMO/OPA_SRC/DIA/diawri.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/DIA/diawri.F90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/DIA/diawri.F90	(revision 359)
@@ -98,4 +98,5 @@
       !!        !  99-02  (E. Guilyardi)  name of netCDF files + variables
       !!   8.5  !  02-09  (G. Madec)  F90: Free form and module
+      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization
       !!----------------------------------------------------------------------
       !! * Modules used
@@ -237,12 +238,12 @@
          CALL histdef( nid_T, "sosaline", "Sea Surface Salinity"               , "PSU"    ,   &  ! sss
             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
-#if defined key_dynspg_fsc
+#if defined key_dynspg_rl
+         CALL histdef( nid_T, "sobarstf","Barotropic StreamFunction"           , "m3/s2"  ,   &  ! bsf
+            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
+#else
          CALL histdef( nid_T, "sossheig", "Sea Surface Height"                 , "m"      ,   &  ! ssh
             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
-#else
-         CALL histdef( nid_T, "sobarstf","Barotropic StreamFunction"           , "m3/s2"  ,   &  ! bsf
-            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
-#endif
-#if defined key_dynspg_fsc && defined key_ice_lim
+#endif
+#if ! defined key_dynspg_rl && defined key_ice_lim
          ! sowaflup = sowaflep + sorunoff + sowafldp + a term associated to
          !    internal damping to Levitus that can be diagnosed from others
@@ -325,5 +326,5 @@
          CALL histdef( nid_U, "sozotaux", "Wind Stress along i-axis"           , "N/m2"   ,   &  ! taux
             &          jpi, jpj, nh_U, 1  , 1, 1  , - 99, 32, clop, zsto, zout )
-#if ! defined key_dynspg_fsc
+#if defined key_dynspg_rl
          CALL histdef( nid_U, "sozospgx", "Zonal Surface Pressure Gradient"    , "N/kg"   ,   &  ! spgu
             &          jpi, jpj, nh_U, 1  , 1, 1  , - 99, 32, clop, zsto, zout )
@@ -342,5 +343,5 @@
          CALL histdef( nid_V, "sometauy", "Wind Stress along j-axis"           , "N/m2"   ,   &  ! tauy
             &          jpi, jpj, nh_V, 1  , 1, 1  , - 99, 32, clop, zsto, zout )
-#if ! defined key_dynspg_fsc
+#if defined key_dynspg_rl
          CALL histdef( nid_V, "somespgy", "Meridional Surface Pressure Grad."  , "N/kg"   ,   &  ! spgv
             &          jpi, jpj, nh_V, 1  , 1, 1  , - 99, 32, clop, zsto, zout )
@@ -407,10 +408,10 @@
       CALL histwrite( nid_T, "sosstsst", it, tn(:,:,1)     , ndim_hT, ndex_hT )   ! sea surface temperature
       CALL histwrite( nid_T, "sosaline", it, sn(:,:,1)     , ndim_hT, ndex_hT )   ! sea surface salinity
-#if defined key_dynspg_fsc
+#if defined key_dynspg_rl
+      CALL histwrite( nid_T, "sobarstf", it, bsfn          , ndim_hT, ndex_hT )   ! barotropic streamfunction
+#else
       CALL histwrite( nid_T, "sossheig", it, sshn          , ndim_hT, ndex_hT )   ! sea surface height
-#else
-      CALL histwrite( nid_T, "sobarstf", it, bsfn          , ndim_hT, ndex_hT )   ! barotropic streamfunction
-#endif
-#if defined key_dynspg_fsc && defined key_ice_lim
+#endif
+#if ! defined key_dynspg_rl && defined key_ice_lim
       CALL histwrite( nid_T, "iowaflup", it, fsalt(:,:)    , ndim_hT, ndex_hT )   ! ice=>ocean water flux
       CALL histwrite( nid_T, "sowaflep", it, fmass(:,:)    , ndim_hT, ndex_hT )   ! atmos=>ocean water flux
@@ -460,5 +461,5 @@
 #endif
       CALL histwrite( nid_U, "sozotaux", it, taux          , ndim_hU, ndex_hU )   ! i-wind stress
-#if ! defined key_dynspg_fsc
+#if defined key_dynspg_rl
       CALL lbc_lnk( spgu, 'U', -1. )
       CALL histwrite( nid_U, "sozospgx", it, spgu          , ndim_hU, ndex_hU )   ! i-surf. press. grad.
@@ -471,5 +472,5 @@
 #endif
       CALL histwrite( nid_V, "sometauy", it, tauy          , ndim_hV, ndex_hV )   ! j-wind stress
-#if ! defined key_dynspg_fsc
+#if defined key_dynspg_rl
       CALL lbc_lnk( spgv, 'V', -1. )
       CALL histwrite( nid_V, "somespgy", it, spgv          , ndim_hV, ndex_hV )   ! j-surf. pressure grad.
@@ -534,4 +535,5 @@
       !!   8.5  !  02-06  (A.Bozec, E. Durand)  Original code (diainit.F)
       !!   9.0  !  02-12  (G. Madec)  merge of diabort and diainit, F90
+      !!    "   !  05-11  (V. Garnier) Surface pressure gradient organization
       !!----------------------------------------------------------------------
       !! * Modules used
@@ -584,4 +586,11 @@
       CALL histdef( id_i, "votemper", "Temperature"           , "C"      ,   &   ! temperature
          &          jpi, jpj, nh_i, jpk, 1, jpk, nz_i, 32, clop, zsto, zout )
+#if defined key_dynspg_rl
+      CALL histdef( id_i, "sobarstf","Barotropic StreamFunction", "m3/s2"  ,   &  ! bsf
+         &          jpi, jpj, nh_i, 1  , 1, 1  , nz_i, 32, clop, zsto, zout )
+#else
+      CALL histdef( id_i, "sossheig", "Sea Surface Height"    , "m"      ,   &  ! ssh
+         &          jpi, jpj, nh_i, 1  , 1, 1  , nz_i, 32, clop, zsto, zout )
+#endif
       CALL histdef( id_i, "vozocrtx", "Zonal Current"         , "m/s"    ,   &   ! zonal current
          &          jpi, jpj, nh_i, jpk, 1, jpk, nz_i, 32, clop, zsto, zout )
@@ -615,4 +624,9 @@
       CALL histwrite( id_i, "votemper", 1, tn    , jpi*jpj*jpk, idex )    ! now temperature
       CALL histwrite( id_i, "vosaline", 1, sn    , jpi*jpj*jpk, idex )    ! now salinity
+#if defined key_dynspg_rl
+      CALL histwrite( id_i, "sobarstf", 1, bsfn  , jpi*jpj    , idex )    ! barotropic streamfunction
+#else
+      CALL histwrite( id_i, "sossheig", 1, sshn  , jpi*jpj    , idex )    ! sea surface height
+#endif
       CALL histwrite( id_i, "vozocrtx", 1, un    , jpi*jpj*jpk, idex )    ! now i-velocity
       CALL histwrite( id_i, "vomecrty", 1, vn    , jpi*jpj*jpk, idex )    ! now j-velocity
Index: /trunk/NEMO/OPA_SRC/DIA/diawri_dimg.h90
===================================================================
--- /trunk/NEMO/OPA_SRC/DIA/diawri_dimg.h90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/DIA/diawri_dimg.h90	(revision 359)
@@ -69,4 +69,5 @@
     !!      additions : 97-2002 ( Clipper Group ) dimg files
     !!                  dec 2003 ( J.M. Molines) f90, mpp output for OPA9.0
+    !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization
     !!----------------------------------------------------------------------
     !! * modules used
@@ -163,5 +164,5 @@
        fsel(:,:,4 ) = fsel(:,:,4 ) + emp (:,:)
        fsel(:,:,5 ) = fsel(:,:,5 ) + tb  (:,:,1) - sst(:,:)
-#if defined key_dynspg_fsc
+#if ! defined key_dynspg_rl
        fsel(:,:,6 ) = fsel(:,:,6 ) + sshn(:,:)    ! SSH
 #else
@@ -240,5 +241,5 @@
           fsel(:,:,5 ) = (tb  (:,:,1) -sst(:,:)) *tmask(:,:,1)
 
-#if defined key_dynspg_fsc
+#if ! defined key_dynspg_rl
           fsel(:,:,6 ) = sshn(:,:)
 #else
Index: /trunk/NEMO/OPA_SRC/DOM/dom_oce.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/DOM/dom_oce.F90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/DOM/dom_oce.F90	(revision 359)
@@ -182,4 +182,5 @@
       rdtmax = 3600._wp ,    &  !: maximum time step on tracers
       rdth   =  800._wp ,    &  !: depth variation of tracer step
+      rdtbt  =   90._wp ,    &  !: barotropic time step for the dynamics (lk_dynspg_ts=T)
       atfp   = 0.1_wp   ,    &  !: asselin time filter parameter
       atfp1                     !: asselin time filter coeff. (atfp1= 1-2*atfp)
Index: /trunk/NEMO/OPA_SRC/DOM/domain.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/DOM/domain.F90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/DOM/domain.F90	(revision 359)
@@ -68,4 +68,5 @@
       !!        !  01-05  (E.Durand - G. Madec) insert closed sea
       !!   8.5  !  02-08  (G. Madec)  F90: Free form and module
+      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization
       !!----------------------------------------------------------------------
       !! * Local declarations
@@ -93,42 +94,22 @@
       ! Local depth or Inverse of the local depth of the water column at u- and v-points
       ! ------------------------------
-#if defined key_dynspg_fsc
       ! Ocean depth at U- and V-points
       hu(:,:) = 0.
       hv(:,:) = 0.
-
       DO jk = 1, jpk
          hu(:,:) = hu(:,:) + fse3u(:,:,jk) * umask(:,:,jk)
          hv(:,:) = hv(:,:) + fse3v(:,:,jk) * vmask(:,:,jk)
       END DO
-# if defined key_trdvor
       ! 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)
-# endif
-
-#elif defined key_dynspg_rl
-      ! 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)
-#endif
+
 
       CALL dom_stp                        ! Time step
@@ -163,5 +144,5 @@
       NAMELIST/namdom/ ntopo , e3zps_min, e3zps_rat, ngrid  , nmsh  ,   &
          &             nacc  , atfp     , rdt      , rdtmin , rdtmax,   &
-         &             rdth  , nfice    , nfbulk   , nclosea
+         &             rdth  , rdtbt    , nfice    , nfbulk , nclosea
       NAMELIST/namcla/ n_cla
       !!----------------------------------------------------------------------
@@ -335,4 +316,5 @@
          WRITE(numout,*) '           maximum time step on tracers   rdtmax    = ', rdtmax
          WRITE(numout,*) '           depth variation tracer step    rdth      = ', rdth
+         WRITE(numout,*) '           barotropic time step           rdtbt     = ', rdtbt
       ENDIF
 
Index: /trunk/NEMO/OPA_SRC/DOM/dommsk.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/DOM/dommsk.F90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/DOM/dommsk.F90	(revision 359)
@@ -18,6 +18,5 @@
    USE lib_mpp
    USE solisl          ! ???
-   USE dynspg_fsc      !
-   USE dynspg_fsc_atsk !
+   USE dynspg          ! choice/control of key cpp for surface pressure gradient
 
    IMPLICIT NONE
@@ -122,4 +121,5 @@
       !!        !  01-09  (J.-M. Molines)  Open boundaries
       !!   8.5  !  02-08  (G. Madec)  F90: Free form and module
+      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization
       !!----------------------------------------------------------------------
       !! *Local declarations
@@ -265,8 +265,8 @@
       
       ! Computation
-      IF( lk_dynspg_fsc .OR. lk_dynspg_fsc_tsk ) THEN
+      IF( lk_dynspg_rl ) THEN
+         bmask(:,:) = fmask(:,:,1)       ! elliptic equation is written at f-point
+      ELSE
          bmask(:,:) = tmask(:,:,1)       ! elliptic equation is written at t-point
-      ELSE
-         bmask(:,:) = fmask(:,:,1)       ! elliptic equation is written at f-point
       ENDIF
       
@@ -285,5 +285,9 @@
       !   north fold : 
       IF( nperio == 3 .OR. nperio == 4 ) THEN
-         IF( lk_dynspg_fsc .OR. lk_dynspg_fsc_tsk ) THEN
+         IF( lk_dynspg_rl ) THEN
+            ! T-pt pivot and F-pt elliptic eq. : bmask set to 0. on rows jpj-1 and jpj
+            bmask(:,jpj-1) = 0.e0
+            bmask(:,jpj  ) = 0.e0
+         ELSE
             ! T-pt pivot and T-pt elliptic eq. : bmask set to 0. on row jpj and on half jpjglo-1 row
             DO ji = 1, jpi
@@ -292,15 +296,8 @@
                bmask(ji,jpj  ) = 0.e0
             END DO
-         ELSE
-            ! T-pt pivot and F-pt elliptic eq. : bmask set to 0. on rows jpj-1 and jpj
-            bmask(:,jpj-1) = 0.e0
-            bmask(:,jpj  ) = 0.e0
          ENDIF
       ENDIF
       IF( nperio == 5 .OR. nperio == 6 ) THEN
-         IF( lk_dynspg_fsc .OR. lk_dynspg_fsc_tsk ) THEN
-            ! F-pt pivot and T-pt elliptic eq. : bmask set to 0. on row jpj
-            bmask(:,jpj) = 0.e0
-         ELSE
+         IF( lk_dynspg_rl ) THEN
             ! F-pt pivot and F-pt elliptic eq. : bmask set to 0. on row jpj and on half jpjglo-1 row
             DO ji = 1, jpi
@@ -309,4 +306,7 @@
                bmask(ji,jpj  ) = 0.e0
             END DO
+         ELSE
+            ! F-pt pivot and T-pt elliptic eq. : bmask set to 0. on row jpj
+            bmask(:,jpj) = 0.e0
          ENDIF
       ENDIF
@@ -323,5 +323,10 @@
          ! north fold : bmask must be set to 0. on rows jpj-1 and jpj 
          IF( npolj == 3 .OR. npolj == 4 ) THEN
-            IF( lk_dynspg_fsc .OR. lk_dynspg_fsc_tsk ) THEN
+            IF( lk_dynspg_rl ) THEN
+               DO ji = 1, nlci
+                  bmask(ji,nlcj-1) = 0.e0
+                  bmask(ji,nlcj  ) = 0.e0
+               END DO
+            ELSE
                DO ji = 1, nlci
                   ii = ji + nimpp - 1
@@ -329,20 +334,15 @@
                   bmask(ji,nlcj  ) = 0.e0
                END DO
-            ELSE
+            ENDIF
+         ENDIF
+         IF( npolj == 5 .OR. npolj == 6 ) THEN
+            IF( lk_dynspg_rl ) THEN
                DO ji = 1, nlci
-                  bmask(ji,nlcj-1) = 0.e0
-                  bmask(ji,nlcj  ) = 0.e0
-               END DO
-            ENDIF
-         ENDIF
-         IF( npolj == 5 .OR. npolj == 6 ) THEN
-            IF( lk_dynspg_fsc .OR. lk_dynspg_fsc_tsk ) THEN
-               DO ji = 1, nlci
+                  ii = ji + nimpp - 1
+                  bmask(ji,nlcj-1) = bmask(ji,nlcj-1) * fpol(ii)
                   bmask(ji,nlcj  ) = 0.e0
                END DO
             ELSE
                DO ji = 1, nlci
-                  ii = ji + nimpp - 1
-                  bmask(ji,nlcj-1) = bmask(ji,nlcj-1) * fpol(ii)
                   bmask(ji,nlcj  ) = 0.e0
                END DO
Index: /trunk/NEMO/OPA_SRC/DYN/dynhpg.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/DYN/dynhpg.F90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/DYN/dynhpg.F90	(revision 359)
@@ -28,18 +28,4 @@
    !! * Accessibility
    PUBLIC dyn_hpg                ! routine called by step.F90
-
-#if defined key_autotasking
-   !!----------------------------------------------------------------------
-   !!   'key_autotasking' :                             j-k-i loop (j-slab)
-   !!----------------------------------------------------------------------
-   LOGICAL, PUBLIC, PARAMETER ::   lk_dynhpg_tsk = .TRUE.    !: autotasked hpg flag
-   LOGICAL, PUBLIC, PARAMETER ::   lk_dynhpg     = .FALSE.   !: vector hpg flag
-#else
-   !!----------------------------------------------------------------------
-   !!   default case :                             k-j-i loop (vector opt.)
-   !!----------------------------------------------------------------------   
-   LOGICAL, PUBLIC, PARAMETER ::   lk_dynhpg_tsk = .FALSE.   !: autotasked hpg flag
-   LOGICAL, PUBLIC, PARAMETER ::   lk_dynhpg     = .TRUE.    !: vector hpg flag
-#endif
 
    !! * Substitutions
Index: /trunk/NEMO/OPA_SRC/DYN/dynnxt.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/DYN/dynnxt.F90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/DYN/dynnxt.F90	(revision 359)
@@ -36,5 +36,5 @@
       !!      After velocity is compute using a leap-frog scheme environment:
       !!         (ua,va) = (ub,vb) + 2 rdt (ua,va)
-      !!      Note that if lk_dynspg_fsc=T, the time stepping has already been
+      !!      Note that if lk_dynspg_flt=T, the time stepping has already been
       !!      performed in dynspg module
       !!      Time filter applied on now horizontal velocity to avoid the
@@ -56,4 +56,5 @@
       !!   8.5  !  02-08  (G. Madec)  F90: Free form and module
       !!        !  02-10  (C. Talandier, A-M. Treguier) Open boundary cond.
+      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization
       !!----------------------------------------------------------------------
       !! * Arguments
@@ -88,5 +89,5 @@
          ! Next velocity
          ! -------------
-#if defined key_dynspg_fsc
+#if defined key_dynspg_flt
          ! Leap-frog time stepping already done in dynspg.F routine
 #else
Index: /trunk/NEMO/OPA_SRC/DYN/dynspg_exp.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/DYN/dynspg_exp.F90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/DYN/dynspg_exp.F90	(revision 359)
@@ -34,6 +34,9 @@
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
-   !!   OPA 9.0 , LODYC-IPSL  (2005)
-   !!----------------------------------------------------------------------
+   !!  OPA 9.0 , LOCEAN-IPSL (2005) 
+   !! $Header$ 
+   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
+   !!----------------------------------------------------------------------
+
 
 CONTAINS
Index: /trunk/NEMO/OPA_SRC/DYN/dynspg_rl.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/DYN/dynspg_rl.F90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/DYN/dynspg_rl.F90	(revision 359)
@@ -18,7 +18,4 @@
    USE ldfdyn_oce      ! ocean dynamics: lateral physics
    USE zdf_oce         ! ocean vertical physics
-   USE trdmod          ! ocean dynamics trends 
-   USE trdmod_oce      ! ocean variables trends
-   USE in_out_manager  ! I/O manager
    USE sol_oce         ! ocean elliptic solver
    USE solpcg          ! preconditionned conjugate gradient solver
@@ -30,4 +27,5 @@
    USE lib_mpp         ! distributed memory computing library
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
+   USE in_out_manager  ! I/O manager
 
    IMPLICIT NONE
@@ -36,7 +34,4 @@
    !! * Accessibility
    PUBLIC dyn_spg_rl   ! called by step.F90
-
-   !! * Shared module variables
-   LOGICAL, PUBLIC, PARAMETER ::   lk_dynspg_rl = .TRUE.    !: rigid-lid flag
 
    !! * Substitutions
@@ -80,5 +75,4 @@
       !!
       !! ** Action : - Update (ua,va) with the surf. pressure gradient trend
-      !!             - Save the trends in (ztdua,ztdva) ('key_trddyn')
       !!
       !! References :
@@ -97,8 +91,6 @@
       !!        !  02-11  (C. Talandier, A-M Treguier) Open boundaries
       !!   9.0  !  04-08  (C. Talandier)  New trends organization
+      !!    "   !  05-11  (V. Garnier) Surface pressure gradient organization
       !!---------------------------------------------------------------------
-      !! * Modules used     
-      USE oce, ONLY :    ztdua => ta,    & ! use ta as 3D workspace   
-                         ztdva => sa       ! use sa as 3D workspace   
       !! * Arguments
       INTEGER, INTENT( in  ) ::   kt       ! ocean time-step index
@@ -532,15 +524,4 @@
       END DO
 
-      ! save the surface pressure gradient trends for diagnostic
-      ! momentum trends
-      IF( l_trddyn )   THEN
-         DO jk = 1, jpkm1
-            ztdua(:,:,jk) = - spgu(:,:)
-            ztdva(:,:,jk) = - spgv(:,:)
-         END DO
-
-         CALL trd_mod(ztdua, ztdva, jpdtdldf, 'DYN', kt)
-      ENDIF
-
    END SUBROUTINE dyn_spg_rl
 
@@ -549,5 +530,4 @@
    !!   'key_dynspg_rl'                                        NO rigid lid
    !!----------------------------------------------------------------------
-   LOGICAL, PUBLIC, PARAMETER ::   lk_dynspg_rl = .FALSE.   !: rigid-lid flag
 CONTAINS
    SUBROUTINE dyn_spg_rl( kt, kindic )       ! Empty routine
Index: /trunk/NEMO/OPA_SRC/DYN/dynspg_ts.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/DYN/dynspg_ts.F90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/DYN/dynspg_ts.F90	(revision 359)
@@ -39,5 +39,7 @@
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
-   !!   OPA 9.0 , LODYC-IPSL  (2005)
+   !!  OPA 9.0 , LOCEAN-IPSL (2005) 
+   !! $Header$ 
+   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
    !!----------------------------------------------------------------------
 
Index: /trunk/NEMO/OPA_SRC/SBC/flxfwb.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/SBC/flxfwb.F90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/SBC/flxfwb.F90	(revision 359)
@@ -4,7 +4,7 @@
    !! Ocean fluxes   : domain averaged freshwater budget
    !!======================================================================
-#if defined key_dynspg_fsc
-   !!----------------------------------------------------------------------
-   !!   'key_dynspg_fsc'               No free surface with constant volume
+#if ! defined key_dynspg_rl
+   !!----------------------------------------------------------------------
+   !!   NOT 'key_dynspg_rl'                        Free surface formulation
    !!----------------------------------------------------------------------
    !!   flx_fwb      : freshwater budget for global ocean configurations
@@ -245,4 +245,5 @@
       !! History :
       !!   9.0  !  03-09  (G. Madec)  Original code
+      !!    "   !  05-11  (V. Garnier) Surface pressure gradient organization
       !!----------------------------------------------------------------------
       !! * Local declarations
@@ -272,5 +273,5 @@
       ENDIF
       ! Option consistency
-#if ! defined key_dynspg_fsc
+#if defined key_dynspg_rl
       IF(lwp) WRITE '               Rigid-lid option, fwb correction is useless, but valid'
 #endif
Index: /trunk/NEMO/OPA_SRC/SBC/ocesbc.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/SBC/ocesbc.F90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/SBC/ocesbc.F90	(revision 359)
@@ -46,5 +46,5 @@
       qrp ,         &  !: heat flux damping (w/m2)
       erp              !: evaporation damping (kg/m2/s = mm/s)
-#if defined key_dynspg_fsc
+#if ! defined key_dynspg_rl
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   &  !:
       dmp              !: internal dampind term
@@ -80,4 +80,5 @@
       !!   1.0  !  00-10  (O. Marti)  Original code
       !!   2.0  !  02-12  (G. Madec)  F90: Free form and module
+      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization
       !!----------------------------------------------------------------------
       !! * Arguments
@@ -101,5 +102,5 @@
          emps  (:,:) = 0.e0
          erp   (:,:) = 0.e0
-#if defined key_dynspg_fsc 
+#if ! defined key_dynspg_rl 
          dmp   (:,:) = 0.e0
 #endif
@@ -135,5 +136,5 @@
          qsr(:,:) = fsolar(:,:)
 
-#if defined key_dynspg_fsc  
+#if ! defined key_dynspg_rl  
          ! total concentration/dilution effect (use on SSS)
          emps(:,:) = fmass(:,:) + fsalt(:,:) + runoff(:,:) + erp(:,:)
@@ -190,4 +191,5 @@
       !!        !  01-03  (D. Ludicone, E. Durand, G. Madec) free surf.
       !!   2.0  !  02-09  (G. Madec, C. Ethe)  F90: Free form and module
+      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization
       !!----------------------------------------------------------------------
       !! * arguments
@@ -209,5 +211,5 @@
          emps   (:,:) = 0.e0
          erp    (:,:) = 0.e0
-#if defined key_dynspg_fsc 
+#if ! defined key_dynspg_rl 
          dmp    (:,:) = 0.e0
 #endif
@@ -227,5 +229,5 @@
          qsr (:,:) = fsolar(:,:)                     ! solar flux
 
-#if defined key_dynspg_fsc     
+#if ! defined key_dynspg_rl     
          ! total concentration/dilution effect (use on SSS)
          emps(:,:) = fmass(:,:) + fsalt(:,:) + runoff(:,:) + erp(:,:) + empold
@@ -393,4 +395,5 @@
       !!        !  01-03  (D. Ludicone, E. Durand, G. Madec) free surf.
       !!   2.0  !  02-09  (G. Madec, C. Ethe)  F90: Free form and module
+      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization
       !!----------------------------------------------------------------------
       !! * Modules used
@@ -430,5 +433,5 @@
          emps   (:,:) = 0.e0
          erp    (:,:) = 0.e0
-#if defined key_dynspg_fsc 
+#if ! defined key_dynspg_rl 
          dmp    (:,:) = 0.e0
 #endif
@@ -510,5 +513,5 @@
          END DO
 
-#if defined key_dynspg_fsc 
+#if ! defined key_dynspg_rl 
          ! Free-surface
 
@@ -756,4 +759,5 @@
       !! History :
       !!   9.0  !  04-01  (G. Madec, C. Ethe)  Original code
+      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization
       !!----------------------------------------------------------------------
       !! * Local declarations
@@ -762,5 +766,5 @@
       REAL(wp) ::   zerp, ztrp, zsrp
       CHARACTER (len=71) :: charout
-#if defined key_dynspg_fsc
+#if ! defined key_dynspg_rl
       REAL(wp) ::   zwei
       REAL(wp) ::   zerpplus(jpi,jpj), zerpminus(jpi,jpj)
@@ -798,5 +802,5 @@
       ENDIF
 
-#if defined key_dynspg_fsc 
+#if ! defined key_dynspg_rl 
       ! Free-surface
          
Index: /trunk/NEMO/OPA_SRC/SOL/solfet.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/SOL/solfet.F90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/SOL/solfet.F90	(revision 359)
@@ -37,5 +37,5 @@
       !!     Solve the ellipic equation for the barotropic stream function
       !!     system (default option) or the transport divergence system
-      !!     (lk_dynspg_fsc=T) using a Finite Elements Tearing and 
+      !!     (lk_dynspg_flt=T) using a Finite Elements Tearing and 
       !!      Interconnecting (FETI) approach.
       !!     In the former case, the barotropic stream function trend has a
Index: /trunk/NEMO/OPA_SRC/SOL/solmat.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/SOL/solmat.F90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/SOL/solmat.F90	(revision 359)
@@ -19,6 +19,4 @@
    USE lbclnk          ! lateral boudary conditions
    USE lib_mpp         ! distributed memory computing
-   USE dynspg_rl
-   USE dynspg_fsc
 
    IMPLICIT NONE
@@ -46,5 +44,5 @@
       !!      The matrix is built for the barotropic stream function system.
       !!      a diagonal preconditioning matrix is also defined.
-      !!       * lk_dynspg_fsc=T: free surface formulation
+      !!       * 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.
@@ -67,4 +65,5 @@
       !!   8.5  !  02-08  (G. Madec)  F90: Free form
       !!        !  02-11  (C. Talandier, A-M. Treguier) Free surface & Open boundaries
+      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization
       !!----------------------------------------------------------------------
       !! * Local declarations
@@ -96,6 +95,6 @@
       z2dt = 2. * rdt
 
-#if defined key_dynspg_fsc && ! defined key_obc
-!!cr      IF( lk_dynspg_fsc .AND. .NOT.lk_obc ) THEN   !bug missing lk_dynspg_fsc_atsk
+#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
@@ -117,6 +116,6 @@
       END DO
       
-#  elif defined key_dynspg_fsc && defined key_obc
-!!cr      ELSEIF( lk_dynspg_fsc .AND. lk_obc ) THEN     !bug missing lk_dynspg_fsc_atsk 
+#  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
@@ -200,6 +199,6 @@
       ! account for the existence of the south symmetric bassin.
       
-!!cr      IF( .NOT.lk_dynspg_fsc ) THEN   !bug missing lk_dynspg_fsc_atsk
-#if ! defined key_dynspg_fsc
+!!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
Index: /trunk/NEMO/OPA_SRC/SOL/solpcg.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/SOL/solpcg.F90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/SOL/solpcg.F90	(revision 359)
@@ -38,5 +38,5 @@
       !! ** Purpose :   Solve the ellipic equation for the barotropic stream 
       !!      function system (lk_dynspg_rl=T) or the transport divergence 
-      !!      system (lk_dynspg_fsc=T) using a diagonal preconditionned
+      !!      system (lk_dynspg_flt=T) using a diagonal preconditionned
       !!      conjugate gradient method.
       !!      In the former case, the barotropic stream function trend has a
Index: /trunk/NEMO/OPA_SRC/SOL/solsor.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/SOL/solsor.F90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/SOL/solsor.F90	(revision 359)
@@ -37,5 +37,5 @@
       !! ** Purpose :   Solve the ellipic equation for the barotropic stream 
       !!      function system (lk_dynspg_rl=T) or the transport divergence 
-      !!      system (lk_dynspg_fsc=T) using a red-black successive-over-
+      !!      system (lk_dynspg_flt=T) using a red-black successive-over-
       !!      relaxation method.
       !!       In the former case, the barotropic stream function trend has a
Index: /trunk/NEMO/OPA_SRC/SOL/solsor_e.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/SOL/solsor_e.F90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/SOL/solsor_e.F90	(revision 359)
@@ -37,5 +37,5 @@
       !! ** Purpose :   Solve the ellipic equation for the barotropic stream 
       !!      function system (lk_dynspg_rl=T) or the transport divergence 
-      !!      system (lk_dynspg_fsc=T) using a red-black successive-over-
+      !!      system (lk_dynspg_flt=T) using a red-black successive-over-
       !!      relaxation method.
       !!       In the former case, the barotropic stream function trend has a
Index: /trunk/NEMO/OPA_SRC/SOL/solver.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/SOL/solver.F90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/SOL/solver.F90	(revision 359)
@@ -19,7 +19,5 @@
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
    USE lib_mpp
-   USE dynspg_rl       
-   USE dynspg_fsc      
-   USE dynspg_fsc_atsk      
+   USE dynspg          ! choice/control of key cpp for surface pressure gradient
 
    IMPLICIT NONE
@@ -40,10 +38,10 @@
       !!       * default option: barotropic stream function system
       !!         and islands initialization (if lk_isl=T)
-      !!       * lk_dynspg_fsc = T : transport divergence system. No specific
+      !!       * lk_dynspg_flt = T : transport divergence system. No specific
       !!         treatment of islands.
       !!      
       !! ** Method :
       !!       - Compute the local depth of the water column at u- and v-point
-      !!      (lk_dynspg_fsc = T) or its inverse (lk_dynspg_rl = T).
+      !!      (lk_dynspg_flt = T) or its inverse (lk_dynspg_rl = T).
       !!      The local depth of the water column is computed by summing 
       !!      the vertical scale factors. For its inverse, the thickness of
@@ -64,5 +62,5 @@
       !!                                u- and v-point. (lk_dynspg_rl = T)
       !!             - hu, hv   : masked local depth at u- and v- points
-      !!                                (lk_dynspg_fsc = T)
+      !!                                (lk_dynspg_flt = T)
       !!             - c_solver_pt : nature of the gridpoint at which the
       !!                                solver is applied
@@ -77,4 +75,5 @@
       !!        !  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
       !!----------------------------------------------------------------------
       !! * Local declarations
@@ -126,10 +125,10 @@
       ENDIF
 
-      IF( lk_dynspg_fsc .OR. lk_dynspg_fsc_tsk ) THEN
+      IF( lk_dynspg_flt ) THEN
          IF(lwp) WRITE(numout,*)
          IF(lwp) WRITE(numout,*) '          free surface formulation'
          IF( lk_isl ) THEN
             IF(lwp) WRITE(numout,cform_err)
-            IF(lwp) WRITE(numout,*) ' key_islands inconsistent with key_dynspg_fsc'
+            IF(lwp) WRITE(numout,*) ' key_islands inconsistent with key_dynspg_flt'
             nstop = nstop + 1
          ENDIF
@@ -139,8 +138,9 @@
       ELSE
          IF(lwp) WRITE(numout,cform_err)
-         IF(lwp) WRITE(numout,*) '          Chose at least one surface pressure gradient calculation: free surface or rigid-lid'
+         IF(lwp) WRITE(numout,*) '          Choose only one surface pressure gradient calculation: filtered or rigid-lid'
+         IF(lwp) WRITE(numout,*) '          Should not call this routine if dynspg_exp or dynspg_ts has been chosen'
          nstop = nstop + 1
       ENDIF
-      IF( ( lk_dynspg_fsc .OR. lk_dynspg_fsc_tsk ) .AND. lk_dynspg_rl ) THEN
+      IF( lk_dynspg_flt .AND. lk_dynspg_rl ) THEN
          IF(lwp) WRITE(numout,cform_err)
          IF(lwp) WRITE(numout,*) '          Chose between free surface or rigid-lid, not both'
Index: /trunk/NEMO/OPA_SRC/TRA/traadv_cen2.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/TRA/traadv_cen2.F90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/TRA/traadv_cen2.F90	(revision 359)
@@ -22,6 +22,5 @@
    USE in_out_manager  ! I/O manager
    USE diaptr          ! poleward transport diagnostics
-   USE dynspg_fsc      ! 
-   USE dynspg_fsc_atsk ! 
+   USE dynspg          ! choice/control of key cpp for surface pressure gradient
    USE prtctl          ! Print control
 
@@ -135,4 +134,5 @@
       !!   8.5  !  02-06  (G. Madec)  F90: Free form and module
       !!   9.0  !  04-08  (C. Talandier) New trends organization
+      !!    "   !  05-11  (V. Garnier) Surface pressure gradient organization
       !!----------------------------------------------------------------------
       !! * Modules used
@@ -332,11 +332,11 @@
 
       ! Surface value
-      IF( lk_dynspg_fsc ) THEN
-         ! free surface-constant volume
+      IF( lk_dynspg_rl ) THEN
+         ! rigid lid : flux set to zero
+         zwx(:,:, 1 ) = 0.e0    ;    zwy(:,:, 1 ) = 0.e0
+      ELSE
+         ! free surface
          zwx(:,:, 1 ) = zwn(:,:,1) * tn(:,:,1)
          zwy(:,:, 1 ) = zwn(:,:,1) * sn(:,:,1)
-      ELSE
-         ! rigid lid : flux set to zero
-         zwx(:,:, 1 ) = 0.e0    ;    zwy(:,:, 1 ) = 0.e0
       ENDIF
 
Index: /trunk/NEMO/OPA_SRC/TRA/traadv_cen2_atsk.h90
===================================================================
--- /trunk/NEMO/OPA_SRC/TRA/traadv_cen2_atsk.h90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/TRA/traadv_cen2_atsk.h90	(revision 359)
@@ -79,6 +79,6 @@
       !!        zcenu = centered flux = wn * mk(tn)
       !!         The surface boundary condition is : 
-      !!      rigid-lid (lk_dynspg_frd = T) : zero advective flux
-      !!      free-surf (lk_dynspg_fsc = T) : wn(:,:,1) * tn(:,:,1)
+      !!      rigid-lid (lk_dynspg_rl = T) : zero advective flux
+      !!      free-surf                    : wn(:,:,1) * tn(:,:,1)
       !!         Add this trend now to the general trend of tracer (ta,sa):
       !!            (ta,sa) = (ta,sa) + ( zta , zsa )
@@ -94,4 +94,5 @@
       !!   8.5  !  02-06  (G. Madec)  F90: Free form and module
       !!   9.0  !  04-08  (C. Talandier) New trends organization
+      !!    "   !  05-11  (V. Garnier) Surface pressure gradient organization
       !!----------------------------------------------------------------------
       !! * Modules used
@@ -286,11 +287,11 @@
 
          ! Surface value
-         IF( lk_dynspg_fsc_tsk ) THEN
-            ! free surface-constant volume
+         IF( lk_dynspg_rl ) THEN
+            ! rigid lid : flux set to zero
+            zwz(:,jj, 1 ) = 0.e0    ;    zww(:,jj, 1 ) = 0.e0
+         ELSE
+            ! free surface
             zwz(:,jj, 1 ) = zwn(:,jj,1) * tn(:,jj,1)
             zww(:,jj, 1 ) = zwn(:,jj,1) * sn(:,jj,1)
-         ELSE
-            ! rigid lid : flux set to zero
-            zwz(:,jj, 1 ) = 0.e0    ;    zww(:,jj, 1 ) = 0.e0
          ENDIF
          
Index: /trunk/NEMO/OPA_SRC/TRA/traadv_ctl.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/TRA/traadv_ctl.F90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/TRA/traadv_ctl.F90	(revision 359)
@@ -9,5 +9,4 @@
    !!----------------------------------------------------------------------
    !! * Modules used
-   USE oce             ! ocean dynamics and active tracers
    USE dom_oce         ! ocean space and time domain
    USE in_out_manager  ! I/O manager
@@ -26,7 +25,4 @@
       ln_traadv_muscl2 = .FALSE.        ! MUSCL2 scheme flag
 
-   !! * Substitutions
-#   include "domzgr_substitute.h90"
-#   include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
    !!   OPA 9.0 , LOCEAN-IPSL (2005) 
@@ -47,10 +43,4 @@
       !!   8.5  !  02-11  (G. Madec)  Original code
       !!----------------------------------------------------------------------
-      !! * Modules used
-      USE traadv_tvd
-      USE traadv_muscl
-      USE traadv_muscl2
-      USE in_out_manager  ! I/O manager
-
       !! * Local declarations
       INTEGER ::   ioptio
Index: /trunk/NEMO/OPA_SRC/TRA/traadv_muscl.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/TRA/traadv_muscl.F90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/TRA/traadv_muscl.F90	(revision 359)
@@ -15,6 +15,5 @@
    USE trdmod_oce      ! ocean variables trends
    USE in_out_manager  ! I/O manager
-   USE dynspg_fsc      ! surface pressure gradient 
-   USE dynspg_fsc_atsk ! autotasked surface pressure gradient
+   USE dynspg          ! choice/control of key cpp for surface pressure gradient
    USE trabbl          ! tracers: bottom boundary layer
    USE lib_mpp         ! distribued memory computing
@@ -62,4 +61,5 @@
       !!   8.5  !  02-06  (G. Madec)  F90: Free form and module
       !!   9.0  !  04-08  (C. Talandier) New trends organization
+      !!    "   !  05-11  (V. Garnier) Surface pressure gradient organization
       !!----------------------------------------------------------------------
       !! * modules used
@@ -369,10 +369,10 @@
       END DO
       ! surface values
-      IF( lk_dynspg_fsc .OR. lk_dynspg_fsc_tsk ) THEN   ! free surface-constant volume
+      IF( lk_dynspg_rl ) THEN                           ! rigid lid : flux set to zero
+         zt1(:,:, 1 ) = 0.e0
+         zs1(:,:, 1 ) = 0.e0
+      ELSE                                              ! free surface
          zt1(:,:, 1 ) = zwn(:,:,1) * tb(:,:,1)
          zs1(:,:, 1 ) = zwn(:,:,1) * sb(:,:,1)
-      ELSE                                              ! rigid lid : flux set to zero
-         zt1(:,:, 1 ) = 0.e0
-         zs1(:,:, 1 ) = 0.e0
       ENDIF
 
Index: /trunk/NEMO/OPA_SRC/TRA/traadv_muscl2.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/TRA/traadv_muscl2.F90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/TRA/traadv_muscl2.F90	(revision 359)
@@ -15,6 +15,5 @@
    USE trdmod_oce      ! ocean variables trends
    USE in_out_manager  ! I/O manager
-   USE dynspg_fsc      ! surface pressure gradient 
-   USE dynspg_fsc_atsk ! autotasked surface pressure gradient
+   USE dynspg          ! choice/control of key cpp for surface pressure gradient
    USE trabbl          ! tracers: bottom boundary layer
    USE lib_mpp
@@ -62,4 +61,5 @@
       !!   8.5  !  02-06  (G. Madec)  F90: Free form and module
       !!   9.0  !  04-08  (C. Talandier) New trends organization
+      !!    "   !  05-11  (V. Garnier) Surface pressure gradient organization
       !!----------------------------------------------------------------------
       !! * modules used
@@ -443,10 +443,10 @@
 
       ! surface values
-      IF( lk_dynspg_fsc .OR. lk_dynspg_fsc_tsk ) THEN   ! free surface-constant volume
+      IF( lk_dynspg_rl ) THEN                           ! rigid lid : flux set to zero
+         zt1(:,:, 1 ) = 0.e0
+         zs1(:,:, 1 ) = 0.e0
+      ELSE                                              ! free surface
          zt1(:,:, 1 ) = zwn(:,:,1) * tb(:,:,1)
          zs1(:,:, 1 ) = zwn(:,:,1) * sb(:,:,1)
-      ELSE                                              ! rigid lid : flux set to zero
-         zt1(:,:, 1 ) = 0.e0
-         zs1(:,:, 1 ) = 0.e0
       ENDIF
 
Index: /trunk/NEMO/OPA_SRC/TRA/traadv_tvd.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/TRA/traadv_tvd.F90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/TRA/traadv_tvd.F90	(revision 359)
@@ -17,6 +17,5 @@
    USE trdmod_oce      ! ocean variables trends
    USE in_out_manager  ! I/O manager
-   USE dynspg_fsc      ! surface pressure gradient 
-   USE dynspg_fsc_atsk ! autotasked surface pressure gradient
+   USE dynspg          ! choice/control of key cpp for surface pressure gradient
    USE trabbl          ! Advective term of BBL
    USE lib_mpp
@@ -65,5 +64,6 @@
       !!   8.5  !  02-06  (G. Madec)  F90: Free form and module
       !!   9.0  !  04-01  (A. de Miranda, G. Madec, J.M. Molines ): advective bbl
-      !!   9.0  !  08-04  (S. Cravatte) add the i-, j- & k- trends computation
+      !!    "   !  08-04  (S. Cravatte) add the i-, j- & k- trends computation
+      !!    "   !  05-11  (V. Garnier) Surface pressure gradient organization
       !!----------------------------------------------------------------------
       !! * Modules used
@@ -159,5 +159,8 @@
       ! upstream tracer flux in the k direction
       ! Surface value
-      IF( lk_dynspg_fsc .OR. lk_dynspg_fsc_tsk ) THEN   ! free surface-constant volume
+      IF( lk_dynspg_rl ) THEN				! rigid lid : flux set to zero
+         ztw(:,:,1) = 0.e0
+         zsw(:,:,1) = 0.e0
+      ELSE						! free surface
          DO jj = 1, jpj
             DO ji = 1, jpi
@@ -167,7 +170,4 @@
             END DO
          END DO
-      ELSE                                              ! rigid lid : flux set to zero
-         ztw(:,:,1) = 0.e0
-         zsw(:,:,1) = 0.e0
       ENDIF
 
Index: /trunk/NEMO/OPA_SRC/istate.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/istate.F90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/istate.F90	(revision 359)
@@ -78,9 +78,4 @@
       rn2  (:,:,:) = 0.e0 
 
-#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
@@ -88,5 +83,8 @@
       bsfn(:,:) = 0.e0      ! now    barotropic stream-function
       bsfd(:,:) = 0.e0      ! barotropic stream-function trend
-#endif 
+#endif
+      ! free surface formulation
+      sshb(:,:) = 0.e0      ! before sea-surface height
+      sshn(:,:) = 0.e0      ! now    sea-surface height
 
 
@@ -222,4 +220,5 @@
       !!   8.0  !  01-09  (M. Levy, M. Ben Jelloul)  read file for EEL 2 & 6
       !!   9.0  !  03-09  (G. Madec, C. Talandier)  EEL 5
+      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization
       !!----------------------------------------------------------------------
       !! * Modules used
@@ -239,7 +238,7 @@
          zh1, zh2, zslope, zcst       ! temporary scalars
       REAL(wp) ::   &
-         zt1  = 12.e0,             &  ! surface temperature value (EEL R5)
-         zt2  =  2.e0,             &  ! bottom  temperature value (EEL R5)
-         zsal = 35.5                  ! constant salinity (EEL R2, R5 and R6)
+         zt1  = 12._wp,            &  ! surface temperature value (EEL R5)
+         zt2  =  2._wp,            &  ! bottom  temperature value (EEL R5)
+         zsal = 35.5_wp                ! constant salinity (EEL R2, R5 and R6)
       REAL(wp) ::   &
          zdt,  zdate0                 ! temporary scalars
@@ -248,5 +247,5 @@
       REAL(wp), DIMENSION(jpiglo,jpjglo) ::   &
          zlamt, zphit                 ! temporary workspace
-# if defined key_dynspg_fsc
+# if ! defined key_dynspg_rl
       REAL(wp), DIMENSION(jpiglo,jpjglo) ::   &
          zssh                         ! initial ssh over the global domain
@@ -290,5 +289,5 @@
       
 
-# if defined key_dynspg_fsc
+# if ! defined key_dynspg_rl
             ! set the dynamics: U,V, hdiv, rot (and ssh if necessary)
             ! ----------------
@@ -451,10 +450,9 @@
       !!   8.1  !  01-09  (M. Levy, M. Ben Jelloul)  Original code
       !!   8.5  !  02-09  (G. Madec)  F90: Free form
+      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization
       !!----------------------------------------------------------------------
       !! * Modules used
       USE eosbn2          ! eq. of state, Brunt Vaisala frequency (eos     routine)
-      USE dynspg_fsc      ! surface pressure gradient         (dyn_spg_fsc routine)
-      USE dynspg_fsc_atsk ! surface pressure gradient    (dyn_spg_fsc_atsk routine)
-      USE dynspg_rl       ! surface pressure gradient          (dyn_spg_rl routine)
+      USE dynspg          ! surface pressure gradient             (dyn_spg routine)
       USE divcur          ! hor. divergence & rel. vorticity      (div_cur routine)
       USE lbclnk          ! ocean lateral boundary condition (or mpp link)
@@ -484,5 +482,5 @@
       DO jk = 2, jpkm1
          zprn(:,:,jk) = zprn(:,:,jk-1)   &
-                      + zalfg * fse3w(:,:,jk) * ( 2. + rhd(:,:,jk) + rhd(:,:,jk-1) )
+            &         + zalfg * fse3w(:,:,jk) * ( 2. + rhd(:,:,jk) + rhd(:,:,jk-1) )
       END DO  
 
@@ -550,10 +548,7 @@
       va(:,:,:) = vb(:,:,:) / rdt
 
-      ! calls dyn_spg. we assume euler time step, strating from rest.
+      ! calls dyn_spg. we assume euler time step, starting from rest.
       indic = 0
-      !                                                     ! surface pressure gradient
-      IF( lk_dynspg_fsc     )   CALL dyn_spg_fsc     ( nit000, indic )  ! free surface constant volume case
-      IF( lk_dynspg_fsc_tsk )   CALL dyn_spg_fsc_atsk( nit000, indic )  ! autotask free surface constant volume case
-      IF( lk_dynspg_rl      )   CALL dyn_spg_rl      ( nit000, indic )  ! rigid-lid case
+      CALL dyn_spg( nit000, indic )       ! surface pressure gradient
 
       ! the new velocity is ua*rdt
Index: /trunk/NEMO/OPA_SRC/oce.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/oce.F90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/oce.F90	(revision 359)
@@ -6,4 +6,5 @@
    !! History :
    !!   8.5  !  02-11  (G. Madec)  F90: Free form and module
+   !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization
    !!----------------------------------------------------------------------
    !!  OPA 9.0 , LOCEAN-IPSL (2005) 
@@ -62,11 +63,11 @@
 #endif
 
-#if defined key_dynspg_fsc   ||   defined key_esopa
-   !! free surface - constant volume formulation
-   !! ------------------------------------------
+   !! free surface
+   !! ------------
    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
+      hu  , hv  ,         &  !: depth at u- and v-points (meters)
+      hur , hvr              !: inverse of u and v-points ocean depth (1/m)
+#if defined key_obc
    REAL(wp), PUBLIC ::    &  !:
       obcsurftot       !: Total lateral surface of open boundaries
@@ -74,15 +75,10 @@
       obcumask, obcvmask     !: u-, v- Force filtering mask for the open 
       !                      !  boundary condition on grad D
-# endif
-# if defined key_trdvor
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   &   !:
-       hur, hvr             !: inverse of u and v-points ocean depth (1/m)
-# endif
 #endif
+
 #if defined key_dynspg_rl   ||   defined key_esopa
    !! rigid-lid formulation
    !! ---------------------
    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)
       bsfd                   !: now trend of barotropic streamfunction (m3/s2)
Index: /trunk/NEMO/OPA_SRC/opa.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/opa.F90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/opa.F90	(revision 359)
@@ -47,4 +47,5 @@
 
    USE step            ! OPA time-stepping                  (stp     routine)
+   USE dynspg          ! Control choice of surface pressure gradient schemes
    USE prtctl          ! Print control                 (prt_ctl_init routine)
    USE ini1d           ! re-initialization of u-v mask for the 1D configuration
@@ -100,4 +101,5 @@
       !!    "   !  04-08  (C. Talandier) New trends organization
       !!    "   !  05-06  (C. Ethe) Add the 1D configuration possibility
+      !!    "   !  05-11  (V. Garnier) Surface pressure gradient organization
       !!----------------------------------------------------------------------
       !! * Local declarations
@@ -162,5 +164,7 @@
       IF( lk_obc    )   CALL obc_init       ! Open boundaries 
 
-      CALL solver_init                      ! Elliptic solver
+      IF( lk_dynspg_flt .OR. lk_dynspg_rl ) THEN
+         CALL solver_init                   ! Elliptic solver
+      ENDIF
 
       CALL day( nit000 )                    ! Calendar
Index: /trunk/NEMO/OPA_SRC/par_ORCA_R05.h90
===================================================================
--- /trunk/NEMO/OPA_SRC/par_ORCA_R05.h90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/par_ORCA_R05.h90	(revision 359)
@@ -17,7 +17,8 @@
       jpidta  = 722,         &  !: 1st lateral dimension > or = to jpiglo
       jpjdta  = 511,         &  !: 2nd   "         "     > or = to jpjglo
-      jpkdta  =  31,         &  !: number of levels      > or = to jpkglo
+      jpkdta  =  31             !: number of levels      > or = to jpkglo
 
 #if defined key_antarctic
+   INTEGER, PARAMETER ::     &
       ! zoom domain size       !!! * antarctic zoom *
       jpiglo  = jpidta,      &  !: 1st dimension of global domain --> i
@@ -33,4 +34,5 @@
 
 #elif defined key_arctic
+   INTEGER, PARAMETER ::     &
       ! zoom domain size       !!! *  arctic zoom  *
       jpiglo  = 562,         &  !: 1st dimension of global domain --> i
@@ -46,4 +48,5 @@
 
 #else
+   INTEGER, PARAMETER ::     &
       ! global domain size     !!! * full domain *
       jpiglo  = jpidta,      &  !: 1st dimension of global domain --> i
Index: /trunk/NEMO/OPA_SRC/par_ORCA_R2.h90
===================================================================
--- /trunk/NEMO/OPA_SRC/par_ORCA_R2.h90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/par_ORCA_R2.h90	(revision 359)
@@ -17,8 +17,9 @@
       jpidta  = 182,         &  !: 1st lateral dimension ( >= jpiglo )
       jpjdta  = 149,         &  !: 2nd    "       "      ( >= jpjglo )
-      jpkdta  = 31,          &  !: number of levels      ( >= jpk    )
+      jpkdta  = 31              !: number of levels      ( >= jpk    ) 
 
 #if defined key_antarctic
       ! zoom domain size       !!! *  antarctic zoom  * 
+   INTEGER, PARAMETER ::     &
       jpiglo  = jpidta,      &  !: 1st dimension of global domain --> i
       jpjglo  = 50,          &  !: 2nd    "                  "    --> j
@@ -34,4 +35,5 @@
 #elif defined key_arctic
       ! zoom domain size       !!! *  arctic zoom  *
+   INTEGER, PARAMETER ::     &
       jpiglo  = 142   ,      &  !: 1st dimension of global domain --> i
       jpjglo  = jpjdta-97+1, &  !: 2nd    "                  "    --> j
@@ -47,4 +49,5 @@
 #elif defined key_cfg_1d
       ! global domain size     !!! *  global domain  *
+   INTEGER, PARAMETER ::     &
       jpiglo  = 3     ,      &  !: 1st dimension of global domain --> i
       jpjglo  = 3     ,      &  !: 2nd    "                  "    --> j
@@ -71,4 +74,5 @@
 #else
       ! global domain size     !!! *  global domain  *
+   INTEGER, PARAMETER ::     &
       jpiglo  = jpidta,      &  !: 1st dimension of global domain --> i
       jpjglo  = jpjdta,      &  !: 2nd    "                  "    --> j
Index: /trunk/NEMO/OPA_SRC/par_oce.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/par_oce.F90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/par_oce.F90	(revision 359)
@@ -7,4 +7,5 @@
    !!   4.0  !  91     (Imbard, Levy, Madec)  Original code
    !!   9.0  !  04-01  (G. Madec, J.-M. Molines)  Free form and module
+   !!    "   !  05-11  (V. Garnier) Surface pressure gradient organization
    !!----------------------------------------------------------------------
    !!  OPA 9.0 , LOCEAN-IPSL (2005) 
@@ -196,4 +197,10 @@
 #endif
 
+#if defined key_autotasking
+   LOGICAL, PUBLIC, PARAMETER ::   lk_jki = .TRUE.   !: j-k-i loop flag
+#else
+   LOGICAL, PUBLIC, PARAMETER ::   lk_jki = .FALSE.  !: k-j-i loop flag
+#endif
+
    !!======================================================================
 END MODULE par_oce
Index: /trunk/NEMO/OPA_SRC/restart.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/restart.F90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/restart.F90	(revision 359)
@@ -21,7 +21,6 @@
    USE blk_oce         ! bulk variables
    USE flx_oce         ! sea-ice/ocean forcings variables
-
-   USE dynspg_fsc,      ONLY : lk_dynspg_fsc       ! ( mpp version )
-   USE dynspg_fsc_atsk, ONLY : lk_dynspg_fsc_tsk   ! 
+   USE dynspg          ! choice/control of key cpp for surface pressure gradient
+   USE dynspg_ts       ! free surface time splitting scheme variables
    USE cpl_oce,         ONLY : lk_cpl              !
 
@@ -37,4 +36,9 @@
       crestart = 'initial.nc'   ! restart file name
    !!----------------------------------------------------------------------
+   !!  OPA 9.0 , LOCEAN-IPSL (2005) 
+   !! $Header$ 
+   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
+   !!----------------------------------------------------------------------
+
 
 CONTAINS
@@ -69,4 +73,5 @@
       !!        !  99-11  (M. Imbard)  Original code
       !!   8.5  !  02-08  (G. Madec)  F90: Free form
+      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization
       !!----------------------------------------------------------------------
       !! * Modules used
@@ -84,8 +89,4 @@
       REAL(wp), DIMENSION(10) ::   zinfo(10)
       REAL(wp), DIMENSION(jpi,jpj) :: ztab 
-      !!----------------------------------------------------------------------
-      !!  OPA 9.0 , LOCEAN-IPSL (2005) 
-      !! $Header$ 
-      !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
       !!----------------------------------------------------------------------
 
@@ -164,11 +165,17 @@
          ztab(:,:) = gcxb(1:jpi,1:jpj)
          CALL restput( numwrs, 'gcxb'   , jpi, jpj, 1  , 0, ztab    )
-# if defined key_dynspg_fsc
-         CALL restput( numwrs, 'sshb'   , jpi, jpj, 1  , 0, sshb    )   ! free surface formulation (ssh)
-         CALL restput( numwrs, 'sshn'   , jpi, jpj, 1  , 0, sshn    )
-# else
+# if defined key_dynspg_rl
          CALL restput( numwrs, 'bsfb'   , jpi, jpj, 1  , 0, bsfb    )   ! Rigid-lid formulation (bsf)
          CALL restput( numwrs, 'bsfn'   , jpi, jpj, 1  , 0, bsfn    )
          CALL restput( numwrs, 'bsfd'   , jpi, jpj, 1  , 0, bsfd    )
+# else
+         CALL restput( numwrs, 'sshb'   , jpi, jpj, 1  , 0, sshb    )   ! free surface formulation (ssh)
+         CALL restput( numwrs, 'sshn'   , jpi, jpj, 1  , 0, sshn    )
+#  if defined key_dynspg_ts
+         CALL restput( numwrs, 'sshb_b' , jpi, jpj, 1  , 0, sshb_b  )   ! free surface formulation (ssh)
+         CALL restput( numwrs, 'sshn_b' , jpi, jpj, 1  , 0, sshn_b  )   ! issued from barotropic loop
+         CALL restput( numwrs, 'un_b'   , jpi, jpj, 1  , 0, un_b    )   ! horizontal transports
+         CALL restput( numwrs, 'vn_b'   , jpi, jpj, 1  , 0, vn_b    )   ! issued from barotropic loop
+#  endif
 # endif
 # if defined key_zdftke   ||   defined key_esopa
@@ -212,6 +219,6 @@
       !!      - prognostic variables on the second record
       !!      - elliptic solver arrays 
-      !!      - barotropic stream function arrays (default option)
-      !!        or free surface arrays ("key_dynspg_fsc" defined)
+      !!      - barotropic stream function arrays ("key_dynspg_rl" defined)
+      !!        or free surface arrays 
       !!      - tke arrays (lk_zdftke=T)
       !!      for this last three records,  the previous characteristics 
@@ -233,4 +240,5 @@
       !!        !  99-05  (M. Imbard)  Original code
       !!   8.5  !  02-09  (G. Madec)  F90: Free form
+      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization
       !!----------------------------------------------------------------------
       !! * Modules used
@@ -239,5 +247,5 @@
       !! * Local declarations
       LOGICAL ::   llog
-      CHARACTER (len=8 ) ::   clvnames(30)
+      CHARACTER (len=8 ) ::   clvnames(50)
       CHARACTER (len=32) ::   clname = 'restart'
       INTEGER  ::   &
@@ -354,11 +362,17 @@
       CALL restget( inum, 'gcx'    , jpi, jpj, 1  , 0, llog, ztab    )
       gcx(1:jpi,1:jpj) = ztab(:,:) 
-# if defined key_dynspg_fsc
-      CALL restget( inum, 'sshb'   , jpi, jpj, 1  , 0, llog, sshb    )   ! free surface formulation (ssh)
-      CALL restget( inum, 'sshn'   , jpi, jpj, 1  , 0, llog, sshn    )
-# else
+# if defined key_dynspg_rl
       CALL restget( inum, 'bsfb'   , jpi, jpj, 1  , 0, llog, bsfb    )   ! Rigid-lid formulation (bsf)
       CALL restget( inum, 'bsfn'   , jpi, jpj, 1  , 0, llog, bsfn    )
       CALL restget( inum, 'bsfd'   , jpi, jpj, 1  , 0, llog, bsfd    )
+# else
+      CALL restget( inum, 'sshb'   , jpi, jpj, 1  , 0, llog, sshb    )   ! free surface formulation (ssh)
+      CALL restget( inum, 'sshn'   , jpi, jpj, 1  , 0, llog, sshn    )
+#  if defined key_dynspg_ts
+      CALL restget( inum, 'sshb_b' , jpi, jpj, 1  , 0, llog, sshb_b  )   ! free surface formulation (ssh)
+      CALL restget( inum, 'sshn_b' , jpi, jpj, 1  , 0, llog, sshn_b  )   ! issued from barotropic loop
+      CALL restget( inum, 'un_b'   , jpi, jpj, 1  , 0, llog, un_b    )   ! horizontal transports
+      CALL restget( inum, 'vn_b'   , jpi, jpj, 1  , 0, llog, vn_b    )   ! issued from barotropic loop
+#  endif
 # endif
 # if defined key_zdftke   ||   defined key_esopa
@@ -436,10 +450,10 @@
       rotb(:,:,:)=rotn(:,:,:)
       hdivb(:,:,:)=hdivn(:,:,:)
-#if defined key_dynspg_fsc
+#if defined key_dynspg_rl
+    ! rigid lid
+      bsfb(:,:)=bsfn(:,:)
+#else
     ! free surface formulation (eta)
       sshb(:,:)=sshn(:,:)
-#else
-    ! rigid lid
-      bsfb(:,:)=bsfn(:,:)
 #endif
     ENDIF
Index: /trunk/NEMO/OPA_SRC/restart_dimg.h90
===================================================================
--- /trunk/NEMO/OPA_SRC/restart_dimg.h90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/restart_dimg.h90	(revision 359)
@@ -2,4 +2,8 @@
    !!                     ***  restart_dimg.h90  *** 
    !!---------------------------------------------------------------------
+   !!  OPA 9.0 , LOCEAN-IPSL (2005) 
+   !! $Header$ 
+   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
+   !!----------------------------------------------------------------------
 
    SUBROUTINE rst_write(kt)
@@ -24,4 +28,5 @@
      !!        !  99-11  (M. Imbard)  NetCDF FORMAT with ioipsl
      !!   8.5  !  03-06  (J.M. Molines)  F90: Free form, mpp support
+     !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization
      !!----------------------------------------------------------------------
      !! * Arguments 
@@ -40,8 +45,4 @@
 
      REAL(wp), DIMENSION( 1) ::   zfice, zfblk   ! used only in case of ice & bulk
-     !!----------------------------------------------------------------------
-     !!  OPA 9.0 , LOCEAN-IPSL (2005) 
-     !! $Header$ 
-     !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
      !!----------------------------------------------------------------------
 
@@ -88,5 +89,5 @@
        IF ( lk_ice_lim                           )   ios1 = 1
        IF ( l_bulk                               )   ios2 = 1
-       IF ( lk_dynspg_fsc .OR. lk_dynspg_fsc_tsk )   ios3 = 1
+       IF ( lk_dynspg_flt                        )   ios3 = 1
        IF ( lk_cpl                               )   ios4 = 1
 
@@ -102,103 +103,70 @@
 
        ! 'before' fields
-
-       DO jk = 1, jpk
-          WRITE(inum,REC=irec) ub(:,:,jk)
-          irec = irec +1
-       END DO
-
-       DO jk = 1, jpk
-          WRITE(inum,REC=irec) vb(:,:,jk)
-          irec = irec +1
-       END DO
-
-       DO jk = 1, jpk
-          WRITE(inum,REC=irec) tb(:,:,jk)
-          irec = irec +1
-       END DO
-
-       DO jk = 1, jpk
-          WRITE(inum,REC=irec) sb(:,:,jk)
-          irec = irec +1
-       END DO
-
-       DO jk = 1, jpk
-          WRITE(inum,REC=irec) rotb(:,:,jk)
-          irec = irec +1
-       END DO
-
-       DO jk = 1, jpk
-          WRITE(inum,REC=irec) hdivb(:,:,jk)
-          irec = irec +1
+       DO jk = 1, jpk
+          WRITE(inum,REC=irec) ub(:,:,jk)   ;    irec = irec +1
+       END DO
+       DO jk = 1, jpk
+          WRITE(inum,REC=irec) vb(:,:,jk)   ;    irec = irec +1
+       END DO
+       DO jk = 1, jpk
+          WRITE(inum,REC=irec) tb(:,:,jk)   ;    irec = irec +1
+       END DO
+       DO jk = 1, jpk
+          WRITE(inum,REC=irec) sb(:,:,jk)   ;    irec = irec +1
+       END DO
+       DO jk = 1, jpk
+          WRITE(inum,REC=irec) rotb(:,:,jk)   ;    irec = irec +1
+       END DO
+       DO jk = 1, jpk
+          WRITE(inum,REC=irec) hdivb(:,:,jk)   ;    irec = irec +1
        END DO
 
        ! 'now' fields
-
-       DO jk = 1, jpk
-          WRITE(inum,REC=irec) un(:,:,jk)
-          irec = irec +1
-       END DO
-
-       DO jk = 1, jpk
-          WRITE(inum,REC=irec) vn(:,:,jk)
-          irec = irec +1
-       END DO
-
-       DO jk = 1, jpk
-          WRITE(inum,REC=irec) tn(:,:,jk)
-          irec = irec +1
-       END DO
-
-       DO jk = 1, jpk
-          WRITE(inum,REC=irec) sn(:,:,jk)
-          irec = irec +1
-       END DO
-
-       DO jk = 1, jpk
-          WRITE(inum,REC=irec) rotn(:,:,jk)
-          irec = irec +1
-       END DO
-
-       DO jk = 1, jpk
-          WRITE(inum,REC=irec) hdivn(:,:,jk)
-          irec = irec +1
+       DO jk = 1, jpk
+          WRITE(inum,REC=irec) un(:,:,jk)   ;   irec = irec +1
+       END DO
+       DO jk = 1, jpk
+          WRITE(inum,REC=irec) vn(:,:,jk)   ;   irec = irec +1
+       END DO
+       DO jk = 1, jpk
+          WRITE(inum,REC=irec) tn(:,:,jk)   ;   irec = irec +1
+       END DO
+       DO jk = 1, jpk
+          WRITE(inum,REC=irec) sn(:,:,jk)   ;   irec = irec +1
+       END DO
+       DO jk = 1, jpk
+          WRITE(inum,REC=irec) rotn(:,:,jk)   ;   irec = irec +1
+       END DO
+       DO jk = 1, jpk
+          WRITE(inum,REC=irec) hdivn(:,:,jk)   ;   irec = irec +1
        END DO
 
        ! elliptic solver arrays
-       WRITE(inum,REC=irec ) gcx(1:jpi,1:jpj)
-       irec = irec +1
-
-       WRITE(inum,REC=irec ) gcxb(1:jpi,1:jpj)
-       irec = irec +1
-
-#if defined key_dynspg_fsc
-
+       WRITE(inum,REC=irec ) gcx(1:jpi,1:jpj)   ;   irec = irec +1
+       WRITE(inum,REC=irec ) gcxb(1:jpi,1:jpj)   ;   irec = irec +1
+#if defined key_dynspg_rl
+       ! Rigid-lid formulation (bsf)
+       WRITE(inum,REC=irec ) bsfb(:,:)   ;   irec = irec +1
+       WRITE(inum,REC=irec ) bsfn(:,:)   ;   irec = irec +1
+       WRITE(inum,REC=irec ) bsfd(:,:)   ;   irec = irec +1
+# else
        ! free surface formulation (ssh)
-
-       WRITE(inum,REC=irec ) sshb(:,:)
-       irec = irec +1
-
-       WRITE(inum,REC=irec ) sshn(:,:)
-       irec = irec +1
-#else
-
-       ! Rigid-lid formulation (bsf)
-
-       WRITE(inum,REC=irec ) bsfb(:,:)
-       irec = irec +1
-
-       WRITE(inum,REC=irec ) bsfn(:,:)
-       irec = irec +1
-
-       WRITE(inum,REC=irec ) bsfd(:,:)
-       irec = irec +1
-
+       WRITE(inum,REC=irec ) sshb(:,:)   ;   irec = irec +1
+       WRITE(inum,REC=irec ) sshn(:,:)   ;   irec = irec +1
+# if defined key_dynspg_ts
+       ! free surface formulation issued from barotropic loop
+       WRITE(inum,REC=irec ) sshb_b(:,:)   ;   irec = irec +1
+       WRITE(inum,REC=irec ) sshn_b(:,:)   ;   irec = irec +1
+
+       ! horizontal transports issued from barotropic loop
+       WRITE(inum,REC=irec) un_b(:,:)   ;   irec = irec +1
+       WRITE(inum,REC=irec) vn_b(:,:)   ;   irec = irec +1
+# endif
 #endif
 
        ! TKE arrays
-
 #if defined key_zdftke
          DO jk = 1, jpk
-            WRITE(inum,REC=irec) en(:,:,jk) ; irec = irec + 1 
+            WRITE(inum,REC=irec) en(:,:,jk)   ;   irec = irec + 1 
          END DO
 #endif
@@ -206,17 +174,17 @@
 #if defined key_ice_lim
           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
+          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
+          WRITE(inum,REC=irec) alb_ice(:,:)  ;   irec = irec + 1
 #    endif
 #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
+          WRITE(inum,REC=irec) zfblk(:)   ;   irec = irec + 1
+          WRITE(inum,REC=irec) gsst(:,:)  ;   irec = irec + 1
 # endif
 
@@ -225,14 +193,13 @@
 
   END SUBROUTINE rst_write
+
 
   SUBROUTINE rst_read
     !!---------------------------------------------------------------------
-    !!                       ROUTINE rst_read
-    !!                     ******************
+    !!                  ***  ROUTINE rst_read  ***
     !! ** Purpose :
     !!        Read restart fields in direct access format, one per process
     !!
-    !! ** Method :
-    !!        Just does the oposit than rst_wri
+    !! ** Method :   Just does the opposit than rst_wri
     !!
     !! History :
@@ -245,7 +212,5 @@
     !!        !  99-11  (M. Imbard)  NetCDF FORMAT with ioipsl
     !!   8.5  !  03-06  (J.M. Molines)  F90: Free form, mpp support
-    !!----------------------------------------------------------------------
-
-
+    !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization
     !!----------------------------------------------------------------------
     USE lib_mpp
@@ -264,8 +229,5 @@
     LOGICAL   :: lstop
 
-      REAL(wp), DIMENSION( 1) ::   zfice, zfblk   ! used only in case of ice & bulk
-
-    !!----------------------------------------------------------------------
-    !!  OPA 8.5, LODYC-IPSL (2002)
+    REAL(wp), DIMENSION( 1) ::   zfice, zfblk   ! used only in case of ice & bulk
     !!----------------------------------------------------------------------
 
@@ -316,8 +278,7 @@
     ! --------------
 
-
-    READ(inum,REC=1) irecl8, ino1, it1, isor1, ipcg1, itke1, &
-     &  iice1, ibulk1, ios1, ios2, ios3, ios4, &
-     &  idast1, adatrj0,  ipi,ipj,ipk,ipni,ipnj,ipnij,iarea
+    READ(inum,REC=1) irecl8, ino1, it1, isor1, ipcg1, itke1,   &
+       &             iice1, ibulk1, ios1, ios2, ios3, ios4,    &
+       &             idast1, adatrj0,  ipi,ipj,ipk,ipni,ipnj,ipnij,iarea
 
     ! Performs checks on the file
@@ -393,105 +354,70 @@
 
     ! 'before' fields
-
-    DO jk = 1, jpk
-       READ(inum,REC=irec) ub(:,:,jk)
-       irec = irec +1
-    END DO
-
-    DO jk = 1, jpk
-       READ(inum,REC=irec) vb(:,:,jk)
-       irec = irec +1
-    END DO
-
-    DO jk = 1, jpk
-       READ(inum,REC=irec) tb(:,:,jk)
-       irec = irec +1
-    END DO
-
-    DO jk = 1, jpk
-       READ(inum,REC=irec) sb(:,:,jk)
-       irec = irec +1
-    END DO
-
-    DO jk = 1, jpk
-       READ(inum,REC=irec) rotb(:,:,jk)
-       irec = irec +1
-    END DO
-
-    DO jk = 1, jpk
-       READ(inum,REC=irec) hdivb(:,:,jk)
-       irec = irec +1
+    DO jk = 1, jpk
+       READ(inum,REC=irec) ub(:,:,jk)   ;   irec = irec +1
+    END DO
+    DO jk = 1, jpk
+       READ(inum,REC=irec) vb(:,:,jk)   ;   irec = irec +1
+    END DO
+    DO jk = 1, jpk
+       READ(inum,REC=irec) tb(:,:,jk)   ;   irec = irec +1
+    END DO
+    DO jk = 1, jpk
+       READ(inum,REC=irec) sb(:,:,jk)   ;   irec = irec +1
+    END DO
+    DO jk = 1, jpk
+       READ(inum,REC=irec) rotb(:,:,jk)   ;   irec = irec +1
+    END DO
+    DO jk = 1, jpk
+       READ(inum,REC=irec) hdivb(:,:,jk)   ;   irec = irec +1
     END DO
 
     ! 'now' fields
-
-    DO jk = 1, jpk
-       READ(inum,REC=irec) un(:,:,jk)
-       irec = irec +1
-    END DO
-
-    DO jk = 1, jpk
-       READ(inum,REC=irec) vn(:,:,jk)
-       irec = irec +1
-    END DO
-
-    DO jk = 1, jpk
-       READ(inum,REC=irec) tn(:,:,jk)
-       irec = irec +1
-    END DO
-
-    DO jk = 1, jpk
-       READ(inum,REC=irec) sn(:,:,jk)
-       irec = irec +1
-    END DO
-
-    DO jk = 1, jpk
-       READ(inum,REC=irec) rotn(:,:,jk)
-       irec = irec +1
-    END DO
-
-    DO jk = 1, jpk
-       READ(inum,REC=irec) hdivn(:,:,jk)
-       irec = irec +1
+    DO jk = 1, jpk
+       READ(inum,REC=irec) un(:,:,jk)   ;   irec = irec +1
+    END DO
+    DO jk = 1, jpk
+       READ(inum,REC=irec) vn(:,:,jk)   ;   irec = irec +1
+    END DO
+    DO jk = 1, jpk
+       READ(inum,REC=irec) tn(:,:,jk)   ;   irec = irec +1
+    END DO
+    DO jk = 1, jpk
+       READ(inum,REC=irec) sn(:,:,jk)   ;   irec = irec +1
+    END DO
+    DO jk = 1, jpk
+       READ(inum,REC=irec) rotn(:,:,jk)   ;   irec = irec +1
+    END DO
+    DO jk = 1, jpk
+       READ(inum,REC=irec) hdivn(:,:,jk)   ;   irec = irec +1
     END DO
 
     ! elliptic solver arrays
-    READ(inum,REC=irec ) gcx(1:jpi,1:jpj)
-    irec = irec +1
-
-    READ(inum,REC=irec ) gcxb(1:jpi,1:jpj)
-    irec = irec +1
-
-#if defined key_dynspg_fsc
-
+    READ(inum,REC=irec ) gcx(1:jpi,1:jpj)   ;   irec = irec +1
+    READ(inum,REC=irec ) gcxb(1:jpi,1:jpj)   ;   irec = irec +1
+#if defined key_dynspg_rl
+    ! Rigid-lid formulation (bsf)
+    READ(inum,REC=irec ) bsfb(:,:)   ;   irec = irec +1
+    READ(inum,REC=irec ) bsfn(:,:)   ;   irec = irec +1
+    READ(inum,REC=irec ) bsfd(:,:)   ;   irec = irec +1
+#else
     ! free surface formulation (eta)
-
-    READ(inum,REC=irec ) sshb(:,:)
-    irec = irec +1
-
-    READ(inum,REC=irec ) sshn(:,:)
-    irec = irec +1
-#else
-
-    ! Rigid-lid formulation (bsf)
-
-    READ(inum,REC=irec ) bsfb(:,:)
-    irec = irec +1
-
-    READ(inum,REC=irec ) bsfn(:,:)
-    irec = irec +1
-
-    READ(inum,REC=irec ) bsfd(:,:)
-    irec = irec +1
-
+    READ(inum,REC=irec ) sshb(:,:)   ;   irec = irec +1
+    READ(inum,REC=irec ) sshn(:,:)   ;   irec = irec +1
+# if defined key_dynspg_ts
+    ! free surface formulation issued from barotropic loop
+    READ(inum,REC=irec ) sshb_b(:,:)   ;   irec = irec +1
+    READ(inum,REC=irec ) sshn_b(:,:)   ;   irec = irec +1
+    ! horizontal transports issued from barotropic loop
+    READ(inum,REC=irec) un_b(:,:)   ;   irec = irec +1
+    READ(inum,REC=irec) vn_b(:,:)   ;   irec = irec +1
+# endif
 #endif
 
     ! TKE arrays
-
 #if defined key_zdftke
     IF ( itke1 == 1 ) THEN
        DO jk = 1, jpk
-          READ(inum,REC=irec) en(:,:,jk)
-          irec = irec +1
+          READ(inum,REC=irec) en(:,:,jk)   ;   irec = irec +1
        END DO
     ELSE
@@ -507,12 +433,12 @@
     ! check if it was in the previous run
     IF ( ios1 == 1 ) THEN
-       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
+       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 ( zfice(1) /= FLOAT(nfice) .OR. ios1 == 0 ) THEN
@@ -528,11 +454,10 @@
             END DO
          END DO
-#    if defined key_coupled
+# if defined key_coupled
          alb_ice(:,:) = 0.8 * tmask(:,:,1)
-#    endif
-    ENDIF
-  
-#endif
-# if defined key_flx_bulk_monthly || defined key_flx_bulk_daily
+# endif
+    ENDIF
+#endif
+#if defined key_flx_bulk_monthly || defined key_flx_bulk_daily
       ! bulk forcing 
       IF( ios2 == 1 ) THEN
@@ -547,5 +472,5 @@
          gsst(:,:) = gsst(:,:) + ( nfbulk-1 )*( tn(:,:,1) + rt0 )
       ENDIF
-# endif
+#endif
     CLOSE(inum)
   ! In case of restart with neuler = 0 then put all before fields = to now fields
@@ -557,13 +482,10 @@
       rotb(:,:,:)=rotn(:,:,:)
       hdivb(:,:,:)=hdivn(:,:,:)
-#if defined key_dynspg_fsc
-    ! free surface formulation (eta)
-      sshb(:,:)=sshn(:,:)
+#if defined key_dynspg_rl
+      bsfb(:,:)=bsfn(:,:)      ! rigid lid
 #else
-    ! rigid lid
-      bsfb(:,:)=bsfn(:,:)
-#endif
-    ENDIF
-
+      sshb(:,:)=sshn(:,:)      ! free surface formulation (eta)
+#endif
+    ENDIF
 
   END SUBROUTINE rst_read
Index: /trunk/NEMO/OPA_SRC/step.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/step.F90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/step.F90	(revision 359)
@@ -35,7 +35,5 @@
    USE dynhpg          ! hydrostatic pressure grad.       (dyn_hpg routine)
    USE dynhpg_atsk     ! hydrostatic pressure grad.  (dyn_hpg_atsk routine)
-   USE dynspg_fsc      ! surface pressure gradient   (dyn_spg_fsc  routine)
-   USE dynspg_fsc_atsk ! surface pressure gradient (dyn_spgfsc_atsk routine)
-   USE dynspg_rl       ! surface pressure gradient     (dyn_spg_rl routine)
+   USE dynspg          ! surface pressure gradient        (dyn_spg routine)
    USE dynkeg          ! kinetic energy gradient          (dyn_keg routine)
    USE dynvor          ! vorticity term              (dyn_vor_... routines)
@@ -166,4 +164,5 @@
       !!    "   !  04-08  (C. Talandier) New trends organization
       !!    "   !  05-01  (C. Ethe) Add the KPP closure scheme
+      !!    "   !  05-11  (V. Garnier) Surface pressure gradient organization
       !!----------------------------------------------------------------------
       !! * Arguments
@@ -369,6 +368,9 @@
 
       !                                                       ! horizontal gradient of Hydrostatic pressure 
-      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)
+      IF ( lk_jki ) THEN
+                               CALL dyn_hpg_atsk( kstp )             ! autotask case (j-k-i loop)
+      ELSE
+                               CALL dyn_hpg     ( kstp )             ! default case  (k-j-i loop)
+      ENDIF
 
                                CALL dyn_zad    ( kstp )       ! vertical advection       
@@ -387,10 +389,7 @@
       CALL lbc_lnk( emp, 'T', 1. )
 !i
-      !                                                       ! surface pressure gradient
-      IF( lk_dynspg_fsc     )   CALL dyn_spg_fsc     ( kstp, indic )  ! free surface constant volume case
-      IF( lk_dynspg_fsc_tsk )   CALL dyn_spg_fsc_atsk( kstp, indic )  ! autotask free surface constant volume case
-      IF( lk_dynspg_rl      )   CALL dyn_spg_rl      ( kstp, indic )  ! rigid-lid case
-
-                                CALL dyn_nxt( kstp )          ! lateral velocity at next time step 
+                               CALL dyn_spg( kstp, indic )    ! surface pressure gradient
+
+                               CALL dyn_nxt( kstp )           ! velocity at next time step 
 
 
Index: /trunk/NEMO/OPA_SRC/stpctl.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/stpctl.F90	(revision 358)
+++ /trunk/NEMO/OPA_SRC/stpctl.F90	(revision 359)
@@ -17,4 +17,5 @@
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
    USE lib_mpp         ! distributed memory computing
+   USE dynspg          ! pressure gradient schemes 
 
    IMPLICIT NONE
@@ -76,29 +77,32 @@
 
 
-      ! elliptic solver statistics
-      ! -----------------------------
-      ! Solver
-      IF(lwp) WRITE(numsol,9200) kt, niter, res, SQRT(epsr)/eps
-9200  FORMAT(' it :', i8, ' niter :', i4, ' res :',e20.10,' b :',e20.10)
+      ! elliptic solver statistics (if required)
+      ! --------------------------
+      IF( lk_dynspg_flt .OR. lk_dynspg_rl ) THEN
+         ! Solver
+         IF(lwp) WRITE(numsol,9200) kt, niter, res, SQRT(epsr)/eps
 
-      ! Islands (if exist)
-      IF( lk_isl )   CALL isl_stp_ctl( kt, kindic )
+         ! Islands (if exist)
+         IF( lk_isl )   CALL isl_stp_ctl( kt, kindic )
 
 
-      ! Output in numwso and numwvo IF kindic<0
-      ! ---------------------------------------
-      !    (i.e. problem for the solver)
-      IF( kindic < 0 ) THEN
-         IF(lwp) THEN
-            WRITE(numout,*) ' stpctl: the elliptic solver DO not converge or explode'
-            WRITE(numout,*) ' ====== '
-            WRITE(numout,9200) kt, niter, res, sqrt(epsr)/eps
-            WRITE(numout,*)
-            WRITE(numout,*) ' stpctl: output of last fields in numwso'
-            WRITE(numout,*) '                                  numwvo'
-            WRITE(numout,*) ' ======  *******************************'
+         ! Output in numwso and numwvo IF kindic<0
+         ! ---------------------------------------
+         !    (i.e. problem for the solver)
+         IF( kindic < 0 ) THEN
+            IF(lwp) THEN
+               WRITE(numout,*) ' stpctl: the elliptic solver DO not converge or explode'
+               WRITE(numout,*) ' ====== '
+               WRITE(numout,9200) kt, niter, res, sqrt(epsr)/eps
+               WRITE(numout,*)
+               WRITE(numout,*) ' stpctl: output of last fields in numwso'
+               WRITE(numout,*) '                                  numwvo'
+               WRITE(numout,*) ' ======  *******************************'
+            ENDIF
+            CALL dia_wri( kt, kindic )
          ENDIF
-         CALL dia_wri( kt, kindic )
       ENDIF
+
+9200  FORMAT(' it :', i8, ' niter :', i4, ' res :',e20.10,' b :',e20.10)
 
       ! Test maximum of velocity (zonal only)
