Index: /trunk/LMDZ.COMMON/libf/dyn3d/advect.F
===================================================================
--- /trunk/LMDZ.COMMON/libf/dyn3d/advect.F	(revision 1458)
+++ /trunk/LMDZ.COMMON/libf/dyn3d/advect.F	(revision 1459)
@@ -28,14 +28,20 @@
 c   -------------
 
-#include "dimensions.h"
-#include "paramet.h"
-#include "comgeom.h"
+      include "dimensions.h"
+      include "paramet.h"
+      include "comgeom.h"
 
 c   Arguments:
 c   ----------
 
-      REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm),teta(ip1jmp1,llm)
-      REAL massebx(ip1jmp1,llm),masseby(ip1jm,llm),w(ip1jmp1,llm)
-      REAL dv(ip1jm,llm),du(ip1jmp1,llm),dteta(ip1jmp1,llm)
+      REAL,INTENT(IN) :: vcov(ip1jm,llm)
+      REAL,INTENT(IN) :: ucov(ip1jmp1,llm)
+      REAL,INTENT(IN) :: teta(ip1jmp1,llm)
+      REAL,INTENT(IN) :: massebx(ip1jmp1,llm)
+      REAL,INTENT(IN) :: masseby(ip1jm,llm)
+      REAL,INTENT(IN) :: w(ip1jmp1,llm)
+      REAL,INTENT(INOUT) :: dv(ip1jm,llm)
+      REAL,INTENT(INOUT) :: du(ip1jmp1,llm)
+      REAL,INTENT(INOUT) :: dteta(ip1jmp1,llm)
 
 c   Local:
@@ -57,7 +63,7 @@
          deuxjour = 2. * daysec
 
-         DO   1  ij   = 1, ip1jmp1
-         unsaire2(ij) = unsaire(ij) * unsaire(ij)
-   1     CONTINUE
+         DO ij   = 1, ip1jmp1
+           unsaire2(ij) = unsaire(ij) * unsaire(ij)
+         ENDDO
       END IF
 
@@ -100,22 +106,22 @@
 
 c
-      DO 20 l = 1, llmm1
+      DO l = 1, llmm1
 
 
 c       ......   calcul de  - w/2.    au niveau  l+1   .......
 
-      DO 5   ij   = 1, ip1jmp1
-      wsur2( ij ) = - 0.5 * w( ij,l+1 )
-   5  CONTINUE
+        DO ij   = 1, ip1jmp1
+          wsur2( ij ) = - 0.5 * w( ij,l+1 )
+        ENDDO
 
 
 c     .....................     calcul pour  du     ..................
 
-      DO 6 ij = iip2 ,ip1jm-1
-      ww        = wsur2 (  ij  )     + wsur2( ij+1 ) 
-      uu        = 0.5 * ( ucov(ij,l) + ucov(ij,l+1) )
-      du(ij,l)  = du(ij,l)   - ww * ( uu - uav(ij, l ) )/massebx(ij, l )
-      du(ij,l+1)= du(ij,l+1) + ww * ( uu - uav(ij,l+1) )/massebx(ij,l+1)
-   6  CONTINUE
+        DO ij = iip2 ,ip1jm-1
+          ww        = wsur2 (  ij  )     + wsur2( ij+1 ) 
+          uu        = 0.5 * ( ucov(ij,l) + ucov(ij,l+1) )
+          du(ij,l)  = du(ij,l)   -ww*(uu-uav(ij,l))/massebx(ij,l)
+          du(ij,l+1)= du(ij,l+1) +ww*(uu-uav(ij,l+1))/massebx(ij,l+1)
+        ENDDO
 
 c     .....  correction pour  du(iip1,j,l)  ........
@@ -123,17 +129,17 @@
 
 CDIR$ IVDEP
-      DO   7  ij   = iip1 +iip1, ip1jm, iip1
-      du( ij, l  ) = du( ij -iim, l  )
-      du( ij,l+1 ) = du( ij -iim,l+1 )
-   7  CONTINUE
+        DO ij   = iip1 +iip1, ip1jm, iip1
+          du( ij, l  ) = du( ij -iim, l  )
+          du( ij,l+1 ) = du( ij -iim,l+1 )
+        ENDDO
 
 c     .................    calcul pour   dv      .....................
 
-      DO 8 ij = 1, ip1jm
-      ww        = wsur2( ij+iip1 )   + wsur2( ij )
-      vv        = 0.5 * ( vcov(ij,l) + vcov(ij,l+1) )
-      dv(ij,l)  = dv(ij, l ) - ww * (vv - vav(ij, l ) )/masseby(ij, l )
-      dv(ij,l+1)= dv(ij,l+1) + ww * (vv - vav(ij,l+1) )/masseby(ij,l+1)
-   8  CONTINUE
+        DO ij = 1, ip1jm
+          ww        = wsur2( ij+iip1 )   + wsur2( ij )
+          vv        = 0.5 * ( vcov(ij,l) + vcov(ij,l+1) )
+          dv(ij,l)  = dv(ij, l ) - ww*(vv-vav(ij,l))/masseby(ij,l)
+          dv(ij,l+1)= dv(ij,l+1) + ww*(vv-vav(ij,l+1))/masseby(ij,l+1)
+        ENDDO
 
 c
@@ -147,20 +153,19 @@
 c                   ...............
 
-        DO 15 ij = 1, ip1jmp1
+        DO ij = 1, ip1jmp1
          ww            = wsur2(ij) * (teta(ij,l) + teta(ij,l+1) )
          dteta(ij, l ) = dteta(ij, l )  -  ww
          dteta(ij,l+1) = dteta(ij,l+1)  +  ww
-  15    CONTINUE
+        ENDDO
 
-      IF( conser)  THEN
-        DO 17 ij = 1,ip1jmp1
-        ge(ij)   = wsur2(ij) * wsur2(ij) * unsaire2(ij)
-  17    CONTINUE
-        gt       = SSUM( ip1jmp1,ge,1 )
-        gtot(l)  = deuxjour * SQRT( gt/ip1jmp1 )
-      END IF
+        IF( conser)  THEN
+          DO ij = 1,ip1jmp1
+            ge(ij)   = wsur2(ij) * wsur2(ij) * unsaire2(ij)
+          ENDDO
+          gt       = SSUM( ip1jmp1,ge,1 )
+          gtot(l)  = deuxjour * SQRT( gt/ip1jmp1 )
+        END IF
 
-  20  CONTINUE
+      ENDDO ! of DO l = 1, llmm1
  
-      RETURN
       END
Index: /trunk/LMDZ.COMMON/libf/dyn3dpar/advect_new_p.F
===================================================================
--- /trunk/LMDZ.COMMON/libf/dyn3dpar/advect_new_p.F	(revision 1458)
+++ /trunk/LMDZ.COMMON/libf/dyn3dpar/advect_new_p.F	(revision 1459)
@@ -28,19 +28,25 @@
 c   -------------
 
-#include "dimensions.h"
-#include "paramet.h"
-#include "comgeom.h"
+      include "dimensions.h"
+      include "paramet.h"
+      include "comgeom.h"
 
 c   Arguments:
 c   ----------
 
-      REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm),teta(ip1jmp1,llm)
-      REAL massebx(ip1jmp1,llm),masseby(ip1jm,llm),w(ip1jmp1,llm)
-      REAL dv(ip1jm,llm),du(ip1jmp1,llm),dteta(ip1jmp1,llm)
+      REAL,INTENT(IN) :: vcov(ip1jm,llm)
+      REAL,INTENT(IN) :: ucov(ip1jmp1,llm)
+      REAL,INTENT(IN) :: teta(ip1jmp1,llm)
+      REAL,INTENT(IN) :: massebx(ip1jmp1,llm)
+      REAL,INTENT(IN) :: masseby(ip1jm,llm)
+      REAL,INTENT(IN) :: w(ip1jmp1,llm)
+      REAL,INTENT(INOUT) :: dv(ip1jm,llm)
+      REAL,INTENT(INOUT) :: du(ip1jmp1,llm)
+      REAL,INTENT(INOUT) :: dteta(ip1jmp1,llm)
+c   Local:
+c   ------
+
       REAL,SAVE :: dv1(ip1jm,llm),du1(ip1jmp1,llm),dteta1(ip1jmp1,llm)
       REAL,SAVE :: dv2(ip1jm,llm),du2(ip1jmp1,llm),dteta2(ip1jmp1,llm)
-c   Local:
-c   ------
-
       REAL,SAVE :: uav(ip1jmp1,llm),vav(ip1jm,llm)
       REAL wsur2(ip1jmp1)
@@ -60,7 +66,7 @@
          deuxjour = 2. * daysec
 
-         DO   1  ij   = 1, ip1jmp1
+         DO ij   = 1, ip1jmp1
          unsaire2(ij) = unsaire(ij) * unsaire(ij)
-   1     CONTINUE
+         ENDDO
       END IF
 
@@ -77,4 +83,5 @@
       DO ij=ijb,ije
         du2(ij,1)=0.
+        du1(ij,llm)=0.
       ENDDO
       
@@ -85,4 +92,5 @@
       DO ij=ijb,ije
         dv2(ij,1)=0.
+        dv1(ij,llm)=0.
       ENDDO
       
@@ -92,4 +100,5 @@
       DO ij=ijb,ije
         dteta2(ij,1)=0.
+        dteta1(ij,llm)=0.
       ENDDO
 c$OMP END MASTER
@@ -129,5 +138,5 @@
            ENDDO
          endif
-         
+
       ENDDO
 c$OMP END DO      
@@ -169,42 +178,42 @@
 
 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
-      DO 20 l = 1, llmm1
+      DO l = 1, llmm1
 
 
 c       ......   calcul de  - w/2.    au niveau  l+1   .......
-      ijb=ij_begin
-      ije=ij_end+iip1
-      if (pole_sud)  ije=ij_end
-      
-      DO 5   ij   = ijb, ije
-      wsur2( ij ) = - 0.5 * w( ij,l+1 )
-   5  CONTINUE
+        ijb=ij_begin
+        ije=ij_end+iip1
+        if (pole_sud)  ije=ij_end
+      
+        DO ij   = ijb, ije
+          wsur2( ij ) = - 0.5 * w( ij,l+1 )
+        ENDDO
 
 
 c     .....................     calcul pour  du     ..................
       
-      ijb=ij_begin
-      ije=ij_end
-      if (pole_nord) ijb=ijb+iip1
-      if (pole_sud)  ije=ije-iip1
-         
-      DO 6 ij = ijb ,ije-1
-      ww        = wsur2 (  ij  )     + wsur2( ij+1 ) 
-      uu        = 0.5 * ( ucov(ij,l) + ucov(ij,l+1) )
-      du1(ij,l)  =  ww * ( uu - uav(ij, l ) )/massebx(ij, l )
-      du2(ij,l+1)=  ww * ( uu - uav(ij,l+1) )/massebx(ij,l+1)
-   6  CONTINUE
+        ijb=ij_begin
+        ije=ij_end
+        if (pole_nord) ijb=ijb+iip1
+        if (pole_sud)  ije=ije-iip1
+         
+        DO ij = ijb ,ije-1
+          ww        = wsur2 (  ij  )     + wsur2( ij+1 ) 
+          uu        = 0.5 * ( ucov(ij,l) + ucov(ij,l+1) )
+          du1(ij,l)  =  ww * ( uu - uav(ij, l ) )/massebx(ij, l )
+          du2(ij,l+1)=  ww * ( uu - uav(ij,l+1) )/massebx(ij,l+1)
+        ENDDO
 
 c     .................    calcul pour   dv      .....................
-      ijb=ij_begin
-      ije=ij_end
-      if (pole_sud)  ije=ij_end-iip1
-      
-      DO 8 ij = ijb, ije
-      ww        = wsur2( ij+iip1 )   + wsur2( ij )
-      vv        = 0.5 * ( vcov(ij,l) + vcov(ij,l+1) )
-      dv1(ij,l)  =  ww * (vv - vav(ij, l ) )/masseby(ij, l )
-      dv2(ij,l+1)=  ww * (vv - vav(ij,l+1) )/masseby(ij,l+1)
-   8  CONTINUE
+        ijb=ij_begin
+        ije=ij_end
+        if (pole_sud)  ije=ij_end-iip1
+      
+        DO ij = ijb, ije
+          ww        = wsur2( ij+iip1 )   + wsur2( ij )
+          vv        = 0.5 * ( vcov(ij,l) + vcov(ij,l+1) )
+          dv1(ij,l)  =  ww * (vv - vav(ij, l ) )/masseby(ij, l )
+          dv2(ij,l+1)=  ww * (vv - vav(ij,l+1) )/masseby(ij,l+1)
+        ENDDO
 
 c
@@ -220,9 +229,9 @@
         ije=ij_end
         
-        DO 15 ij = ijb, ije
+        DO ij = ijb, ije
          ww            = wsur2(ij) * (teta(ij,l) + teta(ij,l+1) )
          dteta1(ij, l ) =   ww
          dteta2(ij,l+1) =   ww
-  15    CONTINUE
+        ENDDO
 
 c ym ---> conser a voir plus tard
@@ -237,5 +246,5 @@
 c      END IF
 
-  20  CONTINUE
+      ENDDO ! of DO l = 1, llmm1
 c$OMP END DO
 
@@ -279,4 +288,3 @@
 c$OMP END DO NOWAIT      
 
-      RETURN
       END
Index: /trunk/LMDZ.COMMON/libf/dynlonlat_phylonlat/calfis.F
===================================================================
--- /trunk/LMDZ.COMMON/libf/dynlonlat_phylonlat/calfis.F	(revision 1458)
+++ /trunk/LMDZ.COMMON/libf/dynlonlat_phylonlat/calfis.F	(revision 1459)
@@ -94,12 +94,12 @@
 c    ------------------
 
-#include "dimensions.h"
-#include "paramet.h"
+      include "dimensions.h"
+      include "paramet.h"
 
       INTEGER ngridmx
       PARAMETER( ngridmx = 2+(jjm-1)*iim - 1/jjm   )
 
-#include "comgeom2.h"
-#include "iniprint.h"
+      include "comgeom2.h"
+      include "iniprint.h"
 
 c    Arguments :
@@ -259,5 +259,5 @@
         call tpot2t(llm,tetamoy,tmoy,pkmoy)
 c SI ON TIENT COMPTE DE LA VARIATION DE G AVEC L'ALTITUDE:
-        zlaymoy(:) = g*rad*rad/(g*rad-phimoy(:))-rad
+        zlaymoy(1:llm) = g*rad*rad/(g*rad-phimoy(1:llm))-rad
         zlevmoy(1) = phimoy(0)/g
         DO l=2,llm
Index: /trunk/LMDZ.COMMON/libf/dynlonlat_phylonlat/calfis_p.F
===================================================================
--- /trunk/LMDZ.COMMON/libf/dynlonlat_phylonlat/calfis_p.F	(revision 1458)
+++ /trunk/LMDZ.COMMON/libf/dynlonlat_phylonlat/calfis_p.F	(revision 1459)
@@ -103,12 +103,12 @@
 c    ------------------
 
-#include "dimensions.h"
-#include "paramet.h"
+      include "dimensions.h"
+      include "paramet.h"
 
       INTEGER ngridmx
       PARAMETER( ngridmx = 2+(jjm-1)*iim - 1/jjm   )
 
-#include "comgeom2.h"
-#include "iniprint.h"
+      include "comgeom2.h"
+      include "iniprint.h"
 #ifdef CPP_MPI
       include 'mpif.h'
@@ -348,5 +348,5 @@
         call tpot2t_p(1,llm,tetamoy,tmoy,pkmoy)
 c SI ON TIENT COMPTE DE LA VARIATION DE G AVEC L'ALTITUDE:
-        zlaymoy(:) = g*rad*rad/(g*rad-phimoy(:))-rad
+        zlaymoy(1:llm) = g*rad*rad/(g*rad-phimoy(1:llm))-rad
         zlevmoy(1) = phimoy(0)/g
         DO l=2,llm
