Index: NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps_rewrite_time_filterswap/src/NST/agrif_oce_sponge.F90
===================================================================
--- NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps_rewrite_time_filterswap/src/NST/agrif_oce_sponge.F90	(revision 11053)
+++ NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps_rewrite_time_filterswap/src/NST/agrif_oce_sponge.F90	(revision 11463)
@@ -393,7 +393,7 @@
          
               IF (N_in * N_out > 0) THEN
-                 h_diff = sum(h_out(1:N_out))-sum(h_in(1:N_in))
+                 h_diff = SUM( h_out(1:N_out) ) - SUM( h_in(1:N_in) )
                  if (h_diff < -1.e4) then
-                    print *,'CHECK YOUR BATHY ...', h_diff, sum(h_out(1:N_out)), sum(h_in(1:N_in))
+                    print *,'CHECK YOUR BATHY ...', h_diff, SUM( h_out(1:N_out) ), SUM( h_in(1:N_in) )
                  endif
               ENDIF
@@ -403,7 +403,7 @@
          ENDDO
 
-         ubdiff(i1:i2,j1:j2,:) = (uu(i1:i2,j1:j2,:,Kbb_a) - tabres_child(i1:i2,j1:j2,:))*umask(i1:i2,j1:j2,:)
+         ubdiff(i1:i2,j1:j2,:) = ( uu(i1:i2,j1:j2,:,Kbb_a) - tabres_child(i1:i2,j1:j2,:  ) )*umask(i1:i2,j1:j2,:)
 #else
-         ubdiff(i1:i2,j1:j2,:) = (uu(i1:i2,j1:j2,:,Kbb_a) - tabres(i1:i2,j1:j2,:,1))*umask(i1:i2,j1:j2,:)
+         ubdiff(i1:i2,j1:j2,:) = ( uu(i1:i2,j1:j2,:,Kbb_a) -       tabres(i1:i2,j1:j2,:,1) )*umask(i1:i2,j1:j2,:)
 #endif
          !
@@ -540,7 +540,7 @@
          
               IF (N_in * N_out > 0) THEN
-                 h_diff = sum(h_out(1:N_out))-sum(h_in(1:N_in))
+                 h_diff = SUM( h_out(1:N_out) ) - SUM( h_in(1:N_in) )
                  if (h_diff < -1.e4) then
-                    print *,'CHECK YOUR BATHY ...', h_diff, sum(h_out(1:N_out)), sum(h_in(1:N_in))
+                    print *,'CHECK YOUR BATHY ...', h_diff, SUM( h_out(1:N_out) ), SUM( h_in(1:N_in) )
                  endif
               ENDIF
@@ -549,7 +549,7 @@
          ENDDO
 
-         vbdiff(i1:i2,j1:j2,:) = (vv(i1:i2,j1:j2,:,Kbb_a) - tabres_child(i1:i2,j1:j2,:))*vmask(i1:i2,j1:j2,:)  
+         vbdiff(i1:i2,j1:j2,:) = ( vv(i1:i2,j1:j2,:,Kbb_a) - tabres_child(i1:i2,j1:j2,:  ) )*vmask(i1:i2,j1:j2,:)  
 # else
-         vbdiff(i1:i2,j1:j2,:) = (vv(i1:i2,j1:j2,:,Kbb_a) - tabres(i1:i2,j1:j2,:,1))*vmask(i1:i2,j1:j2,:)
+         vbdiff(i1:i2,j1:j2,:) = ( vv(i1:i2,j1:j2,:,Kbb_a) -       tabres(i1:i2,j1:j2,:,1) )*vmask(i1:i2,j1:j2,:)
 # endif
          !
@@ -570,6 +570,6 @@
                DO ji = i1,i2-1   ! vector opt.
                   zbtr = r1_e1e2f(ji,jj) * e3f(ji,jj,jk) * fsahm_spf(ji,jj)
-                  rotdiff(ji,jj,jk) = ( e2v(ji+1,jj) * vbdiff(ji+1,jj,jk) & 
-                                    &  -e2v(ji  ,jj) * vbdiff(ji  ,jj,jk)  ) * fmask(ji,jj,jk) * zbtr
+                  rotdiff(ji,jj,jk) = (  e2v(ji+1,jj) * vbdiff(ji+1,jj,jk) & 
+                                    &  - e2v(ji  ,jj) * vbdiff(ji  ,jj,jk)  ) * fmask(ji,jj,jk) * zbtr
                END DO
             END DO
@@ -586,7 +586,8 @@
                IF( .NOT. tabspongedone_u(ji,jj) ) THEN
                   DO jk = 1, jpkm1
-                     uu(ji,jj,jk,Krhs_a) = uu(ji,jj,jk,Krhs_a)                                                               &
-                        & - ( rotdiff (ji  ,jj,jk) - rotdiff (ji,jj-1,jk)) / ( e2u(ji,jj) * e3u(ji,jj,jk,Kmm_a) )  &
-                        & + ( hdivdiff(ji+1,jj,jk) - hdivdiff(ji,jj  ,jk)) * r1_e1u(ji,jj)
+                     uu(ji,jj,jk,Krhs_a) =          uu(ji  ,jj,jk,Krhs_a)                                   &
+                        &                 - (  rotdiff(ji  ,jj,jk) -  rotdiff(ji,jj-1,jk) )                 &
+                        &                   / (    e2u(ji  ,jj)    *      e3u(ji,jj  ,jk,Kmm_a) )           &
+                        &                 + ( hdivdiff(ji+1,jj,jk) - hdivdiff(ji,jj  ,jk) ) * r1_e1u(ji,jj)
                   END DO
                ENDIF
@@ -600,7 +601,8 @@
                IF( .NOT. tabspongedone_v(ji,jj) ) THEN
                   DO jk = 1, jpkm1
-                     vv(ji,jj,jk,Krhs_a) = vv(ji,jj,jk,Krhs_a)                                                                  &
-                        &  + ( rotdiff (ji,jj  ,jk) - rotdiff (ji-1,jj,jk) ) / ( e1v(ji,jj) * e3v(ji,jj,jk,Kmm_a) )   &
-                        &  + ( hdivdiff(ji,jj+1,jk) - hdivdiff(ji  ,jj,jk) ) * r1_e2v(ji,jj)
+                     vv(ji,jj,jk,Krhs_a) =          vv(ji,jj  ,jk,Krhs_a)                                   &
+                        &                 + (  rotdiff(ji,jj  ,jk) -  rotdiff(ji-1,jj,jk) )                 &
+                        &                   / (    e1v(ji,jj  ) *         e3v(ji  ,jj,jk,Kmm_a) )           &
+                        &                 + ( hdivdiff(ji,jj+1,jk) - hdivdiff(ji  ,jj,jk) ) * r1_e2v(ji,jj)
                   END DO
                ENDIF
