Index: LMDZ5/trunk/libf/bibio/i1mach.F
===================================================================
--- LMDZ5/trunk/libf/bibio/i1mach.F	(revision 2196)
+++ LMDZ5/trunk/libf/bibio/i1mach.F	(revision 2197)
@@ -1,4 +1,5 @@
 *DECK I1MACH
       INTEGER FUNCTION I1MACH (I)
+      IMPLICIT NONE
 C***BEGIN PROLOGUE  I1MACH
 C***PURPOSE  Return integer machine dependent constants.
@@ -95,4 +96,5 @@
       SAVE IMACH
       EQUIVALENCE (IMACH(4),OUTPUT)
+      INTEGER I
 C***FIRST EXECUTABLE STATEMENT  I1MACH
       IMACH( 1) =         5
Index: LMDZ5/trunk/libf/bibio/j4save.F
===================================================================
--- LMDZ5/trunk/libf/bibio/j4save.F	(revision 2196)
+++ LMDZ5/trunk/libf/bibio/j4save.F	(revision 2197)
@@ -1,4 +1,5 @@
 *DECK J4SAVE
       FUNCTION J4SAVE (IWHICH, IVALUE, ISET)
+      IMPLICIT NONE
 C***BEGIN PROLOGUE  J4SAVE
 C***SUBSIDIARY
@@ -59,4 +60,5 @@
       DATA IPARAM(5)/1/
       DATA IPARAM(6),IPARAM(7),IPARAM(8),IPARAM(9)/0,0,0,0/
+      INTEGER J4SAVE,IWHICH,IVALUE
 C***FIRST EXECUTABLE STATEMENT  J4SAVE
       J4SAVE = IPARAM(IWHICH)
Index: LMDZ5/trunk/libf/bibio/xercnt.F
===================================================================
--- LMDZ5/trunk/libf/bibio/xercnt.F	(revision 2196)
+++ LMDZ5/trunk/libf/bibio/xercnt.F	(revision 2197)
@@ -1,4 +1,5 @@
 *DECK XERCNT
       SUBROUTINE XERCNT (LIBRAR, SUBROU, MESSG, NERR, LEVEL, KONTRL)
+      IMPLICIT NONE
 C***BEGIN PROLOGUE  XERCNT
 C***SUBSIDIARY
@@ -56,4 +57,5 @@
 C***END PROLOGUE  XERCNT
       CHARACTER*(*) LIBRAR, SUBROU, MESSG
+      INTEGER NERR, LEVEL, KONTRL
 C***FIRST EXECUTABLE STATEMENT  XERCNT
       RETURN
Index: LMDZ5/trunk/libf/bibio/xermsg.F
===================================================================
--- LMDZ5/trunk/libf/bibio/xermsg.F	(revision 2196)
+++ LMDZ5/trunk/libf/bibio/xermsg.F	(revision 2197)
@@ -1,4 +1,5 @@
 *DECK XERMSG
       SUBROUTINE XERMSG (LIBRAR, SUBROU, MESSG, NERR, LEVEL)
+      IMPLICIT NONE
 C***BEGIN PROLOGUE  XERMSG
 C***PURPOSE  Process error messages for SLATEC and other libraries.
@@ -189,4 +190,7 @@
       CHARACTER*72  TEMP
       CHARACTER*20  LFIRST
+      INTEGER NERR, LEVEL, LKNTRL
+      INTEGER J4SAVE, MAXMES, KDUMMY, I, KOUNT, LERR, LLEVEL
+      INTEGER MKNTRL, LTEMP
 C***FIRST EXECUTABLE STATEMENT  XERMSG
       LKNTRL = J4SAVE (2, 0, .FALSE.)
Index: LMDZ5/trunk/libf/bibio/xerprn.F
===================================================================
--- LMDZ5/trunk/libf/bibio/xerprn.F	(revision 2196)
+++ LMDZ5/trunk/libf/bibio/xerprn.F	(revision 2197)
@@ -1,4 +1,5 @@
 *DECK XERPRN
       SUBROUTINE XERPRN (PREFIX, NPREF, MESSG, NWRAP)
+      IMPLICIT NONE
 C***BEGIN PROLOGUE  XERPRN
 C***SUBSIDIARY
@@ -81,4 +82,6 @@
       CHARACTER*2 NEWLIN
       PARAMETER (NEWLIN = '$$')
+      INTEGER N, I1MACH, I, LPREF, LWRAP, LENMSG, NEXTC
+      INTEGER LPIECE, IDELTA
 C***FIRST EXECUTABLE STATEMENT  XERPRN
       CALL XGETUA(IU,NUNIT)
Index: LMDZ5/trunk/libf/bibio/xersve.F
===================================================================
--- LMDZ5/trunk/libf/bibio/xersve.F	(revision 2196)
+++ LMDZ5/trunk/libf/bibio/xersve.F	(revision 2197)
@@ -2,4 +2,5 @@
       SUBROUTINE XERSVE (LIBRAR, SUBROU, MESSG, KFLAG, NERR, LEVEL,
      +   ICOUNT)
+      IMPLICIT NONE
 C***BEGIN PROLOGUE  XERSVE
 C***SUBSIDIARY
@@ -66,4 +67,7 @@
       SAVE LIBTAB, SUBTAB, MESTAB, NERTAB, LEVTAB, KOUNT, KOUNTX, NMSG
       DATA KOUNTX/0/, NMSG/0/
+      INTEGER NERR,LEVEL,KONTRL
+      INTEGER LENTAB, NERTAB, LEVTAB, KOUNT, KOUNTX, NMSG
+      INTEGER KFLAG, ICOUNT, NUNIT, KUNIT, IUNIT, I1MACH, I
 C***FIRST EXECUTABLE STATEMENT  XERSVE
 C
Index: LMDZ5/trunk/libf/bibio/xgetua.F
===================================================================
--- LMDZ5/trunk/libf/bibio/xgetua.F	(revision 2196)
+++ LMDZ5/trunk/libf/bibio/xgetua.F	(revision 2197)
@@ -1,4 +1,5 @@
 *DECK XGETUA
       SUBROUTINE XGETUA (IUNITA, N)
+      IMPLICIT NONE
 C***BEGIN PROLOGUE  XGETUA
 C***PURPOSE  Return unit number(s) to which error messages are being
@@ -41,4 +42,5 @@
 C***END PROLOGUE  XGETUA
       DIMENSION IUNITA(5)
+      INTEGER IUNITA, N, J4SAVE, INDEX, I
 C***FIRST EXECUTABLE STATEMENT  XGETUA
       N = J4SAVE(5,0,.FALSE.)
Index: LMDZ5/trunk/libf/dyn3d_common/grid_atob.F
===================================================================
--- LMDZ5/trunk/libf/dyn3d_common/grid_atob.F	(revision 2196)
+++ LMDZ5/trunk/libf/dyn3d_common/grid_atob.F	(revision 2197)
@@ -936,4 +936,5 @@
 c
       SUBROUTINE dist_sphe(rf_lon,rf_lat,rlon,rlat,im,jm,distance)
+      IMPLICIT NONE
 c
 c Auteur: Laurent Li (le 30 decembre 1996)
@@ -958,4 +959,5 @@
       REAL radius
       PARAMETER (radius=6371229.)
+      INTEGER i,j
 c
       pi = 4.0 * ATAN(1.0)
Index: LMDZ5/trunk/libf/dyn3d_common/grid_noro.F
===================================================================
--- LMDZ5/trunk/libf/dyn3d_common/grid_noro.F	(revision 2196)
+++ LMDZ5/trunk/libf/dyn3d_common/grid_noro.F	(revision 2197)
@@ -54,6 +54,5 @@
 C=======================================================================
 
-      IMPLICIT INTEGER (I,J)
-      IMPLICIT REAL(X,Z) 
+      IMPLICIT NONE 
       
 	  parameter(iusn=2160,jusn=1080,iext=216, epsfra = 1.e-5)
@@ -89,4 +88,14 @@
       REAL a(2200),b(2200),c(1100),d(1100)
       logical masque_lu
+      INTEGER iusn, jusn, iext
+      INTEGER i,j,ii,jj
+      REAL epsfra, xpi, rad, zdeltay, masque
+      REAL zdeltax, zlenx, zleny, xincr
+      REAL zbordnor, zbordsud, weighy, zbordest, zbordoue, weighx
+      REAL zllmmea, zllmstd, zllmsig, zllmgam, zllmpic, zllmval
+      REAL zllmthe, zminthe
+      REAL xk, xl, xm, xp, xq, xw
+      REAL zmeanor, zmeasud, zstdnor, zstdsud, zsignor, zsigsud
+      REAL zweinor, zweisud, zpicnor, zpicsud, zvalnor, zvalsud
 c
       print *,' parametres de l orographie a l echelle sous maille' 
@@ -455,9 +464,11 @@
 
       SUBROUTINE MVA9(X,IMAR,JMAR)
-
+      IMPLICIT NONE
 C MAKE A MOVING AVERAGE OVER 9 GRIDPOINTS OF THE X FIELDS
-
+      INTEGER IMAR,JMAR
       REAL X(IMAR,JMAR),XF(IMAR,JMAR)
       real WEIGHTpb(-1:1,-1:1)
+      INTEGER I,J,IS,JS
+      REAL SUM
 
 
Index: LMDZ5/trunk/libf/dyn3d_common/juldate.F
===================================================================
--- LMDZ5/trunk/libf/dyn3d_common/juldate.F	(revision 2196)
+++ LMDZ5/trunk/libf/dyn3d_common/juldate.F	(revision 2197)
@@ -7,5 +7,11 @@
 c	En entree:an,mois,jour,heure,min.,sec.
 c	En sortie:tjd
-	implicit real (a-h,o-z)
+        IMPLICIT NONE
+        INTEGER,INTENT(IN) :: ian,imoi,ijou,oh,om,os
+        REAL,INTENT(OUT) :: tjd,tjdsec
+        
+        REAL frac,year,rmon,cf,a,b
+        INTEGER ojou
+        
 	frac=((os/60.+om)/60.+oh)/24.
 	ojou=dble(ijou)+frac
Index: LMDZ5/trunk/libf/dyn3d_common/massbar.F
===================================================================
--- LMDZ5/trunk/libf/dyn3d_common/massbar.F	(revision 2196)
+++ LMDZ5/trunk/libf/dyn3d_common/massbar.F	(revision 2197)
@@ -3,4 +3,5 @@
 !
       SUBROUTINE massbar(  masse, massebx, masseby )
+      IMPLICIT NONE
 c
 c **********************************************************************
@@ -24,4 +25,5 @@
       REAL    masse( ip1jmp1,llm ), massebx( ip1jmp1,llm )  ,
      *      masseby(   ip1jm,llm )
+      INTEGER ij,l
 c
 c
Index: LMDZ5/trunk/libf/dyn3d_common/massbarxy.F
===================================================================
--- LMDZ5/trunk/libf/dyn3d_common/massbarxy.F	(revision 2196)
+++ LMDZ5/trunk/libf/dyn3d_common/massbarxy.F	(revision 2197)
@@ -3,4 +3,5 @@
 !
       SUBROUTINE massbarxy(  masse, massebxy )
+      IMPLICIT NONE
 c
 c **********************************************************************
@@ -23,4 +24,5 @@
 c
        REAL  masse( ip1jmp1,llm ), massebxy( ip1jm,llm )
+       INTEGER ij,l
 c
 
Index: LMDZ5/trunk/libf/dyn3d_common/ppm3d.F
===================================================================
--- LMDZ5/trunk/libf/dyn3d_common/ppm3d.F	(revision 2196)
+++ LMDZ5/trunk/libf/dyn3d_common/ppm3d.F	(revision 2197)
@@ -66,5 +66,5 @@
      &                  JNP,j1,NLAY,AP,BP,PT,AE,fill,dum,Umax)
 
-c      implicit none
+      implicit none
 
 c     rajout de déclarations
@@ -270,5 +270,5 @@
 C     User modifiable parameters
 C
-      parameter (Jmax = 361, kmax = 150)
+      integer,parameter :: Jmax = 361, kmax = 150
 C
 C ****6***0*********0*********0*********0*********0*********0**********72
@@ -299,7 +299,13 @@
       data NDT0, NSTEP /0, 0/
       data cross /.true./
+      REAL DTDY, DTDY5, RCAP
+      INTEGER JS0, JN0, IML, JMR, IMJM
       SAVE DTDY, DTDY5, RCAP, JS0, JN0, IML,
      &     DTDX, DTDX5, ACOSP, COSP, COSE, DAP,DBK
 C
+      INTEGER NDT0, NSTEP, j2, k,j,i,ic,l,JS,JN,IMH
+      INTEGER IU,IIU,JT,iad,jad,krd
+      REAL r23,r3,PI,DL,DP,DT,CR1,MAXDT,ZTC,D5
+      REAL sum1,sum2,ru
             
       JMR = JNP -1
@@ -756,6 +762,8 @@
       subroutine FZPPM(IMR,JNP,NLAY,j1,DQ,WZ,P,DC,DQDT,AR,AL,A6,
      &                 flux,wk1,wk2,wz2,delp,KORD)
-      parameter ( kmax = 150 )
-      parameter ( R23 = 2./3., R3 = 1./3.)
+      implicit none
+      integer,parameter :: kmax = 150 
+      real,parameter :: R23 = 2./3., R3 = 1./3.
+      integer IMR,JNP,NLAY,J1,KORD
       real WZ(IMR,JNP,NLAY),P(IMR,JNP,NLAY),DC(IMR,JNP,NLAY),
      &     wk1(IMR,*),delp(IMR,JNP,NLAY),DQ(IMR,JNP,NLAY),
@@ -764,4 +772,6 @@
       real AR(IMR,*),AL(IMR,*),A6(IMR,*),flux(IMR,*),wk2(IMR,*),
      &     wz2(IMR,*)
+      integer JMR,IMJM,NLAYM1,LMT,K,I,J
+      real c0,c1,c2,tmp,qmax,qmin,a,b,fct,a1,a2,cm,cp
 C
       JMR = JNP - 1
@@ -922,7 +932,14 @@
       subroutine xtp(IMR,JNP,IML,j1,j2,JN,JS,PU,DQ,Q,UC,
      &               fx1,xmass,IORD)
+      implicit none
+      integer IMR,JNP,IML,j1,j2,JN,JS,IORD
+      real PU,DQ,Q,UC,fx1,xmass
+      real dc,qtmp
+      integer ISAVE(IMR)
       dimension UC(IMR,*),DC(-IML:IMR+IML+1),xmass(IMR,JNP)
      &    ,fx1(IMR+1),DQ(IMR,JNP),qtmp(-IML:IMR+1+IML)
-      dimension PU(IMR,JNP),Q(IMR,JNP),ISAVE(IMR)
+      dimension PU(IMR,JNP),Q(IMR,JNP)
+      integer jvan,j1vl,j2vl,j,i,iu,itmp,ist,imp
+      real rut
 C
       IMP = IMR + 1
@@ -1031,8 +1048,11 @@
 C
       subroutine fxppm(IMR,IML,UT,P,DC,flux,IORD)
-      parameter ( R3 = 1./3., R23 = 2./3. )
+      implicit none
+      integer IMR,IML,IORD
+      real UT,P,DC,flux
+      real,parameter ::  R3 = 1./3., R23 = 2./3. 
       DIMENSION UT(*),flux(*),P(-IML:IMR+IML+1),DC(-IML:IMR+IML+1)
-      DIMENSION AR(0:IMR),AL(0:IMR),A6(0:IMR)
-      integer LMT 
+      REAL :: AR(0:IMR),AL(0:IMR),A6(0:IMR)
+      integer LMT,IMP,JLVL,i
 c      logical first
 c      data first /.true./
@@ -1088,6 +1108,10 @@
 C
       subroutine xmist(IMR,IML,P,DC)
-      parameter( R24 = 1./24.)
-      dimension P(-IML:IMR+1+IML),DC(-IML:IMR+1+IML)
+      implicit none
+      integer IMR,IML
+      real,parameter :: R24 = 1./24.
+      real :: P(-IML:IMR+1+IML),DC(-IML:IMR+1+IML)
+      integer :: i
+      real :: tmp,pmax,pmin
 C
       do 10  i=1,IMR
@@ -1101,8 +1125,13 @@
       subroutine ytp(IMR,JNP,j1,j2,acosp,RCAP,DQ,P,VC,DC2
      &              ,ymass,fx,A6,AR,AL,JORD)
+      implicit none
+      integer :: IMR,JNP,j1,j2,JORD
+      real :: acosp,RCAP,DQ,P,VC,DC2,ymass,fx,A6,AR,AL
       dimension P(IMR,JNP),VC(IMR,JNP),ymass(IMR,JNP)
      &       ,DC2(IMR,JNP),DQ(IMR,JNP),acosp(JNP)
 C Work array
       DIMENSION fx(IMR,JNP),AR(IMR,JNP),AL(IMR,JNP),A6(IMR,JNP)
+      integer :: JMR,len,i,jt,j
+      real :: sum1,sum2
 C
       JMR = JNP - 1
@@ -1161,6 +1190,10 @@
 C
       subroutine  ymist(IMR,JNP,j1,P,DC,ID)
-      parameter ( R24 = 1./24. )
-      dimension P(IMR,JNP),DC(IMR,JNP)
+      implicit none
+      integer :: IMR,JNP,j1,ID
+      real,parameter :: R24 = 1./24.
+      real :: P(IMR,JNP),DC(IMR,JNP)
+      integer :: iimh,jmr,ijm3,imh,i
+      real :: pmax,pmin,tmp
 C
       IMH = IMR / 2
@@ -1239,9 +1272,12 @@
 C
       subroutine fyppm(VC,P,DC,flux,IMR,JNP,j1,j2,A6,AR,AL,JORD)
-      parameter ( R3 = 1./3., R23 = 2./3. )
+      implicit none
+      integer IMR,JNP,j1,j2,JORD
+      real,parameter :: R3 = 1./3., R23 = 2./3.
       real VC(IMR,*),flux(IMR,*),P(IMR,*),DC(IMR,*)
 C Local work arrays.
       real AR(IMR,JNP),AL(IMR,JNP),A6(IMR,JNP)
-      integer LMT
+      integer LMT,i
+      integer IMH,JMR,j11,IMJM1,len
 c      logical first
 C      data first /.true./
@@ -1315,6 +1351,10 @@
 C
 	subroutine yadv(IMR,JNP,j1,j2,p,VA,ady,wk,IAD)
+        implicit none
+        integer IMR,JNP,j1,j2,IAD
 	REAL p(IMR,JNP),ady(IMR,JNP),VA(IMR,JNP)
         REAL WK(IMR,-1:JNP+2)
+        INTEGER JMR,IMH,i,j,jp
+        REAL rv,a1,b1,sum1,sum2
 C
 	JMR = JNP-1
@@ -1401,5 +1441,9 @@
 C
 	subroutine xadv(IMR,JNP,j1,j2,p,UA,JS,JN,IML,adx,IAD)
+        implicit none
+        INTEGER IMR,JNP,j1,j2,JS,JN,IML,IAD
 	REAL p(IMR,JNP),adx(IMR,JNP),qtmp(-IMR:IMR+IMR),UA(IMR,JNP)
+        INTEGER JMR,j,i,ip,iu,iiu
+        REAL ru,a1,b1
 C
 	JMR = JNP-1
@@ -1489,4 +1533,5 @@
 C
       subroutine lmtppm(DC,A6,AR,AL,P,IM,LMT)
+      implicit none
 C
 C A6 =  CURVATURE OF THE TEST PARABOLA
@@ -1503,6 +1548,9 @@
 C LMT = 2: POSITIVE-DEFINITE CONSTRAINT
 C
-      parameter ( R12 = 1./12. )
-      dimension A6(IM),AR(IM),AL(IM),P(IM),DC(IM)
+      real,parameter :: R12 = 1./12. 
+      real :: A6(IM),AR(IM),AL(IM),P(IM),DC(IM)
+      integer :: IM,LMT
+      INTEGER i
+      REAL da1,da2,a6da,fmin
 C
       if(LMT.eq.0) then
@@ -1564,5 +1612,8 @@
 C
       subroutine A2C(U,V,IMR,JMR,j1,j2,CRX,CRY,dtdx5,DTDY5)
-      dimension U(IMR,*),V(IMR,*),CRX(IMR,*),CRY(IMR,*),DTDX5(*)
+      implicit none
+      integer IMR,JMR,j1,j2
+      real :: U(IMR,*),V(IMR,*),CRX(IMR,*),CRY(IMR,*),DTDX5(*),DTDY5
+      integer i,j
 C
       do 35 j=j1,j2
@@ -1579,5 +1630,9 @@
 C
       subroutine cosa(cosp,cose,JNP,PI,DP)
-      dimension cosp(*),cose(*)
+      implicit none
+      integer JNP
+      real :: cosp(*),cose(*),PI,DP
+      integer JMR,j,jeq
+      real ph5
       JMR = JNP-1
       do 55 j=2,JNP
@@ -1606,5 +1661,9 @@
 C
       subroutine cosc(cosp,cose,JNP,PI,DP)
-      dimension cosp(*),cose(*)
+      implicit none
+      integer JNP
+      real :: cosp(*),cose(*),PI,DP
+      real phi
+      integer j
 C
       phi = -0.5*PI
@@ -1628,7 +1687,10 @@
      &                   cross,IC,NSTEP)
 C
-      parameter( tiny = 1.E-60 )
-      DIMENSION Q(IMR,JNP,NLAY),qtmp(IMR,JNP),cosp(*),acosp(*)
+      real,parameter :: tiny = 1.E-60 
+      INTEGER :: IMR,JNP,NLAY,j1,j2,IC,NSTEP
+      REAL :: Q(IMR,JNP,NLAY),qtmp(IMR,JNP),cosp(*),acosp(*)
       logical cross
+      INTEGER :: NLAYM1,len,ip,L,icr,ipy,ipx,i
+      real :: qup,qly,dup,sum
 C
       NLAYM1 = NLAY-1
@@ -1730,5 +1792,9 @@
 C
       subroutine filcr(q,IMR,JNP,j1,j2,cosp,acosp,icr,tiny)
-      dimension q(IMR,*),cosp(*),acosp(*)
+      implicit none
+      integer :: IMR,JNP,j1,j2,icr
+      real :: q(IMR,*),cosp(*),acosp(*),tiny
+      integer :: i,j
+      real :: dq,dn,d0,d1,ds,d2
       icr = 0
       do 65 j=j1+1,j2-1
@@ -1828,5 +1894,9 @@
 C
       subroutine filns(q,IMR,JNP,j1,j2,cosp,acosp,ipy,tiny)
-      dimension q(IMR,*),cosp(*),acosp(*)
+      implicit none
+      integer :: IMR,JNP,j1,j2,ipy
+      real :: q(IMR,*),cosp(*),acosp(*),tiny
+      real :: DP,CAP1,dq,dn,d0,d1,ds,d2
+      INTEGER :: i,j
 c      logical first
 c      data first /.true./
@@ -1910,5 +1980,9 @@
 C
       subroutine filew(q,qtmp,IMR,JNP,j1,j2,ipx,tiny)
-      dimension q(IMR,*),qtmp(JNP,IMR)
+      implicit none
+      integer :: IMR,JNP,j1,j2,ipx
+      real :: q(IMR,*),qtmp(JNP,IMR),tiny
+      integer :: i,j
+      real :: d0,d1,d2
 C
       ipx = 0
@@ -1983,8 +2057,11 @@
 C
       subroutine zflip(q,im,km,nc)
+      implicit none
 C This routine flip the array q (in the vertical).
+      integer :: im,km,nc
       real q(im,km,nc)
 C local dynamic array
       real qtmp(im,km)
+      integer IC,k,i
 C
       do 4000 IC = 1, nc
Index: LMDZ5/trunk/libf/dyn3d_common/ran1.F
===================================================================
--- LMDZ5/trunk/libf/dyn3d_common/ran1.F	(revision 2196)
+++ LMDZ5/trunk/libf/dyn3d_common/ran1.F	(revision 2197)
@@ -3,11 +3,15 @@
 !
       FUNCTION RAN1(IDUM)
-      DIMENSION R(97)
-      save r
-      save iff,ix1,ix2,ix3
-      PARAMETER (M1=259200,IA1=7141,IC1=54773,RM1=3.8580247E-6)
-      PARAMETER (M2=134456,IA2=8121,IC2=28411,RM2=7.4373773E-6)
-      PARAMETER (M3=243000,IA3=4561,IC3=51349)
-      DATA IFF /0/
+      IMPLICIT NONE
+      REAL RAN1
+      REAL,SAVE :: R(97)
+      REAL,PARAMETER :: RM1=3.8580247E-6,RM2=7.4373773E-6
+      INTEGER,SAVE :: IFF=0
+      integer,save :: ix1,ix2,ix3
+      INTEGER,PARAMETER :: M1=259200,IA1=7141,IC1=54773
+      INTEGER,PARAMETER :: M2=134456,IA2=8121,IC2=28411
+      INTEGER,PARAMETER :: M3=243000,IA3=4561,IC3=51349
+      INTEGER :: IDUM,J
+
       IF (IDUM.LT.0.OR.IFF.EQ.0) THEN
         IFF=1
Index: LMDZ5/trunk/libf/filtrez/acc.F
===================================================================
--- LMDZ5/trunk/libf/filtrez/acc.F	(revision 2196)
+++ LMDZ5/trunk/libf/filtrez/acc.F	(revision 2197)
@@ -3,5 +3,10 @@
 !
         subroutine acc(vec,d,im)
-        dimension vec(im,im),d(im)
+        implicit none
+        integer :: im
+        real :: vec(im,im),d(im)
+        integer :: i,j
+        real ::sum
+        real,external :: ssum
         do j=1,im
           do i=1,im
Index: LMDZ5/trunk/libf/filtrez/eigen.F
===================================================================
--- LMDZ5/trunk/libf/filtrez/eigen.F	(revision 2196)
+++ LMDZ5/trunk/libf/filtrez/eigen.F	(revision 2197)
@@ -3,7 +3,9 @@
 !
       SUBROUTINE eigen( e,d)
+      IMPLICIT NONE
 #include "dimensions.h"
-      dimension e( iim,iim ), d( iim )
-      dimension asm( iim )
+      real :: e( iim,iim ), d( iim )
+      real :: asm( iim )
+      integer :: im,i,j
       im=iim
 c
Index: LMDZ5/trunk/libf/phylmd/clift.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/clift.F90	(revision 2196)
+++ LMDZ5/trunk/libf/phylmd/clift.F90	(revision 2197)
@@ -3,4 +3,5 @@
 
 SUBROUTINE clift(p, t, rr, rs, plcl, dplcldt, dplcldq)
+IMPLICIT NONE
   ! ***************************************************************
   ! *                                                             *
@@ -41,4 +42,6 @@
 
   include "YOMCST.h"
+  real :: p,t,rr,rs,plcl,dplcldt,dplcldq,cpd,cpv,cl,cpvmcl,eps,alv0,a,b
+  real :: rh,chi,alv
 
   cpd = rcpd
Index: LMDZ5/trunk/libf/phylmd/convect3.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/convect3.F90	(revision 2196)
+++ LMDZ5/trunk/libf/phylmd/convect3.F90	(revision 2197)
@@ -17,5 +17,5 @@
   USE dimphy
   USE infotrac, ONLY: nbtr
-
+  IMPLICIT NONE
   include "dimensions.h"
   INTEGER na
@@ -73,5 +73,15 @@
 
 
-
+  REAL :: cpv,cl,cpvmcl,eps,alv0,rdcp,pbcrit,ptcrit,sigd,spfac
+  REAL :: tau,beta,alpha,dtcrit,dtovsh,ahm,rm,um,vm,dphinv
+  REAL :: a2,x,tvx,tvy,plcl,pden,dpbase,tvpbase,tvbase,tdif
+  REAL :: ath1,ath,delti,deltap,dcape,dlnp,sigold,dtmin,fac,w
+  REAL :: amu,rti,cpd,bf2,anum,denom,dei,altem,cwat,stemp,qp
+  REAL :: scrit,alt,smax,asij,wgh,sjmax,sjmin,smid,delp,delm
+  REAL :: asum,bsum,csum,wflux,tinv,wdtrain,awat,afac,afac1,afac2
+  REAL :: bfac,pr1,pr2,sigt,b6,c6,revap,tevap,delth,amfac,amp2
+  REAL :: xf,tf,af,bf,fac2,ur,sru,d,ampmax,dpinv,am,amde,cpinv
+  REAL :: amp1,ad,rat,ax,bx,cx,dx,ex,dsum
+  INTEGER :: nk,i,j,nopt,jn,k,im,jm,n
 
   REAL dnwd0(nd) !  precipitation driven unsaturated downdraft flux
Index: LMDZ5/trunk/libf/phylmd/cv3_inicp.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/cv3_inicp.F90	(revision 2196)
+++ LMDZ5/trunk/libf/phylmd/cv3_inicp.F90	(revision 2197)
@@ -9,5 +9,5 @@
   ! modified by :                                               *
   ! **************************************************************
-
+  IMPLICIT NONE
   include "YOMCST2.h"
 
@@ -19,4 +19,5 @@
 
   REAL qcoef1, qcoef2, qff, qfff, qmix, rmix, qmix1, rmix1, qmix2, rmix2, f
+  REAL :: sumcoef,sigma,aire,pdf,mu,df,ff
 
   qcoef1(f) = tanh(f/gammas)
Index: LMDZ5/trunk/libf/phylmd/hines_gwd.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/hines_gwd.F90	(revision 2196)
+++ LMDZ5/trunk/libf/phylmd/hines_gwd.F90	(revision 2197)
@@ -625,5 +625,4 @@
     mmin_alpha, kstar, slope, f1, f2, f3, naz, levbot, levtop, il1, il2, &
     nlons, nlevs, nazmth, sigsqmcw, sigmatm, lorms, sigalpmc, f2mod)
-
   ! Smooth cutoff wavenumbers and total rms velocity in the vertical
   ! direction NSMAX times, using FLUX_U as temporary work array.
@@ -715,5 +714,5 @@
     i_alpha, mmin_alpha, kstar, slope, f1, f2, f3, naz, levbot, levtop, il1, &
     il2, nlons, nlevs, nazmth, sigsqmcw, sigmatm, lorms, sigalpmc, f2mod)
-
+  IMPLICIT NONE
   ! This routine calculates the cutoff vertical wavenumber and velocity
   ! variances on a longitude by altitude grid for the Hines' Doppler
@@ -766,5 +765,5 @@
 
   INTEGER naz, levbot, levtop, il1, il2, nlons, nlevs, nazmth
-  REAL slope, kstar(nlons), f1, f2, f3
+  REAL slope, kstar(nlons), f1, f2, f3, f2mfac
   REAL m_alpha(nlons, nlevs, nazmth)
   REAL sigma_alpha(nlons, nlevs, nazmth)
@@ -938,5 +937,5 @@
 SUBROUTINE hines_wind(v_alpha, vel_u, vel_v, naz, il1, il2, lev1, lev2, &
     nlons, nlevs, nazmth)
-
+    IMPLICIT NONE
   ! This routine calculates the azimuthal horizontal background wind
   ! components
@@ -1034,5 +1033,5 @@
     m_alpha, ak_alpha, k_alpha, slope, naz, il1, il2, lev1, lev2, nlons, &
     nlevs, nazmth, lorms)
-
+    IMPLICIT NONE
   ! Calculate zonal and meridional components of the vertical flux
   ! of horizontal momentum and corresponding wave drag (force per unit mass)
@@ -1089,5 +1088,5 @@
   ! Internal variables.
 
-  INTEGER i, l, lev1p, lev2m
+  INTEGER i, l, lev1p, lev2m, lev2p
   REAL cos45, prod2, prod4, prod6, prod8, dendz, dendz2
   DATA cos45/0.7071068/
@@ -1234,5 +1233,5 @@
     bvfreq, density, densb, sigma_t, visc_mol, kstar, slope, f2, f3, f5, f6, &
     naz, il1, il2, lev1, lev2, nlons, nlevs, nazmth)
-
+  IMPLICIT NONE
   ! This routine calculates the gravity wave induced heating and
   ! diffusion coefficient on a longitude by altitude grid for
@@ -1355,5 +1354,5 @@
 SUBROUTINE hines_sigma(sigma_t, sigma_alpha, sigsqh_alpha, naz, lev, il1, &
     il2, nlons, nlevs, nazmth)
-
+  IMPLICIT NONE
   ! This routine calculates the total rms and azimuthal rms horizontal
   ! velocities at a given level on a longitude by altitude grid for
@@ -1450,5 +1449,5 @@
 SUBROUTINE hines_intgrl(i_alpha, v_alpha, m_alpha, bvfb, slope, naz, lev, &
     il1, il2, nlons, nlevs, nazmth, lorms)
-
+  IMPLICIT NONE
   ! This routine calculates the vertical wavenumber integral
   ! for a single vertical level at each azimuth on a longitude grid
@@ -1643,5 +1642,5 @@
     alt_cutoff, smco, nsmax, iheatcal, k_alpha, ierror, nmessg, nlons, &
     nazmth, coslat)
-
+  IMPLICIT NONE
   ! This routine specifies various parameters needed for the
   ! the Hines' Doppler spread gravity wave drag parameterization scheme.
@@ -1772,5 +1771,5 @@
     sigma_alpha, v_alpha, m_alpha, iu_print, iv_print, nmessg, ilprt1, &
     ilprt2, levprt1, levprt2, naz, nlons, nlevs, nazmth)
-
+  IMPLICIT NONE
   ! Print out altitude profiles of various quantities from
   ! Hines' Doppler spread gravity wave drag parameterization scheme.
@@ -1864,5 +1863,5 @@
 SUBROUTINE hines_exp(data, data_zmax, alt, alt_exp, iorder, il1, il2, lev1, &
     lev2, nlons, nlevs)
-
+  IMPLICIT NONE
   ! This routine exponentially damps a longitude by altitude array
   ! of data above a specified altitude.
@@ -1941,5 +1940,5 @@
 SUBROUTINE vert_smooth(data, work, coeff, nsmooth, il1, il2, lev1, lev2, &
     nlons, nlevs)
-
+  IMPLICIT NONE
   ! Smooth a longitude by altitude array in the vertical over a
   ! specified number of levels using a three point smoother.
Index: LMDZ5/trunk/libf/phylmd/ini_wake.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/ini_wake.F90	(revision 2196)
+++ LMDZ5/trunk/libf/phylmd/ini_wake.F90	(revision 2197)
@@ -4,4 +4,5 @@
 SUBROUTINE ini_wake(wape, fip, it_wape_prescr, wape_prescr, fip_prescr, &
     alp_bl_prescr, ale_bl_prescr)
+  IMPLICIT NONE
   ! **************************************************************
   ! *
@@ -39,7 +40,10 @@
   include 'iniprint.h'
   ! declarations
+  REAL wape, fip, wape_prescr, fip_prescr
+  INTEGER it_wape_prescr
   REAL ale_bl_prescr
   REAL alp_bl_prescr
   REAL it
+  REAL w,f,alebl,alpbl
 
   ! FH A mettre si besoin dans physiq.def
Index: LMDZ5/trunk/libf/phylmd/tilft43.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/tilft43.F90	(revision 2196)
+++ LMDZ5/trunk/libf/phylmd/tilft43.F90	(revision 2197)
@@ -3,7 +3,11 @@
 
 SUBROUTINE tlift43(p, t, q, qs, gz, icb, nk, tvp, tpk, clw, nd, nl, kk)
+  IMPLICIT NONE
   REAL gz(nd), tpk(nd), clw(nd), p(nd)
   REAL t(nd), q(nd), qs(nd), tvp(nd), lv0
-
+  INTEGER icb, nk, nd, nl, kk
+  REAL cpd, cpv,  cl, g, rowl, gravity, cpvmcl, eps, epsi
+  REAL ah0, cpp, cpinv, tg, qg, alv, s, ahg, tc, denom, es
+  INTEGER i, nst, nsb, j 
   ! ***   ASSIGN VALUES OF THERMODYNAMIC CONSTANTS     ***
 
Index: LMDZ5/trunk/libf/phylmd/tlift.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/tlift.F90	(revision 2196)
+++ LMDZ5/trunk/libf/phylmd/tlift.F90	(revision 2197)
@@ -4,10 +4,10 @@
 SUBROUTINE tlift(p, t, rr, rs, gz, plcl, icb, nk, tvp, tpk, clw, nd, nl, &
     dtvpdt1, dtvpdq1)
-
+  IMPLICIT NONE
   ! Argument NK ajoute (jyg) = Niveau de depart de la
   ! convection
-
-  PARAMETER (na=60)
-  REAL gz(nd), tpk(nd), clw(nd)
+  INTEGER icb, nk, nd, nl
+  INTEGER,PARAMETER :: na=60
+  REAL gz(nd), tpk(nd), clw(nd), plcl
   REAL t(nd), rr(nd), rs(nd), tvp(nd), p(nd)
   REAL dtvpdt1(nd), dtvpdq1(nd) ! Derivatives of parcel virtual
@@ -17,5 +17,8 @@
   REAL dtpdt1(na), dtpdq1(na) ! Derivatives of parcel temperature
   ! wrt T1 and Q1
-
+  REAL gravity, cpd, cpv, cl, ci, cpvmcl, clmci, eps, alv0, alf0
+  REAL cpp, cpinv, ah0, alf, tg, s, ahg, tc, denom, alv, es, esi
+  REAL qsat_new, snew
+  INTEGER icbl, i, imin, j, icb1
 
   LOGICAL ice_conv
Index: LMDZ5/trunk/libf/phylmd/wake.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/wake.F90	(revision 2196)
+++ LMDZ5/trunk/libf/phylmd/wake.F90	(revision 2197)
@@ -1756,5 +1756,5 @@
   ! a une humidite positive dans la zone (x) et dans la zone (w).
   ! ------------------------------------------------------
-
+  IMPLICIT NONE
 
   ! Input
@@ -1772,4 +1772,5 @@
   REAL epsilon
   ! DATA epsilon/1.e-15/
+  INTEGER i,k
 
   DO k = 1, nl
