Index: /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/LDF/ldfslp.F90
===================================================================
--- /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/LDF/ldfslp.F90	(revision 2343)
+++ /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/LDF/ldfslp.F90	(revision 2344)
@@ -9,4 +9,5 @@
    !!   NEMO     0.5  ! 2002-10  (G. Madec)  Free form, F90
    !!            1.0  ! 2005-10  (A. Beckmann)  correction for s-coordinates
+   !!            3.3  ! 2006-10  (C. Harris, G. Nurser)  add ldf_slp_grif (Griffies operator)
    !!----------------------------------------------------------------------
 #if   defined key_ldfslp   ||   defined key_esopa
@@ -34,5 +35,5 @@
    PUBLIC   ldf_slp         ! routine called by step.F90
    PUBLIC   ldf_slp_init    ! routine called by opa.F90
-   PUBLIC ldf_slp_grif   !              "
+   PUBLIC   ldf_slp_grif    ! routine called by step.F90
 
    LOGICAL , PUBLIC, PARAMETER              ::   lk_ldfslp = .TRUE.   !: slopes flag
@@ -57,7 +58,6 @@
    !! NEMO/OPA 3.3 , NEMO Consortium (2010)
    !! $Id$
-   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
-
 CONTAINS
 
@@ -348,4 +348,5 @@
    END SUBROUTINE ldf_slp
 
+
    SUBROUTINE ldf_slp_grif ( kt )
      !!----------------------------------------------------------------------
@@ -364,35 +365,25 @@
      !! ** Action : - alpha, beta
      !!               wslp2 squared slope of neutral surfaces at w-points.
+     !!----------------------------------------------------------------------
+     USE oce, zdit  => ua   ! use ua as workspace
+     USE oce, zdis  => va   ! use va as workspace
+     USE oce, zdjt  => ta   ! use ta as workspace
+     USE oce, zdjs  => sa   ! use sa as workspace
      !!
-     !! History :
-     !!   9.0  !  06-10  (C. Harris)  New subroutine
-     !!----------------------------------------------------------------------
-     !! * Modules used
-     USE oce            , zdit  => ua,  &  ! use ua as workspace
-          zdis  => va,  &  ! use va as workspace
-          zdjt  => ta,  &  ! use ta as workspace
-          zdjs  => sa      ! use sa as workspace
-     !! * Arguments
      INTEGER, INTENT( in ) ::   kt         ! ocean time-step index
-
-     !! * Local declarations
+     !!
      INTEGER  ::   ji, jj, jk, ip, jp, kp  ! dummy loop indices
-     INTEGER  ::   iku, ikv                ! temporary integer
-     REAL(wp) ::   &
-          zt, zs, zh, zt2, zsp5, zp1t1,   &  ! temporary scalars
-          zdenr, zrhotmp, zdndt, zdddt,   &  !     "        "
-          zdnds, zddds, znum, zden,       &  !     "        "
-          zslope, za_sxe, zslopec, zdsloper,&  !     "        "
-          zfact, zepsln, zatempw,zatempu,zatempv, &   !     "        "
-          ze1ur,ze2vr,ze3wr,zdxt,zdxs,zdyt,zdys,zdzt,zdzs,zvolf,&
-          zr_slpmax,zdxrho,zdyrho,zabs_dzrho
-     REAL(wp), DIMENSION(jpi,jpj,jpk,0:1,0:1) ::   &
-          zsx,zsy
-     REAL(wp), DIMENSION(jpi,jpj,0:1,0:1) ::   &
-          zsx_ml_base,zsy_ml_base
-     REAL(wp), DIMENSION(jpi,jpj,jpk) ::   &
-          zdkt,zdks
-     REAL(wp), DIMENSION(jpi,jpj) ::   &
-          zr_ml_basew
+     INTEGER  ::   iku, ikv                ! local integer
+     REAL(wp) ::   zt, zs, zh, zt2, zsp5, zp1t1           ! local scalars
+     REAL(wp) ::     zdenr, zrhotmp, zdndt, zdddt         !   -      -
+     REAL(wp) ::     zdnds, zddds, znum, zden             !   -      -
+     REAL(wp) ::     zslope, za_sxe, zslopec, zdsloper    !   -      -
+     REAL(wp) ::     zfact, zepsln, zatempw,zatempu,zatempv    !   -      -
+     REAL(wp) ::     ze1ur, ze2vr, ze3wr, zdxt, zdxs, zdyt, zdys, zdzt, zdzs, zvolf 
+     REAL(wp) ::     zr_slpmax, zdxrho, zdyrho, zabs_dzrho
+     REAL(wp), DIMENSION(jpi,jpj,jpk,0:1,0:1) ::   zsx,zsy
+     REAL(wp), DIMENSION(jpi,jpj    ,0:1,0:1) ::   zsx_ml_base, zsy_ml_base
+     REAL(wp), DIMENSION(jpi,jpj,jpk)         ::   zdkt, zdks
+     REAL(wp), DIMENSION(jpi,jpj) ::   zr_ml_basew
      !!----------------------------------------------------------------------
 
@@ -444,7 +435,7 @@
                       &                               + 0.380374e-04 ) * zh)
 
-              ENDDO
-           ENDDO
-        ENDDO
+              END DO
+           END DO
+        END DO
 
      CASE ( 1 )
@@ -521,6 +512,6 @@
 
      IF( ln_zps ) THEN      ! partial steps correction at the last level
-# if defined key_vectopt_loop   &&   ! defined key_mpp_omp
-     jj = 1
+# if defined key_vectopt_loop
+     DO jj = 1, 1
         DO ji = 1, jpij-jpi   ! vector opt. (forced unrolling)
 # else
@@ -537,7 +528,5 @@
                  zdjt (ji,jj,ikv) = gtsv(ji,jj,jp_tem)
                  zdjs (ji,jj,ikv) = gtsv(ji,jj,jp_sal)
-# if ! defined key_vectopt_loop   ||   defined key_mpp_omp
               END DO
-# endif
            END DO
         ENDIF
@@ -733,9 +722,6 @@
         DO jp=0,1
            DO kp=0,1
-
               DO jk = 1, jpkm1
-
                  DO jj = 1, jpjm1
-
                     DO ji = 1, fs_jpim1   ! vector opt.
                        ! k index of uppermost point(s) of triad is jk+kp-1
@@ -744,5 +730,5 @@
                        zfact = 1 - 1/(1 + (jk+kp-1)/nmln(ji,jj+jp))
                        zsy(ji,jj+jp,jk,1-jp,kp) = zfact*zsy(ji,jj+jp,jk,1-jp,kp) + &
-                            & (1.0_wp-zfact)*(fsdepw(ji,jj+jp,jk+kp)*zr_ml_basew(ji,jj+jp))*zsy_ml_base(ji,jj+jp,1-jp,kp) 
+                           & (1.0_wp-zfact)*(fsdepw(ji,jj+jp,jk+kp)*zr_ml_basew(ji,jj+jp))*zsy_ml_base(ji,jj+jp,1-jp,kp) 
                     END DO
 
@@ -756,9 +742,6 @@
         DO jp=0,1
            DO kp=0,1
-
               DO jk = 1, jpkm1
-
                  DO jj = 1, jpjm1
-
                     DO ji = 1, fs_jpim1   ! vector opt.
 
@@ -786,12 +769,11 @@
                     END DO
                  END DO
-
               END DO
            END DO
         END DO
 
-        tfw(:,:,1)=0.0
-        sfw(:,:,1)=0.0
-        wslp2(:,:,1)=0.0
+        tfw(:,:,1)=0.e0
+        sfw(:,:,1)=0.e0
+        wslp2(:,:,1)=0.e0
 
         CALL lbc_lnk( wslp2, 'W', 1. )
@@ -808,7 +790,6 @@
         CALL lbc_lnk( psix_eiv, 'U', -1. )
         CALL lbc_lnk( psiy_eiv, 'V', -1. )
-
-
-      END SUBROUTINE ldf_slp_grif
+      !
+   END SUBROUTINE ldf_slp_grif
 
 
