Index: LMDZ6/branches/Amaury_dev/libf/README
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/README	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/README	(revision 5101)
@@ -38,5 +38,5 @@
                with at a first level common routines to all physics 
                and dedicated specific routines for each physics
-               (e.g., call physics + physics initialization) in a
+               (e.g., CALL physics + physics initialization) in a
                subdirectory of the same name as the physics package's
                (phylmd, phydev, ...).
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d/abort_gcm.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d/abort_gcm.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d/abort_gcm.F	(revision 5101)
@@ -37,12 +37,12 @@
 
 #ifdef CPP_IOIPSL
-      call histclo
-      call restclo
+      CALL histclo
+      CALL restclo
 #endif
-      call getin_dump
-c     call histclo(2)
-c     call histclo(3)
-c     call histclo(4)
-c     call histclo(5)
+      CALL getin_dump
+c     CALL histclo(2)
+c     CALL histclo(3)
+c     CALL histclo(4)
+c     CALL histclo(5)
       write(lunout,*) 'Stopping in ', modname
       write(lunout,*) 'Reason = ',message
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d/addfi.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d/addfi.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d/addfi.F	(revision 5101)
@@ -6,6 +6,6 @@
      S          pdufi, pdvfi, pdhfi,pdqfi, pdpfi  )
 
-      USE infotrac, ONLY : nqtot
-      USE control_mod, ONLY : planet_type
+      USE infotrac, ONLY: nqtot
+      USE control_mod, ONLY: planet_type
       IMPLICIT NONE
 c
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d/advtrac.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d/advtrac.F90	(revision 5100)
+++ 	(revision )
@@ -1,354 +1,0 @@
-! $Id$
-
-#define DEBUG_IO
-#undef DEBUG_IO
-SUBROUTINE advtrac(pbaru, pbarv, p, masse,q,iapptrac,teta, flxw, pk)
-   !     Auteur :  F. Hourdin
-
-   !     Modif. P. Le Van     (20/12/97)
-   !            F. Codron     (10/99)
-   !            D. Le Croller (07/2001)
-   !            M.A Filiberti (04/2002)
-
-   USE infotrac,     ONLY: nqtot, tracers, isoCheck
-   USE control_mod,  ONLY: iapp_tracvl, day_step
-   USE comconst_mod, ONLY: dtvr
-
-   IMPLICIT NONE
-
-   include "dimensions.h"
-   include "paramet.h"
-   include "comdissip.h"
-   include "comgeom2.h"
-   include "description.h"
-   include "iniprint.h"
-
-   !---------------------------------------------------------------------------
-   !     Arguments
-   !---------------------------------------------------------------------------
-   INTEGER, INTENT(OUT) :: iapptrac
-   REAL, INTENT(IN) :: pbaru(ip1jmp1,llm)
-   REAL, INTENT(IN) :: pbarv(ip1jm,  llm)
-   REAL, INTENT(INOUT) ::  q(ip1jmp1,llm,nqtot)
-   REAL, INTENT(IN) :: masse(ip1jmp1,llm)
-   REAL, INTENT(IN) ::     p(ip1jmp1,llmp1 )
-   REAL, INTENT(IN) ::  teta(ip1jmp1,llm)
-   REAL, INTENT(IN) ::    pk(ip1jmp1,llm)
-   REAL, INTENT(OUT) :: flxw(ip1jmp1,llm)
-   !---------------------------------------------------------------------------
-   !     Ajout PPM
-   !---------------------------------------------------------------------------
-   REAL :: massebx(ip1jmp1,llm), masseby(ip1jm,llm)
-   !---------------------------------------------------------------------------
-   !     Variables locales
-   !---------------------------------------------------------------------------
-   INTEGER :: ij, l, iq, iadv
-!   REAL(KIND=KIND(1.d0)) :: t_initial, t_final, tps_cpu
-   REAL :: zdp(ip1jmp1), zdpmin, zdpmax
-   INTEGER, SAVE :: iadvtr=0
-   REAL, DIMENSION(ip1jmp1,llm) :: pbaruc, pbarug, massem, wg
-   REAL, DIMENSION(ip1jm,  llm) :: pbarvc, pbarvg
-   EXTERNAL  minmax
-   SAVE massem, pbaruc, pbarvc
-   !---------------------------------------------------------------------------
-   !     Rajouts pour PPM
-   !---------------------------------------------------------------------------
-   INTEGER indice, n
-   REAL :: dtbon                       ! Pas de temps adaptatif pour que CFL<1
-   REAL :: CFLmaxz, aaa, bbb           ! CFL maximum
-   REAL, DIMENSION(iim,jjp1,llm) :: unatppm, vnatppm, fluxwppm
-   REAL ::    qppm(iim*jjp1,llm,nqtot)
-   REAL ::   psppm(iim,jjp1)           ! pression  au sol
-   REAL, DIMENSION(llmp1) :: apppm, bpppm
-   LOGICAL, SAVE :: dum=.TRUE., fill=.TRUE.
-
-   INTEGER, SAVE :: countcfl=0
-   REAL, DIMENSION(ip1jmp1,llm) :: cflx, cflz
-   REAL, DIMENSION(ip1jm  ,llm) :: cfly
-   REAL, DIMENSION(llm), SAVE :: cflxmax, cflymax, cflzmax
-
-   IF(iadvtr == 0) THEN
-      pbaruc(:,:)=0
-      pbarvc(:,:)=0
-   END IF
-
-   !--- Accumulation des flux de masse horizontaux
-   DO l=1,llm
-      DO ij = 1,ip1jmp1
-         pbaruc(ij,l) = pbaruc(ij,l) + pbaru(ij,l)
-      END DO
-      DO ij = 1,ip1jm
-         pbarvc(ij,l) = pbarvc(ij,l) + pbarv(ij,l)
-      END DO
-   END DO
-
-   !--- Selection de la masse instantannee des mailles avant le transport.
-   IF(iadvtr == 0) THEN
-     CALL SCOPY(ip1jmp1*llm,masse,1,massem,1)
-   ! CALL filtreg ( massem ,jjp1, llm,-2, 2, .TRUE., 1 )
-   END IF
-
-   iadvtr   = iadvtr+1
-   iapptrac = iadvtr
-
-   !--- Test pour savoir si on advecte a ce pas de temps
-   IF(iadvtr /= iapp_tracvl) RETURN
-
-   !   ..  Modif P.Le Van  ( 20/12/97 )  ....
-
-   !   traitement des flux de masse avant advection.
-   !       1. calcul de w
-   !       2. groupement des mailles pres du pole.
-
-   CALL groupe(massem, pbaruc, pbarvc, pbarug, pbarvg, wg)
-
-   !--- Flux de masse diaganostiques traceurs
-   flxw = wg / REAL(iapp_tracvl)
-
-   !--- Test sur l'eventuelle creation de valeurs negatives de la masse
-   DO l=1,llm-1
-      DO ij = iip2+1,ip1jm
-         zdp(ij) = pbarug(ij-1,l)    - pbarug(ij,l) &
-                 - pbarvg(ij-iip1,l) + pbarvg(ij,l) &
-                 +     wg(ij,l+1)    -     wg(ij,l)
-      END DO
-! ym  ---> pourquoi jjm-1 et non jjm ? a cause du pole ?
-      CALL SCOPY( jjm -1 ,zdp(iip1+iip1),iip1,zdp(iip2),iip1 )
-      DO ij = iip2,ip1jm
-         zdp(ij)= zdp(ij)*dtvr/ massem(ij,l)
-      END DO
-
-      CALL minmax ( ip1jm-iip1, zdp(iip2), zdpmin,zdpmax )
-
-      IF(MAX(ABS(zdpmin),ABS(zdpmax)) > 0.5) &
-         WRITE(*,*)'WARNING DP/P l=',l,'  MIN:',zdpmin,' MAX:', zdpmax
-
-   END DO
-
-   !-------------------------------------------------------------------------
-   ! Calcul des criteres CFL en X, Y et Z
-   !-------------------------------------------------------------------------
-   IF(countcfl == 0. ) then
-      cflxmax(:)=0.
-      cflymax(:)=0.
-      cflzmax(:)=0.
-   END IF
-
-   countcfl=countcfl+iapp_tracvl
-   cflx(:,:)=0.
-   cfly(:,:)=0.
-   cflz(:,:)=0.
-   DO l=1,llm
-      DO ij=iip2,ip1jm-1
-         IF(pbarug(ij,l)>=0.) then
-            cflx(ij,l)=pbarug(ij,l)*dtvr/masse(ij,l)
-         ELSE
-            cflx(ij,l)=-pbarug(ij,l)*dtvr/masse(ij+1,l)
-         END IF
-      END DO
-   END DO
-
-   DO l=1,llm
-      DO ij=iip2,ip1jm-1,iip1
-         cflx(ij+iip1,l)=cflx(ij,l)
-      END DO
-   END DO
-
-   DO l=1,llm
-      DO ij=1,ip1jm
-         IF(pbarvg(ij,l)>=0.) then
-            cfly(ij,l)=pbarvg(ij,l)*dtvr/masse(ij,l)
-         ELSE
-            cfly(ij,l)=-pbarvg(ij,l)*dtvr/masse(ij+iip1,l)
-         END IF
-      END DO
-   END DO
-
-   DO l=2,llm
-      DO ij=1,ip1jm
-         IF(wg(ij,l) >= 0.) THEN
-            cflz(ij,l)=wg(ij,l)*dtvr/masse(ij,l)
-         ELSE
-            cflz(ij,l)=-wg(ij,l)*dtvr/masse(ij,l-1)
-         END IF
-      END DO
-   END DO
-
-   DO l=1,llm
-      cflxmax(l)=max(cflxmax(l),maxval(cflx(:,l)))
-      cflymax(l)=max(cflymax(l),maxval(cfly(:,l)))
-      cflzmax(l)=max(cflzmax(l),maxval(cflz(:,l)))
-   END DO
-
-   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-   ! Par defaut, on sort le diagnostic des CFL tous les jours.
-   ! Si on veut le sortir a chaque pas d'advection en cas de plantage 
-   !       IF(countcfl==iapp_tracvl) then
-   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-   IF(countcfl==day_step) then
-      DO l=1,llm
-         WRITE(lunout,*) 'L, CFL[xyz]max:', l, cflxmax(l), cflymax(l), cflzmax(l)
-      END DO
-      countcfl=0
-   END IF
-
-   !---------------------------------------------------------------------------
-   !   Advection proprement dite (Modification Le Croller (07/2001)
-   !---------------------------------------------------------------------------
-
-   !---------------------------------------------------------------------------
-   !   Calcul des moyennes basees sur la masse
-   !---------------------------------------------------------------------------
-   CALL massbar(massem,massebx,masseby)
-
-#ifdef DEBUG_IO    
-   CALL WriteField_u('massem',massem)
-   CALL WriteField_u('wg',wg)
-   CALL WriteField_u('pbarug',pbarug)
-   CALL WriteField_v('pbarvg',pbarvg)
-   CALL WriteField_u('p_tmp',p)
-   CALL WriteField_u('pk_tmp',pk)
-   CALL WriteField_u('teta_tmp',teta)
-   DO iq=1,nqtot
-      CALL WriteField_u('q_adv'//trim(int2str(iq)),q(:,:,iq))
-   END DO
-#endif
-
-   IF(isoCheck) WRITE(*,*) 'advtrac 227'
-   CALL check_isotopes_seq(q,ip1jmp1,'advtrac 162')
-
-   !-------------------------------------------------------------------------
-   !       Appel des sous programmes d'advection
-   !-------------------------------------------------------------------------
-   DO iq = 1, nqtot
-!     CALL clock(t_initial)
-      IF(tracers(iq)%parent /= 'air') CYCLE
-      iadv = tracers(iq)%iadv
-      !-----------------------------------------------------------------------
-      SELECT CASE(iadv)
-      !-----------------------------------------------------------------------
-         CASE(0); CYCLE
-         !--------------------------------------------------------------------
-         CASE(10)  !--- Schema de Van Leer I MUSCL
-         !--------------------------------------------------------------------
-!           WRITE(*,*) 'advtrac 239: iq,q(1721,19,:)=',iq,q(1721,19,:)     
-            CALL vlsplt(q,2.,massem,wg,pbarug,pbarvg,dtvr,iq)
-
-         !--------------------------------------------------------------------
-         CASE(14)  !--- Schema "pseuDO amont" + test sur humidite specifique
-                   !--- pour la vapeur d'eau. F. Codron
-         !--------------------------------------------------------------------
-!           WRITE(*,*) 'advtrac 248: iq,q(1721,19,:)=',iq,q(1721,19,:)
-            CALL vlspltqs(q,2.,massem,wg,pbarug,pbarvg,dtvr,p,pk,teta,iq)
-
-         !--------------------------------------------------------------------
-         CASE(12)  !--- Schema de Frederic Hourdin
-         !--------------------------------------------------------------------
-            CALL adaptdt(iadv,dtbon,n,pbarug,massem)   ! pas de temps adaptatif
-            IF(n > 1) WRITE(*,*) 'WARNING horizontal dt=',dtbon,'dtvr=',dtvr,'n=',n
-            DO indice=1,n
-              CALL advn(q(1,1,iq),massem,wg,pbarug,pbarvg,dtbon,1)
-            END DO
-
-         !--------------------------------------------------------------------
-         CASE(13)  !--- Pas de temps adaptatif
-         !--------------------------------------------------------------------
-            CALL adaptdt(iadv,dtbon,n,pbarug,massem)
-            IF(n > 1) WRITE(*,*) 'WARNING horizontal dt=',dtbon,'dtvr=',dtvr,'n=',n
-            DO indice=1,n
-               CALL advn(q(1,1,iq),massem,wg,pbarug,pbarvg,dtbon,2)
-            END DO
-
-         !--------------------------------------------------------------------
-         CASE(20)  !--- Schema de pente SLOPES
-         !--------------------------------------------------------------------
-            CALL pentes_ini (q(1,1,iq),wg,massem,pbarug,pbarvg,0)
-
-         !--------------------------------------------------------------------
-         CASE(30)  !--- Schema de Prather
-         !--------------------------------------------------------------------
-            ! Pas de temps adaptatif
-            CALL adaptdt(iadv,dtbon,n,pbarug,massem)
-            IF(n > 1) WRITE(*,*) 'WARNING horizontal dt=',dtbon,'dtvr=',dtvr,'n=',n
-            CALL prather(q(1,1,iq),wg,massem,pbarug,pbarvg,n,dtbon)
-
-         !--------------------------------------------------------------------
-         CASE(11,16,17,18)   !--- Schemas PPM Lin et Rood
-         !--------------------------------------------------------------------
-            ! Test sur le flux horizontal
-            CALL adaptdt(iadv,dtbon,n,pbarug,massem)   ! pas de temps adaptatif
-            IF(n > 1) WRITE(*,*) 'WARNING horizontal dt=',dtbon,'dtvr=',dtvr,'n=',n
-            ! Test sur le flux vertical
-            CFLmaxz=0.
-            DO l=2,llm
-               DO ij=iip2,ip1jm
-                  aaa=wg(ij,l)*dtvr/massem(ij,l)
-                  CFLmaxz=max(CFLmaxz,aaa)
-                  bbb=-wg(ij,l)*dtvr/massem(ij,l-1)
-                  CFLmaxz=max(CFLmaxz,bbb)
-               END DO
-            END DO
-            IF(CFLmaxz>=1) WRITE(*,*) 'WARNING vertical','CFLmaxz=', CFLmaxz
-            !----------------------------------------------------------------
-            !     Ss-prg interface LMDZ.4->PPM3d (ss-prg de Lin)
-            !----------------------------------------------------------------
-            CALL interpre(q(1,1,iq),qppm(1,1,iq),wg,fluxwppm,massem, &
-                 apppm,bpppm,massebx,masseby,pbarug,pbarvg, &
-                 unatppm,vnatppm,psppm)
-
-            !----------------------------------------------------------------
-            DO indice=1,n     !--- VL (version PPM) horiz. et PPM vert.
-            !----------------------------------------------------------------
-               SELECT CASE(iadv)
-                  !----------------------------------------------------------
-                  CASE(11)
-                  !----------------------------------------------------------
-                     CALL ppm3d(1,qppm(1,1,iq),psppm,psppm,unatppm,vnatppm,fluxwppm,dtbon, &
-                                2,2,2,1,iim,jjp1,2,llm,apppm,bpppm,0.01,6400000,fill,dum,220.)
-                  !----------------------------------------------------------
-                  CASE(16) !--- Monotonic PPM
-                  !----------------------------------------------------------
-                     CALL ppm3d(1,qppm(1,1,iq),psppm,psppm,unatppm,vnatppm,fluxwppm,dtbon, &
-                                3,3,3,1,iim,jjp1,2,llm,apppm,bpppm,0.01,6400000,fill,dum,220.)
-                  !----------------------------------------------------------
-                  CASE(17) !--- Semi monotonic PPM
-                  !----------------------------------------------------------
-                     CALL ppm3d(1,qppm(1,1,iq),psppm,psppm,unatppm,vnatppm,fluxwppm,dtbon, &
-                                4,4,4,1,iim,jjp1,2,llm,apppm,bpppm,0.01,6400000, fill,dum,220.)
-                  !----------------------------------------------------------
-                  CASE(18) !--- Positive Definite PPM
-                  !----------------------------------------------------------
-                     CALL ppm3d(1,qppm(1,1,iq),psppm,psppm,unatppm,vnatppm,fluxwppm,dtbon, &
-                                5,5,5,1,iim,jjp1,2,llm,apppm,bpppm,0.01,6400000,fill,dum,220.)
-               END SELECT
-            !----------------------------------------------------------------
-            END DO
-            !----------------------------------------------------------------
-            !     Ss-prg interface PPM3d-LMDZ.4
-            !----------------------------------------------------------------
-            CALL interpost(q(1,1,iq),qppm(1,1,iq))
-      !----------------------------------------------------------------------
-      END SELECT
-      !----------------------------------------------------------------------
-
-      !----------------------------------------------------------------------
-      ! On impose une seule valeur du traceur au pole Sud j=jjm+1=jjp1 et Nord j=1
-      !----------------------------------------------------------------------
-      !  CALL traceurpole(q(1,1,iq),massem)
-
-      !--- Calcul du temps cpu pour un schema donne
-      !  CALL clock(t_final)
-      !ym  tps_cpu=t_final-t_initial
-      !ym  cpuadv(iq)=cpuadv(iq)+tps_cpu
-
-   END DO
-
-   IF(isoCheck) WRITE(*,*) 'advtrac 402'
-   CALL check_isotopes_seq(q,ip1jmp1,'advtrac 397')
-
-   !-------------------------------------------------------------------------
-   !   on reinitialise a zero les flux de masse cumules
-   !-------------------------------------------------------------------------
-   iadvtr=0
-
-END SUBROUTINE advtrac
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d/advtrac.f90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d/advtrac.f90	(revision 5101)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d/advtrac.f90	(revision 5101)
@@ -0,0 +1,354 @@
+! $Id$
+
+SUBROUTINE advtrac(pbaru, pbarv, p, masse, q, iapptrac, teta, flxw, pk)
+  !     Auteur :  F. Hourdin
+
+  !     Modif. P. Le Van     (20/12/97)
+  !            F. Codron     (10/99)
+  !            D. Le Croller (07/2001)
+  !            M.A Filiberti (04/2002)
+
+  USE infotrac, ONLY: nqtot, tracers, isoCheck
+  USE control_mod, ONLY: iapp_tracvl, day_step
+  USE comconst_mod, ONLY: dtvr
+  USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO
+  USE write_field, ONLY: int2str
+
+  IMPLICIT NONE
+
+  include "dimensions.h"
+  include "paramet.h"
+  include "comdissip.h"
+  include "comgeom2.h"
+  include "description.h"
+  include "iniprint.h"
+
+  !---------------------------------------------------------------------------
+  !     Arguments
+  !---------------------------------------------------------------------------
+  INTEGER, INTENT(OUT) :: iapptrac
+  REAL, INTENT(IN) :: pbaru(ip1jmp1, llm)
+  REAL, INTENT(IN) :: pbarv(ip1jm, llm)
+  REAL, INTENT(INOUT) :: q(ip1jmp1, llm, nqtot)
+  REAL, INTENT(IN) :: masse(ip1jmp1, llm)
+  REAL, INTENT(IN) :: p(ip1jmp1, llmp1)
+  REAL, INTENT(IN) :: teta(ip1jmp1, llm)
+  REAL, INTENT(IN) :: pk(ip1jmp1, llm)
+  REAL, INTENT(OUT) :: flxw(ip1jmp1, llm)
+  !---------------------------------------------------------------------------
+  !     Ajout PPM
+  !---------------------------------------------------------------------------
+  REAL :: massebx(ip1jmp1, llm), masseby(ip1jm, llm)
+  !---------------------------------------------------------------------------
+  !     Variables locales
+  !---------------------------------------------------------------------------
+  INTEGER :: ij, l, iq, iadv
+  !   REAL(KIND=KIND(1.d0)) :: t_initial, t_final, tps_cpu
+  REAL :: zdp(ip1jmp1), zdpmin, zdpmax
+  INTEGER, SAVE :: iadvtr = 0
+  REAL, DIMENSION(ip1jmp1, llm) :: pbaruc, pbarug, massem, wg
+  REAL, DIMENSION(ip1jm, llm) :: pbarvc, pbarvg
+  EXTERNAL  minmax
+  SAVE massem, pbaruc, pbarvc
+  !---------------------------------------------------------------------------
+  !     Rajouts pour PPM
+  !---------------------------------------------------------------------------
+  INTEGER indice, n
+  REAL :: dtbon                       ! Pas de temps adaptatif pour que CFL<1
+  REAL :: CFLmaxz, aaa, bbb           ! CFL maximum
+  REAL, DIMENSION(iim, jjp1, llm) :: unatppm, vnatppm, fluxwppm
+  REAL :: qppm(iim * jjp1, llm, nqtot)
+  REAL :: psppm(iim, jjp1)           ! pression  au sol
+  REAL, DIMENSION(llmp1) :: apppm, bpppm
+  LOGICAL, SAVE :: dum = .TRUE., fill = .TRUE.
+
+  INTEGER, SAVE :: countcfl = 0
+  REAL, DIMENSION(ip1jmp1, llm) :: cflx, cflz
+  REAL, DIMENSION(ip1jm, llm) :: cfly
+  REAL, DIMENSION(llm), SAVE :: cflxmax, cflymax, cflzmax
+
+  IF(iadvtr == 0) THEN
+    pbaruc(:, :) = 0
+    pbarvc(:, :) = 0
+  END IF
+
+  !--- Accumulation des flux de masse horizontaux
+  DO l = 1, llm
+    DO ij = 1, ip1jmp1
+      pbaruc(ij, l) = pbaruc(ij, l) + pbaru(ij, l)
+    END DO
+    DO ij = 1, ip1jm
+      pbarvc(ij, l) = pbarvc(ij, l) + pbarv(ij, l)
+    END DO
+  END DO
+
+  !--- Selection de la masse instantannee des mailles avant le transport.
+  IF(iadvtr == 0) THEN
+    CALL SCOPY(ip1jmp1 * llm, masse, 1, massem, 1)
+    ! CALL filtreg ( massem ,jjp1, llm,-2, 2, .TRUE., 1 )
+  END IF
+
+  iadvtr = iadvtr + 1
+  iapptrac = iadvtr
+
+  !--- Test pour savoir si on advecte a ce pas de temps
+  IF(iadvtr /= iapp_tracvl) RETURN
+
+  !   ..  Modif P.Le Van  ( 20/12/97 )  ....
+
+  !   traitement des flux de masse avant advection.
+  !       1. calcul de w
+  !       2. groupement des mailles pres du pole.
+
+  CALL groupe(massem, pbaruc, pbarvc, pbarug, pbarvg, wg)
+
+  !--- Flux de masse diaganostiques traceurs
+  flxw = wg / REAL(iapp_tracvl)
+
+  !--- Test sur l'eventuelle creation de valeurs negatives de la masse
+  DO l = 1, llm - 1
+    DO ij = iip2 + 1, ip1jm
+      zdp(ij) = pbarug(ij - 1, l) - pbarug(ij, l) &
+              - pbarvg(ij - iip1, l) + pbarvg(ij, l) &
+              + wg(ij, l + 1) - wg(ij, l)
+    END DO
+    ! ym  ---> pourquoi jjm-1 et non jjm ? a cause du pole ?
+    CALL SCOPY(jjm - 1, zdp(iip1 + iip1), iip1, zdp(iip2), iip1)
+    DO ij = iip2, ip1jm
+      zdp(ij) = zdp(ij) * dtvr / massem(ij, l)
+    END DO
+
+    CALL minmax (ip1jm - iip1, zdp(iip2), zdpmin, zdpmax)
+
+    IF(MAX(ABS(zdpmin), ABS(zdpmax)) > 0.5) &
+            WRITE(*, *)'WARNING DP/P l=', l, '  MIN:', zdpmin, ' MAX:', zdpmax
+
+  END DO
+
+  !-------------------------------------------------------------------------
+  ! Calcul des criteres CFL en X, Y et Z
+  !-------------------------------------------------------------------------
+  IF(countcfl == 0.) then
+    cflxmax(:) = 0.
+    cflymax(:) = 0.
+    cflzmax(:) = 0.
+  END IF
+
+  countcfl = countcfl + iapp_tracvl
+  cflx(:, :) = 0.
+  cfly(:, :) = 0.
+  cflz(:, :) = 0.
+  DO l = 1, llm
+    DO ij = iip2, ip1jm - 1
+      IF(pbarug(ij, l)>=0.) then
+        cflx(ij, l) = pbarug(ij, l) * dtvr / masse(ij, l)
+      ELSE
+        cflx(ij, l) = -pbarug(ij, l) * dtvr / masse(ij + 1, l)
+      END IF
+    END DO
+  END DO
+
+  DO l = 1, llm
+    DO ij = iip2, ip1jm - 1, iip1
+      cflx(ij + iip1, l) = cflx(ij, l)
+    END DO
+  END DO
+
+  DO l = 1, llm
+    DO ij = 1, ip1jm
+      IF(pbarvg(ij, l)>=0.) then
+        cfly(ij, l) = pbarvg(ij, l) * dtvr / masse(ij, l)
+      ELSE
+        cfly(ij, l) = -pbarvg(ij, l) * dtvr / masse(ij + iip1, l)
+      END IF
+    END DO
+  END DO
+
+  DO l = 2, llm
+    DO ij = 1, ip1jm
+      IF(wg(ij, l) >= 0.) THEN
+        cflz(ij, l) = wg(ij, l) * dtvr / masse(ij, l)
+      ELSE
+        cflz(ij, l) = -wg(ij, l) * dtvr / masse(ij, l - 1)
+      END IF
+    END DO
+  END DO
+
+  DO l = 1, llm
+    cflxmax(l) = max(cflxmax(l), maxval(cflx(:, l)))
+    cflymax(l) = max(cflymax(l), maxval(cfly(:, l)))
+    cflzmax(l) = max(cflzmax(l), maxval(cflz(:, l)))
+  END DO
+
+  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+  ! Par defaut, on sort le diagnostic des CFL tous les jours.
+  ! Si on veut le sortir a chaque pas d'advection en cas de plantage
+  !       IF(countcfl==iapp_tracvl) then
+  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+  IF(countcfl==day_step) then
+    DO l = 1, llm
+      WRITE(lunout, *) 'L, CFL[xyz]max:', l, cflxmax(l), cflymax(l), cflzmax(l)
+    END DO
+    countcfl = 0
+  END IF
+
+  !---------------------------------------------------------------------------
+  !   Advection proprement dite (Modification Le Croller (07/2001)
+  !---------------------------------------------------------------------------
+
+  !---------------------------------------------------------------------------
+  !   Calcul des moyennes basees sur la masse
+  !---------------------------------------------------------------------------
+  CALL massbar(massem, massebx, masseby)
+
+  IF (CPPKEY_DEBUGIO) THEN
+    CALL WriteField_u('massem', massem)
+    CALL WriteField_u('wg', wg)
+    CALL WriteField_u('pbarug', pbarug)
+    CALL WriteField_v('pbarvg', pbarvg)
+    CALL WriteField_u('p_tmp', p)
+    CALL WriteField_u('pk_tmp', pk)
+    CALL WriteField_u('teta_tmp', teta)
+    DO iq = 1, nqtot
+      CALL WriteField_u('q_adv' // trim(int2str(iq)), q(:, :, iq))
+    END DO
+  END IF
+
+  IF(isoCheck) WRITE(*, *) 'advtrac 227'
+  CALL check_isotopes_seq(q, ip1jmp1, 'advtrac 162')
+
+  !-------------------------------------------------------------------------
+  !       Appel des sous programmes d'advection
+  !-------------------------------------------------------------------------
+  DO iq = 1, nqtot
+    !     CALL clock(t_initial)
+    IF(tracers(iq)%parent /= 'air') CYCLE
+    iadv = tracers(iq)%iadv
+    !-----------------------------------------------------------------------
+    SELECT CASE(iadv)
+      !-----------------------------------------------------------------------
+    CASE(0); CYCLE
+    !--------------------------------------------------------------------
+    CASE(10)  !--- Schema de Van Leer I MUSCL
+      !--------------------------------------------------------------------
+      !           WRITE(*,*) 'advtrac 239: iq,q(1721,19,:)=',iq,q(1721,19,:)
+      CALL vlsplt(q, 2., massem, wg, pbarug, pbarvg, dtvr, iq)
+
+      !--------------------------------------------------------------------
+    CASE(14)  !--- Schema "pseuDO amont" + test sur humidite specifique
+      !--- pour la vapeur d'eau. F. Codron
+      !--------------------------------------------------------------------
+      !           WRITE(*,*) 'advtrac 248: iq,q(1721,19,:)=',iq,q(1721,19,:)
+      CALL vlspltqs(q, 2., massem, wg, pbarug, pbarvg, dtvr, p, pk, teta, iq)
+
+      !--------------------------------------------------------------------
+    CASE(12)  !--- Schema de Frederic Hourdin
+      !--------------------------------------------------------------------
+      CALL adaptdt(iadv, dtbon, n, pbarug, massem)   ! pas de temps adaptatif
+      IF(n > 1) WRITE(*, *) 'WARNING horizontal dt=', dtbon, 'dtvr=', dtvr, 'n=', n
+      DO indice = 1, n
+        CALL advn(q(1, 1, iq), massem, wg, pbarug, pbarvg, dtbon, 1)
+      END DO
+
+      !--------------------------------------------------------------------
+    CASE(13)  !--- Pas de temps adaptatif
+      !--------------------------------------------------------------------
+      CALL adaptdt(iadv, dtbon, n, pbarug, massem)
+      IF(n > 1) WRITE(*, *) 'WARNING horizontal dt=', dtbon, 'dtvr=', dtvr, 'n=', n
+      DO indice = 1, n
+        CALL advn(q(1, 1, iq), massem, wg, pbarug, pbarvg, dtbon, 2)
+      END DO
+
+      !--------------------------------------------------------------------
+    CASE(20)  !--- Schema de pente SLOPES
+      !--------------------------------------------------------------------
+      CALL pentes_ini (q(1, 1, iq), wg, massem, pbarug, pbarvg, 0)
+
+      !--------------------------------------------------------------------
+    CASE(30)  !--- Schema de Prather
+      !--------------------------------------------------------------------
+      ! Pas de temps adaptatif
+      CALL adaptdt(iadv, dtbon, n, pbarug, massem)
+      IF(n > 1) WRITE(*, *) 'WARNING horizontal dt=', dtbon, 'dtvr=', dtvr, 'n=', n
+      CALL prather(q(1, 1, iq), wg, massem, pbarug, pbarvg, n, dtbon)
+
+      !--------------------------------------------------------------------
+    CASE(11, 16, 17, 18)   !--- Schemas PPM Lin et Rood
+      !--------------------------------------------------------------------
+      ! Test sur le flux horizontal
+      CALL adaptdt(iadv, dtbon, n, pbarug, massem)   ! pas de temps adaptatif
+      IF(n > 1) WRITE(*, *) 'WARNING horizontal dt=', dtbon, 'dtvr=', dtvr, 'n=', n
+      ! Test sur le flux vertical
+      CFLmaxz = 0.
+      DO l = 2, llm
+        DO ij = iip2, ip1jm
+          aaa = wg(ij, l) * dtvr / massem(ij, l)
+          CFLmaxz = max(CFLmaxz, aaa)
+          bbb = -wg(ij, l) * dtvr / massem(ij, l - 1)
+          CFLmaxz = max(CFLmaxz, bbb)
+        END DO
+      END DO
+      IF(CFLmaxz>=1) WRITE(*, *) 'WARNING vertical', 'CFLmaxz=', CFLmaxz
+      !----------------------------------------------------------------
+      !     Ss-prg interface LMDZ.4->PPM3d (ss-prg de Lin)
+      !----------------------------------------------------------------
+      CALL interpre(q(1, 1, iq), qppm(1, 1, iq), wg, fluxwppm, massem, &
+              apppm, bpppm, massebx, masseby, pbarug, pbarvg, &
+              unatppm, vnatppm, psppm)
+
+      !----------------------------------------------------------------
+      DO indice = 1, n     !--- VL (version PPM) horiz. et PPM vert.
+        !----------------------------------------------------------------
+        SELECT CASE(iadv)
+          !----------------------------------------------------------
+        CASE(11)
+          !----------------------------------------------------------
+          CALL ppm3d(1, qppm(1, 1, iq), psppm, psppm, unatppm, vnatppm, fluxwppm, dtbon, &
+                  2, 2, 2, 1, iim, jjp1, 2, llm, apppm, bpppm, 0.01, 6400000, fill, dum, 220.)
+          !----------------------------------------------------------
+        CASE(16) !--- Monotonic PPM
+          !----------------------------------------------------------
+          CALL ppm3d(1, qppm(1, 1, iq), psppm, psppm, unatppm, vnatppm, fluxwppm, dtbon, &
+                  3, 3, 3, 1, iim, jjp1, 2, llm, apppm, bpppm, 0.01, 6400000, fill, dum, 220.)
+          !----------------------------------------------------------
+        CASE(17) !--- Semi monotonic PPM
+          !----------------------------------------------------------
+          CALL ppm3d(1, qppm(1, 1, iq), psppm, psppm, unatppm, vnatppm, fluxwppm, dtbon, &
+                  4, 4, 4, 1, iim, jjp1, 2, llm, apppm, bpppm, 0.01, 6400000, fill, dum, 220.)
+          !----------------------------------------------------------
+        CASE(18) !--- Positive Definite PPM
+          !----------------------------------------------------------
+          CALL ppm3d(1, qppm(1, 1, iq), psppm, psppm, unatppm, vnatppm, fluxwppm, dtbon, &
+                  5, 5, 5, 1, iim, jjp1, 2, llm, apppm, bpppm, 0.01, 6400000, fill, dum, 220.)
+        END SELECT
+        !----------------------------------------------------------------
+      END DO
+      !----------------------------------------------------------------
+      !     Ss-prg interface PPM3d-LMDZ.4
+      !----------------------------------------------------------------
+      CALL interpost(q(1, 1, iq), qppm(1, 1, iq))
+      !----------------------------------------------------------------------
+    END SELECT
+    !----------------------------------------------------------------------
+
+    !----------------------------------------------------------------------
+    ! On impose une seule valeur du traceur au pole Sud j=jjm+1=jjp1 et Nord j=1
+    !----------------------------------------------------------------------
+    !  CALL traceurpole(q(1,1,iq),massem)
+
+    !--- Calcul du temps cpu pour un schema donne
+    !  CALL clock(t_final)
+    !ym  tps_cpu=t_final-t_initial
+    !ym  cpuadv(iq)=cpuadv(iq)+tps_cpu
+
+  END DO
+
+  IF(isoCheck) WRITE(*, *) 'advtrac 402'
+  CALL check_isotopes_seq(q, ip1jmp1, 'advtrac 397')
+
+  !-------------------------------------------------------------------------
+  !   on reinitialise a zero les flux de masse cumules
+  !-------------------------------------------------------------------------
+  iadvtr = 0
+
+END SUBROUTINE advtrac
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d/bilan_dyn.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d/bilan_dyn.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d/bilan_dyn.F	(revision 5101)
@@ -185,10 +185,10 @@
            WRITE(lunout,*)'dt_app=',dt_app
            WRITE(lunout,*)'dt_cum=',dt_cum
-           call abort_gcm('bilan_dyn','stopped',1)
+           CALL abort_gcm('bilan_dyn','stopped',1)
         endif
 
         if (i_sortie==1) then
          file='dynzon'
-         call inigrads(ifile,1
+         CALL inigrads(ifile,1
      s  ,0.,180./pi,0.,0.,jjm,rlatv,-90.,90.,180./pi
      s  ,llm,presnivs,1.
@@ -226,5 +226,5 @@
       rlatg=rlatv*180./pi
        
-      call histbeg(infile, 1, rlong, jjm, rlatg,
+      CALL histbeg(infile, 1, rlong, jjm, rlatg,
      .             1, 1, 1, jjm,
      .             tau0, zjulian, dt_cum, thoriid, fileid)
@@ -233,5 +233,5 @@
 C  Appel a histvert pour la grille verticale
 C
-      call histvert(fileid, 'presnivs', 'Niveaux sigma','mb',
+      CALL histvert(fileid, 'presnivs', 'Niveaux sigma','mb',
      .              llm, presnivs, zvertiid)
 C
@@ -258,5 +258,5 @@
      . WRITE(lunout,*)'var ',itr,iQ
      .      ,znom(itr,iQ),znoml(itr,iQ),zunites(itr,iQ)
-            call histdef(fileid,znom(itr,iQ),znoml(itr,iQ),
+            CALL histdef(fileid,znom(itr,iQ),znoml(itr,iQ),
      .        zunites(itr,iQ),1,jjm,thoriid,llm,1,llm,zvertiid,
      .        32,'ave(X)',dt_cum,dt_cum)
@@ -264,5 +264,5 @@
 c   Declarations pour les fonctions de courant
 c      print*,'2HISTDEF'
-          call histdef(fileid,'psi'//nom(iQ)
+          CALL histdef(fileid,'psi'//nom(iQ)
      .      ,'stream fn. '//znoml(itot,iQ),
      .      zunites(itot,iQ),1,jjm,thoriid,llm,1,llm,zvertiid,
@@ -273,13 +273,13 @@
 c   Declarations pour les champs de transport d'air
 c      print*,'3HISTDEF'
-      call histdef(fileid, 'masse', 'masse',
+      CALL histdef(fileid, 'masse', 'masse',
      .             'kg', 1, jjm, thoriid, llm, 1, llm, zvertiid,
      .             32, 'ave(X)', dt_cum, dt_cum)
-      call histdef(fileid, 'v', 'v',
+      CALL histdef(fileid, 'v', 'v',
      .             'm/s', 1, jjm, thoriid, llm, 1, llm, zvertiid,
      .             32, 'ave(X)', dt_cum, dt_cum)
 c   Declarations pour les fonctions de courant
 c      print*,'4HISTDEF'
-          call histdef(fileid,'psi','stream fn. MMC ','mega t/s',
+          CALL histdef(fileid,'psi','stream fn. MMC ','mega t/s',
      .      1,jjm,thoriid,llm,1,llm,zvertiid,
      .      32,'ave(X)',dt_cum,dt_cum)
@@ -290,5 +290,5 @@
       do iQ=1,nQ
          do itr=2,ntr
-            call histdef(fileid,'a'//znom(itr,iQ),znoml(itr,iQ),
+            CALL histdef(fileid,'a'//znom(itr,iQ),znoml(itr,iQ),
      .        zunites(itr,iQ),1,jjm,thoriid,1,1,1,-99,
      .        32,'ave(X)',dt_cum,dt_cum)
@@ -391,8 +391,8 @@
 
 c   convergence horizontale
-      call  convflu(flux_uQ_cum,flux_vQ_cum,llm*nQ,dQ)
+      CALL  convflu(flux_uQ_cum,flux_vQ_cum,llm*nQ,dQ)
 
 c   calcul de la vitesse verticale
-      call convmas(flux_u_cum,flux_v_cum,convm)
+      CALL convmas(flux_u_cum,flux_v_cum,convm)
       CALL vitvert(convm,w)
 
@@ -447,5 +447,5 @@
       zv=0.
       zmasse=0.
-      call massbar(masse_cum,massebx,masseby)
+      CALL massbar(masse_cum,massebx,masseby)
       do l=1,llm
          do j=1,jjm
@@ -537,17 +537,17 @@
       do iQ=1,nQ
          do itr=1,ntr
-            call histwrite(fileid,znom(itr,iQ),itau,zvQ(:,:,itr,iQ)
+            CALL histwrite(fileid,znom(itr,iQ),itau,zvQ(:,:,itr,iQ)
      s      ,jjm*llm,ndex3d)
          enddo
-         call histwrite(fileid,'psi'//nom(iQ),itau,psiQ(:,1:llm,iQ)
+         CALL histwrite(fileid,'psi'//nom(iQ),itau,psiQ(:,1:llm,iQ)
      s      ,jjm*llm,ndex3d)
       enddo
 
-      call histwrite(fileid,'masse',itau,zmasse
+      CALL histwrite(fileid,'masse',itau,zmasse
      s   ,jjm*llm,ndex3d)
-      call histwrite(fileid,'v',itau,zv
+      CALL histwrite(fileid,'v',itau,zv
      s   ,jjm*llm,ndex3d)
       psi=psi*1.e-9
-      call histwrite(fileid,'psi',itau,psi(:,1:llm),jjm*llm,ndex3d)
+      CALL histwrite(fileid,'psi',itau,psi(:,1:llm),jjm*llm,ndex3d)
 
       endif
@@ -569,5 +569,5 @@
             enddo
             zavQ(:,itr,iQ)=zavQ(:,itr,iQ)/zamasse(:)
-            call histwrite(fileid,'a'//znom(itr,iQ),itau,zavQ(:,itr,iQ)
+            CALL histwrite(fileid,'a'//znom(itr,iQ),itau,zavQ(:,itr,iQ)
      s      ,jjm*llm,ndex3d)
          enddo
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d/caladvtrac.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d/caladvtrac.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d/caladvtrac.F	(revision 5101)
@@ -8,6 +8,6 @@
      *                   flxw, pk)
 c
-      USE infotrac, ONLY : nqtot
-      USE control_mod, ONLY : iapp_tracvl,planet_type
+      USE infotrac, ONLY: nqtot
+      USE control_mod, ONLY: iapp_tracvl,planet_type
       USE comconst_mod, ONLY: dtvr
  
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d/caldyn.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d/caldyn.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d/caldyn.F	(revision 5101)
@@ -83,5 +83,5 @@
       CALL massbar  (   masse, massebx , masseby                    )
       ! compute XY-average of mass, massebxy()
-      call massbarxy(   masse, massebxy                             )
+      CALL massbarxy(   masse, massebxy                             )
       ! compute mass fluxes pbaru() and pbarv()
       CALL flumass  ( massebx, masseby , vcont, ucont ,pbaru, pbarv )
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d/conf_gcm.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d/conf_gcm.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d/conf_gcm.F90	(revision 5101)
@@ -11,5 +11,5 @@
   use ioipsl_getincom
 #endif
-  USE infotrac, ONLY : type_trac
+  USE infotrac, ONLY: type_trac
   use assert_m, only: assert
   USE comconst_mod, ONLY: dissip_deltaz, dissip_factz, dissip_zref, &
@@ -315,5 +315,5 @@
   CALL getin('maxlatfilter',maxlatfilter)
   if (maxlatfilter > 90) &
-       call abort_gcm("conf_gcm", 'maxlatfilter should be <=90', 1)
+       CALL abort_gcm("conf_gcm", 'maxlatfilter should be <=90', 1)
 
 
@@ -329,5 +329,5 @@
   CALL getin('iflag_top_bound',iflag_top_bound)
   IF (iflag_top_bound < 0 .or. iflag_top_bound > 2) &
-       call abort_gcm("conf_gcm", 'iflag_top_bound must be 0, 1 or 2', 1)
+       CALL abort_gcm("conf_gcm", 'iflag_top_bound must be 0, 1 or 2', 1)
 
   ! mode_top_bound : fields towards which sponge relaxation will be done:
@@ -749,5 +749,5 @@
      dzoomx = 0.2
      CALL getin('dzoomx',dzoomx)
-     call assert(dzoomx < 1, "conf_gcm: dzoomx must be < 1")
+     CALL assert(dzoomx < 1, "conf_gcm: dzoomx must be < 1")
 
      !Config  Key  = dzoomy
@@ -758,5 +758,5 @@
      dzoomy = 0.2
      CALL getin('dzoomy',dzoomy)
-     call assert(dzoomy < 1, "conf_gcm: dzoomy must be < 1")
+     CALL assert(dzoomy < 1, "conf_gcm: dzoomy must be < 1")
 
      !Config  Key  = taux
@@ -836,5 +836,5 @@
      vert_prof_dissip = merge(1, 0, ok_strato .and. llm==39)
      CALL getin('vert_prof_dissip', vert_prof_dissip)
-     call assert(vert_prof_dissip == 0 .or. vert_prof_dissip ==  1, &
+     CALL assert(vert_prof_dissip == 0 .or. vert_prof_dissip ==  1, &
           "bad value for vert_prof_dissip")
 
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d/dynetat0.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d/dynetat0.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d/dynetat0.F90	(revision 5101)
@@ -8,5 +8,5 @@
   USE infotrac,    ONLY: nqtot, tracers, niso, iqIsoPha, iH2O, isoName
   USE strings_mod, ONLY: maxlen, msg, strStack, real2str, int2str
-  USE netcdf,      ONLY: nf90_open,  nf90_nowrite, NF90_INQ_VARID, &
+  USE netcdf,      ONLY: nf90_open,  nf90_nowrite, nf90_inq_varid, &
                          nf90_close, nf90_get_var, nf90_noerr
   USE readTracFiles_mod, ONLY: new2oldH2O, newHNO3, oldHNO3, getKey
@@ -116,8 +116,8 @@
   CALL get_var2("aire" ,aire)
   var="temps"
-  IF(NF90_INQ_VARID(fID,var,vID)/=nf90_noerr) THEN
+  IF(nf90_inq_varid(fID,var,vID)/=nf90_noerr) THEN
     CALL msg('missing field <temps> ; trying with <Time>', modname)
     var="Time"
-    CALL err(NF90_INQ_VARID(fID,var,vID),"inq",var)
+    CALL err(nf90_inq_varid(fID,var,vID),"inq",var)
   END IF
   CALL err(nf90_get_var(fID,vID,time),"get",var)
@@ -132,5 +132,5 @@
   ll=.FALSE.
 #ifdef REPROBUS
-  ll = NF90_INQ_VARID(fID, 'HNO3tot', vID) /= nf90_noerr                                 !--- DETECT OLD REPRO start.nc FILE
+  ll = nf90_inq_varid(fID, 'HNO3tot', vID) /= nf90_noerr                                 !--- DETECT OLD REPRO start.nc FILE
 #endif
   DO iq=1,nqtot
@@ -145,8 +145,8 @@
     END IF
     !--------------------------------------------------------------------------------------------------------------------------
-    IF(NF90_INQ_VARID(fID, var, vID) == nf90_noerr .AND. .NOT.lSkip) THEN                !=== REGULAR CASE: AVAILABLE VARIABLE
+    IF(nf90_inq_varid(fID, var, vID) == nf90_noerr .AND. .NOT.lSkip) THEN                !=== REGULAR CASE: AVAILABLE VARIABLE
       CALL err(nf90_get_var(fID,vID,q(:,:,:,iq)),"get",var)
     !--------------------------------------------------------------------------------------------------------------------------
-    ELSE IF(NF90_INQ_VARID(fID, oldVar, vID) == nf90_noerr) THEN                         !=== TRY WITH ALTERNATE NAME
+    ELSE IF(nf90_inq_varid(fID, oldVar, vID) == nf90_noerr) THEN                         !=== TRY WITH ALTERNATE NAME
       CALL msg('Tracer <'//TRIM(var)//'> is missing => initialized to <'//TRIM(oldVar)//'>', modname)
       CALL err(nf90_get_var(fID,vID,q(:,:,:,iq)),"get",oldVar)
@@ -208,5 +208,5 @@
   CHARACTER(LEN=*), INTENT(IN)  :: var
   REAL,             INTENT(OUT) :: v(:)
-  CALL err(NF90_INQ_VARID(fID,var,vID),"inq",var)
+  CALL err(nf90_inq_varid(fID,var,vID),"inq",var)
   CALL err(nf90_get_var(fID,vID,v),"get",var)
 END SUBROUTINE get_var1
@@ -216,5 +216,5 @@
   CHARACTER(LEN=*), INTENT(IN)  :: var
   REAL,             INTENT(OUT) :: v(:,:)
-  CALL err(NF90_INQ_VARID(fID,var,vID),"inq",var)
+  CALL err(nf90_inq_varid(fID,var,vID),"inq",var)
   CALL err(nf90_get_var(fID,vID,v),"get",var)
 END SUBROUTINE get_var2
@@ -224,5 +224,5 @@
   CHARACTER(LEN=*), INTENT(IN)  :: var
   REAL,             INTENT(OUT) :: v(:,:,:)
-  CALL err(NF90_INQ_VARID(fID,var,vID),"inq",var)
+  CALL err(nf90_inq_varid(fID,var,vID),"inq",var)
   CALL err(nf90_get_var(fID,vID,v),"get",var)
 END SUBROUTINE get_var3
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d/dynredem.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d/dynredem.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d/dynredem.F90	(revision 5101)
@@ -9,5 +9,5 @@
   USE strings_mod, ONLY: maxlen
   USE infotrac, ONLY: nqtot, tracers
-  USE netcdf, ONLY: nf90_create, nf90_def_dim, NF90_INQ_VARID, nf90_global,    &
+  USE netcdf, ONLY: nf90_create, nf90_def_dim, nf90_inq_varid, nf90_global,    &
                     nf90_close,  nf90_put_att, nf90_unlimited, nf90_clobber,   &
                     nf90_64bit_offset
@@ -169,6 +169,6 @@
   USE infotrac, ONLY: nqtot, tracers, type_trac
   USE control_mod
-  USE netcdf,   ONLY: nf90_open,  nf90_nowrite, nf90_get_var, NF90_INQ_VARID,  &
-                      nf90_close, NF90_WRITE,   nf90_put_var, nf90_noerr
+  USE netcdf,   ONLY: nf90_open,  nf90_nowrite, nf90_get_var, nf90_inq_varid,  &
+                      nf90_close, nf90_write,   nf90_put_var, nf90_noerr
   USE dynredem_mod, ONLY: dynredem_write_u, dynredem_write_v, dynredem_read_u, &
                           err, modname, fil, msg
@@ -202,10 +202,10 @@
 
   modname='dynredem1'; fil=fichnom
-  CALL err(nf90_open(fil,NF90_WRITE,nid),"open",fil)
+  CALL err(nf90_open(fil,nf90_write,nid),"open",fil)
 
 !--- Write/extend time coordinate
   nb = nb + 1
   var="temps"
-  CALL err(NF90_INQ_VARID(nid,var,vID),"inq",var)
+  CALL err(nf90_inq_varid(nid,var,vID),"inq",var)
   CALL err(nf90_put_var(nid,vID,[time]),"put",var)
   WRITE(lunout,*)TRIM(modname)//": Saving for ", nb, time
@@ -213,8 +213,8 @@
 !--- Rewrite control table (itaufin undefined in dynredem0)
   var="controle"
-  CALL err(NF90_INQ_VARID(nid,var,vID),"inq",var)
+  CALL err(nf90_inq_varid(nid,var,vID),"inq",var)
   CALL err(nf90_get_var(nid,vID,tab_cntrl),"get",var)
   tab_cntrl(31)=DBLE(itau_dyn + itaufin)
-  CALL err(NF90_INQ_VARID(nid,var,vID),"inq",var)
+  CALL err(nf90_inq_varid(nid,var,vID),"inq",var)
   CALL err(nf90_put_var(nid,vID,tab_cntrl),"put",var)
 
@@ -235,5 +235,5 @@
     IF(lread_inca) THEN                  !--- Possibly read from "start_trac.nc"
       fil="start_trac.nc"
-      ierr=NF90_INQ_VARID(nid_trac,var,vID_trac)
+      ierr=nf90_inq_varid(nid_trac,var,vID_trac)
       dum='inq'; IF(ierr==nf90_noerr) dum='fnd'
       WRITE(lunout,*)msg(dum,var)
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d/dynredem_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d/dynredem_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d/dynredem_mod.F90	(revision 5101)
@@ -31,5 +31,5 @@
 !===============================================================================
   start(:)=[1,1,1,1]; count(:)=[iip1,jjp1,ll,1]
-  CALL err(NF90_INQ_VARID(ncid,id,nvarid),"inq",id)
+  CALL err(nf90_inq_varid(ncid,id,nvarid),"inq",id)
   CALL err(nf90_put_var(ncid,nvarid,var,start,count),"put",id)
   
@@ -54,5 +54,5 @@
 !===============================================================================
   start(:)=[1,1,1,1]; count(:)=[iip1,jjm,ll,1]
-  CALL err(NF90_INQ_VARID(ncid,id,nvarid),"inq",id)
+  CALL err(nf90_inq_varid(ncid,id,nvarid),"inq",id)
   CALL err(nf90_put_var(ncid,nvarid,var,start,count),"put",id)
   
@@ -77,5 +77,5 @@
 !===============================================================================
   start(:)=[1,1,1,1]; count(:)=[iip1,jjp1,ll,1]
-  CALL err(NF90_INQ_VARID(ncid,id,nvarid),"inq",id)
+  CALL err(nf90_inq_varid(ncid,id,nvarid),"inq",id)
   CALL err(nf90_get_var(ncid,nvarid,var,start,count),"get",id)
   
@@ -121,5 +121,5 @@
   CALL err(nf90_enddef(ncid))
   CALL err(nf90_put_var(ncid,nvarid,v),"put",var)
-  CALL err(NF90_REDEF(ncid))
+  CALL err(nf90_redef(ncid))
 
 END SUBROUTINE put_var1
@@ -144,5 +144,5 @@
   CALL err(nf90_enddef(ncid))
   CALL err(nf90_put_var(ncid,nvarid,v),"put",var)
-  CALL err(NF90_REDEF(ncid))
+  CALL err(nf90_redef(ncid))
 
 END SUBROUTINE put_var2
@@ -188,5 +188,5 @@
   IF(ierr==nf90_noerr) RETURN
   IF(.NOT.PRESENT(typ)) THEN
-    CALL ABORT_gcm(modname,NF90_STRERROR(ierr),ierr)
+    CALL ABORT_gcm(modname,nf90_strerror(ierr),ierr)
   ELSE
     CALL ABORT_gcm(modname,msg(typ,nam),ierr)
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d/fluxstokenc.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d/fluxstokenc.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d/fluxstokenc.F	(revision 5101)
@@ -62,15 +62,15 @@
         
         ndex(1) = 0
-        call histwrite(fluxid, 'phis', 1, phis, iip1*jjp1, ndex)
-        call histwrite(fluxid, 'aire', 1, aire, iip1*jjp1, ndex)
+        CALL histwrite(fluxid, 'phis', 1, phis, iip1*jjp1, ndex)
+        CALL histwrite(fluxid, 'aire', 1, aire, iip1*jjp1, ndex)
         
         ndex(1) = 0
         nscal = 1
         tst(1) = time_step
-        call histwrite(fluxdid, 'dtvr', 1, tst, nscal, ndex)
+        CALL histwrite(fluxdid, 'dtvr', 1, tst, nscal, ndex)
         ist(1)=istdyn
-        call histwrite(fluxdid, 'istdyn', 1, ist, nscal, ndex)
+        CALL histwrite(fluxdid, 'istdyn', 1, ist, nscal, ndex)
         istp(1)= istphy
-        call histwrite(fluxdid, 'istphy', 1, istp, nscal, ndex)
+        CALL histwrite(fluxdid, 'istphy', 1, istp, nscal, ndex)
         
         first = .false.
@@ -140,20 +140,20 @@
         write(lunout,*)'ITAU auquel on stoke les fluxmasses',itau
         
-        call histwrite(fluxid, 'masse', itau, massem,
+        CALL histwrite(fluxid, 'masse', itau, massem,
      .               iip1*jjp1*llm, ndex)
         
-        call histwrite(fluxid, 'pbaru', itau, pbarug,
+        CALL histwrite(fluxid, 'pbaru', itau, pbarug,
      .               iip1*jjp1*llm, ndex)
         
-        call histwrite(fluxvid, 'pbarv', itau, pbarvg,
+        CALL histwrite(fluxvid, 'pbarv', itau, pbarvg,
      .               iip1*jjm*llm, ndex)
         
-        call histwrite(fluxid, 'w' ,itau, wg, 
+        CALL histwrite(fluxid, 'w' ,itau, wg,
      .             iip1*jjp1*llm, ndex) 
         
-        call histwrite(fluxid, 'teta' ,itau, tetac, 
+        CALL histwrite(fluxid, 'teta' ,itau, tetac,
      .             iip1*jjp1*llm, ndex) 
         
-        call histwrite(fluxid, 'phi' ,itau, phic, 
+        CALL histwrite(fluxid, 'phi' ,itau, phic,
      .             iip1*jjp1*llm, ndex) 
         
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d/friction.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d/friction.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d/friction.F	(revision 5101)
@@ -52,9 +52,9 @@
       IF (firstcall) THEN
         ! set friction type
-        call getin("friction_type",friction_type)
+        CALL getin("friction_type",friction_type)
         if ((friction_type<0).or.(friction_type>1)) then
           abort_message="wrong friction type"
           write(lunout,*)'Friction: wrong friction type',friction_type
-          call abort_gcm(modname,abort_message,42)
+          CALL abort_gcm(modname,abort_message,42)
         endif
         firstcall=.false.
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d/gcm.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d/gcm.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d/gcm.F90	(revision 5101)
@@ -143,10 +143,10 @@
   CALL conf_gcm( 99, .TRUE.)
 
-  if (mod(iphysiq, iperiod) /= 0) call abort_gcm("conf_gcm", &
+  if (mod(iphysiq, iperiod) /= 0) CALL abort_gcm("conf_gcm", &
        "iphysiq must be a multiple of iperiod", 1)
 
   use_filtre_fft=.FALSE.
   CALL getin('use_filtre_fft',use_filtre_fft)
-  IF (use_filtre_fft) call abort_gcm("gcm", 'FFT filter is not available in ' &
+  IF (use_filtre_fft) CALL abort_gcm("gcm", 'FFT filter is not available in ' &
           // 'the sequential version of the dynamics.', 1)
 
@@ -166,5 +166,5 @@
 !#ifdef CPP_PHYS
 !  CALL Init_Phys_lmdz(iim,jjp1,llm,1,(/(jjm-1)*iim+2/))
-!  !      call InitComgeomphy ! now done in iniphysiq
+!  !      CALL InitComgeomphy ! now done in iniphysiq
 !#endif
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -177,15 +177,15 @@
 #ifdef CPP_IOIPSL
   if (calend == 'earth_360d') then
-     call ioconf_calendar('360_day')
+     CALL ioconf_calendar('360_day')
      write(lunout,*)'CALENDRIER CHOISI: Terrestre a 360 jours/an'
   else if (calend == 'earth_365d') then
-     call ioconf_calendar('noleap')
+     CALL ioconf_calendar('noleap')
      write(lunout,*)'CALENDRIER CHOISI: Terrestre a 365 jours/an'
   else if (calend == 'gregorian') then
-     call ioconf_calendar('gregorian')
+     CALL ioconf_calendar('gregorian')
      write(lunout,*)'CALENDRIER CHOISI: Terrestre bissextile'
   else
      abort_message = 'Mauvais choix de calendrier'
-     call abort_gcm(modname,abort_message,1)
+     CALL abort_gcm(modname,abort_message,1)
   endif
 #endif
@@ -203,5 +203,5 @@
   !  Choix du nombre de traceurs et du schema pour l'advection
   !  dans fichier traceur.def, par default ou via INCA
-  call init_infotrac
+  CALL init_infotrac
 
   ! Allocation de la tableau q : champs advectes   
@@ -253,5 +253,5 @@
      abort_message =  &
           'Il faut choisir un nb de pas par jour multiple de iperiod'
-     call abort_gcm(modname,abort_message,1)
+     CALL abort_gcm(modname,abort_message,1)
   ENDIF
 
@@ -259,5 +259,5 @@
      abort_message =  &
           'Il faut choisir un nb de pas par jour multiple de iphysiq'
-     call abort_gcm(modname,abort_message,1)
+     CALL abort_gcm(modname,abort_message,1)
   ENDIF
 
@@ -277,5 +277,5 @@
         start_time = starttime
      ELSE
-        call abort_gcm("gcm", "'Je m''arrete'", 1)
+        CALL abort_gcm("gcm", "'Je m''arrete'", 1)
      ENDIF
   ENDIF
@@ -328,14 +328,14 @@
   mois = 1
   heure = 0.
-  call ymds2ju(annee_ref, mois, day_ref, heure, jD_ref)
+  CALL ymds2ju(annee_ref, mois, day_ref, heure, jD_ref)
   jH_ref = jD_ref - int(jD_ref)
   jD_ref = int(jD_ref)
 
-  call ioconf_startdate(INT(jD_ref), jH_ref)
+  CALL ioconf_startdate(INT(jD_ref), jH_ref)
 
   write(lunout,*)'DEBUG'
   write(lunout,*)'annee_ref, mois, day_ref, heure, jD_ref'
   write(lunout,*)annee_ref, mois, day_ref, heure, jD_ref
-  call ju2ymds(jD_ref+jH_ref,an, mois, jour, heure)
+  CALL ju2ymds(jD_ref+jH_ref,an, mois, jour, heure)
   write(lunout,*)'jD_ref+jH_ref,an, mois, jour, heure'
   write(lunout,*)jD_ref+jH_ref,an, mois, jour, heure
@@ -392,7 +392,7 @@
 
 #ifdef CPP_IOIPSL
-  call ju2ymds(jD_ref + day_ini - day_ref, an, mois, jour, heure)
+  CALL ju2ymds(jD_ref + day_ini - day_ref, an, mois, jour, heure)
   write (lunout,301)jour, mois, an
-  call ju2ymds(jD_ref + day_end - day_ref, an, mois, jour, heure)
+  CALL ju2ymds(jD_ref + day_end - day_ref, an, mois, jour, heure)
   write (lunout,302)jour, mois, an
 301 FORMAT('1'/,15x,'run du ', i2,'/',i2,'/',i4)
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d/getparam.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d/getparam.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d/getparam.F90	(revision 5101)
@@ -49,5 +49,5 @@
 
     ret_val=def_val
-    call getin(TARGET,ret_val)
+    CALL getin(TARGET,ret_val)
 
     write(out_eff,*) '######################################'
@@ -72,5 +72,5 @@
 
     ret_val=def_val
-    call getin(TARGET,ret_val)
+    CALL getin(TARGET,ret_val)
 
     write(out_eff,*) '######################################'
@@ -96,5 +96,5 @@
 
     ret_val=def_val
-    call getin(TARGET,ret_val)
+    CALL getin(TARGET,ret_val)
 
     write(out_eff,*) '######################################'
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d/groupe.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d/groupe.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d/groupe.F	(revision 5101)
@@ -60,12 +60,12 @@
 c   Champs 1D
 
-      call convflu(pbaru,pbarv,llm,zconvm)
+      CALL convflu(pbaru,pbarv,llm,zconvm)
 
-      call scopy(ijp1llm,zconvm,1,zconvmm,1)
-      call scopy(ijmllm,pbarv,1,pbarvm,1)
+      CALL scopy(ijp1llm,zconvm,1,zconvmm,1)
+      CALL scopy(ijmllm,pbarv,1,pbarvm,1)
 
       if (groupe_ok) then
-      call groupeun(jjp1,llm,zconvmm)
-      call groupeun(jjm,llm,pbarvm)
+      CALL groupeun(jjp1,llm,zconvmm)
+      CALL groupeun(jjm,llm,pbarvm)
 
 c   Champs 3D
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d/guide_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d/guide_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d/guide_mod.F90	(revision 5101)
@@ -89,5 +89,5 @@
 ! Lecture des parametres:  
 ! ---------------------------------------------
-    call ini_getparam("nudging_parameters_out.txt")
+    CALL ini_getparam("nudging_parameters_out.txt")
 ! Variables guidees
     CALL getpar('guide_u',.true.,guide_u,'guidage de u')
@@ -102,5 +102,5 @@
     CALL getpar('guide_zon',.false.,guide_zon,'guidage moy zonale')
     if (guide_zon .and. abs(grossismx - 1.) > 0.01) &
-         call abort_gcm("guide_init", &
+         CALL abort_gcm("guide_init", &
          "zonal nudging requires grid regular in longitude", 1)
 
@@ -166,5 +166,5 @@
     CALL getpar('guide_2D',.false.,guide_2D,'fichier guidage lat-P')
 
-    call fin_getparam
+    CALL fin_getparam
     
 ! ---------------------------------------------
@@ -400,9 +400,9 @@
 ! Calcul des constantes de rappel
         factt=dtvr*iperiod/daysec 
-        call tau2alpha(3,iip1,jjm ,factt,tau_min_v,tau_max_v,alpha_v)
-        call tau2alpha(2,iip1,jjp1,factt,tau_min_u,tau_max_u,alpha_u)
-        call tau2alpha(1,iip1,jjp1,factt,tau_min_T,tau_max_T,alpha_T)
-        call tau2alpha(1,iip1,jjp1,factt,tau_min_P,tau_max_P,alpha_P)
-        call tau2alpha(1,iip1,jjp1,factt,tau_min_Q,tau_max_Q,alpha_Q)
+        CALL tau2alpha(3,iip1,jjm ,factt,tau_min_v,tau_max_v,alpha_v)
+        CALL tau2alpha(2,iip1,jjp1,factt,tau_min_u,tau_max_u,alpha_u)
+        CALL tau2alpha(1,iip1,jjp1,factt,tau_min_T,tau_max_T,alpha_T)
+        CALL tau2alpha(1,iip1,jjp1,factt,tau_min_P,tau_max_P,alpha_P)
+        CALL tau2alpha(1,iip1,jjp1,factt,tau_min_Q,tau_max_Q,alpha_Q)
 ! correction de rappel dans couche limite
         if (guide_BL) then
@@ -503,7 +503,7 @@
       CALL pression(ip1jmp1,ap,bp,ps,p)
       if (pressure_exner) then
-        call exner_hyb(ip1jmp1,ps,p,pks,pk)
+        CALL exner_hyb(ip1jmp1,ps,p,pks,pk)
       else
-        call exner_milieu(ip1jmp1,ps,p,pks,pk)
+        CALL exner_milieu(ip1jmp1,ps,p,pks,pk)
       endif
       unskap=1./kappa
@@ -782,5 +782,5 @@
         enddo
     enddo
-    call massbar(pext, pbarx, pbary )
+    CALL massbar(pext, pbarx, pbary )
     do l=1,llm
         do j=1,jjp1
@@ -1699,7 +1699,7 @@
         ierr=nf90_def_var(nid,"au",nf90_float,(/id_lonu,id_latu/),vid_au)
         ierr=nf90_def_var(nid,"av",nf90_float,(/id_lonv,id_latv/),vid_av)
-        call nf95_def_var(nid, "alpha_T", nf90_float, (/id_lonv, id_latu/), &
+        CALL nf95_def_var(nid, "alpha_T", nf90_float, (/id_lonv, id_latu/), &
              varid_alpha_t)
-        call nf95_def_var(nid, "alpha_q", nf90_float, (/id_lonv, id_latu/), &
+        CALL nf95_def_var(nid, "alpha_q", nf90_float, (/id_lonv, id_latu/), &
              varid_alpha_q)
         
@@ -1716,6 +1716,6 @@
         ierr = nf90_put_var(nid,vid_au,alpha_u)
         ierr = nf90_put_var(nid,vid_av,alpha_v)
-        call nf95_put_var(nid, varid_alpha_t, alpha_t)
-        call nf95_put_var(nid, varid_alpha_q, alpha_q)
+        CALL nf95_put_var(nid, varid_alpha_t, alpha_t)
+        CALL nf95_put_var(nid, varid_alpha_q, alpha_q)
 ! --------------------------------------------------------------------
 ! Création des variables sauvegardées
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d/iniacademic.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d/iniacademic.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d/iniacademic.F90	(revision 5101)
@@ -22,5 +22,5 @@
   USE ener_mod, ONLY: etot0,ptot0,ztot0,stot0,ang0
   USE readTracFiles_mod, ONLY: addPhase
-  use netcdf, only : nf90_nowrite,nf90_open,nf90_noerr,NF90_INQ_VARID,nf90_close,nf90_get_var
+  use netcdf, ONLY: nf90_nowrite,nf90_open,nf90_noerr,nf90_inq_varid,nf90_close,nf90_get_var
 
   !   Author:    Frederic Hourdin      original: 15/01/93
@@ -89,5 +89,5 @@
     write(lunout,*) "You most likely want an aquaplanet initialisation", &
     " (iflag_phys >= 100)"
-    call abort_gcm(modname,"incompatible iflag_phys==1 and read_start==.false.",1)
+    CALL abort_gcm(modname,"incompatible iflag_phys==1 and read_start==.false.",1)
   endif
   
@@ -97,5 +97,5 @@
 
   ! initialize planet radius, rotation rate,...
-  call conf_planete
+  CALL conf_planete
 
   time_0=0.
@@ -142,5 +142,5 @@
      ierr = nf90_open ('relief_in.nc', nf90_nowrite,nid_relief)
      if (ierr==nf90_noerr) THEN
-         ierr=NF90_INQ_VARID(nid_relief,'RELIEF',varid)
+         ierr=nf90_inq_varid(nid_relief,'RELIEF',varid)
          if (ierr==nf90_noerr) THEN
               ierr=nf90_get_var(nid_relief,varid,relief(1:iim,1:jjp1))
@@ -172,5 +172,5 @@
        CALL exner_hyb( ip1jmp1, ps, p, pks, pk)
      else
-       call exner_milieu(ip1jmp1,ps,p,pks,pk)
+       CALL exner_milieu(ip1jmp1,ps,p,pks,pk)
      endif
      CALL massdair(p,masse)
@@ -299,5 +299,5 @@
         ! winds
         if (ok_geost) then
-           call ugeostr(phi,ucov)
+           CALL ugeostr(phi,ucov)
         else
            ucov(:,:)=0.
@@ -343,5 +343,5 @@
         endif ! of if (planet_type=="earth")
 
-        call check_isotopes_seq(q,1,ip1jmp1,'iniacademic_loc')
+        CALL check_isotopes_seq(q,1,ip1jmp1,'iniacademic_loc')
 
         ! add random perturbation to temperature
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d/integrd.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d/integrd.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d/integrd.F	(revision 5101)
@@ -7,5 +7,5 @@
      &  )
 
-      use control_mod, only : planet_type
+      use control_mod, ONLY: planet_type
       use comconst_mod, only: pi
       USE logic_mod, ONLY: leapf
@@ -106,5 +106,5 @@
          write(lunout,*) " lon = ",rlonv(i)*180./pi, " deg",
      &                   " lat = ",rlatu(j)*180./pi, " deg"
-         call abort_gcm("integrd", "", 1)
+         CALL abort_gcm("integrd", "", 1)
         ENDIF
       ENDDO
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d/interp_horiz.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d/interp_horiz.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d/interp_horiz.F	(revision 5101)
@@ -65,5 +65,5 @@
 
 
-        call iniinterp_horiz (imo,jmo,imn,jmn ,kllm,
+        CALL iniinterp_horiz (imo,jmo,imn,jmn ,kllm,
      &       rlonuo,rlatvo,rlonun,rlatvn,
      &          ktotal,iik,jjk,jk,ik,intersec,airen)
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d/leapfrog.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d/leapfrog.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d/leapfrog.F	(revision 5101)
@@ -12,5 +12,5 @@
 #endif
       USE infotrac, ONLY: nqtot, isoCheck
-      USE guide_mod, ONLY : guide_main
+      USE guide_mod, ONLY: guide_main
       USE write_field, ONLY: writefield
       USE control_mod, ONLY: nday, day_step, planet_type, offline,
@@ -239,9 +239,9 @@
       jH_cur = jH_cur - int(jH_cur)
 
-      call check_isotopes_seq(q,ip1jmp1,'leapfrog 321')
+      CALL check_isotopes_seq(q,ip1jmp1,'leapfrog 321')
 
 #ifdef CPP_IOIPSL
       if (ok_guide) then
-        call guide_main(itau,ucov,vcov,teta,q,masse,ps)
+        CALL guide_main(itau,ucov,vcov,teta,q,masse,ps)
       endif
 #endif
@@ -271,5 +271,5 @@
 !      CALL filtreg ( finvmaold ,jjp1, llm, -2,2, .TRUE., 1 )
 
-      call check_isotopes_seq(q,ip1jmp1,'leapfrog 400')
+      CALL check_isotopes_seq(q,ip1jmp1,'leapfrog 400')
 
    2  CONTINUE ! Matsuno backward or leapfrog step begins here
@@ -322,5 +322,5 @@
 
 
-      call check_isotopes_seq(q,ip1jmp1,'leapfrog 589')
+      CALL check_isotopes_seq(q,ip1jmp1,'leapfrog 589')
 
 c-----------------------------------------------------------------------
@@ -341,5 +341,5 @@
 c   -------------------------------------------------------------
 
-      call check_isotopes_seq(q,ip1jmp1,
+      CALL check_isotopes_seq(q,ip1jmp1,
      &           'leapfrog 686: avant caladvtrac')
 
@@ -371,5 +371,5 @@
 
        CALL msg('720', modname, isoCheck)
-       call check_isotopes_seq(q,ip1jmp1,'leapfrog 756')
+       CALL check_isotopes_seq(q,ip1jmp1,'leapfrog 756')
         
        CALL integrd ( nqtot,vcovm1,ucovm1,tetam1,psm1,massem1 ,
@@ -378,5 +378,5 @@
 
        CALL msg('724', modname, isoCheck)
-       call check_isotopes_seq(q,ip1jmp1,'leapfrog 762')
+       CALL check_isotopes_seq(q,ip1jmp1,'leapfrog 762')
 
 c .P.Le Van (26/04/94  ajout de  finvpold dans l'appel d'integrd)
@@ -429,5 +429,5 @@
            jH_cur = jH_cur - int(jH_cur)
 !         write(lunout,*)'itau, jD_cur = ', itau, jD_cur, jH_cur
-!         call ju2ymds(jD_cur+jH_cur, an, mois, jour, secondes)
+!         CALL ju2ymds(jD_cur+jH_cur, an, mois, jour, secondes)
 !         write(lunout,*)'current date = ',an, mois, jour, secondes 
 
@@ -514,5 +514,5 @@
         endif
 
-        call friction(ucov,vcov,dtvr)
+        CALL friction(ucov,vcov,dtvr)
         
         ! Sponge layer (if any)
@@ -542,5 +542,5 @@
         CALL massdair(p,masse)
 
-        call check_isotopes_seq(q,ip1jmp1,'leapfrog 1196')
+        CALL check_isotopes_seq(q,ip1jmp1,'leapfrog 1196')
 
 c-----------------------------------------------------------------------
@@ -552,6 +552,6 @@
 
 c   calcul de l'energie cinetique avant dissipation
-        call covcont(llm,ucov,vcov,ucont,vcont)
-        call enercin(vcov,ucov,vcont,ucont,ecin0)
+        CALL covcont(llm,ucov,vcov,ucont,vcont)
+        CALL enercin(vcov,ucov,vcont,ucont,ecin0)
 
 c   dissipation
@@ -566,6 +566,6 @@
 C       On rajoute la tendance due a la transform. Ec -> E therm. cree
 C       lors de la dissipation
-            call covcont(llm,ucov,vcov,ucont,vcont)
-            call enercin(vcov,ucov,vcont,ucont,ecin)
+            CALL covcont(llm,ucov,vcov,ucont,vcont)
+            CALL enercin(vcov,ucov,vcont,ucont,ecin)
             dtetaecdt= (ecin0-ecin)/ pk
 c           teta=teta+dtetaecdt
@@ -616,5 +616,5 @@
 c              IF( lafin ) then  
 c                abort_message = 'Simulation finished'
-c                call abort_gcm(modname,abort_message,0)
+c                CALL abort_gcm(modname,abort_message,0)
 c              ENDIF
         
@@ -627,5 +627,5 @@
 c   preparation du pas d'integration suivant  ......
 
-      call check_isotopes_seq(q,ip1jmp1,'leapfrog 1509')
+      CALL check_isotopes_seq(q,ip1jmp1,'leapfrog 1509')
 
       IF ( .NOT.purmats ) THEN
@@ -658,5 +658,5 @@
               abort_message = 'Simulation finished'
 
-              call abort_gcm(modname,abort_message,0)
+              CALL abort_gcm(modname,abort_message,0)
             ENDIF
 c-----------------------------------------------------------------------
@@ -689,5 +689,5 @@
             ENDIF ! of IF((MOD(itau,iperiod).EQ.0).OR.(itau.EQ.itaufin))
 
-            call check_isotopes_seq(q,ip1jmp1,'leapfrog 1584')
+            CALL check_isotopes_seq(q,ip1jmp1,'leapfrog 1584')
 
 c-----------------------------------------------------------------------
@@ -706,11 +706,11 @@
 #ifdef CPP_IOIPSL
               if (ok_dyn_ins) then
-!               write(lunout,*) "leapfrog: call writehist, itau=",itau
+!               write(lunout,*) "leapfrog: CALL writehist, itau=",itau
                CALL writehist(itau,vcov,ucov,teta,phi,q,masse,ps,phis)
-!               call WriteField('ucov',reshape(ucov,(/iip1,jmp1,llm/)))
-!               call WriteField('vcov',reshape(vcov,(/iip1,jjm,llm/)))
-!              call WriteField('teta',reshape(teta,(/iip1,jmp1,llm/)))
-!               call WriteField('ps',reshape(ps,(/iip1,jmp1/)))
-!               call WriteField('masse',reshape(masse,(/iip1,jmp1,llm/)))
+!               CALL WriteField('ucov',reshape(ucov,(/iip1,jmp1,llm/)))
+!               CALL WriteField('vcov',reshape(vcov,(/iip1,jjm,llm/)))
+!              CALL WriteField('teta',reshape(teta,(/iip1,jmp1,llm/)))
+!               CALL WriteField('ps',reshape(ps,(/iip1,jmp1/)))
+!               CALL WriteField('masse',reshape(masse,(/iip1,jmp1,llm/)))
               endif ! of if (ok_dyn_ins)
 #endif
@@ -774,5 +774,5 @@
       ELSE ! of IF (.not.purmats)
 
-            call check_isotopes_seq(q,ip1jmp1,'leapfrog 1664')
+            CALL check_isotopes_seq(q,ip1jmp1,'leapfrog 1664')
 
 c       ........................................................
@@ -793,5 +793,5 @@
                IF( itau == itaufinp1 ) then
                  abort_message = 'Simulation finished'
-                 call abort_gcm(modname,abort_message,0)
+                 CALL abort_gcm(modname,abort_message,0)
                ENDIF
                GO TO 2
@@ -799,5 +799,5 @@
             ELSE ! of IF(forward) i.e. backward step
  
-              call check_isotopes_seq(q,ip1jmp1,'leapfrog 1698')
+              CALL check_isotopes_seq(q,ip1jmp1,'leapfrog 1698')
 
               IF(MOD(itau,iperiod)==0 .OR. itau==itaufin) THEN
@@ -836,5 +836,5 @@
 #ifdef CPP_IOIPSL
               if (ok_dyn_ins) then
-!                write(lunout,*) "leapfrog: call writehist (b)",
+!                write(lunout,*) "leapfrog: CALL writehist (b)",
 !     &                        itau,iecri
                 CALL writehist(itau,vcov,ucov,teta,phi,q,masse,ps,phis)
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d/qminimum.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d/qminimum.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d/qminimum.F	(revision 5101)
@@ -58,5 +58,5 @@
 c
 
-      call check_isotopes_seq(q,ip1jmp1,'qminimum 52')   
+      CALL check_isotopes_seq(q,ip1jmp1,'qminimum 52')
 
       zx_defau_diag(:,:,:)=0.0
@@ -158,5 +158,5 @@
        enddo !do k=2,llm
 
-       call check_isotopes_seq(q,ip1jmp1,'qminimum 168')
+       CALL check_isotopes_seq(q,ip1jmp1,'qminimum 168')
         
       
@@ -185,5 +185,5 @@
        enddo !do k=2,llm  
 
-       call check_isotopes_seq(q,ip1jmp1,'qminimum 197')
+       CALL check_isotopes_seq(q,ip1jmp1,'qminimum 197')
 
       endif !if (niso > 0) then
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d/replay3d.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d/replay3d.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d/replay3d.F90	(revision 5101)
@@ -8,5 +8,5 @@
 
 
-USE comvert_mod, only :  preff, pa
+USE comvert_mod, ONLY:  preff, pa
 USE inigeomphy_mod, ONLY: inigeomphy
 
@@ -18,5 +18,5 @@
   USE logic_mod, ONLY: ecripar, iflag_phys, read_start
 
-  USE serre_mod, ONLY : clon,clat,transx,transy,alphax,alphay,pxo,pyo,              &
+  USE serre_mod, ONLY: clon,clat,transx,transy,alphax,alphay,pxo,pyo,              &
         grossismx, grossismy, dzoomx, dzoomy,taux,tauy
   USE mod_const_mpi, ONLY: comm_lmdz
@@ -101,5 +101,5 @@
   CALL conf_gcm( 99, .TRUE.)
 
-  if (mod(iphysiq, iperiod) /= 0) call abort_gcm("conf_gcm", &
+  if (mod(iphysiq, iperiod) /= 0) CALL abort_gcm("conf_gcm", &
        "iphysiq must be a multiple of iperiod", 1)
 
@@ -139,5 +139,5 @@
   mois = 1
   heure = 0.
-! call ymds2ju(annee_ref, mois, day_ref, heure, jD_ref)
+! CALL ymds2ju(annee_ref, mois, day_ref, heure, jD_ref)
   jH_ref = jD_ref - int(jD_ref)
   jD_ref = int(jD_ref)
@@ -170,5 +170,5 @@
 ! Initialisation de la parametrisation
 !---------------------------------------------------------------------
-      call call_ini_replay
+      CALL call_ini_replay
 
 !---------------------------------------------------------------------
@@ -177,5 +177,5 @@
       DO it=1,ntime
          print*,'Pas de temps ',it,klon,klev
-         call call_param_replay(klon,klev)
+         CALL call_param_replay(klon,klev)
       ENDDO
 
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d/vlsplt.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d/vlsplt.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d/vlsplt.F	(revision 5101)
@@ -78,24 +78,24 @@
 
 cprint*,'Entree vlx1'
-c	call minmaxq(zq,qmin,qmax,'avant vlx     ')
-      call vlx(zq,pente_max,zm,mu,iq)
+c	CALL minmaxq(zq,qmin,qmax,'avant vlx     ')
+      CALL vlx(zq,pente_max,zm,mu,iq)
 cprint*,'Sortie vlx1'
-c	call minmaxq(zq,qmin,qmax,'apres vlx1    ')
+c	CALL minmaxq(zq,qmin,qmax,'apres vlx1    ')
 
 c print*,'Entree vly1'
 
-      call vly(zq,pente_max,zm,mv,iq)
-c	call minmaxq(zq,qmin,qmax,'apres vly1     ')
+      CALL vly(zq,pente_max,zm,mv,iq)
+c	CALL minmaxq(zq,qmin,qmax,'apres vly1     ')
 cprint*,'Sortie vly1'
-      call vlz(zq,pente_max,zm,mw,iq)
-c	call minmaxq(zq,qmin,qmax,'apres vlz     ')
-
-
-      call vly(zq,pente_max,zm,mv,iq)
-c	call minmaxq(zq,qmin,qmax,'apres vly     ')
-
-
-      call vlx(zq,pente_max,zm,mu,iq)
-c	call minmaxq(zq,qmin,qmax,'apres vlx2    ')
+      CALL vlz(zq,pente_max,zm,mw,iq)
+c	CALL minmaxq(zq,qmin,qmax,'apres vlz     ')
+
+
+      CALL vly(zq,pente_max,zm,mv,iq)
+c	CALL minmaxq(zq,qmin,qmax,'apres vly     ')
+
+
+      CALL vlx(zq,pente_max,zm,mu,iq)
+c	CALL minmaxq(zq,qmin,qmax,'apres vlx2    ')
 	
 
@@ -124,5 +124,5 @@
       END
       RECURSIVE SUBROUTINE vlx(q,pente_max,masse,u_m,iq)
-      USE infotrac, ONLY : nqtot,tracers, ! CRisi
+      USE infotrac, ONLY: nqtot,tracers, ! CRisi
      &                     min_qParent,min_qMass,min_ratio ! MVals et CRisi
 
@@ -414,5 +414,5 @@
       do ifils=1,tracers(iq)%nqChildren
         iq2=tracers(iq)%iqDescen(ifils)
-        call vlx(Ratio,pente_max,masseq,u_mq,iq2)
+        CALL vlx(Ratio,pente_max,masseq,u_mq,iq2)
       enddo
 ! end CRisi
@@ -459,5 +459,5 @@
       END
       RECURSIVE SUBROUTINE vly(q,pente_max,masse,masse_adv_v,iq)
-      USE infotrac, ONLY : nqtot,tracers, ! CRisi
+      USE infotrac, ONLY: nqtot,tracers, ! CRisi
      &                     min_qParent,min_qMass,min_ratio ! MVals et CRisi
 c
@@ -739,5 +739,5 @@
       do ifils=1,tracers(iq)%nqDescen
         iq2=tracers(iq)%iqDescen(ifils)
-        call vly(Ratio,pente_max,masseq,qbyv,iq2)
+        CALL vly(Ratio,pente_max,masseq,qbyv,iq2)
       enddo
 
@@ -822,5 +822,5 @@
       END
       RECURSIVE SUBROUTINE vlz(q,pente_max,masse,w,iq)
-      USE infotrac, ONLY : nqtot,tracers, ! CRisi 
+      USE infotrac, ONLY: nqtot,tracers, ! CRisi
      &                     min_qParent,min_qMass,min_ratio ! MVals et CRisi
 c
@@ -945,5 +945,5 @@
       do ifils=1,tracers(iq)%nqChildren
         iq2=tracers(iq)%iqDescen(ifils)
-        call vlz(Ratio,pente_max,masseq,wq,iq2)
+        CALL vlz(Ratio,pente_max,masseq,wq,iq2)
       enddo
 ! end CRisi  
@@ -1017,5 +1017,5 @@
       integer ismin,ismax
 
-      call scopy (ip1jmp1*llm,zq,1,zzq,1)
+      CALL scopy (ip1jmp1*llm,zq,1,zzq,1)
 
       ijlmin=ismin(ijp1llm,zq,1)
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d/vlspltqs.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d/vlspltqs.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d/vlspltqs.F	(revision 5101)
@@ -127,27 +127,27 @@
       enddo  
 
-c      call minmaxq(zq,qmin,qmax,'avant vlxqs     ')
-      call vlxqs(zq,pente_max,zm,mu,qsat,iq)
-
-c     call minmaxq(zq,qmin,qmax,'avant vlyqs     ')
-
-      call vlyqs(zq,pente_max,zm,mv,qsat,iq)
-
-c      call minmaxq(zq,qmin,qmax,'avant vlz     ')
-
-      call vlz(zq,pente_max,zm,mw,iq)
-
-c     call minmaxq(zq,qmin,qmax,'avant vlyqs     ')
-c     call minmaxq(zm,qmin,qmax,'M avant vlyqs     ')
-
-      call vlyqs(zq,pente_max,zm,mv,qsat,iq)
-
-c     call minmaxq(zq,qmin,qmax,'avant vlxqs     ')
-c     call minmaxq(zm,qmin,qmax,'M avant vlxqs     ')
-
-      call vlxqs(zq,pente_max,zm,mu,qsat,iq)
-
-c     call minmaxq(zq,qmin,qmax,'apres vlxqs     ')
-c     call minmaxq(zm,qmin,qmax,'M apres vlxqs     ')
+c      CALL minmaxq(zq,qmin,qmax,'avant vlxqs     ')
+      CALL vlxqs(zq,pente_max,zm,mu,qsat,iq)
+
+c     CALL minmaxq(zq,qmin,qmax,'avant vlyqs     ')
+
+      CALL vlyqs(zq,pente_max,zm,mv,qsat,iq)
+
+c      CALL minmaxq(zq,qmin,qmax,'avant vlz     ')
+
+      CALL vlz(zq,pente_max,zm,mw,iq)
+
+c     CALL minmaxq(zq,qmin,qmax,'avant vlyqs     ')
+c     CALL minmaxq(zm,qmin,qmax,'M avant vlyqs     ')
+
+      CALL vlyqs(zq,pente_max,zm,mv,qsat,iq)
+
+c     CALL minmaxq(zq,qmin,qmax,'avant vlxqs     ')
+c     CALL minmaxq(zm,qmin,qmax,'M avant vlxqs     ')
+
+      CALL vlxqs(zq,pente_max,zm,mu,qsat,iq)
+
+c     CALL minmaxq(zq,qmin,qmax,'apres vlxqs     ')
+c     CALL minmaxq(zm,qmin,qmax,'M apres vlxqs     ')
 
 
@@ -177,5 +177,5 @@
       END
       SUBROUTINE vlxqs(q,pente_max,masse,u_m,qsat,iq)
-      USE infotrac, ONLY : nqtot,tracers ! CRisi
+      USE infotrac, ONLY: nqtot,tracers ! CRisi
 
 c
@@ -471,5 +471,5 @@
       do ifils=1,tracers(iq)%nqChildren
         iq2=tracers(iq)%iqDescen(ifils)
-        call vlx(Ratio,pente_max,masseq,u_mq,iq2)
+        CALL vlx(Ratio,pente_max,masseq,u_mq,iq2)
       enddo
 ! end CRisi
@@ -514,5 +514,5 @@
       END
       SUBROUTINE vlyqs(q,pente_max,masse,masse_adv_v,qsat,iq)
-      USE infotrac, ONLY : nqtot,tracers ! CRisi
+      USE infotrac, ONLY: nqtot,tracers ! CRisi
 c
 c     Auteurs:   P.Le Van, F.Hourdin, F.Forget 
@@ -779,5 +779,5 @@
         iq2=tracers(iq)%iqDescen(ifils)
         !write(*,*) 'vlyqs 783: appel rec de vly, iq2=',iq2
-        call vly(Ratio,pente_max,masseq,qbyv,iq2)
+        CALL vly(Ratio,pente_max,masseq,qbyv,iq2)
       enddo
 
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d/wrgrads.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d/wrgrads.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d/wrgrads.F	(revision 5101)
@@ -107,7 +107,7 @@
       write(unit(if),'(a12)') 'UNDEF 1.0E30'
       write(unit(if),'(a5,1x,a40)') 'TITLE ',title(if)
-      call formcoord(unit(if),im,xd(iii,if),1.,.false.,'XDEF')
-      call formcoord(unit(if),jm,yd(iji,if),1.,.true.,'YDEF')
-      call formcoord(unit(if),lm,zd(1,if),1.,.false.,'ZDEF')
+      CALL formcoord(unit(if),im,xd(iii,if),1.,.false.,'XDEF')
+      CALL formcoord(unit(if),jm,yd(iji,if),1.,.true.,'YDEF')
+      CALL formcoord(unit(if),lm,zd(1,if),1.,.false.,'ZDEF')
       write(unit(if),'(a4,i10,a30)')
      &       'TDEF ',itime(if),' LINEAR 02JAN1987 1MO '
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d/write_paramLMDZ_dyn.h
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d/write_paramLMDZ_dyn.h	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d/write_paramLMDZ_dyn.h	(revision 5101)
@@ -241,5 +241,5 @@
 c
       if (ok_sync) then
-        call histsync(nid_ctesGCM)
+        CALL histsync(nid_ctesGCM)
       endif
 c
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/advn.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d_common/advn.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d_common/advn.F	(revision 5101)
@@ -99,17 +99,17 @@
       enddo
 
-c     call minmaxq(zq,qmin,qmax,'avant vlx     ')
-      call advnqx(zq,zqg,zqd)
-      call advnx(zq,zqg,zqd,zm,mu,mode)
-      call advnqy(zq,zqs,zqn)
-      call advny(zq,zqs,zqn,zm,mv)
-      call advnqz(zq,zqh,zqb)
-      call advnz(zq,zqh,zqb,zm,mw)
-c     call vlz(zq,0.,zm,mw)
-      call advnqy(zq,zqs,zqn)
-      call advny(zq,zqs,zqn,zm,mv)
-      call advnqx(zq,zqg,zqd)
-      call advnx(zq,zqg,zqd,zm,mu,mode)
-c     call minmaxq(zq,qmin,qmax,'apres vlx     ')
+c     CALL minmaxq(zq,qmin,qmax,'avant vlx     ')
+      CALL advnqx(zq,zqg,zqd)
+      CALL advnx(zq,zqg,zqd,zm,mu,mode)
+      CALL advnqy(zq,zqs,zqn)
+      CALL advny(zq,zqs,zqn,zm,mv)
+      CALL advnqz(zq,zqh,zqb)
+      CALL advnz(zq,zqh,zqb,zm,mw)
+c     CALL vlz(zq,0.,zm,mw)
+      CALL advnqy(zq,zqs,zqn)
+      CALL advny(zq,zqs,zqn,zm,mv)
+      CALL advnqx(zq,zqg,zqd)
+      CALL advnx(zq,zqg,zqd,zm,mu,mode)
+c     CALL minmaxq(zq,qmin,qmax,'apres vlx     ')
 
       do l=1,llm
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/conf_planete.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d_common/conf_planete.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d_common/conf_planete.F90	(revision 5101)
@@ -81,5 +81,5 @@
 ! Intrinsic heat flux (default: none) (only used if planet_type="giant")
 ihf = 0.
-call getin('ihf',ihf)
+CALL getin('ihf',ihf)
 
 END SUBROUTINE conf_planete
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/control_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d_common/control_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d_common/control_mod.F90	(revision 5101)
@@ -16,10 +16,10 @@
   INTEGER,SAVE :: iapp_tracvl ! apply (cumulated) traceur advection every
                               ! iapp_tracvl dynamical steps
-  INTEGER,SAVE :: nsplit_phys ! number of sub-cycle steps in call to physics
+  INTEGER,SAVE :: nsplit_phys ! number of sub-cycle steps in CALL to physics
   INTEGER,SAVE :: iconser
   INTEGER,SAVE :: iecri
   INTEGER,SAVE :: dissip_period ! apply dissipation every dissip_period
                                 ! dynamical step
-  INTEGER,SAVE :: iphysiq ! call physics every iphysiq dynamical steps
+  INTEGER,SAVE :: iphysiq ! CALL physics every iphysiq dynamical steps
   INTEGER,SAVE :: iecrimoy
   INTEGER,SAVE :: dayref
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/diagedyn.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d_common/diagedyn.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d_common/diagedyn.F	(revision 5101)
@@ -52,5 +52,5 @@
 c======================================================================
  
-      USE control_mod, ONLY : planet_type
+      USE control_mod, ONLY: planet_type
       
       IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/disvert.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d_common/disvert.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d_common/disvert.F90	(revision 5101)
@@ -64,5 +64,5 @@
 
   vert_sampling = merge("strato", "tropo ", ok_strato) ! default value
-  call getin('vert_sampling', vert_sampling)
+  CALL getin('vert_sampling', vert_sampling)
   WRITE(lunout,*) TRIM(modname)//' vert_sampling = ' // vert_sampling
   if (llm==39 .and. vert_sampling=="strato") then
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/disvert_noterre.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d_common/disvert_noterre.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d_common/disvert_noterre.F	(revision 5101)
@@ -181,5 +181,5 @@
          DO l = 1, llm
 
-         call sig_hybrid(sig(l),pa,preff,newsig)
+         CALL sig_hybrid(sig(l),pa,preff,newsig)
             bp(l) = EXP( 1. - 1./(newsig**2)  )
             ap(l) = pa * (newsig - bp(l) )
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/exner_hyb_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d_common/exner_hyb_m.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d_common/exner_hyb_m.F90	(revision 5101)
@@ -60,9 +60,9 @@
        if (llm==1) then
           if (kappa/=1) then
-             call abort_gcm(modname, &
+             CALL abort_gcm(modname, &
                   "kappa!=1 , but running in Shallow Water mode!!",42)
           endif
           if (cpp/=r) then
-             call abort_gcm(modname, &
+             CALL abort_gcm(modname, &
                   "cpp!=r , but running in Shallow Water mode!!",42)
           endif
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/exner_milieu_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d_common/exner_milieu_m.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d_common/exner_milieu_m.F90	(revision 5101)
@@ -57,9 +57,9 @@
        if (llm==1) then
           if (kappa/=1) then
-             call abort_gcm(modname, &
+             CALL abort_gcm(modname, &
                   "kappa!=1 , but running in Shallow Water mode!!",42)
           endif
           if (cpp/=r) then
-             call abort_gcm(modname, &
+             CALL abort_gcm(modname, &
                   "cpp!=r , but running in Shallow Water mode!!",42)
           endif
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/extrapol.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d_common/extrapol.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d_common/extrapol.F	(revision 5101)
@@ -150,5 +150,5 @@
 C
 C* Not enough points around point P are unmasked; interpolation on P 
-C  will be done in a future call to extrap.
+C  will be done in a future CALL to extrap.
 C
          IF (inbor >= knbor) THEN
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/fxhyp_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d_common/fxhyp_m.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d_common/fxhyp_m.F90	(revision 5101)
@@ -172,11 +172,11 @@
           Xf(2 * nmax) = pi_d
 
-          call invert_zoom_x(xf, xtild, Xprimt, rlonm025(:iim), &
+          CALL invert_zoom_x(xf, xtild, Xprimt, rlonm025(:iim), &
                xprimm025(:iim), xuv = - 0.25_k8)
-          call invert_zoom_x(xf, xtild, Xprimt, rlonv(:iim), xprimv(:iim), &
+          CALL invert_zoom_x(xf, xtild, Xprimt, rlonv(:iim), xprimv(:iim), &
                xuv = 0._k8)
-          call invert_zoom_x(xf, xtild, Xprimt, rlonu(:iim), xprimu(:iim), &
+          CALL invert_zoom_x(xf, xtild, Xprimt, rlonu(:iim), xprimu(:iim), &
                xuv = 0.5_k8)
-          call invert_zoom_x(xf, xtild, Xprimt, rlonp025(:iim), &
+          CALL invert_zoom_x(xf, xtild, Xprimt, rlonp025(:iim), &
                xprimp025(:iim), xuv = 0.25_k8)
        end if test_grossismx
@@ -211,8 +211,8 @@
        END IF
 
-       call principal_cshift(is2, rlonm025, xprimm025)
-       call principal_cshift(is2, rlonv, xprimv)
-       call principal_cshift(is2, rlonu, xprimu)
-       call principal_cshift(is2, rlonp025, xprimp025)
+       CALL principal_cshift(is2, rlonm025, xprimm025)
+       CALL principal_cshift(is2, rlonv, xprimv)
+       CALL principal_cshift(is2, rlonu, xprimu)
+       CALL principal_cshift(is2, rlonp025, xprimp025)
 
        forall (i = 1: iim) d_rlonv(i) = rlonv(i + 1) - rlonv(i)
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/grilles_gcm_netcdf_sub.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d_common/grilles_gcm_netcdf_sub.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d_common/grilles_gcm_netcdf_sub.F90	(revision 5101)
@@ -182,5 +182,5 @@
   status=nf90_put_att(ncid_out,area_id,'long_name','gridcell area')
   ! land-sea mask (nearest integer approx)
-  status = nf90_def_var(ncid_out,'mask',NF90_INT,out_dim,mask_id)
+  status = nf90_def_var(ncid_out,'mask',nf90_int,out_dim,mask_id)
   CALL handle_err(status)
   status=nf90_put_att(ncid_out,mask_id,'long_name','land-sea mask (nINT approx)')
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/infotrac.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d_common/infotrac.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d_common/infotrac.F90	(revision 5101)
@@ -3,6 +3,6 @@
 MODULE infotrac
 
-  USE       strings_mod, ONLY : msg, fmsg, maxlen, cat, dispTable, int2str, bool2str, strStack, strParse
-  USE readTracFiles_mod, ONLY : trac_type, readTracersFiles, tracers, setGeneration, itZonIso, nzone, tran0, isoZone, &
+  USE       strings_mod, ONLY: msg, fmsg, maxlen, cat, dispTable, int2str, bool2str, strStack, strParse
+  USE readTracFiles_mod, ONLY: trac_type, readTracersFiles, tracers, setGeneration, itZonIso, nzone, tran0, isoZone, &
           delPhase, niso, getKey, isot_type, processIsotopes, isotope, maxTableWidth, iqIsoPha, nphas, ixIso, isoPhas, &
           addPhase, iH2O, addKey, isoSelect, testTracersFiles, isoKeys, indexUpdate, iqWIsoPha, nbIso, ntiso, isoName, isoCheck
@@ -113,9 +113,9 @@
 
   SUBROUTINE init_infotrac
-    USE control_mod, ONLY : planet_type
+    USE control_mod, ONLY: planet_type
 #ifdef REPROBUS
    USE CHEM_REP,    ONLY: Init_chem_rep_trac
 #endif
-    USE lmdz_cppkeys_wrapper, ONLY : CPPKEY_INCA, CPPKEY_STRATAER
+    USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA, CPPKEY_STRATAER
     IMPLICIT NONE
     !==============================================================================================================================
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/iniconst.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d_common/iniconst.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d_common/iniconst.F90	(revision 5101)
@@ -64,19 +64,19 @@
   endif
   ! but user can also specify using one or the other in run.def:
-  call getin('disvert_type',disvert_type)
+  CALL getin('disvert_type',disvert_type)
   write(lunout,*) trim(modname),': disvert_type=',disvert_type
 
   pressure_exner = disvert_type == 1 ! default value
-  call getin('pressure_exner', pressure_exner)
+  CALL getin('pressure_exner', pressure_exner)
 
   if (disvert_type==1) then
      ! standard case for Earth (automatic generation of levels)
-     call disvert()
+     CALL disvert()
   else if (disvert_type==2) then
      ! standard case for planets (levels generated using z2sig.def file)
-     call disvert_noterre
+     CALL disvert_noterre
   else
      write(abort_message,*) "Wrong value for disvert_type: ", disvert_type
-     call abort_gcm(modname,abort_message,0)
+     CALL abort_gcm(modname,abort_message,0)
   endif
 
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/inidissip.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d_common/inidissip.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d_common/inidissip.F90	(revision 5101)
@@ -11,5 +11,5 @@
   !   -------------
 
-  USE control_mod, only : dissip_period,iperiod
+  USE control_mod, ONLY: dissip_period,iperiod
   USE comconst_mod, ONLY: dissip_deltaz, dissip_factz, dissip_zref, &
                           dtdiss, dtvr, rad
@@ -79,5 +79,5 @@
      write(lunout,*)'  Inidissip  zh min max  ',zhmin,zhmax
      abort_message='probleme generateur alleatoire dans inidissip'
-     call abort_gcm('inidissip',abort_message,1)
+     CALL abort_gcm('inidissip',abort_message,1)
   ENDIF
 
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/initdynav.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d_common/initdynav.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d_common/initdynav.F90	(revision 5101)
@@ -6,6 +6,6 @@
   USE IOIPSL
 #endif
-  USE infotrac, ONLY : nqtot
-  use com_io_dyn_mod, only : histaveid,histvaveid,histuaveid, &
+  USE infotrac, ONLY: nqtot
+  use com_io_dyn_mod, ONLY: histaveid,histvaveid,histuaveid, &
        dynhistave_file,dynhistvave_file,dynhistuave_file
   USE comconst_mod, ONLY: pi
@@ -83,5 +83,5 @@
   ! Restriction de IOIPSL: seulement 2 coordonnees dans le meme fichier
   ! Grille Scalaire       
-  call histbeg(dynhistave_file, iip1, rlong(:,1), jjp1, rlat(1,:), &
+  CALL histbeg(dynhistave_file, iip1, rlong(:,1), jjp1, rlat(1,:), &
        1, iip1, 1, jjp1, &
        tau0, zjulian, tstep, thoriid,histaveid)
@@ -98,5 +98,5 @@
   enddo
 
-  call histbeg(dynhistvave_file, iip1, rlong(:,1), jjm, rlat(1,:), &
+  CALL histbeg(dynhistvave_file, iip1, rlong(:,1), jjm, rlat(1,:), &
        1, iip1, 1, jjm, &
        tau0, zjulian, tstep, vhoriid,histvaveid)
@@ -109,5 +109,5 @@
   enddo
 
-  call histbeg(dynhistuave_file, iip1, rlong(:,1),jjp1, rlat(1,:), &
+  CALL histbeg(dynhistuave_file, iip1, rlong(:,1),jjp1, rlat(1,:), &
        1, iip1, 1, jjp1, &
        tau0, zjulian, tstep, uhoriid,histuaveid)
@@ -115,9 +115,9 @@
   !  Appel a histvert pour la grille verticale
 
-  call histvert(histaveid,'presnivs','Niveaux Pression approximatifs','mb', &
+  CALL histvert(histaveid,'presnivs','Niveaux Pression approximatifs','mb', &
        llm, presnivs/100., zvertiid,'down')
-  call histvert(histuaveid,'presnivs','Niveaux Pression approximatifs','mb', &
+  CALL histvert(histuaveid,'presnivs','Niveaux Pression approximatifs','mb', &
        llm, presnivs/100., zvertiid,'down')
-  call histvert(histvaveid,'presnivs','Niveaux Pression approximatifs','mb', &
+  CALL histvert(histvaveid,'presnivs','Niveaux Pression approximatifs','mb', &
        llm, presnivs/100., zvertiid,'down')
 
@@ -126,5 +126,5 @@
   !  Vents U
 
-  call histdef(histuaveid, 'u', 'vent u moyen ', &
+  CALL histdef(histuaveid, 'u', 'vent u moyen ', &
        'm/s', iip1, jjp1, uhoriid, llm, 1, llm, zvertiid, &
        32, 'ave(X)', t_ops, t_wrt)
@@ -132,5 +132,5 @@
   !  Vents V
 
-  call histdef(histvaveid, 'v', 'vent v moyen', &
+  CALL histdef(histvaveid, 'v', 'vent v moyen', &
        'm/s', iip1, jjm, vhoriid, llm, 1, llm, zvertiid, &
        32, 'ave(X)', t_ops, t_wrt)
@@ -139,5 +139,5 @@
   !  Temperature
 
-  call histdef(histaveid, 'temp', 'temperature moyenne', 'K', &
+  CALL histdef(histaveid, 'temp', 'temperature moyenne', 'K', &
        iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &
        32, 'ave(X)', t_ops, t_wrt)
@@ -145,5 +145,5 @@
   !  Temperature potentielle
 
-  call histdef(histaveid, 'theta', 'temperature potentielle', 'K', &
+  CALL histdef(histaveid, 'theta', 'temperature potentielle', 'K', &
        iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &
        32, 'ave(X)', t_ops, t_wrt)
@@ -151,5 +151,5 @@
   !  Geopotentiel
 
-  call histdef(histaveid, 'phi', 'geopotentiel moyen', '-', &
+  CALL histdef(histaveid, 'phi', 'geopotentiel moyen', '-', &
        iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &
        32, 'ave(X)', t_ops, t_wrt)
@@ -158,5 +158,5 @@
 
   !        DO iq=1,nqtot
-  !          call histdef(histaveid, tracers(iq)%name, &
+  !          CALL histdef(histaveid, tracers(iq)%name, &
   !                                  tracers(iq)%longName, '-',  &
   !                  iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &
@@ -166,5 +166,5 @@
   !  Masse
 
-  call histdef(histaveid, 'masse', 'masse', 'kg', &
+  CALL histdef(histaveid, 'masse', 'masse', 'kg', &
        iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &
        32, 'ave(X)', t_ops, t_wrt)
@@ -172,5 +172,5 @@
   !  Pression au sol
 
-  call histdef(histaveid, 'ps', 'pression naturelle au sol', 'Pa', &
+  CALL histdef(histaveid, 'ps', 'pression naturelle au sol', 'Pa', &
        iip1, jjp1, thoriid, 1, 1, 1, -99, &
        32, 'ave(X)', t_ops, t_wrt)
@@ -178,11 +178,11 @@
   !  Geopotentiel au sol
 
-  !      call histdef(histaveid, 'phis', 'geopotentiel au sol', '-', &
+  !      CALL histdef(histaveid, 'phis', 'geopotentiel au sol', '-', &
   !                  iip1, jjp1, thoriid, 1, 1, 1, -99, &
   !                  32, 'ave(X)', t_ops, t_wrt)
 
-  call histend(histaveid)
-  call histend(histuaveid)
-  call histend(histvaveid)
+  CALL histend(histaveid)
+  CALL histend(histuaveid)
+  CALL histend(histvaveid)
 #else
   write(lunout,*)"initdynav: Warning this routine should not be", &
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/initfluxsto.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d_common/initfluxsto.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d_common/initfluxsto.F	(revision 5101)
@@ -92,5 +92,5 @@
       enddo
  
-      call histbeg(infile, iip1, rlong(:,1), jjp1, rlat(1,:),
+      CALL histbeg(infile, iip1, rlong(:,1), jjp1, rlat(1,:),
      .             1, iip1, 1, jjp1,
      .             tau0, zjulian, tstep, uhoriid, fileid)
@@ -108,10 +108,10 @@
       enddo
 
-      call histbeg('fluxstokev.nc', iip1, rlong(:,1), jjm, rlat(1,:),
+      CALL histbeg('fluxstokev.nc', iip1, rlong(:,1), jjm, rlat(1,:),
      .             1, iip1, 1, jjm,
      .             tau0, zjulian, tstep, vhoriid, filevid)
         
         rl(1,1) = 1.
-      call histbeg('defstoke.nc', 1, rl, 1, rl,
+      CALL histbeg('defstoke.nc', 1, rl, 1, rl,
      .             1, 1, 1, 1,
      .             tau0, zjulian, tstep, dhoriid, filedid)
@@ -127,5 +127,5 @@
       enddo
 
-      call histhori(fileid, iip1, rlong, jjp1, rlat, 'scalar',
+      CALL histhori(fileid, iip1, rlong, jjp1, rlat, 'scalar',
      .              'Grille points scalaires', thoriid)
         
@@ -133,14 +133,14 @@
 C  Appel a histvert pour la grille verticale
 C
-      call histvert(fileid, 'sig_s', 'Niveaux sigma',
+      CALL histvert(fileid, 'sig_s', 'Niveaux sigma',
      . 'sigma_level',
      .              llm, nivsigs, zvertiid)
 C Pour le fichier V
-      call histvert(filevid, 'sig_s', 'Niveaux sigma',
+      CALL histvert(filevid, 'sig_s', 'Niveaux sigma',
      .  'sigma_level',
      .              llm, nivsigs, zvertiid)
 c pour le fichier def
       nivd(1) = 1
-      call histvert(filedid, 'sig_s', 'Niveaux sigma',
+      CALL histvert(filedid, 'sig_s', 'Niveaux sigma',
      .  'sigma_level',
      .              1, nivd, dvertiid)
@@ -173,5 +173,5 @@
 C Masse 
 C
-      call histdef(fileid, 'masse', 'Masse', 'kg',
+      CALL histdef(fileid, 'masse', 'Masse', 'kg',
      .             iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
      .             32, 'inst(X)', t_ops, t_wrt)
@@ -179,5 +179,5 @@
 C  Pbaru 
 C
-      call histdef(fileid, 'pbaru', 'flx de masse zonal', 'kg m/s',
+      CALL histdef(fileid, 'pbaru', 'flx de masse zonal', 'kg m/s',
      .             iip1, jjp1, uhoriid, llm, 1, llm, zvertiid,
      .             32, 'inst(X)', t_ops, t_wrt)
@@ -186,5 +186,5 @@
 C  Pbarv 
 C
-      call histdef(filevid, 'pbarv', 'flx de masse mer', 'kg m/s',
+      CALL histdef(filevid, 'pbarv', 'flx de masse mer', 'kg m/s',
      .             iip1, jjm, vhoriid, llm, 1, llm, zvertiid,
      .             32, 'inst(X)', t_ops, t_wrt)
@@ -192,5 +192,5 @@
 C  w 
 C
-      call histdef(fileid, 'w', 'flx de masse vert', 'kg m/s',
+      CALL histdef(fileid, 'w', 'flx de masse vert', 'kg m/s',
      .             iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
      .             32, 'inst(X)', t_ops, t_wrt)
@@ -199,5 +199,5 @@
 C  Temperature potentielle
 C
-      call histdef(fileid, 'teta', 'temperature potentielle', '-',
+      CALL histdef(fileid, 'teta', 'temperature potentielle', '-',
      .             iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
      .             32, 'inst(X)', t_ops, t_wrt)
@@ -207,5 +207,5 @@
 C Geopotentiel 
 C
-      call histdef(fileid, 'phi', 'geopotentiel instantane', '-',
+      CALL histdef(fileid, 'phi', 'geopotentiel instantane', '-',
      .             iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
      .             32, 'inst(X)', t_ops, t_wrt)
@@ -213,11 +213,11 @@
 C  Fin
 C
-      call histend(fileid)
-      call histend(filevid)
-      call histend(filedid)
+      CALL histend(fileid)
+      CALL histend(filevid)
+      CALL histend(filedid)
       if (ok_sync) then
-        call histsync(fileid)
-        call histsync(filevid)
-        call histsync(filedid)
+        CALL histsync(fileid)
+        CALL histsync(filevid)
+        CALL histsync(filedid)
       endif
         
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/inithist.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d_common/inithist.F	(revision 5100)
+++ 	(revision )
@@ -1,195 +1,0 @@
-
-! $Id$
-
-      subroutine inithist(day0,anne0,tstep,t_ops,t_wrt)
-
-#ifdef CPP_IOIPSL
-       USE IOIPSL
-#endif
-       USE infotrac, ONLY : nqtot
-       use com_io_dyn_mod, only : histid,histvid,histuid,               &
-     &                        dynhist_file,dynhistv_file,dynhistu_file
-       USE comconst_mod, ONLY: pi
-       USE comvert_mod, ONLY: presnivs
-       USE temps_mod, ONLY: itau_dyn
-       
-      implicit none
-
-C
-C   Routine d'initialisation des ecritures des fichiers histoires LMDZ
-C   au format IOIPSL
-C
-C   Appels succesifs des routines: histbeg
-C                                  histhori
-C                                  histver
-C                                  histdef
-C                                  histend
-C
-C   Entree:
-C
-C      infile: nom du fichier histoire a creer
-C      day0,anne0: date de reference
-C      tstep: duree du pas de temps en seconde
-C      t_ops: frequence de l'operation pour IOIPSL
-C      t_wrt: frequence d'ecriture sur le fichier
-C      nq: nombre de traceurs
-C
-C
-C   L. Fairhead, LMD, 03/99
-C
-C =====================================================================
-C
-C   Declarations
-      include "dimensions.h"
-      include "paramet.h"
-      include "comgeom.h"
-      include "description.h"
-      include "iniprint.h"
-
-C   Arguments
-C
-      integer day0, anne0
-      real tstep, t_ops, t_wrt
-
-#ifdef CPP_IOIPSL
-! This routine needs IOIPSL to work
-C   Variables locales
-C
-      integer tau0
-      real zjulian
-      integer iq
-      real rlong(iip1,jjp1), rlat(iip1,jjp1)
-      integer uhoriid, vhoriid, thoriid, zvertiid
-      integer ii,jj
-      integer zan, dayref
-C
-C  Initialisations
-C
-      pi = 4. * atan (1.)
-C
-C  Appel a histbeg: creation du fichier netcdf et initialisations diverses
-C         
-
-      zan = anne0
-      dayref = day0
-      CALL ymds2ju(zan, 1, dayref, 0.0, zjulian)
-      tau0 = itau_dyn
-      
-! -------------------------------------------------------------
-! Creation des 3 fichiers pour les grilles horizontales U,V,Scal
-! -------------------------------------------------------------
-!Grille U      
-      do jj = 1, jjp1
-        do ii = 1, iip1
-          rlong(ii,jj) = rlonu(ii) * 180. / pi
-          rlat(ii,jj) = rlatu(jj) * 180. / pi
-        enddo
-      enddo
-       
-      call histbeg(dynhistu_file, iip1, rlong(:,1), jjp1, rlat(1,:),
-     .             1, iip1, 1, jjp1,
-     .             tau0, zjulian, tstep, uhoriid, histuid)
-
-! Grille V
-      do jj = 1, jjm
-        do ii = 1, iip1
-          rlong(ii,jj) = rlonv(ii) * 180. / pi
-          rlat(ii,jj) = rlatv(jj) * 180. / pi
-        enddo
-      enddo
-
-      call histbeg(dynhistv_file, iip1, rlong(:,1), jjm, rlat(1,:),
-     .             1, iip1, 1, jjm,
-     .             tau0, zjulian, tstep, vhoriid, histvid)
-
-!Grille Scalaire
-      do jj = 1, jjp1
-        do ii = 1, iip1
-          rlong(ii,jj) = rlonv(ii) * 180. / pi
-          rlat(ii,jj) = rlatu(jj) * 180. / pi
-        enddo
-      enddo
-
-      call histbeg(dynhist_file, iip1, rlong(:,1), jjp1, rlat(1,:),
-     .             1, iip1, 1, jjp1,
-     .             tau0, zjulian, tstep, thoriid, histid)
-! -------------------------------------------------------------
-C  Appel a histvert pour la grille verticale
-! -------------------------------------------------------------
-      call histvert(histid, 'presnivs', 'Niveaux pression','mb',
-     .              llm, presnivs/100., zvertiid,'down')
-      call histvert(histvid, 'presnivs', 'Niveaux pression','mb',
-     .              llm, presnivs/100., zvertiid,'down')
-      call histvert(histuid, 'presnivs', 'Niveaux pression','mb',
-     .              llm, presnivs/100., zvertiid,'down')
-C
-! -------------------------------------------------------------
-C  Appels a histdef pour la definition des variables a sauvegarder
-! -------------------------------------------------------------
-C
-C  Vents U
-C
-      call histdef(histuid, 'u', 'vent u', 'm/s',
-     .             iip1, jjp1, uhoriid, llm, 1, llm, zvertiid,
-     .             32, 'inst(X)', t_ops, t_wrt)
-C
-C  Vents V
-C
-      call histdef(histvid, 'v', 'vent v', 'm/s',
-     .             iip1, jjm, vhoriid, llm, 1, llm, zvertiid,
-     .             32, 'inst(X)', t_ops, t_wrt)
-
-C
-C  Temperature potentielle
-C
-      call histdef(histid, 'teta', 'temperature potentielle', '-',
-     .             iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
-     .             32, 'inst(X)', t_ops, t_wrt)
-C
-C  Geopotentiel
-C
-      call histdef(histid, 'phi', 'geopotentiel', '-',
-     .             iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
-     .             32, 'inst(X)', t_ops, t_wrt)
-C
-C  Traceurs
-C
-
-!        DO iq=1,nqtot
-!          call histdef(histid, tracers(iq)%name, 
-!                               tracers(iq)%longName, '-',
-!     .             iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
-!     .             32, 'inst(X)', t_ops, t_wrt)
-!        enddo
-!C
-C  Masse
-C
-      call histdef(histid, 'masse', 'masse', 'kg',
-     .             iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
-     .             32, 'inst(X)', t_ops, t_wrt)
-C
-C  Pression au sol
-C
-      call histdef(histid, 'ps', 'pression naturelle au sol', 'Pa',
-     .             iip1, jjp1, thoriid, 1, 1, 1, -99,
-     .             32, 'inst(X)', t_ops, t_wrt)
-C
-C  Geopotentiel au sol
-!C
-!      call histdef(histid, 'phis', 'geopotentiel au sol', '-',
-!     .             iip1, jjp1, thoriid, 1, 1, 1, -99,
-!     .             32, 'inst(X)', t_ops, t_wrt)
-!C
-C  Fin
-C
-      call histend(histid)
-      call histend(histuid)
-      call histend(histvid)
-#else
-! tell the user this routine should be run with ioipsl
-      write(lunout,*)"inithist: Warning this routine should not be",
-     &               " used without ioipsl"
-#endif
-! of #ifdef CPP_IOIPSL
-      return
-      end
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/inithist.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d_common/inithist.F90	(revision 5101)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d_common/inithist.F90	(revision 5101)
@@ -0,0 +1,194 @@
+! $Id$
+
+subroutine inithist(day0, anne0, tstep, t_ops, t_wrt)
+
+#ifdef CPP_IOIPSL
+   USE IOIPSL
+#endif
+  USE infotrac, ONLY: nqtot
+  use com_io_dyn_mod, ONLY: histid, histvid, histuid, &
+          dynhist_file, dynhistv_file, dynhistu_file
+  USE comconst_mod, ONLY: pi
+  USE comvert_mod, ONLY: presnivs
+  USE temps_mod, ONLY: itau_dyn
+
+  implicit none
+
+  !
+  !   Routine d'initialisation des ecritures des fichiers histoires LMDZ
+  !   au format IOIPSL
+  !
+  !   Appels succesifs des routines: histbeg
+  !                              histhori
+  !                              histver
+  !                              histdef
+  !                              histend
+  !
+  !   Entree:
+  !
+  !  infile: nom du fichier histoire a creer
+  !  day0,anne0: date de reference
+  !  tstep: duree du pas de temps en seconde
+  !  t_ops: frequence de l'operation pour IOIPSL
+  !  t_wrt: frequence d'ecriture sur le fichier
+  !  nq: nombre de traceurs
+  !
+  !
+  !   L. Fairhead, LMD, 03/99
+  !
+  ! =====================================================================
+  !
+  !   Declarations
+  include "dimensions.h"
+  include "paramet.h"
+  include "comgeom.h"
+  include "description.h"
+  include "iniprint.h"
+
+  !   Arguments
+  !
+  integer :: day0, anne0
+  real :: tstep, t_ops, t_wrt
+
+#ifdef CPP_IOIPSL
+  ! This routine needs IOIPSL to work
+  !   Variables locales
+  !
+  integer :: tau0
+  real :: zjulian
+  integer :: iq
+  real :: rlong(iip1,jjp1), rlat(iip1,jjp1)
+  integer :: uhoriid, vhoriid, thoriid, zvertiid
+  integer :: ii,jj
+  integer :: zan, dayref
+  !
+  !  Initialisations
+  !
+  pi = 4. * atan (1.)
+  !
+  !  Appel a histbeg: creation du fichier netcdf et initialisations diverses
+  !
+
+  zan = anne0
+  dayref = day0
+  CALL ymds2ju(zan, 1, dayref, 0.0, zjulian)
+  tau0 = itau_dyn
+
+  ! -------------------------------------------------------------
+  ! Creation des 3 fichiers pour les grilles horizontales U,V,Scal
+  ! -------------------------------------------------------------
+  !Grille U
+  do jj = 1, jjp1
+    do ii = 1, iip1
+      rlong(ii,jj) = rlonu(ii) * 180. / pi
+      rlat(ii,jj) = rlatu(jj) * 180. / pi
+    enddo
+  enddo
+
+  CALL histbeg(dynhistu_file, iip1, rlong(:,1), jjp1, rlat(1,:), &
+        1, iip1, 1, jjp1, &
+        tau0, zjulian, tstep, uhoriid, histuid)
+
+  ! Grille V
+  do jj = 1, jjm
+    do ii = 1, iip1
+      rlong(ii,jj) = rlonv(ii) * 180. / pi
+      rlat(ii,jj) = rlatv(jj) * 180. / pi
+    enddo
+  enddo
+
+  CALL histbeg(dynhistv_file, iip1, rlong(:,1), jjm, rlat(1,:), &
+        1, iip1, 1, jjm, &
+        tau0, zjulian, tstep, vhoriid, histvid)
+
+  !Grille Scalaire
+  do jj = 1, jjp1
+    do ii = 1, iip1
+      rlong(ii,jj) = rlonv(ii) * 180. / pi
+      rlat(ii,jj) = rlatu(jj) * 180. / pi
+    enddo
+  enddo
+
+  CALL histbeg(dynhist_file, iip1, rlong(:,1), jjp1, rlat(1,:), &
+        1, iip1, 1, jjp1, &
+        tau0, zjulian, tstep, thoriid, histid)
+  ! -------------------------------------------------------------
+  !  Appel a histvert pour la grille verticale
+  ! -------------------------------------------------------------
+  CALL histvert(histid, 'presnivs', 'Niveaux pression','mb', &
+        llm, presnivs/100., zvertiid,'down')
+  CALL histvert(histvid, 'presnivs', 'Niveaux pression','mb', &
+        llm, presnivs/100., zvertiid,'down')
+  CALL histvert(histuid, 'presnivs', 'Niveaux pression','mb', &
+        llm, presnivs/100., zvertiid,'down')
+  !
+  ! -------------------------------------------------------------
+  !  Appels a histdef pour la definition des variables a sauvegarder
+  ! -------------------------------------------------------------
+  !
+  !  Vents U
+  !
+  CALL histdef(histuid, 'u', 'vent u', 'm/s', &
+        iip1, jjp1, uhoriid, llm, 1, llm, zvertiid, &
+        32, 'inst(X)', t_ops, t_wrt)
+  !
+  !  Vents V
+  !
+  CALL histdef(histvid, 'v', 'vent v', 'm/s', &
+        iip1, jjm, vhoriid, llm, 1, llm, zvertiid, &
+        32, 'inst(X)', t_ops, t_wrt)
+
+  !
+  !  Temperature potentielle
+  !
+  CALL histdef(histid, 'teta', 'temperature potentielle', '-', &
+        iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &
+        32, 'inst(X)', t_ops, t_wrt)
+  !
+  !  Geopotentiel
+  !
+  CALL histdef(histid, 'phi', 'geopotentiel', '-', &
+        iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &
+        32, 'inst(X)', t_ops, t_wrt)
+  !
+  !  Traceurs
+  !
+
+  !    DO iq=1,nqtot
+  !      CALL histdef(histid, tracers(iq)%name,
+  !                           tracers(iq)%longName, '-',
+  ! .             iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
+  ! .             32, 'inst(X)', t_ops, t_wrt)
+  !    enddo
+  !C
+  !  Masse
+  !
+  CALL histdef(histid, 'masse', 'masse', 'kg', &
+        iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &
+        32, 'inst(X)', t_ops, t_wrt)
+  !
+  !  Pression au sol
+  !
+  CALL histdef(histid, 'ps', 'pression naturelle au sol', 'Pa', &
+        iip1, jjp1, thoriid, 1, 1, 1, -99, &
+        32, 'inst(X)', t_ops, t_wrt)
+  !
+  !  Geopotentiel au sol
+  !C
+  !  CALL histdef(histid, 'phis', 'geopotentiel au sol', '-',
+  ! .             iip1, jjp1, thoriid, 1, 1, 1, -99,
+  ! .             32, 'inst(X)', t_ops, t_wrt)
+  !C
+  !  Fin
+  !
+  CALL histend(histid)
+  CALL histend(histuid)
+  CALL histend(histvid)
+#else
+  ! tell the user this routine should be run with ioipsl
+  write(lunout, *)"inithist: Warning this routine should not be", &
+          " used without ioipsl"
+#endif
+  ! of #ifdef CPP_IOIPSL
+  return
+end subroutine inithist
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/inter_barxy_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d_common/inter_barxy_m.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d_common/inter_barxy_m.F90	(revision 5101)
@@ -57,9 +57,9 @@
          "inter_barxy jnterfd")
     jmods = size(champint, 2)
-    call assert(size(champ, 1) == size(dlonid), "inter_barxy size(champ, 1)")
-    call assert((/size(rlonimod), size(champint, 1)/) == iim, &
+    CALL assert(size(champ, 1) == size(dlonid), "inter_barxy size(champ, 1)")
+    CALL assert((/size(rlonimod), size(champint, 1)/) == iim, &
          "inter_barxy iim")
-    call assert(any(jmods == (/jjm, jjm + 1/)), 'inter_barxy jmods')
-    call assert(size(rlatimod) == jjm, "inter_barxy size(rlatimod)")
+    CALL assert(any(jmods == (/jjm, jjm + 1/)), 'inter_barxy jmods')
+    CALL assert(size(rlatimod) == jjm, "inter_barxy size(rlatimod)")
 
     ! Check decreasing order for "rlatimod":
@@ -323,5 +323,5 @@
     !------------------------------------
 
-    call assert(size(yjdat) == size(fdat), "inter_bary")
+    CALL assert(size(yjdat) == size(fdat), "inter_bary")
 
     ! Initialisation des variables
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/pentes_ini.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d_common/pentes_ini.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d_common/pentes_ini.F	(revision 5101)
@@ -257,8 +257,8 @@
          enddo
       endif
-      call limx(s0,sx,sm,pente_max)
-c     call minmaxq(zq,1.e33,-1.e33,'avant advx     ')
-       call advx( limit,.5*dtvr,pbaru,sm,s0,sx,sy,sz,lati,latf)
-c     call minmaxq(zq,1.e33,-1.e33,'avant advy     ')
+      CALL limx(s0,sx,sm,pente_max)
+c     CALL minmaxq(zq,1.e33,-1.e33,'avant advx     ')
+       CALL advx( limit,.5*dtvr,pbaru,sm,s0,sx,sy,sz,lati,latf)
+c     CALL minmaxq(zq,1.e33,-1.e33,'avant advy     ')
       if (mode==4) then
          do l=1,llm
@@ -271,7 +271,7 @@
          enddo
       endif
-       call   limy(s0,sy,sm,pente_max)
-       call advy( limit,.5*dtvr,pbarv,sm,s0,sx,sy,sz ) 
-c     call minmaxq(zq,1.e33,-1.e33,'avant advz     ')
+       CALL   limy(s0,sy,sm,pente_max)
+       CALL advy( limit,.5*dtvr,pbarv,sm,s0,sx,sy,sz )
+c     CALL minmaxq(zq,1.e33,-1.e33,'avant advz     ')
        do j=1,jjp1
           do i=1,iip1
@@ -280,6 +280,6 @@
           enddo
        enddo
-       call limz(s0,sz,sm,pente_max)
-       call advz( limit,dtvr,w,sm,s0,sx,sy,sz )
+       CALL limz(s0,sz,sm,pente_max)
+       CALL advz( limit,dtvr,w,sm,s0,sx,sy,sz )
       if (mode==4) then
          do l=1,llm
@@ -292,6 +292,6 @@
          enddo
       endif
-        call limy(s0,sy,sm,pente_max)
-       call advy( limit,.5*dtvr,pbarv,sm,s0,sx,sy,sz ) 
+        CALL limy(s0,sy,sm,pente_max)
+       CALL advy( limit,.5*dtvr,pbarv,sm,s0,sx,sy,sz )
        do l=1,llm
           do j=1,jjp1
@@ -305,5 +305,5 @@
 
 
-c     call minmaxq(zq,1.e33,-1.e33,'avant advx     ')
+c     CALL minmaxq(zq,1.e33,-1.e33,'avant advx     ')
       if (mode==4) then
          do l=1,llm
@@ -316,7 +316,7 @@
          enddo
       endif
-       call limx(s0,sx,sm,pente_max)
-       call advx( limit,.5*dtvr,pbaru,sm,s0,sx,sy,sz,lati,latf) 
-c     call minmaxq(zq,1.e33,-1.e33,'apres advx     ')
+       CALL limx(s0,sx,sm,pente_max)
+       CALL advx( limit,.5*dtvr,pbaru,sm,s0,sx,sy,sz,lati,latf)
+c     CALL minmaxq(zq,1.e33,-1.e33,'apres advx     ')
 c      do l=1,llm
 c         do j=1,jjp1
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/ppm3d.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d_common/ppm3d.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d_common/ppm3d.F	(revision 5101)
@@ -24,5 +24,5 @@
 C
 C Purpose: given horizontal winds on  a hybrid sigma-p surfaces,
-C          one call to tpcore updates the 3-D mixing ratio
+C          one CALL to tpcore updates the 3-D mixing ratio
 C          fields one time step (NDT). [vertical mass flux is computed
 C          internally consistent with the discretized hydrostatic mass
@@ -355,8 +355,8 @@
       if(IGD==0) then
 C Compute analytic cosine at cell edges
-            call cosa(cosp,cose,JNP,PI,DP)
+            CALL cosa(cosp,cose,JNP,PI,DP)
       else
 C Define cosine consistent with GEOS-GCM (using dycore2.0 or later)
-            call cosc(cosp,cose,JNP,PI,DP)
+            CALL cosc(cosp,cose,JNP,PI,DP)
       endif
 C
@@ -455,5 +455,5 @@
       if(IGD==0) then
 C Convert winds on A-Grid to Courant # on C-Grid.
-      call A2C(U(1,1,k),V(1,1,k),IMR,JMR,j1,j2,CRX,CRY,dtdx5,DTDY5)
+      CALL A2C(U(1,1,k),V(1,1,k),IMR,JMR,j1,j2,CRX,CRY,dtdx5,DTDY5)
       else
 C Convert winds on C-grid to Courant #
@@ -674,6 +674,6 @@
 		jad = 1
 	endif
-      call xadv(IMR,JNP,j1,j2,wk1(1,1,2),UA,JS,JN,IML,DC2,iad)
-      call yadv(IMR,JNP,j1,j2,wk1(1,1,1),VA,PV,W,jad)
+      CALL xadv(IMR,JNP,j1,j2,wk1(1,1,2),UA,JS,JN,IML,DC2,iad)
+      CALL yadv(IMR,JNP,j1,j2,wk1(1,1,1),VA,PV,W,jad)
       do j=1,JNP
       do i=1,IMR
@@ -683,8 +683,8 @@
       endif
 C
-      call xtp(IMR,JNP,IML,j1,j2,JN,JS,PU,DQ(1,1,k,IC),wk1(1,1,2)
+      CALL xtp(IMR,JNP,IML,j1,j2,JN,JS,PU,DQ(1,1,k,IC),wk1(1,1,2)
      &        ,CRX,fx1,xmass,IORD)
 
-      call ytp(IMR,JNP,j1,j2,acosp,RCAP,DQ(1,1,k,IC),wk1(1,1,1),CRY,
+      CALL ytp(IMR,JNP,j1,j2,acosp,RCAP,DQ(1,1,k,IC),wk1(1,1,1),CRY,
      &  DC2,ymass,WK1(1,1,3),wk1(1,1,4),WK1(1,1,5),WK1(1,1,6),JORD)
 C
@@ -746,9 +746,9 @@
 C****6***0*********0*********0*********0*********0*********0**********72
    
-      call FZPPM(IMR,JNP,NLAY,j1,DQ(1,1,1,IC),W,Q(1,1,1,IC),WK1,DPI,
+      CALL FZPPM(IMR,JNP,NLAY,j1,DQ(1,1,1,IC),W,Q(1,1,1,IC),WK1,DPI,
      &           DC2,CRX,CRY,PU,PV,xmass,ymass,delp1,KRD)
 C
     
-      if(fill) call qckxyz(DQ(1,1,1,IC),DC2,IMR,JNP,NLAY,j1,j2,
+      if(fill) CALL qckxyz(DQ(1,1,1,IC),DC2,IMR,JNP,NLAY,j1,j2,
      &                     cosp,acosp,.false.,IC,NSTEP)
 C
@@ -921,11 +921,11 @@
 C****6***0*********0*********0*********0*********0*********0**********72
 C Top & Bot always monotonic
-      call lmtppm(flux(1,1),A6(1,1),AR(1,1),AL(1,1),wk1(1,1),IMR,0)
-      call lmtppm(flux(1,NLAY),A6(1,NLAY),AR(1,NLAY),AL(1,NLAY),
+      CALL lmtppm(flux(1,1),A6(1,1),AR(1,1),AL(1,1),wk1(1,1),IMR,0)
+      CALL lmtppm(flux(1,NLAY),A6(1,NLAY),AR(1,NLAY),AL(1,NLAY),
      &            wk1(1,NLAY),IMR,0)
 C
 C Interior depending on KORD
       if(LMT<=2)
-     &  call lmtppm(flux(1,2),A6(1,2),AR(1,2),AL(1,2),wk1(1,2),
+     &  CALL lmtppm(flux(1,2),A6(1,2),AR(1,2),AL(1,2),wk1(1,2),
      &              IMR*(NLAY-2),LMT)
 C
@@ -1004,5 +1004,5 @@
       END DO
       ELSE
-      call xmist(IMR,IML,Qtmp,DC)
+      CALL xmist(IMR,IML,Qtmp,DC)
       DC(0) = DC(IMR)
 C
@@ -1013,5 +1013,5 @@
       END DO
       else
-      call fxppm(IMR,IML,UC(1,j),Qtmp,DC,fx1,IORD)
+      CALL fxppm(IMR,IML,UC(1,j),Qtmp,DC,fx1,IORD)
       endif
 C
@@ -1041,5 +1041,5 @@
       END DO
       ELSE
-      call xmist(IMR,IML,Qtmp,DC)
+      CALL xmist(IMR,IML,Qtmp,DC)
 C
       do i=-IML,0
@@ -1132,5 +1132,5 @@
       END DO
 C
-      if(LMT<=2) call lmtppm(DC(1),A6(1),AR(1),AL(1),P(1),IMR,LMT)
+      if(LMT<=2) CALL lmtppm(DC(1),A6(1),AR(1),AL(1),P(1),IMR,LMT)
 C
       AL(0) = AL(IMR)
@@ -1189,9 +1189,9 @@
       else
    
-      call ymist(IMR,JNP,j1,P,DC2,4)
+      CALL ymist(IMR,JNP,j1,P,DC2,4)
 C
       if(JORD<=0 .or. JORD>=3) then
    
-      call fyppm(VC,P,DC2,fx,IMR,JNP,j1,j2,A6,AR,AL,JORD)
+      CALL fyppm(VC,P,DC2,fx,IMR,JNP,j1,j2,A6,AR,AL,JORD)
     
       else
@@ -1384,5 +1384,5 @@
       END DO
 C
-      if(LMT<=2) call lmtppm(DC(1,j11),A6(1,j11),AR(1,j11)
+      if(LMT<=2) CALL lmtppm(DC(1,j11),A6(1,j11),AR(1,j11)
      &                       ,AL(1,j11),P(1,j11),len,LMT)
 C
@@ -1761,11 +1761,11 @@
       L = 1
 	icr = 1
-      call filns(q(1,1,L),IMR,JNP,j1,j2,cosp,acosp,ipy,tiny)
+      CALL filns(q(1,1,L),IMR,JNP,j1,j2,cosp,acosp,ipy,tiny)
       if(ipy==0) goto 50
-      call filew(q(1,1,L),qtmp,IMR,JNP,j1,j2,ipx,tiny)
+      CALL filew(q(1,1,L),qtmp,IMR,JNP,j1,j2,ipx,tiny)
       if(ipx==0) goto 50
 C
       if(cross) then
-      call filcr(q(1,1,L),IMR,JNP,j1,j2,cosp,acosp,icr,tiny)
+      CALL filcr(q(1,1,L),IMR,JNP,j1,j2,cosp,acosp,icr,tiny)
       endif
       if(icr==0) goto 50
@@ -1784,10 +1784,10 @@
       icr = 1
 C
-      call filns(q(1,1,L),IMR,JNP,j1,j2,cosp,acosp,ipy,tiny)
+      CALL filns(q(1,1,L),IMR,JNP,j1,j2,cosp,acosp,ipy,tiny)
       if(ipy==0) goto 225
-      call filew(q(1,1,L),qtmp,IMR,JNP,j1,j2,ipx,tiny)
+      CALL filew(q(1,1,L),qtmp,IMR,JNP,j1,j2,ipx,tiny)
       if(ipx==0) go to 225
       if(cross) then
-      call filcr(q(1,1,L),IMR,JNP,j1,j2,cosp,acosp,icr,tiny)
+      CALL filcr(q(1,1,L),IMR,JNP,j1,j2,cosp,acosp,icr,tiny)
       endif
       if(icr==0) goto 225
@@ -1815,10 +1815,10 @@
       L = NLAY
 C
-      call filns(q(1,1,L),IMR,JNP,j1,j2,cosp,acosp,ipy,tiny)
+      CALL filns(q(1,1,L),IMR,JNP,j1,j2,cosp,acosp,ipy,tiny)
       if(ipy==0) goto 911
-      call filew(q(1,1,L),qtmp,IMR,JNP,j1,j2,ipx,tiny)
+      CALL filew(q(1,1,L),qtmp,IMR,JNP,j1,j2,ipx,tiny)
       if(ipx==0) goto 911
 C
-      call filcr(q(1,1,L),IMR,JNP,j1,j2,cosp,acosp,icr,tiny)
+      CALL filcr(q(1,1,L),IMR,JNP,j1,j2,cosp,acosp,icr,tiny)
       if(icr==0) goto 911
 C
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/prather.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d_common/prather.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d_common/prather.F	(revision 5101)
@@ -147,5 +147,5 @@
 c-----------------------------------------------------------
        do indice =1,nt
-       call advxp( limit,0.5*dt,pbaru,sm,s0,sx,sy,sz
+       CALL advxp( limit,0.5*dt,pbaru,sm,s0,sx,sy,sz
      .             ,sxx,sxy,sxz,syy,syz,szz,1 )
         END DO
@@ -157,5 +157,5 @@
         enddo
 c---------------------------------------------------------
-       call advyp( limit,.5*dt*nt,pbarv,sm,s0,sx,sy,sz
+       CALL advyp( limit,.5*dt*nt,pbarv,sm,s0,sx,sy,sz
      .             ,sxx,sxy,sxz,syy,syz,szz,1 )
 c---------------------------------------------------------
@@ -174,5 +174,5 @@
           enddo
        enddo
-       call advzp( limit,dt*nt,w,sm,s0,sx,sy,sz 
+       CALL advzp( limit,dt*nt,w,sm,s0,sx,sy,sz
      .             ,sxx,sxy,sxz,syy,syz,szz,1 )
         do l=1,llm
@@ -186,5 +186,5 @@
 
 c---------------------------------------------------------
-       call advyp( limit,.5*dt*nt,pbarv,sm,s0,sx,sy,sz
+       CALL advyp( limit,.5*dt*nt,pbarv,sm,s0,sx,sy,sz
      .             ,sxx,sxy,sxz,syy,syz,szz,1 )
 c---------------------------------------------------------
@@ -204,5 +204,5 @@
        ENDDO
        do indice=1,nt
-       call advxp( limit,0.5*dt,pbaru,sm,s0,sx,sy,sz
+       CALL advxp( limit,0.5*dt,pbaru,sm,s0,sx,sy,sz
      .             ,sxx,sxy,sxz,syy,syz,szz,1 )
         END DO
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/rotatf.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d_common/rotatf.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d_common/rotatf.F	(revision 5101)
@@ -9,5 +9,5 @@
 c     a tous les niveaux d'1 vecteur de comp. x et y ..
 c       x  et  y etant des composantes  covariantes  ...
-c     Only difference with rotat: call to filtreg.
+c     Only difference with rotat: CALL to filtreg.
 c********************************************************************
 c   klevel, x  et y   sont des arguments d'entree pour le s-prog
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/test_period.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d_common/test_period.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d_common/test_period.F	(revision 5101)
@@ -9,5 +9,5 @@
 c                           teta, q , p et phis                 .......... 
 c
-      USE infotrac, ONLY : nqtot
+      USE infotrac, ONLY: nqtot
 c
 c     IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/ugeostr.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d_common/ugeostr.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d_common/ugeostr.F90	(revision 5101)
@@ -48,5 +48,5 @@
      ENDDO
   ENDDO
-  call dump2d(jjm,llm,um,'Vent-u geostrophique')
+  CALL dump2d(jjm,llm,um,'Vent-u geostrophique')
 
   !   calcul des champ de vent:
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/write_grads_dyn.h
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d_common/write_grads_dyn.h	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d_common/write_grads_dyn.h	(revision 5101)
@@ -5,5 +5,5 @@
 
          string10='dyn'
-         call inigrads(1,iip1
+         CALL inigrads(1,iip1
      s  ,rlonv,180./pi,-180.,180.,jjp1,rlatu,-90.,90.,180./pi
      s  ,llm,presnivs,1.
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/writedynav.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d_common/writedynav.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d_common/writedynav.F90	(revision 5101)
@@ -6,6 +6,6 @@
   USE ioipsl
 #endif
-  USE infotrac, ONLY : nqtot
-  use com_io_dyn_mod, only : histaveid, histvaveid, histuaveid
+  USE infotrac, ONLY: nqtot
+  use com_io_dyn_mod, ONLY: histaveid, histvaveid, histuaveid
   USE comconst_mod, ONLY: cpp
   USE temps_mod, ONLY: itau_dyn
@@ -71,5 +71,5 @@
 
   ! Passage aux composantes naturelles du vent
-  call covnat(llm, ucov, vcov, unat, vnat)
+  CALL covnat(llm, ucov, vcov, unat, vnat)
 
   !  Appels a histwrite pour l'ecriture des variables a sauvegarder
@@ -77,15 +77,15 @@
   !  Vents U 
 
-  call histwrite(histuaveid, 'u', itau_w, unat,  &
+  CALL histwrite(histuaveid, 'u', itau_w, unat,  &
        iip1*jjp1*llm, ndexu)
 
   !  Vents V
 
-  call histwrite(histvaveid, 'v', itau_w, vnat,  &
+  CALL histwrite(histvaveid, 'v', itau_w, vnat,  &
        iip1*jjm*llm, ndexv)
 
   !  Temperature potentielle moyennee
 
-  call histwrite(histaveid, 'theta', itau_w, teta,  &
+  CALL histwrite(histaveid, 'theta', itau_w, teta,  &
        iip1*jjp1*llm, ndexu)
 
@@ -95,10 +95,10 @@
      tm(ii) = teta(ii) * ppk(ii)/cpp
   enddo
-  call histwrite(histaveid, 'temp', itau_w, tm,  &
+  CALL histwrite(histaveid, 'temp', itau_w, tm,  &
        iip1*jjp1*llm, ndexu)
 
   !  Geopotentiel
 
-  call histwrite(histaveid, 'phi', itau_w, phi,  &
+  CALL histwrite(histaveid, 'phi', itau_w, phi,  &
        iip1*jjp1*llm, ndexu)
 
@@ -106,5 +106,5 @@
 
   !  DO iq=1, nqtot
-  !       call histwrite(histaveid, tracers(iq)%longName, itau_w, &
+  !       CALL histwrite(histaveid, tracers(iq)%longName, itau_w, &
   !                   q(:, :, iq), iip1*jjp1*llm, ndexu)
   ! enddo
@@ -112,19 +112,19 @@
   !  Masse
 
-  call histwrite(histaveid, 'masse', itau_w, masse,  &
+  CALL histwrite(histaveid, 'masse', itau_w, masse,  &
        iip1*jjp1*llm, ndexu)
 
   !  Pression au sol
 
-  call histwrite(histaveid, 'ps', itau_w, ps, iip1*jjp1, ndex2d)
+  CALL histwrite(histaveid, 'ps', itau_w, ps, iip1*jjp1, ndex2d)
 
   ! Geopotentiel au sol
 
-  ! call histwrite(histaveid, 'phis', itau_w, phis, iip1*jjp1, ndex2d)
+  ! CALL histwrite(histaveid, 'phis', itau_w, phis, iip1*jjp1, ndex2d)
 
   if (ok_sync) then
-     call histsync(histaveid)
-     call histsync(histvaveid)
-     call histsync(histuaveid)
+     CALL histsync(histaveid)
+     CALL histsync(histvaveid)
+     CALL histsync(histuaveid)
   ENDIF
 
Index: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/writehist.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3d_common/writehist.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3d_common/writehist.F	(revision 5101)
@@ -7,6 +7,6 @@
       USE ioipsl
 #endif
-      USE infotrac, ONLY : nqtot
-      use com_io_dyn_mod, only : histid,histvid,histuid
+      USE infotrac, ONLY: nqtot
+      use com_io_dyn_mod, ONLY: histid,histvid,histuid
       USE temps_mod, ONLY: itau_dyn
       
@@ -72,5 +72,5 @@
       itau_w = itau_dyn + time
 !  Passage aux composantes naturelles du vent
-      call covnat(llm, ucov, vcov, unat, vnat)
+      CALL covnat(llm, ucov, vcov, unat, vnat)
 C
 C  Appels a histwrite pour l'ecriture des variables a sauvegarder
@@ -78,10 +78,10 @@
 C  Vents U
 C
-      call histwrite(histuid, 'u', itau_w, unat, 
+      CALL histwrite(histuid, 'u', itau_w, unat,
      .               iip1*jjp1*llm, ndexu)
 C
 C  Vents V
 C
-      call histwrite(histvid, 'v', itau_w, vnat, 
+      CALL histwrite(histvid, 'v', itau_w, vnat,
      .               iip1*jjm*llm, ndexv)
 
@@ -89,10 +89,10 @@
 C  Temperature potentielle
 C
-      call histwrite(histid, 'teta', itau_w, teta, 
+      CALL histwrite(histid, 'teta', itau_w, teta,
      .                iip1*jjp1*llm, ndexu)
 C
 C  Geopotentiel
 C
-      call histwrite(histid, 'phi', itau_w, phi, 
+      CALL histwrite(histid, 'phi', itau_w, phi,
      .                iip1*jjp1*llm, ndexu)
 C
@@ -100,5 +100,5 @@
 C
 !        DO iq=1,nqtot
-!          call histwrite(histid, tracers(iq)%longName, itau_w, 
+!          CALL histwrite(histid, tracers(iq)%longName, itau_w,
 !     .                   q(:,:,iq), iip1*jjp1*llm, ndexu)
 !        enddo
@@ -106,20 +106,20 @@
 C  Masse
 C
-      call histwrite(histid,'masse',itau_w, masse,iip1*jjp1*llm,ndexu)
+      CALL histwrite(histid,'masse',itau_w, masse,iip1*jjp1*llm,ndexu)
 C
 C  Pression au sol
 C
-      call histwrite(histid, 'ps', itau_w, ps, iip1*jjp1, ndex2d)
+      CALL histwrite(histid, 'ps', itau_w, ps, iip1*jjp1, ndex2d)
 C
 C  Geopotentiel au sol
 C
-!      call histwrite(histid, 'phis', itau_w, phis, iip1*jjp1, ndex2d)
+!      CALL histwrite(histid, 'phis', itau_w, phis, iip1*jjp1, ndex2d)
 C
 C  Fin
 C
       if (ok_sync) then
-        call histsync(histid)
-        call histsync(histvid)
-        call histsync(histuid)
+        CALL histsync(histid)
+        CALL histsync(histvid)
+        CALL histsync(histuid)
       endif
 #else
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/abort_gcm.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/abort_gcm.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/abort_gcm.F	(revision 5101)
@@ -30,15 +30,15 @@
 #ifdef CPP_IOIPSL
 c$OMP MASTER
-      call histclo
-      call restclo
+      CALL histclo
+      CALL restclo
       if (MPI_rank == 0) then
-         call getin_dump
+         CALL getin_dump
       endif
 c$OMP END MASTER
 #endif
-c     call histclo(2)
-c     call histclo(3)
-c     call histclo(4)
-c     call histclo(5)
+c     CALL histclo(2)
+c     CALL histclo(3)
+c     CALL histclo(4)
+c     CALL histclo(5)
       write(lunout,*) 'Stopping in ', modname
       write(lunout,*) 'Reason = ',message
@@ -50,5 +50,5 @@
         if (using_mpi) THEN
 C$OMP CRITICAL (MPI_ABORT_GCM)
-          call MPI_ABORT(COMM_LMDZ, 1, ierror_mpi)
+          CALL MPI_ABORT(COMM_LMDZ, 1, ierror_mpi)
 C$OMP END CRITICAL (MPI_ABORT_GCM)
         else
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/addfi_loc.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/addfi_loc.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/addfi_loc.F	(revision 5101)
@@ -6,6 +6,6 @@
      S          pdufi, pdvfi, pdhfi,pdqfi, pdpfi  )
       USE parallel_lmdz
-      USE infotrac, ONLY : nqtot
-      USE control_mod, ONLY : planet_type
+      USE infotrac, ONLY: nqtot
+      USE control_mod, ONLY: planet_type
       IMPLICIT NONE
 c
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/advect_new_loc.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/advect_new_loc.F	(revision 5100)
+++ 	(revision )
@@ -1,294 +1,0 @@
-
-! $Header$
-
-      SUBROUTINE advect_new_loc(ucov,vcov,teta,w,massebx,masseby,
-     &                        du,dv,dteta)
-      USE parallel_lmdz
-      USE write_field_loc
-      USE advect_new_mod
-      USE comconst_mod, ONLY: daysec
-      USE logic_mod, ONLY: conser
-      
-      IMPLICIT NONE
-c=======================================================================
-c
-c   Auteurs:  P. Le Van , Fr. Hourdin  .
-c   -------
-c
-c   Objet:
-c   ------
-c
-c   *************************************************************
-c   .... calcul des termes d'advection vertic.pour u,v,teta,q ...
-c   *************************************************************
-c        ces termes sont ajoutes a du,dv,dteta et dq .
-c  Modif F.Forget 03/94 : on retire q de advect
-c
-c=======================================================================
-c-----------------------------------------------------------------------
-c   Declarations:
-c   -------------
-
-      include "dimensions.h"
-      include "paramet.h"
-      include "comgeom.h"
-
-c   Arguments:
-c   ----------
-
-      REAL vcov(ijb_v:ije_v,llm),ucov(ijb_u:ije_u,llm)
-      REAL teta(ijb_u:ije_u,llm)
-      REAL massebx(ijb_u:ije_u,llm),masseby(ijb_v:ije_v,llm)
-      REAL w(ijb_u:ije_u,llm)
-      REAL dv(ijb_v:ije_v,llm),du(ijb_u:ije_u,llm)
-      REAL dteta(ijb_u:ije_u,llm)
-c   Local:
-c   ------
-
-      REAL wsur2(ijb_u:ije_u)
-      REAL unsaire2(ijb_u:ije_u), ge(ijb_u:ije_u)
-      REAL deuxjour, ww, gt, uu, vv
-
-      INTEGER  ij,l,ijb,ije
-      EXTERNAL  SSUM
-      REAL      SSUM
-
-
-
-c-----------------------------------------------------------------------
-c   2. Calculs preliminaires:
-c   -------------------------
-      
-      IF (conser.AND.1==0)  THEN
-         deuxjour = 2. * daysec
-
-         DO   ij   = 1, ip1jmp1
-         unsaire2(ij) = unsaire(ij) * unsaire(ij)
-      END DO
-      END IF
-
-
-c------------------  -yy ----------------------------------------------
-c   .  Calcul de     u
-
-c$OMP MASTER
-      ijb=ij_begin
-      ije=ij_end
-      if (pole_nord) ijb=ijb+iip1
-      if (pole_sud)  ije=ije-iip1
-
-      DO ij=ijb,ije
-        du2(ij,1)=0.
-        du1(ij,llm)=0.
-      ENDDO
-      
-      ijb=ij_begin
-      ije=ij_end
-      if (pole_sud)  ije=ij_end-iip1
-      
-      DO ij=ijb,ije
-        dv2(ij,1)=0.
-        dv1(ij,llm)=0.
-      ENDDO
-      
-      ijb=ij_begin
-      ije=ij_end
-
-      DO ij=ijb,ije
-        dteta2(ij,1)=0.
-        dteta1(ij,llm)=0.
-      ENDDO
-c$OMP END MASTER
-c$OMP BARRIER
- 
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)   
-      DO  l=1,llm
-         
-         ijb=ij_begin
-         ije=ij_end
-         if (pole_nord) ijb=ijb+iip1
-         if (pole_sud)  ije=ije-iip1
-         
-c         DO    ij     = iip2, ip1jmp1
-c            uav(ij,l) = 0.25 * ( ucov(ij,l) + ucov(ij-iip1,l) )
-c         ENDDO
-
-c         DO    ij     = iip2, ip1jm
-c            uav(ij,l) = uav(ij,l) + uav(ij+iip1,l)
-c         ENDDO
-         
-         DO    ij     = ijb, ije
-                  
-           uav(ij,l)=0.25*(ucov(ij,l)+ucov(ij-iip1,l))
-     .               +0.25*(ucov(ij+iip1,l)+ucov(ij,l))
-         ENDDO
-         
-         if (pole_nord) then
-           DO      ij         = 1, iip1
-              uav(ij      ,l) = 0.
-           ENDDO
-         endif
-         
-         if (pole_sud) then
-           DO      ij         = 1, iip1
-              uav(ip1jm+ij,l) = 0.
-           ENDDO
-         endif
-         
-      ENDDO
-c$OMP END DO      
-c      call write_field3d_p('uav',reshape(uav,(/iip1,jjp1,llm/)))
-      
-c------------------  -xx ----------------------------------------------
-c   .  Calcul de     v
-      
-      ijb=ij_begin
-      ije=ij_end
-      if (pole_sud)  ije=ij_end-iip1
-
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)      
-      DO  l=1,llm
-         
-         DO    ij   = ijb+1, ije
-           vav(ij,l) = 0.25 * ( vcov(ij,l) + vcov(ij-1,l) )
-         ENDDO
-         
-         DO    ij   = ijb,ije,iip1
-          vav(ij,l) = vav(ij+iim,l)
-         ENDDO
-         
-         
-         DO    ij   = ijb, ije-1
-          vav(ij,l) = vav(ij,l) + vav(ij+1,l)
-         ENDDO
-         
-         DO    ij       = ijb, ije, iip1
-          vav(ij+iim,l) = vav(ij,l)
-         ENDDO
-         
-      ENDDO
-c$OMP END DO
-c       call write_field3d_p('vav',reshape(vav,(/iip1,jjm,llm/)))
-
-c-----------------------------------------------------------------------
-c$OMP BARRIER
-
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
-      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 ij   = ijb, ije
-      wsur2( ij ) = - 0.5 * w( ij,l+1 )
-      END DO
-
-
-c     .....................     calcul pour  du     ..................
-      
-      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)
-      END DO
-
-c     .................    calcul pour   dv      .....................
-      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)
-      END DO
-
-c
-
-c     ............................................................
-c     ...............    calcul pour   dh      ...................
-c     ............................................................
-
-c                       ---z
-c       calcul de  - d( teta  * w )      qu'on ajoute a   dh
-c                   ...............
-        ijb=ij_begin
-        ije=ij_end
-        
-        DO ij = ijb, ije
-         ww            = wsur2(ij) * (teta(ij,l) + teta(ij,l+1) )
-         dteta1(ij, l ) =   ww
-         dteta2(ij,l+1) =   ww
-      END DO
-
-c ym ---> conser a voir plus tard
-
-c      IF( conser)  THEN
-c        
-c        DO 17 ij = 1,ip1jmp1
-c        ge(ij)   = wsur2(ij) * wsur2(ij) * unsaire2(ij)
-c  17    CONTINUE
-c        gt       = SSUM( ip1jmp1,ge,1 )
-c        gtot(l)  = deuxjour * SQRT( gt/ip1jmp1 )
-c      END IF
-
-      END DO
-c$OMP END DO
-
-      ijb=ij_begin
-      ije=ij_end
-      if (pole_nord) ijb=ijb+iip1
-      if (pole_sud)  ije=ije-iip1
-#ifdef DEBUG_IO    
-       CALL WriteField_u('du_bis',du)     
-#endif
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)       
-      DO l=1,llm
-        DO ij=ijb,ije-1
-	  du(ij,l)=du(ij,l)+du2(ij,l)-du1(ij,l)
-	ENDDO
-
-        DO   ij   = ijb+iip1-1, ije, iip1
-         du( ij, l  ) = du( ij -iim, l  )
-        ENDDO 
-      ENDDO
-c$OMP END DO NOWAIT
-#ifdef DEBUG_IO    
-      CALL WriteField_u('du1',du1)      
-      CALL WriteField_u('du2',du2)      
-      CALL WriteField_u('du_bis',du)      
-#endif
-      ijb=ij_begin
-      ije=ij_end
-      if (pole_sud)  ije=ij_end-iip1
-
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)      
-      DO l=1,llm
-        DO ij=ijb,ije
-	  dv(ij,l)=dv(ij,l)+dv2(ij,l)-dv1(ij,l)
-	ENDDO
-      ENDDO
-c$OMP END DO NOWAIT      
-      ijb=ij_begin
-      ije=ij_end
-
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)    
-      DO l=1,llm
-        DO ij=ijb,ije
-	  dteta(ij,l)=dteta(ij,l)+dteta2(ij,l)-dteta1(ij,l)
-	ENDDO
-      ENDDO
-c$OMP END DO NOWAIT      
-
-      RETURN
-      END
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/advect_new_loc.f90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/advect_new_loc.f90	(revision 5101)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/advect_new_loc.f90	(revision 5101)
@@ -0,0 +1,293 @@
+! $Header$
+
+SUBROUTINE advect_new_loc(ucov, vcov, teta, w, massebx, masseby, &
+        du, dv, dteta)
+  USE parallel_lmdz
+  USE write_field_loc
+  USE advect_new_mod
+  USE comconst_mod, ONLY: daysec
+  USE logic_mod, ONLY: conser
+  USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO
+
+  IMPLICIT NONE
+  !=======================================================================
+  !
+  !   Auteurs:  P. Le Van , Fr. Hourdin  .
+  !   -------
+  !
+  !   Objet:
+  !   ------
+  !
+  !   *************************************************************
+  !   .... calcul des termes d'advection vertic.pour u,v,teta,q ...
+  !   *************************************************************
+  !    ces termes sont ajoutes a du,dv,dteta et dq .
+  !  Modif F.Forget 03/94 : on retire q de advect
+  !
+  !=======================================================================
+  !-----------------------------------------------------------------------
+  !   Declarations:
+  !   -------------
+
+  include "dimensions.h"
+  include "paramet.h"
+  include "comgeom.h"
+
+  !   Arguments:
+  !   ----------
+
+  REAL :: vcov(ijb_v:ije_v, llm), ucov(ijb_u:ije_u, llm)
+  REAL :: teta(ijb_u:ije_u, llm)
+  REAL :: massebx(ijb_u:ije_u, llm), masseby(ijb_v:ije_v, llm)
+  REAL :: w(ijb_u:ije_u, llm)
+  REAL :: dv(ijb_v:ije_v, llm), du(ijb_u:ije_u, llm)
+  REAL :: dteta(ijb_u:ije_u, llm)
+  !   Local:
+  !   ------
+
+  REAL :: wsur2(ijb_u:ije_u)
+  REAL :: unsaire2(ijb_u:ije_u), ge(ijb_u:ije_u)
+  REAL :: deuxjour, ww, gt, uu, vv
+
+  INTEGER :: ij, l, ijb, ije
+  EXTERNAL  SSUM
+  REAL :: SSUM
+
+
+
+  !-----------------------------------------------------------------------
+  !   2. Calculs preliminaires:
+  !   -------------------------
+
+  IF (conser.AND.1==0)  THEN
+    deuxjour = 2. * daysec
+
+    DO   ij = 1, ip1jmp1
+      unsaire2(ij) = unsaire(ij) * unsaire(ij)
+    END DO
+  END IF
+
+
+  !------------------  -yy ----------------------------------------------
+  !   .  Calcul de     u
+
+  !$OMP MASTER
+  ijb = ij_begin
+  ije = ij_end
+  if (pole_nord) ijb = ijb + iip1
+  if (pole_sud)  ije = ije - iip1
+
+  DO ij = ijb, ije
+    du2(ij, 1) = 0.
+    du1(ij, llm) = 0.
+  ENDDO
+
+  ijb = ij_begin
+  ije = ij_end
+  if (pole_sud)  ije = ij_end - iip1
+
+  DO ij = ijb, ije
+    dv2(ij, 1) = 0.
+    dv1(ij, llm) = 0.
+  ENDDO
+
+  ijb = ij_begin
+  ije = ij_end
+
+  DO ij = ijb, ije
+    dteta2(ij, 1) = 0.
+    dteta1(ij, llm) = 0.
+  ENDDO
+  !$OMP END MASTER
+  !$OMP BARRIER
+
+  !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+  DO  l = 1, llm
+
+    ijb = ij_begin
+    ije = ij_end
+    if (pole_nord) ijb = ijb + iip1
+    if (pole_sud)  ije = ije - iip1
+
+    ! DO    ij     = iip2, ip1jmp1
+    !    uav(ij,l) = 0.25 * ( ucov(ij,l) + ucov(ij-iip1,l) )
+    ! ENDDO
+
+    ! DO    ij     = iip2, ip1jm
+    !    uav(ij,l) = uav(ij,l) + uav(ij+iip1,l)
+    ! ENDDO
+
+    DO    ij = ijb, ije
+
+      uav(ij, l) = 0.25 * (ucov(ij, l) + ucov(ij - iip1, l)) &
+              + 0.25 * (ucov(ij + iip1, l) + ucov(ij, l))
+    ENDDO
+
+    if (pole_nord) then
+      DO      ij = 1, iip1
+        uav(ij, l) = 0.
+      ENDDO
+    endif
+
+    if (pole_sud) then
+      DO      ij = 1, iip1
+        uav(ip1jm + ij, l) = 0.
+      ENDDO
+    endif
+
+  ENDDO
+  !$OMP END DO
+  ! CALL write_field3d_p('uav',reshape(uav,(/iip1,jjp1,llm/)))
+
+  !------------------  -xx ----------------------------------------------
+  !   .  Calcul de     v
+
+  ijb = ij_begin
+  ije = ij_end
+  if (pole_sud)  ije = ij_end - iip1
+
+  !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+  DO  l = 1, llm
+
+    DO    ij = ijb + 1, ije
+      vav(ij, l) = 0.25 * (vcov(ij, l) + vcov(ij - 1, l))
+    ENDDO
+
+    DO    ij = ijb, ije, iip1
+      vav(ij, l) = vav(ij + iim, l)
+    ENDDO
+
+    DO    ij = ijb, ije - 1
+      vav(ij, l) = vav(ij, l) + vav(ij + 1, l)
+    ENDDO
+
+    DO    ij = ijb, ije, iip1
+      vav(ij + iim, l) = vav(ij, l)
+    ENDDO
+
+  ENDDO
+  !$OMP END DO
+  ! CALL write_field3d_p('vav',reshape(vav,(/iip1,jjm,llm/)))
+
+  !-----------------------------------------------------------------------
+  !$OMP BARRIER
+
+  !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+  DO l = 1, llmm1
+
+
+    ! ......   calcul de  - w/2.    au niveau  l+1   .......
+    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)
+    END DO
+
+
+    ! .....................     calcul pour  du     ..................
+
+    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)
+    END DO
+
+    ! .................    calcul pour   dv      .....................
+    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)
+    END DO
+
+    !
+
+    ! ............................................................
+    ! ...............    calcul pour   dh      ...................
+    ! ............................................................
+
+    !                   ---z
+    !   calcul de  - d( teta  * w )      qu'on ajoute a   dh
+    !               ...............
+    ijb = ij_begin
+    ije = ij_end
+
+    DO ij = ijb, ije
+      ww = wsur2(ij) * (teta(ij, l) + teta(ij, l + 1))
+      dteta1(ij, l) = ww
+      dteta2(ij, l + 1) = ww
+    END DO
+
+    ! ym ---> conser a voir plus tard
+
+    ! 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
+
+  END DO
+  !$OMP END DO
+
+  ijb = ij_begin
+  ije = ij_end
+  if (pole_nord) ijb = ijb + iip1
+  if (pole_sud)  ije = ije - iip1
+  IF (CPPKEY_DEBUGIO) THEN
+    CALL WriteField_u('du_bis', du)
+  END IF
+  !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+  DO l = 1, llm
+    DO ij = ijb, ije - 1
+      du(ij, l) = du(ij, l) + du2(ij, l) - du1(ij, l)
+    ENDDO
+
+    DO   ij = ijb + iip1 - 1, ije, iip1
+      du(ij, l) = du(ij - iim, l)
+    ENDDO
+  ENDDO
+  !$OMP END DO NOWAIT
+  IF (CPPKEY_DEBUGIO) THEN
+    CALL WriteField_u('du1', du1)
+    CALL WriteField_u('du2', du2)
+    CALL WriteField_u('du_bis', du)
+  END IF
+  ijb = ij_begin
+  ije = ij_end
+  if (pole_sud)  ije = ij_end - iip1
+
+  !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+  DO l = 1, llm
+    DO ij = ijb, ije
+      dv(ij, l) = dv(ij, l) + dv2(ij, l) - dv1(ij, l)
+    ENDDO
+  ENDDO
+  !$OMP END DO NOWAIT
+  ijb = ij_begin
+  ije = ij_end
+
+  !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+  DO l = 1, llm
+    DO ij = ijb, ije
+      dteta(ij, l) = dteta(ij, l) + dteta2(ij, l) - dteta1(ij, l)
+    ENDDO
+  ENDDO
+  !$OMP END DO NOWAIT
+
+  RETURN
+END SUBROUTINE advect_new_loc
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/advtrac_loc.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/advtrac_loc.F90	(revision 5100)
+++ 	(revision )
@@ -1,290 +1,0 @@
-
-#define DEBUG_IO
-#undef DEBUG_IO
-SUBROUTINE advtrac_loc(pbarug, pbarvg, wg, p, massem, q, teta, pk)
-   !     Auteur :  F. Hourdin
-
-   !     Modif. P. Le Van     (20/12/97)
-   !            F. Codron     (10/99)
-   !            D. Le Croller (07/2001)
-   !            M.A Filiberti (04/2002)
-
-   USE infotrac,     ONLY: nqtot, tracers
-   USE control_mod,  ONLY: iapp_tracvl, day_step, planet_type
-   USE comconst_mod, ONLY: dtvr
-   USE parallel_lmdz
-   USE Write_Field_loc
-   USE Write_Field
-   USE Bands
-   USE mod_hallo
-   USE Vampir
-   USE times
-   USE advtrac_mod, ONLY: finmasse
-
-   IMPLICIT NONE
-
-   include "dimensions.h"
-   include "paramet.h"
-   include "comdissip.h"
-   include "comgeom2.h"
-   include "description.h"
-!   include "iniprint.h"
-
-   !---------------------------------------------------------------------------
-   !     Arguments
-   !---------------------------------------------------------------------------
-   REAL, INTENT(IN) ::  pbarug(ijb_u:ije_u,llm)
-   REAL, INTENT(IN) ::  pbarvg(ijb_v:ije_v,llm)
-   REAL, INTENT(IN) ::      wg(ijb_u:ije_u,llm)
-   REAL, INTENT(IN) ::       p(ijb_u:ije_u,llmp1)
-   REAL, INTENT(IN) ::  massem(ijb_u:ije_u,llm)
-   REAL, INTENT(INOUT) ::    q(ijb_u:ije_u,llm,nqtot)
-   REAL, INTENT(IN) ::    teta(ijb_u:ije_u,llm)
-   REAL, INTENT(IN) ::      pk(ijb_u:ije_u,llm)
-   !---------------------------------------------------------------------------
-   !     Ajout PPM
-   !---------------------------------------------------------------------------
-   REAL :: massebx(ijb_u:ije_u,llm), masseby(ijb_v:ije_v,llm)
-   !---------------------------------------------------------------------------
-   !     Variables locales
-   !---------------------------------------------------------------------------
-   INTEGER :: ij, l, iq, iadv
-   REAL(KIND=KIND(1.d0)) :: t_initial, t_final, tps_cpu
-   REAL :: zdp(ijb_u:ije_u), zdpmin, zdpmax
-   INTEGER, SAVE :: iadvtr=0
-!$OMP THREADPRIVATE(iadvtr)
-   EXTERNAL  minmax
-
-   !---------------------------------------------------------------------------
-   !     Rajouts pour PPM
-   !---------------------------------------------------------------------------
-   INTEGER :: indice, n
-   REAL :: dtbon                       ! Pas de temps adaptatif pour que CFL<1
-   REAL :: CFLmaxz, aaa, bbb           ! CFL maximum
-   REAL, DIMENSION(iim,jjb_u:jje_u,llm) :: unatppm, vnatppm, fluxwppm
-   REAL ::    qppm(iim*jjnb_u,llm,nqtot)
-   REAL ::   psppm(iim,jjb_u:jje_u)    ! pression  au sol
-   REAL, DIMENSION(llmp1) :: apppm, bpppm
-   LOGICAL, SAVE :: dum=.TRUE., fill=.TRUE.
-   INTEGER :: ijb, ije, ijbu, ijbv, ijeu, ijev, j
-   TYPE(Request),SAVE :: testRequest
-!$OMP THREADPRIVATE(testRequest)
-
-! Test sur l'eventuelle creation de valeurs negatives de la masse
-   ijb = ij_begin; IF(pole_nord) ijb = ij_begin+iip1
-   ije = ij_end;   IF(pole_sud)  ije = ij_end-iip1
-
-!$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
-   DO l=1,llm-1
-      DO ij = ijb+1,ije
-         zdp(ij) = pbarug(ij-1,l)    - pbarug(ij,l) &
-                 - pbarvg(ij-iip1,l) + pbarvg(ij,l) &
-                 +     wg(ij,l+1)    -     wg(ij,l)
-      END DO
-! ym  ---> pourquoi jjm-1 et non jjm ? a cause du pole ?
-!     CALL SCOPY( jjm -1 ,zdp(iip1+iip1),iip1,zdp(iip2),iip1 )
-      DO ij = ijb,ije-iip1+1,iip1
-         zdp(ij)=zdp(ij+iip1-1)
-      END DO
-      DO ij = ijb,ije
-         zdp(ij)= zdp(ij)*dtvr/ massem(ij,l) 
-      END DO 
-!     CALL minmax ( ip1jm-iip1, zdp(iip2), zdpmin,zdpmax )
-! ym ---> eventuellement a revoir
-      CALL minmax( ije-ijb+1, zdp(ijb), zdpmin,zdpmax )
-      IF(MAX(ABS(zdpmin),ABS(zdpmax)) >0.5) &
-         WRITE(*,*)'WARNING DP/P l=',l,'  MIN:',zdpmin,'   MAX:', zdpmax
-   END DO
-!$OMP END DO NOWAIT
-
-   !---------------------------------------------------------------------------
-   !   Advection proprement dite (Modification Le Croller (07/2001)
-   !---------------------------------------------------------------------------
-
-   !---------------------------------------------------------------------------
-   !   Calcul des moyennes basees sur la masse
-   !---------------------------------------------------------------------------
-!ym   CALL massbar_p(massem,massebx,masseby)
-!ym   ----> Normalement, inutile pour les schemas classiques
-!ym   ----> Reverifier lors de la parallelisation des autres schemas
-
-#ifdef DEBUG_IO    
-   CALL WriteField_u('massem',massem)
-   CALL WriteField_u('wg',wg)
-   CALL WriteField_u('pbarug',pbarug)
-   CALL WriteField_v('pbarvg',pbarvg)
-   CALL WriteField_u('p_tmp',p)
-   CALL WriteField_u('pk_tmp',pk)
-   CALL WriteField_u('teta_tmp',teta)
-   DO iq=1,nqtot
-      CALL WriteField_u('q_adv'//trim(int2str(iq)),q(:,:,iq))
-   END DO
-#endif
-
-!  CALL Register_Hallo_v(pbarvg,llm,1,1,1,1,TestRequest)
-!  CALL SendRequest(TestRequest)
-!!$OMP BARRIER
-!  CALL WaitRequest(TestRequest)
-!$OMP BARRIER
-
-!  WRITE(*,*) 'advtrac 157: appel de vlspltgen_loc'
-   CALL vlspltgen_loc(q, 2., massem, wg, pbarug, pbarvg, dtvr, p, pk, teta )
-
-#ifdef DEBUG_IO     
-   DO iq = 1, nqtot
-      CALL WriteField_u('q_adv'//trim(int2str(iq)),q(:,:,iq))
-   END DO
-#endif
-         
-   GOTO 1234     
-   !-------------------------------------------------------------------------
-   !       Appel des sous programmes d'advection
-   !-------------------------------------------------------------------------
-   DO iq = 1, nqtot
-!     CALL clock(t_initial)
-      IF(tracers(iq)%parent /= 'air') CYCLE
-      iadv = tracers(iq)%iadv
-      !-----------------------------------------------------------------------
-      SELECT CASE(iadv)
-      !-----------------------------------------------------------------------
-         CASE(0); CYCLE
-         !--------------------------------------------------------------------
-         CASE(10)  !--- Schema de Van Leer I MUSCL
-         !--------------------------------------------------------------------
-!           WRITE(*,*) 'advtrac 239: iq,q(1721,19,:)=',iq,q(1721,19,:)     
-!LF         CALL vlsplt_p(q(1,1,iq),2.,massem,wg,pbarug,pbarvg,dtvr)
-
-         !--------------------------------------------------------------------
-         CASE(14)  !--- Schema "pseuDO amont" + test sur humidite specifique
-                   !--- pour la vapeur d'eau. F. Codron
-         !--------------------------------------------------------------------
-!           WRITE(*,*) 'advtrac 248: iq,q(1721,19,:)=',iq,q(1721,19,:)
-            CALL abort_gcm("advtrac","appel a vlspltqs :schema non parallelise",1)
-!LF         CALL vlspltqs_p(q(1,1,1),2.,massem,wg,pbarug,pbarvg,dtvr,p,pk,teta )
-
-         !--------------------------------------------------------------------
-         CASE(12)  !--- Schema de Frederic Hourdin
-         !--------------------------------------------------------------------
-            CALL abort_gcm("advtrac","appel a vlspltqs :schema non parallelise",1)
-            CALL adaptdt(iadv,dtbon,n,pbarug,massem)   ! pas de temps adaptatif
-            IF(n > 1) WRITE(*,*) 'WARNING horizontal dt=',dtbon,'dtvr=',dtvr,'n=',n
-            DO indice=1,n
-              CALL advn(q(1,1,iq),massem,wg,pbarug,pbarvg,dtbon,1)
-            END DO
-
-         !--------------------------------------------------------------------
-         CASE(13)  !--- Pas de temps adaptatif
-         !--------------------------------------------------------------------
-            CALL abort_gcm("advtrac","schema non parallelise",1)
-            CALL adaptdt(iadv,dtbon,n,pbarug,massem)
-            IF(n > 1) WRITE(*,*) 'WARNING horizontal dt=',dtbon,'dtvr=',dtvr,'n=',n
-            DO indice=1,n
-               CALL advn(q(1,1,iq),massem,wg,pbarug,pbarvg,dtbon,2)
-            END DO
-
-         !--------------------------------------------------------------------
-         CASE(20)  !--- Schema de pente SLOPES
-         !--------------------------------------------------------------------
-            CALL abort_gcm("advtrac","schema SLOPES non parallelise",1)
-            CALL pentes_ini (q(1,1,iq),wg,massem,pbarug,pbarvg,0)
-
-         !--------------------------------------------------------------------
-         CASE(30)  !--- Schema de Prather
-         !--------------------------------------------------------------------
-            CALL abort_gcm("advtrac","schema prather non parallelise",1)
-            ! Pas de temps adaptatif
-            CALL adaptdt(iadv,dtbon,n,pbarug,massem)
-            IF(n > 1) WRITE(*,*) 'WARNING horizontal dt=',dtbon,'dtvr=',dtvr,'n=',n
-            CALL prather(q(1,1,iq),wg,massem,pbarug,pbarvg,n,dtbon)
-
-         !--------------------------------------------------------------------
-         CASE(11,16,17,18)   !--- Schemas PPM Lin et Rood
-         !--------------------------------------------------------------------
-            CALL abort_gcm("advtrac","schema PPM non parallelise",1)
-            ! Test sur le flux horizontal
-            CALL adaptdt(iadv,dtbon,n,pbarug,massem)   ! pas de temps adaptatif
-            IF(n > 1) WRITE(*,*) 'WARNING horizontal dt=',dtbon,'dtvr=',dtvr,'n=',n
-            ! Test sur le flux vertical
-            CFLmaxz=0.
-            DO l=2,llm
-               DO ij=iip2,ip1jm
-                  aaa=wg(ij,l)*dtvr/massem(ij,l)
-                  CFLmaxz=max(CFLmaxz,aaa)
-                  bbb=-wg(ij,l)*dtvr/massem(ij,l-1)
-                  CFLmaxz=max(CFLmaxz,bbb)
-               END DO
-            END DO
-            IF(CFLmaxz>=1) WRITE(*,*) 'WARNING vertical','CFLmaxz=', CFLmaxz
-            !----------------------------------------------------------------
-            !     Ss-prg interface LMDZ.4->PPM3d (ss-prg de Lin)
-            !----------------------------------------------------------------
-            CALL interpre(q(1,1,iq),qppm(1,1,iq),wg,fluxwppm,massem, &
-                 apppm,bpppm,massebx,masseby,pbarug,pbarvg, &
-                 unatppm,vnatppm,psppm)
-
-            !----------------------------------------------------------------
-            DO indice=1,n     !--- VL (version PPM) horiz. et PPM vert.
-            !----------------------------------------------------------------
-               SELECT CASE(iadv)
-                  !----------------------------------------------------------
-                  CASE(11)
-                  !----------------------------------------------------------
-                     CALL ppm3d(1,qppm(1,1,iq),psppm,psppm,unatppm,vnatppm,fluxwppm,dtbon, &
-                                2,2,2,1,iim,jjp1,2,llm,apppm,bpppm,0.01,6400000,fill,dum,220.)
-                  !----------------------------------------------------------
-                  CASE(16) !--- Monotonic PPM
-                  !----------------------------------------------------------
-                     CALL ppm3d(1,qppm(1,1,iq),psppm,psppm,unatppm,vnatppm,fluxwppm,dtbon, &
-                                3,3,3,1,iim,jjp1,2,llm,apppm,bpppm,0.01,6400000,fill,dum,220.)
-                  !----------------------------------------------------------
-                  CASE(17) !--- Semi monotonic PPM
-                  !----------------------------------------------------------
-                     CALL ppm3d(1,qppm(1,1,iq),psppm,psppm,unatppm,vnatppm,fluxwppm,dtbon, &
-                                4,4,4,1,iim,jjp1,2,llm,apppm,bpppm,0.01,6400000, fill,dum,220.)
-                  !----------------------------------------------------------
-                  CASE(18) !--- Positive Definite PPM
-                  !----------------------------------------------------------
-                     CALL ppm3d(1,qppm(1,1,iq),psppm,psppm,unatppm,vnatppm,fluxwppm,dtbon, &
-                                5,5,5,1,iim,jjp1,2,llm,apppm,bpppm,0.01,6400000,fill,dum,220.)
-               END SELECT
-            !----------------------------------------------------------------
-            END DO
-            !----------------------------------------------------------------
-            !     Ss-prg interface PPM3d-LMDZ.4
-            !----------------------------------------------------------------
-            CALL interpost(q(1,1,iq),qppm(1,1,iq))
-      !----------------------------------------------------------------------
-      END SELECT
-      !----------------------------------------------------------------------
-
-      !----------------------------------------------------------------------
-      ! On impose une seule valeur du traceur au pole Sud j=jjm+1=jjp1 et Nord j=1
-      !----------------------------------------------------------------------
-      !  CALL traceurpole(q(1,1,iq),massem)
-
-      !--- Calcul du temps cpu pour un schema donne
-      !  CALL clock(t_final)
-      !ym  tps_cpu=t_final-t_initial
-      !ym  cpuadv(iq)=cpuadv(iq)+tps_cpu
-
-   END DO
-
-1234 CONTINUE
-!$OMP BARRIER
-   IF(planet_type=="earth") THEN
-      ijb=ij_begin
-      ije=ij_end
-!$OMP DO SCHEDULE(STATIC,OMP_CHUNK)      
-      DO l = 1, llm
-         DO ij = ijb, ije
-            finmasse(ij,l) =  p(ij,l) - p(ij,l+1) 
-         END DO
-      END DO
-!$OMP END DO
-
-      CALL qminimum_loc( q, nqtot, finmasse )
-
-   END IF ! of if (planet_type=="earth")
-
-END SUBROUTINE advtrac_loc
-
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/advtrac_loc.f90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/advtrac_loc.f90	(revision 5101)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/advtrac_loc.f90	(revision 5101)
@@ -0,0 +1,288 @@
+SUBROUTINE advtrac_loc(pbarug, pbarvg, wg, p, massem, q, teta, pk)
+  !     Auteur :  F. Hourdin
+
+  !     Modif. P. Le Van     (20/12/97)
+  !            F. Codron     (10/99)
+  !            D. Le Croller (07/2001)
+  !            M.A Filiberti (04/2002)
+
+  USE infotrac, ONLY: nqtot, tracers
+  USE control_mod, ONLY: iapp_tracvl, day_step, planet_type
+  USE comconst_mod, ONLY: dtvr
+  USE parallel_lmdz
+  USE Write_Field_loc
+  USE Write_Field
+  USE Bands
+  USE mod_hallo
+  USE Vampir
+  USE times
+  USE advtrac_mod, ONLY: finmasse
+  USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO
+
+  IMPLICIT NONE
+
+  include "dimensions.h"
+  include "paramet.h"
+  include "comdissip.h"
+  include "comgeom2.h"
+  include "description.h"
+  !   include "iniprint.h"
+
+  !---------------------------------------------------------------------------
+  !     Arguments
+  !---------------------------------------------------------------------------
+  REAL, INTENT(IN) :: pbarug(ijb_u:ije_u, llm)
+  REAL, INTENT(IN) :: pbarvg(ijb_v:ije_v, llm)
+  REAL, INTENT(IN) :: wg(ijb_u:ije_u, llm)
+  REAL, INTENT(IN) :: p(ijb_u:ije_u, llmp1)
+  REAL, INTENT(IN) :: massem(ijb_u:ije_u, llm)
+  REAL, INTENT(INOUT) :: q(ijb_u:ije_u, llm, nqtot)
+  REAL, INTENT(IN) :: teta(ijb_u:ije_u, llm)
+  REAL, INTENT(IN) :: pk(ijb_u:ije_u, llm)
+  !---------------------------------------------------------------------------
+  !     Ajout PPM
+  !---------------------------------------------------------------------------
+  REAL :: massebx(ijb_u:ije_u, llm), masseby(ijb_v:ije_v, llm)
+  !---------------------------------------------------------------------------
+  !     Variables locales
+  !---------------------------------------------------------------------------
+  INTEGER :: ij, l, iq, iadv
+  REAL(KIND = KIND(1.d0)) :: t_initial, t_final, tps_cpu
+  REAL :: zdp(ijb_u:ije_u), zdpmin, zdpmax
+  INTEGER, SAVE :: iadvtr = 0
+  !$OMP THREADPRIVATE(iadvtr)
+  EXTERNAL  minmax
+
+  !---------------------------------------------------------------------------
+  !     Rajouts pour PPM
+  !---------------------------------------------------------------------------
+  INTEGER :: indice, n
+  REAL :: dtbon                       ! Pas de temps adaptatif pour que CFL<1
+  REAL :: CFLmaxz, aaa, bbb           ! CFL maximum
+  REAL, DIMENSION(iim, jjb_u:jje_u, llm) :: unatppm, vnatppm, fluxwppm
+  REAL :: qppm(iim * jjnb_u, llm, nqtot)
+  REAL :: psppm(iim, jjb_u:jje_u)    ! pression  au sol
+  REAL, DIMENSION(llmp1) :: apppm, bpppm
+  LOGICAL, SAVE :: dum = .TRUE., fill = .TRUE.
+  INTEGER :: ijb, ije, ijbu, ijbv, ijeu, ijev, j
+  TYPE(Request), SAVE :: testRequest
+  !$OMP THREADPRIVATE(testRequest)
+
+  ! Test sur l'eventuelle creation de valeurs negatives de la masse
+  ijb = ij_begin; IF(pole_nord) ijb = ij_begin + iip1
+  ije = ij_end;   IF(pole_sud)  ije = ij_end - iip1
+
+  !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+  DO l = 1, llm - 1
+    DO ij = ijb + 1, ije
+      zdp(ij) = pbarug(ij - 1, l) - pbarug(ij, l) &
+              - pbarvg(ij - iip1, l) + pbarvg(ij, l) &
+              + wg(ij, l + 1) - wg(ij, l)
+    END DO
+    ! ym  ---> pourquoi jjm-1 et non jjm ? a cause du pole ?
+    !     CALL SCOPY( jjm -1 ,zdp(iip1+iip1),iip1,zdp(iip2),iip1 )
+    DO ij = ijb, ije - iip1 + 1, iip1
+      zdp(ij) = zdp(ij + iip1 - 1)
+    END DO
+    DO ij = ijb, ije
+      zdp(ij) = zdp(ij) * dtvr / massem(ij, l)
+    END DO
+    !     CALL minmax ( ip1jm-iip1, zdp(iip2), zdpmin,zdpmax )
+    ! ym ---> eventuellement a revoir
+    CALL minmax(ije - ijb + 1, zdp(ijb), zdpmin, zdpmax)
+    IF(MAX(ABS(zdpmin), ABS(zdpmax)) >0.5) &
+            WRITE(*, *)'WARNING DP/P l=', l, '  MIN:', zdpmin, '   MAX:', zdpmax
+  END DO
+  !$OMP END DO NOWAIT
+
+  !---------------------------------------------------------------------------
+  !   Advection proprement dite (Modification Le Croller (07/2001)
+  !---------------------------------------------------------------------------
+
+  !---------------------------------------------------------------------------
+  !   Calcul des moyennes basees sur la masse
+  !---------------------------------------------------------------------------
+  !ym   CALL massbar_p(massem,massebx,masseby)
+  !ym   ----> Normalement, inutile pour les schemas classiques
+  !ym   ----> Reverifier lors de la parallelisation des autres schemas
+
+  IF (CPPKEY_DEBUGIO) THEN
+    CALL WriteField_u('massem', massem)
+    CALL WriteField_u('wg', wg)
+    CALL WriteField_u('pbarug', pbarug)
+    CALL WriteField_v('pbarvg', pbarvg)
+    CALL WriteField_u('p_tmp', p)
+    CALL WriteField_u('pk_tmp', pk)
+    CALL WriteField_u('teta_tmp', teta)
+    DO iq = 1, nqtot
+      CALL WriteField_u('q_adv' // trim(int2str(iq)), q(:, :, iq))
+    END DO
+  END IF
+
+  !  CALL Register_Hallo_v(pbarvg,llm,1,1,1,1,TestRequest)
+  !  CALL SendRequest(TestRequest)
+  !!$OMP BARRIER
+  !  CALL WaitRequest(TestRequest)
+  !$OMP BARRIER
+
+  !  WRITE(*,*) 'advtrac 157: appel de vlspltgen_loc'
+  CALL vlspltgen_loc(q, 2., massem, wg, pbarug, pbarvg, dtvr, p, pk, teta)
+
+  IF (CPPKEY_DEBUGIO) THEN
+    DO iq = 1, nqtot
+      CALL WriteField_u('q_adv' // trim(int2str(iq)), q(:, :, iq))
+    END DO
+  END IF
+
+  GOTO 1234
+  !-------------------------------------------------------------------------
+  !       Appel des sous programmes d'advection
+  !-------------------------------------------------------------------------
+  DO iq = 1, nqtot
+    !     CALL clock(t_initial)
+    IF(tracers(iq)%parent /= 'air') CYCLE
+    iadv = tracers(iq)%iadv
+    !-----------------------------------------------------------------------
+    SELECT CASE(iadv)
+      !-----------------------------------------------------------------------
+    CASE(0); CYCLE
+    !--------------------------------------------------------------------
+    CASE(10)  !--- Schema de Van Leer I MUSCL
+      !--------------------------------------------------------------------
+      !           WRITE(*,*) 'advtrac 239: iq,q(1721,19,:)=',iq,q(1721,19,:)
+      !LF         CALL vlsplt_p(q(1,1,iq),2.,massem,wg,pbarug,pbarvg,dtvr)
+
+      !--------------------------------------------------------------------
+    CASE(14)  !--- Schema "pseuDO amont" + test sur humidite specifique
+      !--- pour la vapeur d'eau. F. Codron
+      !--------------------------------------------------------------------
+      !           WRITE(*,*) 'advtrac 248: iq,q(1721,19,:)=',iq,q(1721,19,:)
+      CALL abort_gcm("advtrac", "appel a vlspltqs :schema non parallelise", 1)
+      !LF         CALL vlspltqs_p(q(1,1,1),2.,massem,wg,pbarug,pbarvg,dtvr,p,pk,teta )
+
+      !--------------------------------------------------------------------
+    CASE(12)  !--- Schema de Frederic Hourdin
+      !--------------------------------------------------------------------
+      CALL abort_gcm("advtrac", "appel a vlspltqs :schema non parallelise", 1)
+      CALL adaptdt(iadv, dtbon, n, pbarug, massem)   ! pas de temps adaptatif
+      IF(n > 1) WRITE(*, *) 'WARNING horizontal dt=', dtbon, 'dtvr=', dtvr, 'n=', n
+      DO indice = 1, n
+        CALL advn(q(1, 1, iq), massem, wg, pbarug, pbarvg, dtbon, 1)
+      END DO
+
+      !--------------------------------------------------------------------
+    CASE(13)  !--- Pas de temps adaptatif
+      !--------------------------------------------------------------------
+      CALL abort_gcm("advtrac", "schema non parallelise", 1)
+      CALL adaptdt(iadv, dtbon, n, pbarug, massem)
+      IF(n > 1) WRITE(*, *) 'WARNING horizontal dt=', dtbon, 'dtvr=', dtvr, 'n=', n
+      DO indice = 1, n
+        CALL advn(q(1, 1, iq), massem, wg, pbarug, pbarvg, dtbon, 2)
+      END DO
+
+      !--------------------------------------------------------------------
+    CASE(20)  !--- Schema de pente SLOPES
+      !--------------------------------------------------------------------
+      CALL abort_gcm("advtrac", "schema SLOPES non parallelise", 1)
+      CALL pentes_ini (q(1, 1, iq), wg, massem, pbarug, pbarvg, 0)
+
+      !--------------------------------------------------------------------
+    CASE(30)  !--- Schema de Prather
+      !--------------------------------------------------------------------
+      CALL abort_gcm("advtrac", "schema prather non parallelise", 1)
+      ! Pas de temps adaptatif
+      CALL adaptdt(iadv, dtbon, n, pbarug, massem)
+      IF(n > 1) WRITE(*, *) 'WARNING horizontal dt=', dtbon, 'dtvr=', dtvr, 'n=', n
+      CALL prather(q(1, 1, iq), wg, massem, pbarug, pbarvg, n, dtbon)
+
+      !--------------------------------------------------------------------
+    CASE(11, 16, 17, 18)   !--- Schemas PPM Lin et Rood
+      !--------------------------------------------------------------------
+      CALL abort_gcm("advtrac", "schema PPM non parallelise", 1)
+      ! Test sur le flux horizontal
+      CALL adaptdt(iadv, dtbon, n, pbarug, massem)   ! pas de temps adaptatif
+      IF(n > 1) WRITE(*, *) 'WARNING horizontal dt=', dtbon, 'dtvr=', dtvr, 'n=', n
+      ! Test sur le flux vertical
+      CFLmaxz = 0.
+      DO l = 2, llm
+        DO ij = iip2, ip1jm
+          aaa = wg(ij, l) * dtvr / massem(ij, l)
+          CFLmaxz = max(CFLmaxz, aaa)
+          bbb = -wg(ij, l) * dtvr / massem(ij, l - 1)
+          CFLmaxz = max(CFLmaxz, bbb)
+        END DO
+      END DO
+      IF(CFLmaxz>=1) WRITE(*, *) 'WARNING vertical', 'CFLmaxz=', CFLmaxz
+      !----------------------------------------------------------------
+      !     Ss-prg interface LMDZ.4->PPM3d (ss-prg de Lin)
+      !----------------------------------------------------------------
+      CALL interpre(q(1, 1, iq), qppm(1, 1, iq), wg, fluxwppm, massem, &
+              apppm, bpppm, massebx, masseby, pbarug, pbarvg, &
+              unatppm, vnatppm, psppm)
+
+      !----------------------------------------------------------------
+      DO indice = 1, n     !--- VL (version PPM) horiz. et PPM vert.
+        !----------------------------------------------------------------
+        SELECT CASE(iadv)
+          !----------------------------------------------------------
+        CASE(11)
+          !----------------------------------------------------------
+          CALL ppm3d(1, qppm(1, 1, iq), psppm, psppm, unatppm, vnatppm, fluxwppm, dtbon, &
+                  2, 2, 2, 1, iim, jjp1, 2, llm, apppm, bpppm, 0.01, 6400000, fill, dum, 220.)
+          !----------------------------------------------------------
+        CASE(16) !--- Monotonic PPM
+          !----------------------------------------------------------
+          CALL ppm3d(1, qppm(1, 1, iq), psppm, psppm, unatppm, vnatppm, fluxwppm, dtbon, &
+                  3, 3, 3, 1, iim, jjp1, 2, llm, apppm, bpppm, 0.01, 6400000, fill, dum, 220.)
+          !----------------------------------------------------------
+        CASE(17) !--- Semi monotonic PPM
+          !----------------------------------------------------------
+          CALL ppm3d(1, qppm(1, 1, iq), psppm, psppm, unatppm, vnatppm, fluxwppm, dtbon, &
+                  4, 4, 4, 1, iim, jjp1, 2, llm, apppm, bpppm, 0.01, 6400000, fill, dum, 220.)
+          !----------------------------------------------------------
+        CASE(18) !--- Positive Definite PPM
+          !----------------------------------------------------------
+          CALL ppm3d(1, qppm(1, 1, iq), psppm, psppm, unatppm, vnatppm, fluxwppm, dtbon, &
+                  5, 5, 5, 1, iim, jjp1, 2, llm, apppm, bpppm, 0.01, 6400000, fill, dum, 220.)
+        END SELECT
+        !----------------------------------------------------------------
+      END DO
+      !----------------------------------------------------------------
+      !     Ss-prg interface PPM3d-LMDZ.4
+      !----------------------------------------------------------------
+      CALL interpost(q(1, 1, iq), qppm(1, 1, iq))
+      !----------------------------------------------------------------------
+    END SELECT
+    !----------------------------------------------------------------------
+
+    !----------------------------------------------------------------------
+    ! On impose une seule valeur du traceur au pole Sud j=jjm+1=jjp1 et Nord j=1
+    !----------------------------------------------------------------------
+    !  CALL traceurpole(q(1,1,iq),massem)
+
+    !--- Calcul du temps cpu pour un schema donne
+    !  CALL clock(t_final)
+    !ym  tps_cpu=t_final-t_initial
+    !ym  cpuadv(iq)=cpuadv(iq)+tps_cpu
+
+  END DO
+
+  1234 CONTINUE
+  !$OMP BARRIER
+  IF(planet_type=="earth") THEN
+    ijb = ij_begin
+    ije = ij_end
+    !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+    DO l = 1, llm
+      DO ij = ijb, ije
+        finmasse(ij, l) = p(ij, l) - p(ij, l + 1)
+      END DO
+    END DO
+    !$OMP END DO
+
+    CALL qminimum_loc(q, nqtot, finmasse)
+
+  END IF ! of if (planet_type=="earth")
+
+END SUBROUTINE advtrac_loc
+
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/bands.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/bands.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/bands.F90	(revision 5101)
@@ -51,5 +51,5 @@
       integer :: ierr
     
-      call AllocateBands
+      CALL AllocateBands
       write(siim,'(i3)') iim
       write(sjjm,'(i3)') jjm
@@ -192,5 +192,5 @@
         
   
-      call allgather_timer_average
+      CALL allgather_timer_average
 
       do i=0,mpi_size-1
@@ -259,5 +259,5 @@
         
   
-      call allgather_timer_average
+      CALL allgather_timer_average
 
       do i=0,mpi_size-1
@@ -328,5 +328,5 @@
         
   
-      call allgather_timer_average
+      CALL allgather_timer_average
 
       do i=0,mpi_size-1
@@ -384,5 +384,5 @@
       ! Ehouarn: what follows is only related to // physics
       USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_PHYS
-      USE mod_phys_lmdz_para, only : klon_mpi_para_nb
+      USE mod_phys_lmdz_para, ONLY: klon_mpi_para_nb
 
       USE parallel_lmdz
@@ -399,5 +399,5 @@
         
   
-      call allgather_timer_average
+      CALL allgather_timer_average
       
       medium=0
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/bilan_dyn_loc.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/bilan_dyn_loc.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/bilan_dyn_loc.F	(revision 5101)
@@ -280,8 +280,8 @@
       dhe=(/ 0 /)
 
-      call flio_dom_set(mpi_size,mpi_rank,ddid,dsg,dsl,dpf,dpl,dhs,dhe, 
+      CALL flio_dom_set(mpi_size,mpi_rank,ddid,dsg,dsl,dpf,dpl,dhs,dhe,
      .                 'box',bilan_dyn_domain_id)
        
-      call histbeg(trim(infile),
+      CALL histbeg(trim(infile),
      .             1, rlong, jjn, rlatg(jjb:jje),
      .             1, 1, 1, jjn,
@@ -292,5 +292,5 @@
 C  Appel a histvert pour la grille verticale
 C
-      call histvert(fileid, 'presnivs', 'Niveaux sigma','mb',
+      CALL histvert(fileid, 'presnivs', 'Niveaux sigma','mb',
      .              llm, presnivs, zvertiid)
 C
@@ -317,5 +317,5 @@
      . WRITE(lunout,*)'var ',itr,iQ
      .      ,znom(itr,iQ),znoml(itr,iQ),zunites(itr,iQ)
-            call histdef(fileid,znom(itr,iQ),znoml(itr,iQ),
+            CALL histdef(fileid,znom(itr,iQ),znoml(itr,iQ),
      .        zunites(itr,iQ),1,jjn,thoriid,llm,1,llm,zvertiid,
      .        32,'ave(X)',dt_cum,dt_cum)
@@ -323,5 +323,5 @@
 c   Declarations pour les fonctions de courant
 c      print*,'2HISTDEF'
-          call histdef(fileid,'psi'//nom(iQ)
+          CALL histdef(fileid,'psi'//nom(iQ)
      .      ,'stream fn. '//znoml(itot,iQ),
      .      zunites(itot,iQ),1,jjn,thoriid,llm,1,llm,zvertiid,
@@ -332,13 +332,13 @@
 c   Declarations pour les champs de transport d'air
 c      print*,'3HISTDEF'
-      call histdef(fileid, 'masse', 'masse',
+      CALL histdef(fileid, 'masse', 'masse',
      .             'kg', 1, jjn, thoriid, llm, 1, llm, zvertiid,
      .             32, 'ave(X)', dt_cum, dt_cum)
-      call histdef(fileid, 'v', 'v',
+      CALL histdef(fileid, 'v', 'v',
      .             'm/s', 1, jjn, thoriid, llm, 1, llm, zvertiid,
      .             32, 'ave(X)', dt_cum, dt_cum)
 c   Declarations pour les fonctions de courant
 c      print*,'4HISTDEF'
-          call histdef(fileid,'psi','stream fn. MMC ','mega t/s',
+          CALL histdef(fileid,'psi','stream fn. MMC ','mega t/s',
      .      1,jjn,thoriid,llm,1,llm,zvertiid,
      .      32,'ave(X)',dt_cum,dt_cum)
@@ -349,5 +349,5 @@
       do iQ=1,nQ
          do itr=2,ntr
-            call histdef(fileid,'a'//znom(itr,iQ),znoml(itr,iQ),
+            CALL histdef(fileid,'a'//znom(itr,iQ),znoml(itr,iQ),
      .        zunites(itr,iQ),1,jjn,thoriid,1,1,1,-99,
      .        32,'ave(X)',dt_cum,dt_cum)
@@ -373,9 +373,9 @@
 !      ucont(:,jjb:jje,:)=0
 
-      call Register_Hallo_u(ucov,llm,1,1,1,1,Req)
-      call Register_Hallo_v(vcov,llm,1,1,1,1,Req)
-      call SendRequest(Req)
+      CALL Register_Hallo_u(ucov,llm,1,1,1,1,Req)
+      CALL Register_Hallo_v(vcov,llm,1,1,1,1,Req)
+      CALL SendRequest(Req)
 c$OMP BARRIER
-      call WaitRequest(Req)
+      CALL WaitRequest(Req)
 
       CALL covcont_loc(llm,ucov,vcov,ucont,vcont)
@@ -493,9 +493,9 @@
 c    -------------
       do iQ=1,nQ
-        call Register_Hallo_u(Q(1,jjb_u,1,iQ),llm,0,1,1,0,Req) 
-      enddo
-      call SendRequest(Req)
+        CALL Register_Hallo_u(Q(1,jjb_u,1,iQ),llm,0,1,1,0,Req)
+      enddo
+      CALL SendRequest(Req)
 !$OMP BARRIER      
-      call WaitRequest(Req)
+      CALL WaitRequest(Req)
       
       jjb=jj_begin
@@ -521,20 +521,20 @@
 
 c   convergence horizontale
-      call Register_Hallo_u(flux_uQ_cum,llm,2,2,2,2,Req)
-      call Register_Hallo_v(flux_vQ_cum,llm,2,2,2,2,Req)
-      call SendRequest(Req)
+      CALL Register_Hallo_u(flux_uQ_cum,llm,2,2,2,2,Req)
+      CALL Register_Hallo_v(flux_vQ_cum,llm,2,2,2,2,Req)
+      CALL SendRequest(Req)
 !$OMP BARRIER      
-      call WaitRequest(Req)
-
-      call  convflu_loc(flux_uQ_cum,flux_vQ_cum,llm*nQ,dQ)
+      CALL WaitRequest(Req)
+
+      CALL  convflu_loc(flux_uQ_cum,flux_vQ_cum,llm*nQ,dQ)
 
 c   calcul de la vitesse verticale
-      call Register_Hallo_u(flux_u_cum,llm,2,2,2,2,Req)
-      call Register_Hallo_v(flux_v_cum,llm,2,2,2,2,Req)
-      call SendRequest(Req)
+      CALL Register_Hallo_u(flux_u_cum,llm,2,2,2,2,Req)
+      CALL Register_Hallo_v(flux_v_cum,llm,2,2,2,2,Req)
+      CALL SendRequest(Req)
 !$OMP BARRIER      
-      call WaitRequest(Req)
-
-      call convmas_loc(flux_u_cum,flux_v_cum,convm)
+      CALL WaitRequest(Req)
+
+      CALL convmas_loc(flux_u_cum,flux_v_cum,convm)
       CALL vitvert_loc(convm,w)
 !$OMP BARRIER
@@ -659,14 +659,14 @@
 !$OMP BARRIER
 
-      call Register_Hallo_u(masse_cum,llm,1,1,1,1,Req)
-      do iQ=1,nQ
-        call Register_Hallo_u(Q_cum(1,jjb_u,1,iQ),llm,0,1,1,0,Req)
-      enddo
-
-      call SendRequest(Req)
-!$OMP BARRIER
-      call WaitRequest(Req)
-
-      call massbar_loc(masse_cum,massebx,masseby)
+      CALL Register_Hallo_u(masse_cum,llm,1,1,1,1,Req)
+      do iQ=1,nQ
+        CALL Register_Hallo_u(Q_cum(1,jjb_u,1,iQ),llm,0,1,1,0,Req)
+      enddo
+
+      CALL SendRequest(Req)
+!$OMP BARRIER
+      CALL WaitRequest(Req)
+
+      CALL massbar_loc(masse_cum,massebx,masseby)
       
       jjb=jj_begin
@@ -786,19 +786,19 @@
       do iQ=1,nQ
          do itr=1,ntr
-            call histwrite(fileid,znom(itr,iQ),itau,
+            CALL histwrite(fileid,znom(itr,iQ),itau,
      s                     zvQ(jjb:jje,:,itr,iQ)
      s                     ,jjn*llm,ndex3d)
          enddo
-         call histwrite(fileid,'psi'//nom(iQ),
+         CALL histwrite(fileid,'psi'//nom(iQ),
      s                  itau,psiQ(jjb:jje,1:llm,iQ)
      s                  ,jjn*llm,ndex3d)
       enddo
 
-      call histwrite(fileid,'masse',itau,zmasse(jjb:jje,1:llm)
+      CALL histwrite(fileid,'masse',itau,zmasse(jjb:jje,1:llm)
      s   ,jjn*llm,ndex3d)
-      call histwrite(fileid,'v',itau,zv(jjb:jje,1:llm)
+      CALL histwrite(fileid,'v',itau,zv(jjb:jje,1:llm)
      s   ,jjn*llm,ndex3d)
       psi(jjb:jje,:)=psi(jjb:jje,:)*1.e-9
-      call histwrite(fileid,'psi',itau,psi(jjb:jje,1:llm),
+      CALL histwrite(fileid,'psi',itau,psi(jjb:jje,1:llm),
      s               jjn*llm,ndex3d)
 
@@ -824,5 +824,5 @@
             enddo
             zavQ(jjb:jje,itr,iQ)=zavQ(jjb:jje,itr,iQ)/zamasse(jjb:jje)
-            call histwrite(fileid,'a'//znom(itr,iQ),itau,
+            CALL histwrite(fileid,'a'//znom(itr,iQ),itau,
      s                     zavQ(jjb:jje,itr,iQ),jjn*llm,ndex3d)
          enddo
@@ -838,5 +838,5 @@
 c=====================================================================
 !$OMP MASTER
-      call histsync(fileid)
+      CALL histsync(fileid)
 !$OMP END MASTER
 
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/caladvtrac_loc.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/caladvtrac_loc.F	(revision 5100)
+++ 	(revision )
@@ -1,217 +1,0 @@
-
-! $Id: caladvtrac_p.F 1299 2010-01-20 14:27:21Z fairhead $
-
-c
-c
-            SUBROUTINE caladvtrac_loc(q,pbaru,pbarv ,
-     *                   p ,masse, dq ,  teta,
-     *                   flxw, pk, iapptrac)
-      USE parallel_lmdz 
-      USE infotrac, ONLY : nqtot
-      USE control_mod, ONLY : iapp_tracvl,planet_type
-      USE caladvtrac_mod
-      USE mod_hallo
-      USE bands
-      USE times
-      USE Vampir
-      USE write_field_loc
-c
-      IMPLICIT NONE
-c
-c     Auteurs:   F.Hourdin , P.Le Van, F.Forget, F.Codron  
-c
-c     F.Codron (10/99) : ajout humidite specifique pour eau vapeur
-c=======================================================================
-c
-c       Shema de  Van Leer
-c
-c=======================================================================
-
-
-      include "dimensions.h"
-      include "paramet.h"
-
-c   Arguments:
-c   ----------
-      REAL :: pbaru( ijb_u:ije_u,llm ),pbarv( ijb_v:ije_v,llm)
-      REAL :: masse(ijb_u:ije_u,llm)
-      REAL :: p( ijb_u:ije_u,llmp1)
-      REAL :: q( ijb_u:ije_u,llm,nqtot),dq( ijb_u:ije_u,llm, nqtot )
-      REAL :: teta( ijb_u:ije_u,llm),pk( ijb_u:ije_u,llm)
-      REAL :: flxw(ijb_u:ije_u,llm)
-      INTEGER :: iapptrac
-c   Local:
-c   ------
-!      REAL :: pbarug(ijb_u:ije_u,llm)
-!      REAL :: pbarvg(ijb_v:ije_v,llm)
-!      REAL :: wg(ijb_u:ije_u,llm)
-      
-      REAL :: flxw_adv(distrib_vanleer%ijb_u:distrib_vanleer%ije_u,llm)
-      INTEGER,SAVE :: iadvtr=0
-!$OMP THREADPRIVATE(iadvtr)
-      INTEGER ::  ijb,ije,ijbu,ijbv,ijeu,ijev,j
-      INTEGER :: ij,l
-      TYPE(Request),SAVE :: Request_vanleer
-!$OMP THREADPRIVATE(Request_vanleer)
-
-      !write(*,*) 'caladvtrac 58: entree'     
-      ijbu=ij_begin
-      ijeu=ij_end
-      
-      ijbv=ij_begin-iip1
-      ijev=ij_end
-      if (pole_nord) ijbv=ij_begin
-      if (pole_sud)  ijev=ij_end-iip1
-
-      IF(iadvtr==0) THEN
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)        
-	DO l=1,llm   
-          pbaruc(ijbu:ijeu,l)=0.
-          pbarvc(ijbv:ijev,l)=0.
-        ENDDO
-c$OMP END DO NOWAIT  
-      ENDIF
-
-c   accumulation des flux de masse horizontaux
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
-      DO l=1,llm
-         DO ij = ijbu,ijeu
-            pbaruc(ij,l) = pbaruc(ij,l) + pbaru(ij,l)
-         ENDDO
-         DO ij = ijbv,ijev
-            pbarvc(ij,l) = pbarvc(ij,l) + pbarv(ij,l)
-         ENDDO
-      ENDDO
-c$OMP END DO NOWAIT
-
-c   selection de la masse instantannee des mailles avant le transport.
-      IF(iadvtr==0) THEN
-
-          ijb=ij_begin
-          ije=ij_end
-
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
-       DO l=1,llm
-          massem(ijb:ije,l)=masse(ijb:ije,l)
-       ENDDO
-c$OMP END DO NOWAIT
-
-      ENDIF
-
-      iadvtr   = iadvtr+1
-
-c$OMP MASTER
-      iapptrac = iadvtr
-c$OMP END MASTER
-
-c   Test pour savoir si on advecte a ce pas de temps
-
-      IF ( iadvtr==iapp_tracvl ) THEN
-      !write(*,*) 'caladvtrac 133'
-c$OMP MASTER
-        call suspend_timer(timer_caldyn)
-c$OMP END MASTER
-      
-      ijb=ij_begin
-      ije=ij_end
-      
-cc   ..  Modif P.Le Van  ( 20/12/97 )  ....
-cc
-
-c   traitement des flux de masse avant advection.
-c     1. calcul de w
-c     2. groupement des mailles pres du pole.
-
-        CALL groupe_loc( massem, pbaruc,pbarvc, pbarug,pbarvg,wg )
-
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)      
-      DO l=1,llm
-        flxw(ijb:ije,l)=wg(ijb:ije,l)/REAL(iapp_tracvl)
-      ENDDO
-c$OMP ENDDO NOWAIT
-
-#ifdef DEBUG_IO    
-         CALL WriteField_u('pbarug1',pbarug)
-         CALL WriteField_v('pbarvg1',pbarvg)
-         CALL WriteField_u('wg1',wg)
-#endif
-
-c$OMP BARRIER
-
-
-c$OMP MASTER
-      call VTb(VTHallo)
-c$OMP END MASTER
-
-      call Register_SwapField_u(pbarug,pbarug_adv, distrib_vanleer,
-     &                          Request_vanleer)
-      call Register_SwapField_v(pbarvg,pbarvg_adv, distrib_vanleer,
-     &                          Request_vanleer,up=1)
-      call Register_SwapField_u(massem,massem_adv, distrib_vanleer,
-     &                          Request_vanleer)
-      call Register_SwapField_u(wg,wg_adv,distrib_vanleer,
-     &                          Request_vanleer)
-      call Register_SwapField_u(teta,teta_adv, distrib_vanleer,
-     &                          Request_vanleer,up=1,down=1)
-      call Register_SwapField_u(p,p_adv, distrib_vanleer,
-     &                          Request_vanleer,up=1,down=1)
-      call Register_SwapField_u(pk,pk_adv, distrib_vanleer,
-     &                          Request_vanleer,up=1,down=1)
-      call Register_SwapField_u(q,q_adv, distrib_vanleer,
-     &                          Request_vanleer)
-
-      call SendRequest(Request_vanleer)
-c$OMP BARRIER
-      call WaitRequest(Request_vanleer)
-
-
-c$OMP BARRIER
-c$OMP MASTER      
-      call Set_Distrib(distrib_vanleer)
-      call VTe(VTHallo)
-      call VTb(VTadvection)
-      call start_timer(timer_vanleer)
-c$OMP END MASTER
-c$OMP BARRIER
-!      CALL WriteField_u('pbarug_adv',pbarug_adv)
-!      CALL WriteField_u('',)
-      
-      
-#ifdef DEBUG_IO
-         CALL WriteField_u('pbarug1',pbarug_adv)
-         CALL WriteField_v('pbarvg1',pbarvg_adv)
-         CALL WriteField_u('wg1',wg_adv)
-#endif        
-      !write(*,*) 'caladvtrac 185'  
-      CALL advtrac_loc( pbarug_adv,pbarvg_adv,wg_adv, 
-     *             p_adv,  massem_adv,q_adv, teta_adv,
-     .             pk_adv)     
-      !write(*,*) 'caladvtrac 189'
-
-
-c$OMP MASTER
-	call VTe(VTadvection)
-        call stop_timer(timer_vanleer)
-        call VTb(VThallo)
-c$OMP END MASTER
-
-        call Register_SwapField_u(q_adv,q,distrib_caldyn,
-     *                             Request_vanleer)
-
-        call SendRequest(Request_vanleer)
-c$OMP BARRIER
-        call WaitRequest(Request_vanleer)      
-
-c$OMP BARRIER
-c$OMP MASTER
-        call Set_Distrib(distrib_caldyn)
-	call VTe(VThallo)
-	call resume_timer(timer_caldyn)
-c$OMP END MASTER
-c$OMP BARRIER
-          iadvtr=0
-       ENDIF ! if iadvtr.EQ.iapp_tracvl
-
-      END
-
-
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/caladvtrac_loc.f90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/caladvtrac_loc.f90	(revision 5101)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/caladvtrac_loc.f90	(revision 5101)
@@ -0,0 +1,215 @@
+! $Id: caladvtrac_p.F 1299 2010-01-20 14:27:21Z fairhead $
+
+!
+!
+SUBROUTINE caladvtrac_loc(q, pbaru, pbarv, &
+        p, masse, dq, teta, &
+        flxw, pk, iapptrac)
+  USE parallel_lmdz
+  USE infotrac, ONLY: nqtot
+  USE control_mod, ONLY: iapp_tracvl, planet_type
+  USE caladvtrac_mod
+  USE mod_hallo
+  USE bands
+  USE times
+  USE Vampir
+  USE write_field_loc
+  USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO
+
+  IMPLICIT NONE
+  !
+  ! Auteurs:   F.Hourdin , P.Le Van, F.Forget, F.Codron
+  !
+  ! F.Codron (10/99) : ajout humidite specifique pour eau vapeur
+  !=======================================================================
+  !
+  !   Shema de  Van Leer
+  !
+  !=======================================================================
+
+  include "dimensions.h"
+  include "paramet.h"
+
+  !   Arguments:
+  !   ----------
+  REAL :: pbaru(ijb_u:ije_u, llm), pbarv(ijb_v:ije_v, llm)
+  REAL :: masse(ijb_u:ije_u, llm)
+  REAL :: p(ijb_u:ije_u, llmp1)
+  REAL :: q(ijb_u:ije_u, llm, nqtot), dq(ijb_u:ije_u, llm, nqtot)
+  REAL :: teta(ijb_u:ije_u, llm), pk(ijb_u:ije_u, llm)
+  REAL :: flxw(ijb_u:ije_u, llm)
+  INTEGER :: iapptrac
+  !   Local:
+  !   ------
+  ! REAL :: pbarug(ijb_u:ije_u,llm)
+  ! REAL :: pbarvg(ijb_v:ije_v,llm)
+  !      REAL :: wg(ijb_u:ije_u,llm)
+
+  REAL :: flxw_adv(distrib_vanleer%ijb_u:distrib_vanleer%ije_u, llm)
+  INTEGER, SAVE :: iadvtr = 0
+  !$OMP THREADPRIVATE(iadvtr)
+  INTEGER :: ijb, ije, ijbu, ijbv, ijeu, ijev, j
+  INTEGER :: ij, l
+  TYPE(Request), SAVE :: Request_vanleer
+  !$OMP THREADPRIVATE(Request_vanleer)
+
+  ! !write(*,*) 'caladvtrac 58: entree'
+  ijbu = ij_begin
+  ijeu = ij_end
+
+  ijbv = ij_begin - iip1
+  ijev = ij_end
+  if (pole_nord) ijbv = ij_begin
+  if (pole_sud)  ijev = ij_end - iip1
+
+  IF(iadvtr==0) THEN
+    !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+    DO l = 1, llm
+      pbaruc(ijbu:ijeu, l) = 0.
+      pbarvc(ijbv:ijev, l) = 0.
+    ENDDO
+    !$OMP END DO NOWAIT
+  ENDIF
+
+  !   accumulation des flux de masse horizontaux
+  !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+  DO l = 1, llm
+    DO ij = ijbu, ijeu
+      pbaruc(ij, l) = pbaruc(ij, l) + pbaru(ij, l)
+    ENDDO
+    DO ij = ijbv, ijev
+      pbarvc(ij, l) = pbarvc(ij, l) + pbarv(ij, l)
+    ENDDO
+  ENDDO
+  !$OMP END DO NOWAIT
+
+  !   selection de la masse instantannee des mailles avant le transport.
+  IF(iadvtr==0) THEN
+
+    ijb = ij_begin
+    ije = ij_end
+
+    !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+    DO l = 1, llm
+      massem(ijb:ije, l) = masse(ijb:ije, l)
+    ENDDO
+    !$OMP END DO NOWAIT
+
+  ENDIF
+
+  iadvtr = iadvtr + 1
+
+  !$OMP MASTER
+  iapptrac = iadvtr
+  !$OMP END MASTER
+
+  !   Test pour savoir si on advecte a ce pas de temps
+
+  IF (iadvtr==iapp_tracvl) THEN
+    ! !write(*,*) 'caladvtrac 133'
+    !$OMP MASTER
+    CALL suspend_timer(timer_caldyn)
+    !$OMP END MASTER
+
+    ijb = ij_begin
+    ije = ij_end
+
+    !c   ..  Modif P.Le Van  ( 20/12/97 )  ....
+    !c
+
+    !   traitement des flux de masse avant advection.
+    ! 1. calcul de w
+    ! 2. groupement des mailles pres du pole.
+
+    CALL groupe_loc(massem, pbaruc, pbarvc, pbarug, pbarvg, wg)
+
+    !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+    DO l = 1, llm
+      flxw(ijb:ije, l) = wg(ijb:ije, l) / REAL(iapp_tracvl)
+    ENDDO
+    !$OMP ENDDO NOWAIT
+
+    IF (CPPKEY_DEBUGIO) THEN
+      CALL WriteField_u('pbarug1', pbarug)
+      CALL WriteField_v('pbarvg1', pbarvg)
+      CALL WriteField_u('wg1', wg)
+    END IF
+
+    !$OMP BARRIER
+
+
+    !$OMP MASTER
+    CALL VTb(VTHallo)
+    !$OMP END MASTER
+
+    CALL Register_SwapField_u(pbarug, pbarug_adv, distrib_vanleer, &
+            Request_vanleer)
+    CALL Register_SwapField_v(pbarvg, pbarvg_adv, distrib_vanleer, &
+            Request_vanleer, up = 1)
+    CALL Register_SwapField_u(massem, massem_adv, distrib_vanleer, &
+            Request_vanleer)
+    CALL Register_SwapField_u(wg, wg_adv, distrib_vanleer, &
+            Request_vanleer)
+    CALL Register_SwapField_u(teta, teta_adv, distrib_vanleer, &
+            Request_vanleer, up = 1, down = 1)
+    CALL Register_SwapField_u(p, p_adv, distrib_vanleer, &
+            Request_vanleer, up = 1, down = 1)
+    CALL Register_SwapField_u(pk, pk_adv, distrib_vanleer, &
+            Request_vanleer, up = 1, down = 1)
+    CALL Register_SwapField_u(q, q_adv, distrib_vanleer, &
+            Request_vanleer)
+
+    CALL SendRequest(Request_vanleer)
+    !$OMP BARRIER
+    CALL WaitRequest(Request_vanleer)
+
+
+    !$OMP BARRIER
+    !$OMP MASTER
+    CALL Set_Distrib(distrib_vanleer)
+    CALL VTe(VTHallo)
+    CALL VTb(VTadvection)
+    CALL start_timer(timer_vanleer)
+    !$OMP END MASTER
+    !$OMP BARRIER
+    ! CALL WriteField_u('pbarug_adv',pbarug_adv)
+    ! CALL WriteField_u('',)
+
+    IF (CPPKEY_DEBUGIO) THEN
+      CALL WriteField_u('pbarug1', pbarug_adv)
+      CALL WriteField_v('pbarvg1', pbarvg_adv)
+      CALL WriteField_u('wg1', wg_adv)
+    END IF
+    ! !write(*,*) 'caladvtrac 185'
+    CALL advtrac_loc(pbarug_adv, pbarvg_adv, wg_adv, &
+            p_adv, massem_adv, q_adv, teta_adv, &
+            pk_adv)
+    ! !write(*,*) 'caladvtrac 189'
+
+
+    !$OMP MASTER
+    CALL VTe(VTadvection)
+    CALL stop_timer(timer_vanleer)
+    CALL VTb(VThallo)
+    !$OMP END MASTER
+
+    CALL Register_SwapField_u(q_adv, q, distrib_caldyn, &
+            Request_vanleer)
+
+    CALL SendRequest(Request_vanleer)
+    !$OMP BARRIER
+    CALL WaitRequest(Request_vanleer)
+
+    !$OMP BARRIER
+    !$OMP MASTER
+    CALL Set_Distrib(distrib_caldyn)
+    CALL VTe(VThallo)
+    CALL resume_timer(timer_caldyn)
+    !$OMP END MASTER
+    !$OMP BARRIER
+    iadvtr = 0
+  ENDIF ! if iadvtr.EQ.iapp_tracvl
+
+END SUBROUTINE caladvtrac_loc
+
+
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/caladvtrac_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/caladvtrac_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/caladvtrac_mod.F90	(revision 5101)
@@ -32,5 +32,5 @@
   USE parallel_lmdz
   USE infotrac, ONLY: nqtot
-  USE advtrac_mod, ONLY : advtrac_allocate
+  USE advtrac_mod, ONLY: advtrac_allocate
   USE groupe_mod 
   IMPLICIT NONE
@@ -96,5 +96,5 @@
   USE bands
   USE parallel_lmdz
-  USE advtrac_mod, ONLY : advtrac_switch_vanleer 
+  USE advtrac_mod, ONLY: advtrac_switch_vanleer
   IMPLICIT NONE
     TYPE(distrib),INTENT(IN) :: dist
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/caldyn_loc.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/caldyn_loc.F	(revision 5100)
+++ 	(revision )
@@ -1,185 +1,0 @@
-
-! $Id: $
-
-#undef DEBUG_IO
-!#define DEBUG_IO
-
-      SUBROUTINE caldyn_loc
-     $ (itau,ucov,vcov,teta,ps,masse,pk,pkf,phis ,
-     $  phi,conser,du,dv,dteta,dp,w,pbaru,pbarv,time )
-      USE parallel_lmdz
-      USE Write_Field_loc
-      USE caldyn_mod, ONLY: vcont, ucont, ang, p, massebx, masseby,
-     &                      vorpot, ecin, bern, massebxy, convm
-      USE comvert_mod, ONLY: ap, bp
-      
-      IMPLICIT NONE
-
-!=======================================================================
-
-!  Auteur :  P. Le Van
-
-!   Objet:
-!   ------
-
-!   Calcul des tendances dynamiques.
-
-! Modif 04/93 F.Forget
-!=======================================================================
-
-!-----------------------------------------------------------------------
-!   0. Declarations:
-!   ----------------
-
-      include "dimensions.h"
-      include "paramet.h"
-      include "comgeom.h"
-
-!   Arguments:
-!   ----------
-
-      LOGICAL,INTENT(IN) :: conser ! triggers printing some diagnostics ! not used
-      INTEGER,INTENT(IN) :: itau ! time step index ! not used
-      REAL,INTENT(IN) :: vcov(ijb_v:ije_v,llm) ! covariant meridional wind
-      REAL,INTENT(IN) :: ucov(ijb_u:ije_u,llm) ! covariant zonal wind
-      REAL,INTENT(IN) :: teta(ijb_u:ije_u,llm) ! potential temperature
-      REAL,INTENT(IN) :: ps(ijb_u:ije_u) ! surface pressure
-      REAL,INTENT(IN) :: phis(ijb_u:ije_u) ! geopotential at the surface
-      REAL,INTENT(IN) :: pk(iip1,jjb_u:jje_u,llm) ! Exner at mid-layer
-      REAL,INTENT(IN) :: pkf(ijb_u:ije_u,llm) ! filtered Exner
-      REAL,INTENT(IN) :: phi(ijb_u:ije_u,llm) ! geopotential
-      REAL,INTENT(OUT) :: masse(ijb_u:ije_u,llm) ! air mass
-      REAL,INTENT(OUT) :: dv(ijb_v:ije_v,llm) ! tendency on vcov
-      REAL,INTENT(OUT) :: du(ijb_u:ije_u,llm) ! tendency on ucov
-      REAL,INTENT(OUT) :: dteta(ijb_u:ije_u,llm) ! tenddency on teta
-      REAL,INTENT(OUT) :: dp(ijb_u:ije_u) ! tendency on ps
-      REAL,INTENT(OUT) :: w(ijb_u:ije_u,llm) ! vertical velocity
-      REAL,INTENT(OUT) :: pbaru(ijb_u:ije_u,llm) ! mass flux in the zonal direction
-      REAL,INTENT(OUT) :: pbarv(ijb_v:ije_v,llm) ! mass flux in the meridional direction
-      REAL,INTENT(IN) :: time ! current time
-
-!   Local:
-!   ------
-
-      INTEGER   ij,l,ijb,ije,ierr
-
-
-!-----------------------------------------------------------------------
-!   Compute dynamical tendencies:
-!--------------------------------
-
-      ! compute contravariant winds ucont() and vcont
-      CALL covcont_loc  ( llm    , ucov    , vcov , ucont, vcont     )
-      ! compute pressure p()
-      CALL pression_loc ( ip1jmp1, ap      , bp   ,  ps  , p         )
-cym      CALL psextbar (   ps   , psexbarxy                          )
-c$OMP BARRIER
-      ! compute mass in each atmospheric mesh: masse()
-      CALL massdair_loc (    p   , masse                             )
-      ! compute X and Y-averages of mass, massebx() and masseby()
-      CALL massbar_loc  (   masse, massebx , masseby                 )
-      ! compute XY-average of mass, massebxy()
-      call massbarxy_loc(   masse, massebxy                          )
-      ! compute mass fluxes pbaru() and pbarv()
-      CALL flumass_loc  ( massebx, masseby,vcont,ucont,pbaru,pbarv   )
-      ! compute dteta() , horizontal converging flux of theta
-      CALL dteta1_loc   (   teta , pbaru   , pbarv, dteta            )
-      ! compute convm(), horizontal converging flux of mass
-      CALL convmas1_loc  (   pbaru, pbarv   , convm                  )
-c$OMP BARRIER      
-      CALL convmas2_loc  (   convm                      )
-c$OMP BARRIER
-#ifdef DEBUG_IO
-      call WriteField_u('ucont',ucont)
-      call WriteField_v('vcont',vcont)
-      call WriteField_u('p',p)
-      call WriteField_u('masse',masse)
-      call WriteField_u('massebx',massebx)
-      call WriteField_v('masseby',masseby)
-      call WriteField_v('massebxy',massebxy)
-      call WriteField_u('pbaru',pbaru)
-      call WriteField_v('pbarv',pbarv)
-      call WriteField_u('dteta',dteta)
-      call WriteField_u('convm',convm)
-#endif      
-
-c$OMP BARRIER
-c$OMP MASTER
-      ijb=ij_begin
-      ije=ij_end
-      ! compute pressure variation due to mass convergence
-      DO ij =ijb, ije
-         dp( ij ) = convm( ij,1 ) / airesurg( ij )
-      ENDDO
-c$OMP END MASTER
-c$OMP BARRIER
-      
-      ! compute vertical velocity w()
-      CALL vitvert_loc ( convm  , w                                )
-      ! compute potential vorticity vorpot()
-      CALL tourpot_loc ( vcov   , ucov  , massebxy  , vorpot       )
-      ! compute rotation induced du() and dv()
-      CALL dudv1_loc   ( vorpot , pbaru , pbarv     , du     , dv  )
-
-#ifdef DEBUG_IO      
-      call WriteField_u('w',w)
-      call WriteField_v('vorpot',vorpot)
-      call WriteField_u('du',du)
-      call WriteField_v('dv',dv)
-#endif      
-      
-      ! compute kinetic energy ecin()
-      CALL enercin_loc ( vcov   , ucov  , vcont   , ucont  , ecin  )
-      ! compute Bernouilli function bern()
-      CALL bernoui_loc ( ip1jmp1, llm   , phi       , ecin   , bern)
-      ! compute and add du() and dv() contributions from Bernouilli and pressure
-      CALL dudv2_loc   ( teta   , pkf   , bern      , du     , dv  )
-
-#ifdef DEBUG_IO
-      call WriteField_u('ecin',ecin)
-      call WriteField_u('bern',bern)
-      call WriteField_u('du',du)
-      call WriteField_v('dv',dv)
-      call WriteField_u('pkf',pkf)
-#endif
-      
-      ijb=ij_begin-iip1
-      ije=ij_end+iip1
-      
-      if (pole_nord) ijb=ij_begin
-      if (pole_sud) ije=ij_end
-
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)       
-      DO l=1,llm
-         DO ij=ijb,ije
-            ang(ij,l) = ucov(ij,l) + constang(ij)
-        ENDDO
-      ENDDO
-c$OMP END DO
-
-      ! compute vertical advection contributions to du(), dv() and dteta()
-      CALL advect_new_loc(ang,vcov,teta,w,massebx,masseby,du,dv,dteta) 
-
-C  WARNING probleme de peridocite de dv sur les PC/linux. Pb d'arrondi 
-C          probablement. Observe sur le code compile avec pgf90 3.0-1 
-      ijb=ij_begin
-      ije=ij_end
-      if (pole_sud) ije=ij_end-iip1
-
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 
-      DO l = 1, llm
-         DO ij = ijb, ije, iip1
-           IF( dv(ij,l)/=dv(ij+iim,l) )  THEN
-c         PRINT *,'!!!ATTENTION!!! probleme de periodicite sur vcov',  
-c    ,   ' dans caldyn'
-c         PRINT *,' l,  ij = ', l, ij, ij+iim,dv(ij+iim,l),dv(ij,l)
-          dv(ij+iim,l) = dv(ij,l)
-          endif
-         enddo
-      enddo
-c$OMP END DO NOWAIT      
-
-! Ehouarn: NB: output of control variables not implemented...
-
-      RETURN
-      END
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/caldyn_loc.f90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/caldyn_loc.f90	(revision 5101)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/caldyn_loc.f90	(revision 5101)
@@ -0,0 +1,182 @@
+! $Id: $
+
+SUBROUTINE caldyn_loc &
+        (itau, ucov, vcov, teta, ps, masse, pk, pkf, phis, &
+        phi, conser, du, dv, dteta, dp, w, pbaru, pbarv, time)
+  USE parallel_lmdz
+  USE Write_Field_loc
+  USE caldyn_mod, ONLY: vcont, ucont, ang, p, massebx, masseby, &
+          vorpot, ecin, bern, massebxy, convm
+  USE comvert_mod, ONLY: ap, bp
+  USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO
+
+  IMPLICIT NONE
+
+  !=======================================================================
+
+  !  Auteur :  P. Le Van
+
+  !   Objet:
+  !   ------
+
+  !   Calcul des tendances dynamiques.
+
+  ! Modif 04/93 F.Forget
+  !=======================================================================
+
+  !-----------------------------------------------------------------------
+  !   0. Declarations:
+  !   ----------------
+
+  include "dimensions.h"
+  include "paramet.h"
+  include "comgeom.h"
+
+  !   Arguments:
+  !   ----------
+
+  LOGICAL, INTENT(IN) :: conser ! triggers printing some diagnostics ! not used
+  INTEGER, INTENT(IN) :: itau ! time step index ! not used
+  REAL, INTENT(IN) :: vcov(ijb_v:ije_v, llm) ! covariant meridional wind
+  REAL, INTENT(IN) :: ucov(ijb_u:ije_u, llm) ! covariant zonal wind
+  REAL, INTENT(IN) :: teta(ijb_u:ije_u, llm) ! potential temperature
+  REAL, INTENT(IN) :: ps(ijb_u:ije_u) ! surface pressure
+  REAL, INTENT(IN) :: phis(ijb_u:ije_u) ! geopotential at the surface
+  REAL, INTENT(IN) :: pk(iip1, jjb_u:jje_u, llm) ! Exner at mid-layer
+  REAL, INTENT(IN) :: pkf(ijb_u:ije_u, llm) ! filtered Exner
+  REAL, INTENT(IN) :: phi(ijb_u:ije_u, llm) ! geopotential
+  REAL, INTENT(OUT) :: masse(ijb_u:ije_u, llm) ! air mass
+  REAL, INTENT(OUT) :: dv(ijb_v:ije_v, llm) ! tendency on vcov
+  REAL, INTENT(OUT) :: du(ijb_u:ije_u, llm) ! tendency on ucov
+  REAL, INTENT(OUT) :: dteta(ijb_u:ije_u, llm) ! tenddency on teta
+  REAL, INTENT(OUT) :: dp(ijb_u:ije_u) ! tendency on ps
+  REAL, INTENT(OUT) :: w(ijb_u:ije_u, llm) ! vertical velocity
+  REAL, INTENT(OUT) :: pbaru(ijb_u:ije_u, llm) ! mass flux in the zonal direction
+  REAL, INTENT(OUT) :: pbarv(ijb_v:ije_v, llm) ! mass flux in the meridional direction
+  REAL, INTENT(IN) :: time ! current time
+
+  !   Local:
+  !   ------
+
+  INTEGER :: ij, l, ijb, ije, ierr
+
+
+  !-----------------------------------------------------------------------
+  !   Compute dynamical tendencies:
+  !--------------------------------
+
+  ! ! compute contravariant winds ucont() and vcont
+  CALL covcont_loc  (llm, ucov, vcov, ucont, vcont)
+  ! ! compute pressure p()
+  CALL pression_loc (ip1jmp1, ap, bp, ps, p)
+  !ym      CALL psextbar (   ps   , psexbarxy                          )
+  !$OMP BARRIER
+  ! ! compute mass in each atmospheric mesh: masse()
+  CALL massdair_loc (p, masse)
+  ! ! compute X and Y-averages of mass, massebx() and masseby()
+  CALL massbar_loc  (masse, massebx, masseby)
+  ! ! compute XY-average of mass, massebxy()
+  CALL massbarxy_loc(masse, massebxy)
+  ! ! compute mass fluxes pbaru() and pbarv()
+  CALL flumass_loc  (massebx, masseby, vcont, ucont, pbaru, pbarv)
+  ! ! compute dteta() , horizontal converging flux of theta
+  CALL dteta1_loc   (teta, pbaru, pbarv, dteta)
+  ! ! compute convm(), horizontal converging flux of mass
+  CALL convmas1_loc  (pbaru, pbarv, convm)
+  !$OMP BARRIER
+  CALL convmas2_loc  (convm)
+  !$OMP BARRIER
+  IF (CPPKEY_DEBUGIO) THEN
+    CALL WriteField_u('ucont', ucont)
+    CALL WriteField_v('vcont', vcont)
+    CALL WriteField_u('p', p)
+    CALL WriteField_u('masse', masse)
+    CALL WriteField_u('massebx', massebx)
+    CALL WriteField_v('masseby', masseby)
+    CALL WriteField_v('massebxy', massebxy)
+    CALL WriteField_u('pbaru', pbaru)
+    CALL WriteField_v('pbarv', pbarv)
+    CALL WriteField_u('dteta', dteta)
+    CALL WriteField_u('convm', convm)
+  END IF
+
+  !$OMP BARRIER
+  !$OMP MASTER
+  ijb = ij_begin
+  ije = ij_end
+  ! ! compute pressure variation due to mass convergence
+  DO ij = ijb, ije
+    dp(ij) = convm(ij, 1) / airesurg(ij)
+  ENDDO
+  !$OMP END MASTER
+  !$OMP BARRIER
+
+  ! ! compute vertical velocity w()
+  CALL vitvert_loc (convm, w)
+  ! ! compute potential vorticity vorpot()
+  CALL tourpot_loc (vcov, ucov, massebxy, vorpot)
+  ! ! compute rotation induced du() and dv()
+  CALL dudv1_loc   (vorpot, pbaru, pbarv, du, dv)
+
+  IF (CPPKEY_DEBUGIO) THEN
+    CALL WriteField_u('w', w)
+    CALL WriteField_v('vorpot', vorpot)
+    CALL WriteField_u('du', du)
+    CALL WriteField_v('dv', dv)
+  END IF
+
+  ! ! compute kinetic energy ecin()
+  CALL enercin_loc (vcov, ucov, vcont, ucont, ecin)
+  ! ! compute Bernouilli function bern()
+  CALL bernoui_loc (ip1jmp1, llm, phi, ecin, bern)
+  ! ! compute and add du() and dv() contributions from Bernouilli and pressure
+  CALL dudv2_loc   (teta, pkf, bern, du, dv)
+
+  IF (CPPKEY_DEBUGIO) THEN
+    CALL WriteField_u('ecin', ecin)
+    CALL WriteField_u('bern', bern)
+    CALL WriteField_u('du', du)
+    CALL WriteField_v('dv', dv)
+    CALL WriteField_u('pkf', pkf)
+  END IF
+
+  ijb = ij_begin - iip1
+  ije = ij_end + iip1
+
+  if (pole_nord) ijb = ij_begin
+  if (pole_sud) ije = ij_end
+
+  !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+  DO l = 1, llm
+    DO ij = ijb, ije
+      ang(ij, l) = ucov(ij, l) + constang(ij)
+    ENDDO
+  ENDDO
+  !$OMP END DO
+
+  ! ! compute vertical advection contributions to du(), dv() and dteta()
+  CALL advect_new_loc(ang, vcov, teta, w, massebx, masseby, du, dv, dteta)
+
+  !  WARNING probleme de peridocite de dv sur les PC/linux. Pb d'arrondi
+  ! probablement. Observe sur le code compile avec pgf90 3.0-1
+  ijb = ij_begin
+  ije = ij_end
+  if (pole_sud) ije = ij_end - iip1
+
+  !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+  DO l = 1, llm
+    DO ij = ijb, ije, iip1
+      IF(dv(ij, l)/=dv(ij + iim, l))  THEN
+        ! PRINT *,'!!!ATTENTION!!! probleme de periodicite sur vcov',
+        !    ,   ' dans caldyn'
+        ! PRINT *,' l,  ij = ', l, ij, ij+iim,dv(ij+iim,l),dv(ij,l)
+        dv(ij + iim, l) = dv(ij, l)
+      endif
+    enddo
+  enddo
+  !$OMP END DO NOWAIT
+
+  ! Ehouarn: NB: output of control variables not implemented...
+
+  RETURN
+END SUBROUTINE caldyn_loc
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/caldyn_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/caldyn_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/caldyn_mod.F90	(revision 5101)
@@ -23,5 +23,5 @@
   USE parallel_lmdz
   USE dimensions_mod
-  USE advect_new_mod,ONLY : advect_new_allocate
+  USE advect_new_mod,ONLY: advect_new_allocate
   IMPLICIT NONE
   TYPE(distrib),POINTER :: d
@@ -50,5 +50,5 @@
   USE bands
   USE parallel_lmdz
-  USE advect_new_mod,ONLY : advect_new_switch_caldyn
+  USE advect_new_mod,ONLY: advect_new_switch_caldyn
   IMPLICIT NONE
     TYPE(distrib),INTENT(IN) :: dist
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/call_dissip_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/call_dissip_mod.F90	(revision 5100)
+++ 	(revision )
@@ -1,324 +1,0 @@
-MODULE call_dissip_mod
-
-    REAL,POINTER,SAVE :: ucov(:,:)
-    REAL,POINTER,SAVE :: vcov(:,:)
-    REAL,POINTER,SAVE :: teta(:,:)
-    REAL,POINTER,SAVE :: p(:,: )
-    REAL,POINTER,SAVE :: pk(:,:)
-
-    REAL,POINTER,SAVE :: ucont(:,:)
-    REAL,POINTER,SAVE :: vcont(:,:)
-    REAL,POINTER,SAVE :: ecin(:,:)
-    REAL,POINTER,SAVE :: ecin0(:,:)
-    REAL,POINTER,SAVE :: dudis(:,:)
-    REAL,POINTER,SAVE :: dvdis(:,:)
-    REAL,POINTER,SAVE :: dtetadis(:,:)
-    REAL,POINTER,SAVE :: dtetaecdt(:,:)
-
-
-
-CONTAINS
-  
-  SUBROUTINE call_dissip_allocate
-  USE bands
-  USE allocate_field_mod
-  USE parallel_lmdz
-  USE dimensions_mod
-  USE dissip_mod, ONLY : dissip_allocate
-  IMPLICIT NONE
-    TYPE(distrib),POINTER :: d
-    d=>distrib_dissip
-
-    CALL allocate_u(ucov,llm,d)
-    ucov(:,:)=0
-    CALL allocate_v(vcov,llm,d)
-    vcov(:,:)=0
-    CALL allocate_u(teta,llm,d)
-    CALL allocate_u(p,llmp1,d)
-    CALL allocate_u(pk,llm,d)
-    CALL allocate_u(ucont,llm,d)
-    CALL allocate_v(vcont,llm,d)
-    CALL allocate_u(ecin,llm,d)
-    CALL allocate_u(ecin0,llm,d)
-    CALL allocate_u(dudis,llm,d)
-    CALL allocate_v(dvdis,llm,d)
-    CALL allocate_u(dtetadis,llm,d)
-    CALL allocate_u(dtetaecdt,llm,d)
-    
-    
-    CALL dissip_allocate
-    
-  END SUBROUTINE call_dissip_allocate
-  
-  SUBROUTINE call_dissip_switch_dissip(dist)
-  USE allocate_field_mod
-  USE bands
-  USE parallel_lmdz
-  USE dissip_mod, ONLY : dissip_switch_dissip
-  IMPLICIT NONE
-    TYPE(distrib),INTENT(IN) :: dist
-
-    CALL switch_u(ucov,distrib_dissip,dist)
-    CALL switch_v(vcov,distrib_dissip,dist)
-    CALL switch_u(teta,distrib_dissip,dist)
-    CALL switch_u(p,distrib_dissip,dist)
-    CALL switch_u(pk,distrib_dissip,dist)
-    CALL switch_u(ucont,distrib_dissip,dist)
-    CALL switch_v(vcont,distrib_dissip,dist)
-    CALL switch_u(ecin,distrib_dissip,dist)
-    CALL switch_u(ecin0,distrib_dissip,dist)
-    CALL switch_u(dudis,distrib_dissip,dist)
-    CALL switch_v(dvdis,distrib_dissip,dist)
-    CALL switch_u(dtetadis,distrib_dissip,dist)
-    CALL switch_u(dtetaecdt,distrib_dissip,dist)
-
-    CALL dissip_switch_dissip(dist)
-    
-  END SUBROUTINE call_dissip_switch_dissip  
-  
-
-  
-  SUBROUTINE call_dissip(ucov_dyn,vcov_dyn,teta_dyn,p_dyn,pk_dyn,ps_dyn)
-  USE dimensions_mod
-  USE parallel_lmdz
-  USE times
-  USE mod_hallo
-  USE Bands
-  USE vampir
-  USE write_field_loc
-  IMPLICIT NONE
-    INCLUDE 'comgeom.h'
-    REAL,INTENT(INOUT) :: ucov_dyn(ijb_u:ije_u,llm) ! covariant zonal wind
-    REAL,INTENT(INOUT) :: vcov_dyn(ijb_v:ije_v,llm) ! covariant meridional wind
-    REAL,INTENT(INOUT) :: teta_dyn(ijb_u:ije_u,llm) ! covariant meridional wind
-    REAL,INTENT(INOUT) :: p_dyn(ijb_u:ije_u,llmp1 ) ! pressure at interlayer
-    REAL,INTENT(INOUT) :: pk_dyn(ijb_u:ije_u,llm) ! Exner at midlayer
-    REAL,INTENT(INOUT) :: ps_dyn(ijb_u:ije_u) ! surface pressure
-    REAL :: tppn(iim),tpps(iim)
-    REAL :: tpn,tps
-
-    REAL  SSUM
-    LOGICAL,PARAMETER :: dissip_conservative=.TRUE.
-    TYPE(Request),SAVE :: Request_dissip 
-!$OMP THREADPRIVATE(Request_dissip )    
-    INTEGER :: ij,l,ijb,ije 
-  
-    
-  !$OMP MASTER
-    CALL suspend_timer(timer_caldyn)
-        
-!       print*,'Entree dans la dissipation : Iteration No ',true_itau
-!   calcul de l'energie cinetique avant dissipation
-!       print *,'Passage dans la dissipation'
-
-    CALL VTb(VThallo)
-  !$OMP END MASTER
-
-  !$OMP BARRIER
-
-    CALL Register_SwapField_u(ucov_dyn,ucov,distrib_dissip, Request_dissip,up=1,down=1)
-    CALL Register_SwapField_v(vcov_dyn,vcov,distrib_dissip, Request_dissip,up=1,down=1)
-    CALL Register_SwapField_u(teta_dyn,teta,distrib_dissip, Request_dissip)
-    CALL Register_SwapField_u(p_dyn,p,distrib_dissip,Request_dissip)
-    CALL Register_SwapField_u(pk_dyn,pk,distrib_dissip,Request_dissip)
-
-    CALL SendRequest(Request_dissip)       
-  !$OMP BARRIER
-    CALL WaitRequest(Request_dissip)       
-
-  !$OMP BARRIER
-  !$OMP MASTER
-    CALL set_distrib(distrib_dissip)
-    CALL VTe(VThallo)
-    CALL VTb(VTdissipation)
-    CALL start_timer(timer_dissip)
-  !$OMP END MASTER
-  !$OMP BARRIER
-
-    CALL covcont_loc(llm,ucov,vcov,ucont,vcont)
-    CALL enercin_loc(vcov,ucov,vcont,ucont,ecin0)
-
-!   dissipation
-
-!        CALL FTRACE_REGION_BEGIN("dissip")
-    CALL dissip_loc(vcov,ucov,teta,p,dvdis,dudis,dtetadis)
-
-#ifdef DEBUG_IO    
-    CALL WriteField_u('dudis',dudis)
-    CALL WriteField_v('dvdis',dvdis)
-    CALL WriteField_u('dtetadis',dtetadis)
-#endif
- 
-!      CALL FTRACE_REGION_END("dissip")
-         
-    ijb=ij_begin
-    ije=ij_end
-  !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)        
-    DO l=1,llm
-      ucov(ijb:ije,l)=ucov(ijb:ije,l)+dudis(ijb:ije,l)
-    ENDDO
-  !$OMP END DO NOWAIT        
-
-    IF (pole_sud) ije=ije-iip1
-   
-  !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)        
-    DO l=1,llm
-      vcov(ijb:ije,l)=vcov(ijb:ije,l)+dvdis(ijb:ije,l)
-    ENDDO
-  !$OMP END DO NOWAIT        
-
-!       teta=teta+dtetadis
-
-
-!------------------------------------------------------------------------
-    IF (dissip_conservative) THEN
-!       On rajoute la tendance due a la transform. Ec -> E therm. cree
-!       lors de la dissipation
-    !$OMP BARRIER
-    !$OMP MASTER
-      CALL suspend_timer(timer_dissip)
-      CALL VTb(VThallo)
-    !$OMP END MASTER
-      CALL Register_Hallo_u(ucov,llm,1,1,1,1,Request_Dissip)
-      CALL Register_Hallo_v(vcov,llm,1,1,1,1,Request_Dissip)
-      CALL SendRequest(Request_Dissip)
-    !$OMP BARRIER
-      CALL WaitRequest(Request_Dissip)
-    !$OMP MASTER
-      CALL VTe(VThallo)
-      CALL resume_timer(timer_dissip)
-    !$OMP END MASTER
-    !$OMP BARRIER            
-      CALL covcont_loc(llm,ucov,vcov,ucont,vcont)
-      CALL enercin_loc(vcov,ucov,vcont,ucont,ecin)
-            
-      ijb=ij_begin
-      ije=ij_end
-    !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)            
-      DO l=1,llm
-        DO ij=ijb,ije
-           dtetaecdt(ij,l)= (ecin0(ij,l)-ecin(ij,l))/ pk(ij,l)
-           dtetadis(ij,l)=dtetadis(ij,l)+dtetaecdt(ij,l)
-        ENDDO
-      ENDDO
-    !$OMP END DO NOWAIT            
-
-    ENDIF
-
-    ijb=ij_begin
-    ije=ij_end
-
-  !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)            
-    DO l=1,llm
-      DO ij=ijb,ije
-         teta(ij,l)=teta(ij,l)+dtetadis(ij,l)
-      ENDDO
-    ENDDO
-  !$OMP END DO NOWAIT         
-
-!------------------------------------------------------------------------
-
-
-!    .......        P. Le Van (  ajout  le 17/04/96  )   ...........
-!   ...      Calcul de la valeur moyenne, unique de h aux poles  .....
-
-    ijb=ij_begin
-    ije=ij_end
-         
-    IF (pole_nord) THEN
-  
-   !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
-      DO l  =  1, llm
-        DO ij =  1,iim
-          tppn(ij)  = aire(  ij    ) * teta(  ij    ,l)
-        ENDDO
-        tpn  = SSUM(iim,tppn,1)/apoln
-
-        DO ij = 1, iip1
-          teta(  ij    ,l) = tpn
-        ENDDO
-      ENDDO
-    !$OMP END DO NOWAIT
-
-         if (1 == 0) then
-!!! Ehouarn: lines here 1) kill 1+1=2 in the dynamics
-!!!                     2) should probably not be here anyway
-!!! but are kept for those who would want to revert to previous behaviour
-    !$OMP MASTER               
-      DO ij =  1,iim
-        tppn(ij)  = aire(  ij    ) * ps_dyn (  ij    )
-      ENDDO
-      tpn  = SSUM(iim,tppn,1)/apoln
-  
-      DO ij = 1, iip1
-        ps_dyn(  ij    ) = tpn
-      ENDDO
-    !$OMP END MASTER
-    
-    ENDIF ! of if (1 == 0)
-    endif ! of of (pole_nord)
-        
-    IF (pole_sud) THEN
-
-    !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
-      DO l  =  1, llm
-        DO ij =  1,iim
-          tpps(ij)  = aire(ij+ip1jm) * teta(ij+ip1jm,l)
-        ENDDO
-        
-        tps  = SSUM(iim,tpps,1)/apols
-
-        DO ij = 1, iip1
-          teta(ij+ip1jm,l) = tps
-        ENDDO
-      ENDDO
-    !$OMP END DO NOWAIT
-
-    if (1 == 0) then
-!!! Ehouarn: lines here 1) kill 1+1=2 in the dynamics
-!!!                     2) should probably not be here anyway
-!!! but are kept for those who would want to revert to previous behaviour
-    !$OMP MASTER               
-      DO ij =  1,iim
-        tpps(ij)  = aire(ij+ip1jm) * ps_dyn (ij+ip1jm)
-      ENDDO
-      tps  = SSUM(iim,tpps,1)/apols
-  
-      DO ij = 1, iip1
-        ps_dyn(ij+ip1jm) = tps
-      ENDDO
-    !$OMP END MASTER
-    ENDIF ! of if (1 == 0)
-    endif ! of if (pole_sud)
-
-
-  !$OMP BARRIER
-  !$OMP MASTER
-    CALL VTe(VTdissipation)
-    CALL stop_timer(timer_dissip)
-    CALL VTb(VThallo)
-  !$OMP END MASTER
- 
-    CALL Register_SwapField_u(ucov,ucov_dyn,distrib_caldyn,Request_dissip)
-    CALL Register_SwapField_v(vcov,vcov_dyn,distrib_caldyn,Request_dissip)
-    CALL Register_SwapField_u(teta,teta_dyn,distrib_caldyn,Request_dissip)
-    CALL Register_SwapField_u(p,p_dyn,distrib_caldyn,Request_dissip)
-    CALL Register_SwapField_u(pk,pk_dyn,distrib_caldyn,Request_dissip)
-
-    CALL SendRequest(Request_dissip)       
-
-  !$OMP BARRIER
-    CALL WaitRequest(Request_dissip)       
-  !$OMP BARRIER
-  !$OMP MASTER
-    CALL set_distrib(distrib_caldyn)
-    CALL VTe(VThallo)
-    CALL resume_timer(timer_caldyn)
-!        print *,'fin dissipation'
-  !$OMP END MASTER
-  !$OMP BARRIER
-  
-  
-  END SUBROUTINE call_dissip
-
-END MODULE call_dissip_mod
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/call_dissip_mod.f90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/call_dissip_mod.f90	(revision 5101)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/call_dissip_mod.f90	(revision 5101)
@@ -0,0 +1,322 @@
+MODULE call_dissip_mod
+
+  REAL, POINTER, SAVE :: ucov(:, :)
+  REAL, POINTER, SAVE :: vcov(:, :)
+  REAL, POINTER, SAVE :: teta(:, :)
+  REAL, POINTER, SAVE :: p(:, :)
+  REAL, POINTER, SAVE :: pk(:, :)
+
+  REAL, POINTER, SAVE :: ucont(:, :)
+  REAL, POINTER, SAVE :: vcont(:, :)
+  REAL, POINTER, SAVE :: ecin(:, :)
+  REAL, POINTER, SAVE :: ecin0(:, :)
+  REAL, POINTER, SAVE :: dudis(:, :)
+  REAL, POINTER, SAVE :: dvdis(:, :)
+  REAL, POINTER, SAVE :: dtetadis(:, :)
+  REAL, POINTER, SAVE :: dtetaecdt(:, :)
+
+
+CONTAINS
+
+  SUBROUTINE call_dissip_allocate
+    USE bands
+    USE allocate_field_mod
+    USE parallel_lmdz
+    USE dimensions_mod
+    USE dissip_mod, ONLY: dissip_allocate
+    IMPLICIT NONE
+    TYPE(distrib), POINTER :: d
+    d => distrib_dissip
+
+    CALL allocate_u(ucov, llm, d)
+    ucov(:, :) = 0
+    CALL allocate_v(vcov, llm, d)
+    vcov(:, :) = 0
+    CALL allocate_u(teta, llm, d)
+    CALL allocate_u(p, llmp1, d)
+    CALL allocate_u(pk, llm, d)
+    CALL allocate_u(ucont, llm, d)
+    CALL allocate_v(vcont, llm, d)
+    CALL allocate_u(ecin, llm, d)
+    CALL allocate_u(ecin0, llm, d)
+    CALL allocate_u(dudis, llm, d)
+    CALL allocate_v(dvdis, llm, d)
+    CALL allocate_u(dtetadis, llm, d)
+    CALL allocate_u(dtetaecdt, llm, d)
+
+    CALL dissip_allocate
+
+  END SUBROUTINE call_dissip_allocate
+
+  SUBROUTINE call_dissip_switch_dissip(dist)
+    USE allocate_field_mod
+    USE bands
+    USE parallel_lmdz
+    USE dissip_mod, ONLY: dissip_switch_dissip
+    IMPLICIT NONE
+    TYPE(distrib), INTENT(IN) :: dist
+
+    CALL switch_u(ucov, distrib_dissip, dist)
+    CALL switch_v(vcov, distrib_dissip, dist)
+    CALL switch_u(teta, distrib_dissip, dist)
+    CALL switch_u(p, distrib_dissip, dist)
+    CALL switch_u(pk, distrib_dissip, dist)
+    CALL switch_u(ucont, distrib_dissip, dist)
+    CALL switch_v(vcont, distrib_dissip, dist)
+    CALL switch_u(ecin, distrib_dissip, dist)
+    CALL switch_u(ecin0, distrib_dissip, dist)
+    CALL switch_u(dudis, distrib_dissip, dist)
+    CALL switch_v(dvdis, distrib_dissip, dist)
+    CALL switch_u(dtetadis, distrib_dissip, dist)
+    CALL switch_u(dtetaecdt, distrib_dissip, dist)
+
+    CALL dissip_switch_dissip(dist)
+
+  END SUBROUTINE call_dissip_switch_dissip
+
+
+  SUBROUTINE call_dissip(ucov_dyn, vcov_dyn, teta_dyn, p_dyn, pk_dyn, ps_dyn)
+    USE dimensions_mod
+    USE parallel_lmdz
+    USE times
+    USE mod_hallo
+    USE Bands
+    USE vampir
+    USE write_field_loc
+    USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO
+
+    IMPLICIT NONE
+    INCLUDE 'comgeom.h'
+    REAL, INTENT(INOUT) :: ucov_dyn(ijb_u:ije_u, llm) ! covariant zonal wind
+    REAL, INTENT(INOUT) :: vcov_dyn(ijb_v:ije_v, llm) ! covariant meridional wind
+    REAL, INTENT(INOUT) :: teta_dyn(ijb_u:ije_u, llm) ! covariant meridional wind
+    REAL, INTENT(INOUT) :: p_dyn(ijb_u:ije_u, llmp1) ! pressure at interlayer
+    REAL, INTENT(INOUT) :: pk_dyn(ijb_u:ije_u, llm) ! Exner at midlayer
+    REAL, INTENT(INOUT) :: ps_dyn(ijb_u:ije_u) ! surface pressure
+    REAL :: tppn(iim), tpps(iim)
+    REAL :: tpn, tps
+
+    REAL  SSUM
+    LOGICAL, PARAMETER :: dissip_conservative = .TRUE.
+    TYPE(Request), SAVE :: Request_dissip
+    !$OMP THREADPRIVATE(Request_dissip )
+    INTEGER :: ij, l, ijb, ije
+
+
+    !$OMP MASTER
+    CALL suspend_timer(timer_caldyn)
+
+    !       print*,'Entree dans la dissipation : Iteration No ',true_itau
+    !   calcul de l'energie cinetique avant dissipation
+    !       print *,'Passage dans la dissipation'
+
+    CALL VTb(VThallo)
+    !$OMP END MASTER
+
+    !$OMP BARRIER
+
+    CALL Register_SwapField_u(ucov_dyn, ucov, distrib_dissip, Request_dissip, up = 1, down = 1)
+    CALL Register_SwapField_v(vcov_dyn, vcov, distrib_dissip, Request_dissip, up = 1, down = 1)
+    CALL Register_SwapField_u(teta_dyn, teta, distrib_dissip, Request_dissip)
+    CALL Register_SwapField_u(p_dyn, p, distrib_dissip, Request_dissip)
+    CALL Register_SwapField_u(pk_dyn, pk, distrib_dissip, Request_dissip)
+
+    CALL SendRequest(Request_dissip)
+    !$OMP BARRIER
+    CALL WaitRequest(Request_dissip)
+
+    !$OMP BARRIER
+    !$OMP MASTER
+    CALL set_distrib(distrib_dissip)
+    CALL VTe(VThallo)
+    CALL VTb(VTdissipation)
+    CALL start_timer(timer_dissip)
+    !$OMP END MASTER
+    !$OMP BARRIER
+
+    CALL covcont_loc(llm, ucov, vcov, ucont, vcont)
+    CALL enercin_loc(vcov, ucov, vcont, ucont, ecin0)
+
+    !   dissipation
+
+    !        CALL FTRACE_REGION_BEGIN("dissip")
+    CALL dissip_loc(vcov, ucov, teta, p, dvdis, dudis, dtetadis)
+
+    IF (CPPKEY_DEBUGIO) THEN
+      CALL WriteField_u('dudis', dudis)
+      CALL WriteField_v('dvdis', dvdis)
+      CALL WriteField_u('dtetadis', dtetadis)
+    END IF
+
+    !      CALL FTRACE_REGION_END("dissip")
+
+    ijb = ij_begin
+    ije = ij_end
+    !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+    DO l = 1, llm
+      ucov(ijb:ije, l) = ucov(ijb:ije, l) + dudis(ijb:ije, l)
+    ENDDO
+    !$OMP END DO NOWAIT
+
+    IF (pole_sud) ije = ije - iip1
+
+    !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+    DO l = 1, llm
+      vcov(ijb:ije, l) = vcov(ijb:ije, l) + dvdis(ijb:ije, l)
+    ENDDO
+    !$OMP END DO NOWAIT
+
+    !       teta=teta+dtetadis
+
+
+    !------------------------------------------------------------------------
+    IF (dissip_conservative) THEN
+      !       On rajoute la tendance due a la transform. Ec -> E therm. cree
+      !       lors de la dissipation
+      !$OMP BARRIER
+      !$OMP MASTER
+      CALL suspend_timer(timer_dissip)
+      CALL VTb(VThallo)
+      !$OMP END MASTER
+      CALL Register_Hallo_u(ucov, llm, 1, 1, 1, 1, Request_Dissip)
+      CALL Register_Hallo_v(vcov, llm, 1, 1, 1, 1, Request_Dissip)
+      CALL SendRequest(Request_Dissip)
+      !$OMP BARRIER
+      CALL WaitRequest(Request_Dissip)
+      !$OMP MASTER
+      CALL VTe(VThallo)
+      CALL resume_timer(timer_dissip)
+      !$OMP END MASTER
+      !$OMP BARRIER
+      CALL covcont_loc(llm, ucov, vcov, ucont, vcont)
+      CALL enercin_loc(vcov, ucov, vcont, ucont, ecin)
+
+      ijb = ij_begin
+      ije = ij_end
+      !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+      DO l = 1, llm
+        DO ij = ijb, ije
+          dtetaecdt(ij, l) = (ecin0(ij, l) - ecin(ij, l)) / pk(ij, l)
+          dtetadis(ij, l) = dtetadis(ij, l) + dtetaecdt(ij, l)
+        ENDDO
+      ENDDO
+      !$OMP END DO NOWAIT
+
+    ENDIF
+
+    ijb = ij_begin
+    ije = ij_end
+
+    !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+    DO l = 1, llm
+      DO ij = ijb, ije
+        teta(ij, l) = teta(ij, l) + dtetadis(ij, l)
+      ENDDO
+    ENDDO
+    !$OMP END DO NOWAIT
+
+    !------------------------------------------------------------------------
+
+
+    !    .......        P. Le Van (  ajout  le 17/04/96  )   ...........
+    !   ...      Calcul de la valeur moyenne, unique de h aux poles  .....
+
+    ijb = ij_begin
+    ije = ij_end
+
+    IF (pole_nord) THEN
+
+      !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+      DO l = 1, llm
+        DO ij = 1, iim
+          tppn(ij) = aire(ij) * teta(ij, l)
+        ENDDO
+        tpn = SSUM(iim, tppn, 1) / apoln
+
+        DO ij = 1, iip1
+          teta(ij, l) = tpn
+        ENDDO
+      ENDDO
+      !$OMP END DO NOWAIT
+
+      if (1 == 0) then
+        !!! Ehouarn: lines here 1) kill 1+1=2 in the dynamics
+        !!!                     2) should probably not be here anyway
+        !!! but are kept for those who would want to revert to previous behaviour
+        !$OMP MASTER
+        DO ij = 1, iim
+          tppn(ij) = aire(ij) * ps_dyn (ij)
+        ENDDO
+        tpn = SSUM(iim, tppn, 1) / apoln
+
+        DO ij = 1, iip1
+          ps_dyn(ij) = tpn
+        ENDDO
+        !$OMP END MASTER
+
+      ENDIF ! of if (1 == 0)
+    endif ! of of (pole_nord)
+
+    IF (pole_sud) THEN
+
+      !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+      DO l = 1, llm
+        DO ij = 1, iim
+          tpps(ij) = aire(ij + ip1jm) * teta(ij + ip1jm, l)
+        ENDDO
+
+        tps = SSUM(iim, tpps, 1) / apols
+
+        DO ij = 1, iip1
+          teta(ij + ip1jm, l) = tps
+        ENDDO
+      ENDDO
+      !$OMP END DO NOWAIT
+
+      if (1 == 0) then
+        !!! Ehouarn: lines here 1) kill 1+1=2 in the dynamics
+        !!!                     2) should probably not be here anyway
+        !!! but are kept for those who would want to revert to previous behaviour
+        !$OMP MASTER
+        DO ij = 1, iim
+          tpps(ij) = aire(ij + ip1jm) * ps_dyn (ij + ip1jm)
+        ENDDO
+        tps = SSUM(iim, tpps, 1) / apols
+
+        DO ij = 1, iip1
+          ps_dyn(ij + ip1jm) = tps
+        ENDDO
+        !$OMP END MASTER
+      ENDIF ! of if (1 == 0)
+    endif ! of if (pole_sud)
+
+
+    !$OMP BARRIER
+    !$OMP MASTER
+    CALL VTe(VTdissipation)
+    CALL stop_timer(timer_dissip)
+    CALL VTb(VThallo)
+    !$OMP END MASTER
+
+    CALL Register_SwapField_u(ucov, ucov_dyn, distrib_caldyn, Request_dissip)
+    CALL Register_SwapField_v(vcov, vcov_dyn, distrib_caldyn, Request_dissip)
+    CALL Register_SwapField_u(teta, teta_dyn, distrib_caldyn, Request_dissip)
+    CALL Register_SwapField_u(p, p_dyn, distrib_caldyn, Request_dissip)
+    CALL Register_SwapField_u(pk, pk_dyn, distrib_caldyn, Request_dissip)
+
+    CALL SendRequest(Request_dissip)
+
+    !$OMP BARRIER
+    CALL WaitRequest(Request_dissip)
+    !$OMP BARRIER
+    !$OMP MASTER
+    CALL set_distrib(distrib_caldyn)
+    CALL VTe(VThallo)
+    CALL resume_timer(timer_caldyn)
+    !        print *,'fin dissipation'
+    !$OMP END MASTER
+    !$OMP BARRIER
+
+  END SUBROUTINE call_dissip
+
+END MODULE call_dissip_mod
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/conf_gcm.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/conf_gcm.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/conf_gcm.F90	(revision 5101)
@@ -346,5 +346,5 @@
   CALL getin('maxlatfilter',maxlatfilter)
   if (maxlatfilter > 90) &
-       call abort_gcm("conf_gcm", 'maxlatfilter should be <=90', 1)
+       CALL abort_gcm("conf_gcm", 'maxlatfilter should be <=90', 1)
   
 
@@ -353,7 +353,7 @@
   CALL getin('ngroup',ngroup)
   IF (mod(iim, 2**ngroup) /= 0) &
-       call abort_gcm("conf_gcm", 'iim must be multiple of 2**ngroup', 1)
+       CALL abort_gcm("conf_gcm", 'iim must be multiple of 2**ngroup', 1)
   IF (2**ngroup > jjm + 1) &
-       call abort_gcm("conf_gcm", '2**ngroup must be <= jjm + 1', 1)
+       CALL abort_gcm("conf_gcm", '2**ngroup must be <= jjm + 1', 1)
 
   ! mode_top_bound : fields towards which sponge relaxation will be done:
@@ -365,5 +365,5 @@
   CALL getin('iflag_top_bound',iflag_top_bound)
   IF (iflag_top_bound < 0 .or. iflag_top_bound > 2) &
-       call abort_gcm("conf_gcm", 'iflag_top_bound must be 0, 1 or 2', 1)
+       CALL abort_gcm("conf_gcm", 'iflag_top_bound must be 0, 1 or 2', 1)
 
   ! mode_top_bound : fields towards which sponge relaxation will be done:
@@ -401,5 +401,5 @@
   CALL getin('ok_guide',ok_guide)
 
-  IF (ok_guide .and. adjust) call abort_gcm("conf_gcm", &
+  IF (ok_guide .and. adjust) CALL abort_gcm("conf_gcm", &
        "adjust does not work with ok_guide", 1)
 
@@ -812,5 +812,5 @@
      dzoomx = 0.2
      CALL getin('dzoomx',dzoomx)
-     call assert(dzoomx < 1, "conf_gcm: dzoomx must be < 1")
+     CALL assert(dzoomx < 1, "conf_gcm: dzoomx must be < 1")
 
      !Config  Key  = dzoomy
@@ -821,5 +821,5 @@
      dzoomy = 0.2
      CALL getin('dzoomy',dzoomy)
-     call assert(dzoomy < 1, "conf_gcm: dzoomy must be < 1")
+     CALL assert(dzoomy < 1, "conf_gcm: dzoomy must be < 1")
 
      !Config  Key  = taux
@@ -940,5 +940,5 @@
      vert_prof_dissip = merge(1, 0, ok_strato .and. llm==39)
      CALL getin('vert_prof_dissip', vert_prof_dissip)
-     call assert(vert_prof_dissip == 0 .or. vert_prof_dissip ==  1, &
+     CALL assert(vert_prof_dissip == 0 .or. vert_prof_dissip ==  1, &
           "bad value for vert_prof_dissip")
 
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/dissip_loc.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/dissip_loc.F	(revision 5100)
+++ 	(revision )
@@ -1,234 +1,0 @@
-
-! $Id: $
-
-      SUBROUTINE dissip_loc( vcov,ucov,teta,p, dv,du,dh )
-c
-      USE parallel_lmdz
-      USE write_field_loc
-      USE dissip_mod, ONLY: dissip_allocate
-      USE comconst_mod, ONLY: dtdiss
-      IMPLICIT NONE
-
-
-c ..  Avec nouveaux operateurs star :  gradiv2 , divgrad2, nxgraro2  ...
-c                                 (  10/01/98  )
-
-c=======================================================================
-c
-c   Auteur:  P. Le Van
-c   -------
-c
-c   Objet:
-c   ------
-c
-c   Dissipation horizontale
-c
-c=======================================================================
-c-----------------------------------------------------------------------
-c   Declarations:
-c   -------------
-
-      include "dimensions.h"
-      include "paramet.h"
-      include "comgeom.h"
-      include "comdissnew.h"
-      include "comdissipn.h"
-
-c   Arguments:
-c   ----------
-
-      REAL,INTENT(IN) :: vcov(ijb_v:ije_v,llm) ! covariant meridional wind
-      REAL,INTENT(IN) :: ucov(ijb_u:ije_u,llm) ! covariant zonal wind
-      REAL,INTENT(IN) :: teta(ijb_u:ije_u,llm) ! potential temperature
-      REAL,INTENT(IN) :: p(ijb_u:ije_u,llmp1) ! interlayer pressure
-      ! tendencies (.../s) on covariant winds and potential temperature
-      REAL,INTENT(OUT) :: dv(ijb_v:ije_v,llm)
-      REAL,INTENT(OUT) :: du(ijb_u:ije_u,llm)
-      REAL,INTENT(OUT) :: dh(ijb_u:ije_u,llm)
-
-c   Local:
-c   ------
-
-      REAL gdx(ijb_u:ije_u,llm),gdy(ijb_v:ije_v,llm)
-      REAL grx(ijb_u:ije_u,llm),gry(ijb_v:ije_v,llm)
-      REAL te1dt(llm),te2dt(llm),te3dt(llm)
-      REAL deltapres(ijb_u:ije_u,llm)
-
-      INTEGER l,ij
-
-      REAL  SSUM
-      integer :: ijb,ije
-      
-      LOGICAl,SAVE :: first=.TRUE.
-!$OMP THREADPRIVATE(first)
-
-      IF (first) THEN
-        CALL dissip_allocate
-        first=.FALSE.
-      ENDIF
-c-----------------------------------------------------------------------
-c   initialisations:
-c   ----------------
-
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 
-      DO l=1,llm
-         te1dt(l) = tetaudiv(l) * dtdiss
-         te2dt(l) = tetaurot(l) * dtdiss
-         te3dt(l) = tetah(l)    * dtdiss
-      ENDDO
-c$OMP END DO NOWAIT
-c      CALL initial0( ijp1llm, du )
-c      CALL initial0( ijmllm , dv )
-c      CALL initial0( ijp1llm, dh )
-     
-      ijb=ij_begin
-      ije=ij_end
-
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 
-      DO l=1,llm
-        du(ijb:ije,l)=0
-        dh(ijb:ije,l)=0
-      ENDDO
-c$OMP END DO NOWAIT
-      
-      if (pole_sud) ije=ij_end-iip1
-
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 
-      DO l=1,llm
-        dv(ijb:ije,l)=0
-      ENDDO
-c$OMP END DO NOWAIT
-     
-c-----------------------------------------------------------------------
-c   Calcul de la dissipation:
-c   -------------------------
-
-c   Calcul de la partie   grad  ( div ) :
-c   -------------------------------------
-      
-     
-      
-      IF(lstardis) THEN
-c      IF (.FALSE.) THEN
-         CALL gradiv2_loc( llm,ucov,vcov,nitergdiv,gdx,gdy )
-      ELSE
-!         CALL gradiv_p ( llm,ucov,vcov,nitergdiv,gdx,gdy )
-      ENDIF
-
-#ifdef DEBUG_IO    
-      call WriteField_u('gdx',gdx)
-      call WriteField_v('gdy',gdy)
-#endif
-
-      ijb=ij_begin
-      ije=ij_end
-      if (pole_sud) ije=ij_end-iip1
-
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 
-      DO l=1,llm
-         if (pole_nord) then
-           DO ij = 1, iip1
-              gdx(     ij ,l) = 0.
-           ENDDO
-         endif
-         
-         if (pole_sud) then
-           DO ij = 1, iip1
-              gdx(ij+ip1jm,l) = 0.
-           ENDDO
-         endif
-         
-         if (pole_nord) ijb=ij_begin+iip1
-         DO ij = ijb,ije
-            du(ij,l) = du(ij,l) - te1dt(l) *gdx(ij,l)
-         ENDDO
-
-         if (pole_nord) ijb=ij_begin
-         DO ij = ijb,ije
-            dv(ij,l) = dv(ij,l) - te1dt(l) *gdy(ij,l)
-         ENDDO
-
-       ENDDO
-c$OMP END DO NOWAIT
-c   calcul de la partie   n X grad ( rot ):
-c   ---------------------------------------
-
-      IF(lstardis) THEN
-c      IF (.FALSE.) THEN
-         CALL nxgraro2_loc( llm,ucov, vcov, nitergrot,grx,gry )
-      ELSE
-!         CALL nxgrarot_p( llm,ucov, vcov, nitergrot,grx,gry )
-      ENDIF
-
-#ifdef DEBUG_IO    
-      call WriteField_u('grx',grx)
-      call WriteField_v('gry',gry)
-#endif
-
-
-      ijb=ij_begin
-      ije=ij_end
-      if (pole_sud) ije=ij_end-iip1
-
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)       
-      DO l=1,llm
-         
-         if (pole_nord) then
-           DO ij = 1, iip1
-              grx(ij,l) = 0.
-           ENDDO
-         endif
-         
-         if (pole_nord) ijb=ij_begin+iip1
-         DO ij = ijb,ije
-            du(ij,l) = du(ij,l) - te2dt(l) * grx(ij,l)
-         ENDDO
-         
-         if (pole_nord) ijb=ij_begin
-         DO ij =  ijb, ije
-            dv(ij,l) = dv(ij,l) - te2dt(l) * gry(ij,l)
-         ENDDO
-      
-      ENDDO
-c$OMP END DO NOWAIT
-
-c   calcul de la partie   div ( grad ):
-c   -----------------------------------
-
-        
-      IF(lstardis) THEN
-c      IF (.FALSE.) THEN
-    
-      ijb=ij_begin
-      ije=ij_end
-
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)      
-       DO l = 1, llm
-          DO ij = ijb, ije
-            deltapres(ij,l) = AMAX1( 0.,  p(ij,l) - p(ij,l+1) )
-          ENDDO
-       ENDDO
-c$OMP END DO NOWAIT
-         CALL divgrad2_loc( llm,teta, deltapres  ,niterh, gdx )
-      ELSE
-!         CALL divgrad_p ( llm,teta, niterh, gdx        )
-      ENDIF
-
-#ifdef DEBUG_IO    
-      call WriteField_u('gdx',gdx)
-#endif
-
-
-      ijb=ij_begin
-      ije=ij_end
-      
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)      
-      DO l = 1,llm
-         DO ij = ijb,ije
-            dh( ij,l ) = dh( ij,l ) - te3dt(l) * gdx( ij,l )
-         ENDDO
-      ENDDO
-c$OMP END DO NOWAIT
-
-      RETURN
-      END
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/dissip_loc.f90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/dissip_loc.f90	(revision 5101)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/dissip_loc.f90	(revision 5101)
@@ -0,0 +1,229 @@
+! $Id: $
+
+SUBROUTINE dissip_loc(vcov, ucov, teta, p, dv, du, dh)
+  !
+  USE parallel_lmdz
+  USE write_field_loc
+  USE dissip_mod, ONLY: dissip_allocate
+  USE comconst_mod, ONLY: dtdiss
+  USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO
+  IMPLICIT NONE
+
+
+  ! ..  Avec nouveaux operateurs star :  gradiv2 , divgrad2, nxgraro2  ...
+  ! (  10/01/98  )
+
+  !=======================================================================
+  !
+  !   Auteur:  P. Le Van
+  !   -------
+  !
+  !   Objet:
+  !   ------
+  !
+  !   Dissipation horizontale
+  !
+  !=======================================================================
+  !-----------------------------------------------------------------------
+  !   Declarations:
+  !   -------------
+
+  include "dimensions.h"
+  include "paramet.h"
+  include "comgeom.h"
+  include "comdissnew.h"
+  include "comdissipn.h"
+
+  !   Arguments:
+  !   ----------
+
+  REAL, INTENT(IN) :: vcov(ijb_v:ije_v, llm) ! covariant meridional wind
+  REAL, INTENT(IN) :: ucov(ijb_u:ije_u, llm) ! covariant zonal wind
+  REAL, INTENT(IN) :: teta(ijb_u:ije_u, llm) ! potential temperature
+  REAL, INTENT(IN) :: p(ijb_u:ije_u, llmp1) ! interlayer pressure
+  ! ! tendencies (.../s) on covariant winds and potential temperature
+  REAL, INTENT(OUT) :: dv(ijb_v:ije_v, llm)
+  REAL, INTENT(OUT) :: du(ijb_u:ije_u, llm)
+  REAL, INTENT(OUT) :: dh(ijb_u:ije_u, llm)
+
+  !   Local:
+  !   ------
+
+  REAL :: gdx(ijb_u:ije_u, llm), gdy(ijb_v:ije_v, llm)
+  REAL :: grx(ijb_u:ije_u, llm), gry(ijb_v:ije_v, llm)
+  REAL :: te1dt(llm), te2dt(llm), te3dt(llm)
+  REAL :: deltapres(ijb_u:ije_u, llm)
+
+  INTEGER :: l, ij
+
+  REAL :: SSUM
+  integer :: ijb, ije
+
+  LOGICAl, SAVE :: first = .TRUE.
+  !$OMP THREADPRIVATE(first)
+
+  IF (first) THEN
+    CALL dissip_allocate
+    first = .FALSE.
+  ENDIF
+  !-----------------------------------------------------------------------
+  !   initialisations:
+  !   ----------------
+
+  !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+  DO l = 1, llm
+    te1dt(l) = tetaudiv(l) * dtdiss
+    te2dt(l) = tetaurot(l) * dtdiss
+    te3dt(l) = tetah(l) * dtdiss
+  ENDDO
+  !$OMP END DO NOWAIT
+  ! CALL initial0( ijp1llm, du )
+  ! CALL initial0( ijmllm , dv )
+  ! CALL initial0( ijp1llm, dh )
+
+  ijb = ij_begin
+  ije = ij_end
+
+  !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+  DO l = 1, llm
+    du(ijb:ije, l) = 0
+    dh(ijb:ije, l) = 0
+  ENDDO
+  !$OMP END DO NOWAIT
+
+  if (pole_sud) ije = ij_end - iip1
+
+  !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+  DO l = 1, llm
+    dv(ijb:ije, l) = 0
+  ENDDO
+  !$OMP END DO NOWAIT
+
+  !-----------------------------------------------------------------------
+  !   Calcul de la dissipation:
+  !   -------------------------
+
+  !   Calcul de la partie   grad  ( div ) :
+  !   -------------------------------------
+
+  IF(lstardis) THEN
+    ! IF (.FALSE.) THEN
+    CALL gradiv2_loc(llm, ucov, vcov, nitergdiv, gdx, gdy)
+  ELSE
+    ! CALL gradiv_p ( llm,ucov,vcov,nitergdiv,gdx,gdy )
+  ENDIF
+
+  IF (CPPKEY_DEBUGIO) THEN
+    CALL WriteField_u('gdx', gdx)
+    CALL WriteField_v('gdy', gdy)
+  END IF
+
+  ijb = ij_begin
+  ije = ij_end
+  if (pole_sud) ije = ij_end - iip1
+
+  !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+  DO l = 1, llm
+    if (pole_nord) then
+      DO ij = 1, iip1
+        gdx(ij, l) = 0.
+      ENDDO
+    endif
+
+    if (pole_sud) then
+      DO ij = 1, iip1
+        gdx(ij + ip1jm, l) = 0.
+      ENDDO
+    endif
+
+    if (pole_nord) ijb = ij_begin + iip1
+    DO ij = ijb, ije
+      du(ij, l) = du(ij, l) - te1dt(l) * gdx(ij, l)
+    ENDDO
+
+    if (pole_nord) ijb = ij_begin
+    DO ij = ijb, ije
+      dv(ij, l) = dv(ij, l) - te1dt(l) * gdy(ij, l)
+    ENDDO
+
+  ENDDO
+  !$OMP END DO NOWAIT
+  !   calcul de la partie   n X grad ( rot ):
+  !   ---------------------------------------
+
+  IF(lstardis) THEN
+    ! IF (.FALSE.) THEN
+    CALL nxgraro2_loc(llm, ucov, vcov, nitergrot, grx, gry)
+  ELSE
+    ! CALL nxgrarot_p( llm,ucov, vcov, nitergrot,grx,gry )
+  ENDIF
+
+  IF (CPPKEY_DEBUGIO) THEN
+    CALL WriteField_u('grx', grx)
+    CALL WriteField_v('gry', gry)
+  END IF
+
+  ijb = ij_begin
+  ije = ij_end
+  if (pole_sud) ije = ij_end - iip1
+
+  !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+  DO l = 1, llm
+
+    if (pole_nord) then
+      DO ij = 1, iip1
+        grx(ij, l) = 0.
+      ENDDO
+    endif
+
+    if (pole_nord) ijb = ij_begin + iip1
+    DO ij = ijb, ije
+      du(ij, l) = du(ij, l) - te2dt(l) * grx(ij, l)
+    ENDDO
+
+    if (pole_nord) ijb = ij_begin
+    DO ij = ijb, ije
+      dv(ij, l) = dv(ij, l) - te2dt(l) * gry(ij, l)
+    ENDDO
+
+  ENDDO
+  !$OMP END DO NOWAIT
+
+  !   calcul de la partie   div ( grad ):
+  !   -----------------------------------
+
+  IF(lstardis) THEN
+    ! IF (.FALSE.) THEN
+
+    ijb = ij_begin
+    ije = ij_end
+
+    !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+    DO l = 1, llm
+      DO ij = ijb, ije
+        deltapres(ij, l) = AMAX1(0., p(ij, l) - p(ij, l + 1))
+      ENDDO
+    ENDDO
+    !$OMP END DO NOWAIT
+    CALL divgrad2_loc(llm, teta, deltapres, niterh, gdx)
+  ELSE
+    ! CALL divgrad_p ( llm,teta, niterh, gdx        )
+  ENDIF
+
+  IF (CPPKEY_DEBUGIO) THEN
+    CALL WriteField_u('gdx', gdx)
+  END IF
+
+  ijb = ij_begin
+  ije = ij_end
+
+  !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+  DO l = 1, llm
+    DO ij = ijb, ije
+      dh(ij, l) = dh(ij, l) - te3dt(l) * gdx(ij, l)
+    ENDDO
+  ENDDO
+  !$OMP END DO NOWAIT
+
+  RETURN
+END SUBROUTINE dissip_loc
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/dissip_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/dissip_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/dissip_mod.F90	(revision 5101)
@@ -10,7 +10,7 @@
   USE parallel_lmdz
   USE dimensions_mod
-  USE gradiv2_mod, ONLY : gradiv2_allocate
-  USE nxgraro2_mod, ONLY : nxgraro2_allocate
-  USE divgrad2_mod, ONLY : divgrad2_allocate
+  USE gradiv2_mod, ONLY: gradiv2_allocate
+  USE nxgraro2_mod, ONLY: nxgraro2_allocate
+  USE divgrad2_mod, ONLY: divgrad2_allocate
   IMPLICIT NONE
 
@@ -26,7 +26,7 @@
   USE bands
   USE parallel_lmdz
-  USE gradiv2_mod,ONLY : gradiv2_switch_dissip
-  USE nxgraro2_mod,ONLY : nxgraro2_switch_dissip
-  USE divgrad2_mod,ONLY : divgrad2_switch_dissip
+  USE gradiv2_mod,ONLY: gradiv2_switch_dissip
+  USE nxgraro2_mod,ONLY: nxgraro2_switch_dissip
+  USE divgrad2_mod,ONLY: divgrad2_switch_dissip
   IMPLICIT NONE
     TYPE(distrib),INTENT(IN) :: dist
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/divgrad2_loc.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/divgrad2_loc.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/divgrad2_loc.F	(revision 5101)
@@ -50,8 +50,8 @@
 c
 c$OMP BARRIER
-       call Register_Hallo_u(divgra,llm,1,1,1,1,Request_dissip)
-       call SendRequest(Request_dissip)
+       CALL Register_Hallo_u(divgra,llm,1,1,1,1,Request_dissip)
+       CALL SendRequest(Request_dissip)
 c$OMP BARRIER
-       call WaitRequest(Request_dissip)
+       CALL WaitRequest(Request_dissip)
 c$OMP BARRIER
 
@@ -79,8 +79,8 @@
       DO  iter = 1, lh - 2
 c$OMP BARRIER
-       call Register_Hallo_u(divgra,llm,1,1,1,1,Request_dissip)
-       call SendRequest(Request_dissip)
+       CALL Register_Hallo_u(divgra,llm,1,1,1,1,Request_dissip)
+       CALL SendRequest(Request_dissip)
 c$OMP BARRIER
-       call WaitRequest(Request_dissip)
+       CALL WaitRequest(Request_dissip)
 
 c$OMP BARRIER
@@ -102,8 +102,8 @@
 c
 c$OMP BARRIER
-       call Register_Hallo_u(divgra,llm,1,1,1,1,Request_dissip)
-       call SendRequest(Request_dissip)
+       CALL Register_Hallo_u(divgra,llm,1,1,1,1,Request_dissip)
+       CALL SendRequest(Request_dissip)
 c$OMP BARRIER
-       call WaitRequest(Request_dissip)
+       CALL WaitRequest(Request_dissip)
 c$OMP BARRIER
 
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/dynetat0_loc.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/dynetat0_loc.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/dynetat0_loc.F90	(revision 5101)
@@ -9,6 +9,6 @@
   USE infotrac,    ONLY: nqtot, tracers, niso, iqIsoPha, iH2O, isoName
   USE strings_mod, ONLY: maxlen, msg, strStack, real2str, int2str, strIdx
-  USE netcdf,      ONLY: nf90_open,  nf90_nowrite, nf90_inquire_dimension, NF90_INQ_VARID, &
-                         nf90_close, nf90_get_var, NF90_INQUIRE_VARIABLE,  nf90_noerr
+  USE netcdf,      ONLY: nf90_open,  nf90_nowrite, nf90_inquire_dimension, nf90_inq_varid, &
+                         nf90_close, nf90_get_var, nf90_inquire_variable,  nf90_noerr
   USE readTracFiles_mod, ONLY: new2oldH2O, newHNO3, oldHNO3, getKey
   USE control_mod, ONLY: planet_type
@@ -122,8 +122,8 @@
 
   var="temps"
-  IF(NF90_INQ_VARID(fID,var,vID)/=nf90_noerr) THEN
+  IF(nf90_inq_varid(fID,var,vID)/=nf90_noerr) THEN
     CALL msg('missing field <temps> ; trying with <Time>', modname)
     var="Time"
-    CALL err(NF90_INQ_VARID(fID,var,vID),"inq",var)
+    CALL err(nf90_inq_varid(fID,var,vID),"inq",var)
   END IF
   CALL err(nf90_get_var(fID,vID,time),"get",var)
@@ -157,5 +157,5 @@
   ll = .FALSE.
 #ifdef REPROBUS
-  ll = NF90_INQ_VARID(fID, 'HNO3tot', vID) /= nf90_noerr                                 !--- DETECT OLD REPRO start.nc FILE
+  ll = nf90_inq_varid(fID, 'HNO3tot', vID) /= nf90_noerr                                 !--- DETECT OLD REPRO start.nc FILE
 #endif
   DO iq=1,nqtot
@@ -170,8 +170,8 @@
     END IF
     !--------------------------------------------------------------------------------------------------------------------------
-    IF(NF90_INQ_VARID(fID, var, vID) == nf90_noerr .AND. .NOT.lSkip) THEN                !=== REGULAR CASE: AVAILABLE VARIABLE
+    IF(nf90_inq_varid(fID, var, vID) == nf90_noerr .AND. .NOT.lSkip) THEN                !=== REGULAR CASE: AVAILABLE VARIABLE
       CALL get_var2(var,q_glo); q(ijb_u:ije_u,:,iq)=q_glo(ijb_u:ije_u,:)
     !--------------------------------------------------------------------------------------------------------------------------
-    ELSE IF(NF90_INQ_VARID(fID, oldVar, vID) == nf90_noerr) THEN                         !=== TRY WITH ALTERNATE NAME
+    ELSE IF(nf90_inq_varid(fID, oldVar, vID) == nf90_noerr) THEN                         !=== TRY WITH ALTERNATE NAME
       CALL msg('Tracer <'//TRIM(var)//'> is missing => initialized to <'//TRIM(oldVar)//'>', modname)
       CALL get_var2(oldVar, q_glo); q(ijb_u:ije_u,:,iq)=q_glo(ijb_u:ije_u,:)
@@ -238,10 +238,10 @@
   INTEGER :: nn(3), dids(3), k, nd, ntot
 
-  CALL err(NF90_INQ_VARID(fID,var,vID),"inq",var)
-  ierr=NF90_INQUIRE_VARIABLE(fID,vID,ndims=nd)
+  CALL err(nf90_inq_varid(fID,var,vID),"inq",var)
+  ierr=nf90_inquire_variable(fID,vID,ndims=nd)
   IF(nd==1) THEN
     CALL err(nf90_get_var(fID,vID,v),"get",var); RETURN
   END IF
-  ierr=NF90_INQUIRE_VARIABLE(fID,vID,dimids=dids)
+  ierr=nf90_inquire_variable(fID,vID,dimids=dids)
   DO k=1,nd; ierr=nf90_inquire_dimension(fID,dids(k),len=nn(k)); END DO
   ntot=PRODUCT(nn(1:nd))
@@ -263,11 +263,11 @@
 
 
-  CALL err(NF90_INQ_VARID(fID,var,vID),"inq",var)
-  ierr=NF90_INQUIRE_VARIABLE(fID,vID,ndims=nd)
+  CALL err(nf90_inq_varid(fID,var,vID),"inq",var)
+  ierr=nf90_inquire_variable(fID,vID,ndims=nd)
 
   IF(nd==1) THEN
     CALL err(nf90_get_var(fID,vID,v),"get",var); RETURN
   END IF
-  ierr=NF90_INQUIRE_VARIABLE(fID,vID,dimids=dids)
+  ierr=nf90_inquire_variable(fID,vID,dimids=dids)
 
   DO k=1,nd; ierr=nf90_inquire_dimension(fID,dids(k),len=nn(k)); END DO
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/dynredem_loc.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/dynredem_loc.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/dynredem_loc.F90	(revision 5101)
@@ -11,5 +11,5 @@
   USE strings_mod, ONLY: maxlen
   USE infotrac, ONLY: nqtot, tracers
-  USE netcdf, ONLY: nf90_create, nf90_def_dim, NF90_INQ_VARID, nf90_global,    &
+  USE netcdf, ONLY: nf90_create, nf90_def_dim, nf90_inq_varid, nf90_global,    &
                     nf90_close,  nf90_put_att, nf90_unlimited, nf90_clobber,   &
                     nf90_64bit_offset
@@ -178,6 +178,6 @@
   USE infotrac, ONLY: nqtot, tracers, type_trac
   USE control_mod
-  USE netcdf,   ONLY: nf90_open,  nf90_nowrite, nf90_get_var, NF90_INQ_VARID,  &
-                      nf90_close, NF90_WRITE,   nf90_put_var, nf90_noerr
+  USE netcdf,   ONLY: nf90_open,  nf90_nowrite, nf90_get_var, nf90_inq_varid,  &
+                      nf90_close, nf90_write,   nf90_put_var, nf90_noerr
   USE dynredem_mod, ONLY: dynredem_write_u, dynredem_write_v, dynredem_read_u, &
                           err, modname, fil, msg
@@ -213,10 +213,10 @@
   IF(mpi_rank==0) THEN !++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   modname='dynredem1_loc'; fil=fichnom
-  CALL err(nf90_open(fil,NF90_WRITE,nid),"open",fil)
+  CALL err(nf90_open(fil,nf90_write,nid),"open",fil)
 
 !--- Write/extend time coordinate
   nb = nb + 1
   var="temps"
-  CALL err(NF90_INQ_VARID(nid,var,vID),"inq",var)
+  CALL err(nf90_inq_varid(nid,var,vID),"inq",var)
   CALL err(nf90_put_var(nid,vID,[time]),"put",var)
   WRITE(lunout,*)TRIM(modname)//": Saving for ", nb, time
@@ -224,8 +224,8 @@
 !--- Rewrite control table (itaufin undefined in dynredem0)
   var="controle"
-  CALL err(NF90_INQ_VARID(nid,var,vID),"inq",var)
+  CALL err(nf90_inq_varid(nid,var,vID),"inq",var)
   CALL err(nf90_get_var(nid,vID,tab_cntrl),"get",var)
   tab_cntrl(31)=DBLE(itau_dyn + itaufin)
-  CALL err(NF90_INQ_VARID(nid,var,vID),"inq",var)
+  CALL err(nf90_inq_varid(nid,var,vID),"inq",var)
   CALL err(nf90_put_var(nid,vID,tab_cntrl),"put",var)
   END IF               !++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -253,5 +253,5 @@
 !$OMP MASTER      
       fil="start_trac.nc"
-      ierr=NF90_INQ_VARID(nid_trac,var,vID_trac)
+      ierr=nf90_inq_varid(nid_trac,var,vID_trac)
       dum='inq'; IF(ierr==nf90_noerr) dum='fnd'
       WRITE(lunout,*)msg(dum,var)
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/dynredem_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/dynredem_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/dynredem_mod.F90	(revision 5101)
@@ -37,5 +37,5 @@
 
 !$OMP MASTER
-  IF(mpi_rank==0) CALL err(NF90_INQ_VARID(ncid,id,nvarid),"inq",id)
+  IF(mpi_rank==0) CALL err(nf90_inq_varid(ncid,id,nvarid),"inq",id)
 !$OMP END MASTER
 
@@ -87,5 +87,5 @@
 
 !$OMP MASTER
-  IF(mpi_rank==0) CALL err(NF90_INQ_VARID(ncid,id,nvarid),"inq",id)
+  IF(mpi_rank==0) CALL err(nf90_inq_varid(ncid,id,nvarid),"inq",id)
 !$OMP END MASTER
 
@@ -137,5 +137,5 @@
 
 !$OMP MASTER
-  IF(mpi_rank==0) CALL err(NF90_INQ_VARID(ncid,id,nvarid),'inq',id)
+  IF(mpi_rank==0) CALL err(nf90_inq_varid(ncid,id,nvarid),'inq',id)
 !$OMP END MASTER
 
@@ -213,5 +213,5 @@
   IF(nd==1) CALL err(nf90_put_var(ncid,nvarid,RESHAPE(v,nn(1:1))),var)
   IF(nd==2) CALL err(nf90_put_var(ncid,nvarid,RESHAPE(v,nn(1:2))),var)
-  CALL err(NF90_REDEF(ncid))
+  CALL err(nf90_redef(ncid))
 END SUBROUTINE put_var
 
@@ -260,5 +260,5 @@
   IF(ierr==nf90_noerr) RETURN
   IF(.NOT.PRESENT(typ)) THEN
-    CALL ABORT_gcm(modname,NF90_STRERROR(ierr),ierr)
+    CALL ABORT_gcm(modname,nf90_strerror(ierr),ierr)
   ELSE
     CALL ABORT_gcm(modname,msg(typ,nam),ierr)
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/exner_hyb_loc_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/exner_hyb_loc_m.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/exner_hyb_loc_m.F90	(revision 5101)
@@ -5,5 +5,5 @@
 contains
 
-  SUBROUTINE  exner_hyb_loc(ngrid, ps, p, pks,pk,pkf)
+  SUBROUTINE  exner_hyb_loc(ngrid, ps, p, pks, pk, pkf)
 
     !     Auteurs :  P.Le Van  , Fr. Hourdin  .
@@ -14,5 +14,5 @@
 
     !   ************************************************************************
-    !    Calcule la fonction d'Exner pk = Cp * (p/preff) ** kappa , aux milieux des 
+    !    Calcule la fonction d'Exner pk = Cp * (p/preff) ** kappa , aux milieux des
     !    couches .   Pk(l) sera calcule aux milieux  des couches l ,entre les
     !    pressions p(l) et p(l+1) ,definis aux interfaces des llm couches .
@@ -26,9 +26,8 @@
     !    ( voir note de Fr.Hourdin )  ,
 
-    !    on determine successivement , du haut vers le bas des couches, les 
-    !    coef. alpha(llm),beta(llm) .,.,alpha(l),beta(l),,,alpha(2),beta(2), 
-    !    puis pk(ij,1). Ensuite ,on calcule,du bas vers le haut des couches,  
+    !    on determine successivement , du haut vers le bas des couches, les
+    !    coef. alpha(llm),beta(llm) .,.,alpha(l),beta(l),,,alpha(2),beta(2),
+    !    puis pk(ij,1). Ensuite ,on calcule,du bas vers le haut des couches,
     !     pk(ij,l)  donne  par la relation (2),  pour l = 2 a l = llm .
-
 
     USE parallel_lmdz
@@ -37,5 +36,6 @@
     USE comconst_mod, ONLY: cpp, kappa, r, jmp1
     USE comvert_mod, ONLY: preff
-    
+    USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO
+
     IMPLICIT NONE
 
@@ -45,36 +45,36 @@
 
     INTEGER  ngrid
-    REAL p(ijb_u:ije_u,llmp1),pk(ijb_u:ije_u,llm)
-    REAL, optional:: pkf(ijb_u:ije_u,llm)
-    REAL ps(ijb_u:ije_u),pks(ijb_u:ije_u)
-    REAL alpha(ijb_u:ije_u,llm),beta(ijb_u:ije_u,llm)
+    REAL p(ijb_u:ije_u, llmp1), pk(ijb_u:ije_u, llm)
+    REAL, optional :: pkf(ijb_u:ije_u, llm)
+    REAL ps(ijb_u:ije_u), pks(ijb_u:ije_u)
+    REAL alpha(ijb_u:ije_u, llm), beta(ijb_u:ije_u, llm)
 
     !    .... variables locales   ...
 
     INTEGER l, ij
-    REAL unpl2k,dellta
+    REAL unpl2k, dellta
 
-    INTEGER ije,ijb,jje,jjb
-    logical,save :: firstcall=.true.
-    !$OMP THREADPRIVATE(firstcall) 
-    character(len=*),parameter :: modname="exner_hyb_loc"
+    INTEGER ije, ijb, jje, jjb
+    logical, save :: firstcall = .true.
+    !$OMP THREADPRIVATE(firstcall)
+    character(len = *), parameter :: modname = "exner_hyb_loc"
 
-    !$OMP BARRIER           
+    !$OMP BARRIER
 
     ! Sanity check
     if (firstcall) then
-       ! sanity checks for Shallow Water case (1 vertical layer)
-       if (llm==1) then
-          if (kappa/=1) then
-             call abort_gcm(modname, &
-                  "kappa!=1 , but running in Shallow Water mode!!",42)
-          endif
-          if (cpp/=r) then
-             call abort_gcm(modname, &
-                  "cpp!=r , but running in Shallow Water mode!!",42)
-          endif
-       endif ! of if (llm.eq.1)
+      ! sanity checks for Shallow Water case (1 vertical layer)
+      if (llm==1) then
+        if (kappa/=1) then
+          CALL abort_gcm(modname, &
+                  "kappa!=1 , but running in Shallow Water mode!!", 42)
+        endif
+        if (cpp/=r) then
+          CALL abort_gcm(modname, &
+                  "cpp!=r , but running in Shallow Water mode!!", 42)
+        endif
+      endif ! of if (llm.eq.1)
 
-       firstcall=.false.
+      firstcall = .false.
     endif ! of if (firstcall)
 
@@ -84,30 +84,30 @@
     if (llm==1) then
 
-       ! Compute pks(:),pk(:),pkf(:)
-       ijb=ij_begin
-       ije=ij_end
-       !$OMP DO SCHEDULE(STATIC)
-       DO ij=ijb, ije
-          pks(ij) = (cpp/preff) * ps(ij)
-          pk(ij,1) = .5*pks(ij)
-          if (present(pkf)) pkf(ij,1)=pk(ij,1)
-       ENDDO
-       !$OMP ENDDO
+      ! Compute pks(:),pk(:),pkf(:)
+      ijb = ij_begin
+      ije = ij_end
+      !$OMP DO SCHEDULE(STATIC)
+      DO ij = ijb, ije
+        pks(ij) = (cpp / preff) * ps(ij)
+        pk(ij, 1) = .5 * pks(ij)
+        if (present(pkf)) pkf(ij, 1) = pk(ij, 1)
+      ENDDO
+      !$OMP ENDDO
 
-       !$OMP BARRIER
-       if (present(pkf)) then
-          jjb=jj_begin
-          jje=jj_end
-          CALL filtreg_p ( pkf,jjb_u,jje_u,jjb,jje, jmp1, llm, &
-               2, 1, .TRUE., 1 )
-       end if
+      !$OMP BARRIER
+      if (present(pkf)) then
+        jjb = jj_begin
+        jje = jj_end
+        CALL filtreg_p (pkf, jjb_u, jje_u, jjb, jje, jmp1, llm, &
+                2, 1, .TRUE., 1)
+      end if
 
-       ! our work is done, exit routine
-       return
+      ! our work is done, exit routine
+      return
     endif ! of if (llm.eq.1)
 
     ! General case:
 
-    unpl2k    = 1.+ 2.* kappa
+    unpl2k = 1. + 2. * kappa
 
     !     -------------
@@ -115,10 +115,10 @@
     !     -------------
 
-    ijb=ij_begin
-    ije=ij_end
+    ijb = ij_begin
+    ije = ij_end
 
     !$OMP DO SCHEDULE(STATIC)
-    DO   ij  = ijb, ije
-       pks(ij) = cpp * ( ps(ij)/preff ) ** kappa
+    DO   ij = ijb, ije
+      pks(ij) = cpp * (ps(ij) / preff) ** kappa
     ENDDO
     !$OMP ENDDO
@@ -131,7 +131,7 @@
 
     !$OMP DO SCHEDULE(STATIC)
-    DO     ij      = ijb,ije
-       alpha(ij,llm) = 0.
-       beta (ij,llm) = 1./ unpl2k
+    DO     ij = ijb, ije
+      alpha(ij, llm) = 0.
+      beta (ij, llm) = 1. / unpl2k
     ENDDO
     !$OMP ENDDO NOWAIT
@@ -139,13 +139,13 @@
     !     ... Calcul des coeff. alpha et beta  pour l = llm-1  a l = 2 ...
 
-    DO l = llm -1 , 2 , -1
+    DO l = llm - 1, 2, -1
 
-       !$OMP DO SCHEDULE(STATIC)
-       DO ij = ijb, ije
-          dellta = p(ij,l)* unpl2k + p(ij,l+1)* ( beta(ij,l+1)-unpl2k )
-          alpha(ij,l)  = - p(ij,l+1) / dellta * alpha(ij,l+1)
-          beta (ij,l)  =   p(ij,l  ) / dellta   
-       ENDDO
-       !$OMP ENDDO NOWAIT
+      !$OMP DO SCHEDULE(STATIC)
+      DO ij = ijb, ije
+        dellta = p(ij, l) * unpl2k + p(ij, l + 1) * (beta(ij, l + 1) - unpl2k)
+        alpha(ij, l) = - p(ij, l + 1) / dellta * alpha(ij, l + 1)
+        beta (ij, l) = p(ij, l) / dellta
+      ENDDO
+      !$OMP ENDDO NOWAIT
     ENDDO
 
@@ -154,7 +154,7 @@
 
     !$OMP DO SCHEDULE(STATIC)
-    DO   ij   = ijb, ije
-       pk(ij,1) = ( p(ij,1)*pks(ij) - 0.5*alpha(ij,2)*p(ij,2) )  / &
-            (  p(ij,1)* (1.+kappa) + 0.5*( beta(ij,2)-unpl2k )* p(ij,2) )
+    DO   ij = ijb, ije
+      pk(ij, 1) = (p(ij, 1) * pks(ij) - 0.5 * alpha(ij, 2) * p(ij, 2)) / &
+              (p(ij, 1) * (1. + kappa) + 0.5 * (beta(ij, 2) - unpl2k) * p(ij, 2))
     ENDDO
     !$OMP ENDDO NOWAIT
@@ -163,34 +163,34 @@
 
     DO l = 2, llm
-       !$OMP DO SCHEDULE(STATIC)
-       DO   ij   = ijb, ije
-          pk(ij,l) = alpha(ij,l) + beta(ij,l) * pk(ij,l-1)
-       ENDDO
-       !$OMP ENDDO NOWAIT        
+      !$OMP DO SCHEDULE(STATIC)
+      DO   ij = ijb, ije
+        pk(ij, l) = alpha(ij, l) + beta(ij, l) * pk(ij, l - 1)
+      ENDDO
+      !$OMP ENDDO NOWAIT
     ENDDO
 
     if (present(pkf)) then
-       !    calcul de pkf
+      !    calcul de pkf
 
-       DO l = 1, llm
-          !$OMP DO SCHEDULE(STATIC)
-          DO   ij   = ijb, ije
-             pkf(ij,l)=pk(ij,l)
-          ENDDO
-          !$OMP ENDDO NOWAIT             
-       ENDDO
+      DO l = 1, llm
+        !$OMP DO SCHEDULE(STATIC)
+        DO   ij = ijb, ije
+          pkf(ij, l) = pk(ij, l)
+        ENDDO
+        !$OMP ENDDO NOWAIT
+      ENDDO
 
-       !$OMP BARRIER
+      !$OMP BARRIER
 
-       jjb=jj_begin
-       jje=jj_end
-#ifdef DEBUG_IO    
-       call WriteField_u('pkf',pkf)
-#endif
-       CALL filtreg_p ( pkf,jjb_u,jje_u,jjb,jje, jmp1, llm, &
-            2, 1, .TRUE., 1 )
-#ifdef DEBUG_IO    
-       call WriteField_u('pkf',pkf)
-#endif     
+      jjb = jj_begin
+      jje = jj_end
+      IF (CPPKEY_DEBUGIO) THEN
+        CALL WriteField_u('pkf', pkf)
+      END IF
+      CALL filtreg_p (pkf, jjb_u, jje_u, jjb, jje, jmp1, llm, &
+              2, 1, .TRUE., 1)
+      IF (CPPKEY_DEBUGIO) THEN
+        CALL WriteField_u('pkf', pkf)
+      END IF
     end if
 
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/exner_milieu_loc_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/exner_milieu_loc_m.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/exner_milieu_loc_m.F90	(revision 5101)
@@ -60,9 +60,9 @@
        if (llm==1) then
           if (kappa/=1) then
-             call abort_gcm(modname, &
+             CALL abort_gcm(modname, &
                   "kappa!=1 , but running in Shallow Water mode!!",42)
           endif
           if (cpp/=r) then
-             call abort_gcm(modname, &
+             CALL abort_gcm(modname, &
                   "cpp!=r , but running in Shallow Water mode!!",42)
           endif
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/filtreg_p.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/filtreg_p.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/filtreg_p.F	(revision 5101)
@@ -3,5 +3,5 @@
       SUBROUTINE filtreg_p ( champ, ibeg, iend, nlat, nbniv, 
      &     ifiltre, iaire, griscal ,iter)
-      USE parallel_lmdz, only : OMP_CHUNK
+      USE parallel_lmdz, ONLY: OMP_CHUNK
       USE mod_filtre_fft
       USE timer_filtre
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/fluxstokenc_p.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/fluxstokenc_p.F	(revision 5100)
+++ 	(revision )
@@ -1,175 +1,0 @@
-
-! $Id: caladvtrac_p.F 1299 2010-01-20 14:27:21Z fairhead $
-
-c
-c
-            SUBROUTINE fluxstokenc_p(pbaru,pbarv ,
-     *                   masse,  teta, phi)
-      USE parallel_lmdz 
-      USE control_mod, ONLY : iapp_tracvl,planet_type,iphysiq
-      USE caladvtrac_mod
-      USE mod_hallo
-      USE bands
-      USE times
-      USE Vampir
-      USE write_field_loc
-
-c
-      IMPLICIT NONE
-c
-c     Auteurs:   F.Hourdin , P.Le Van, F.Forget, F.Codron  
-c
-c=======================================================================
-c
-c       Shema de  Van Leer
-c
-c=======================================================================
-
-
-      include "dimensions.h"
-      include "paramet.h"
-      include "tracstoke.h"
-
-c   Arguments:
-c   ----------
-      REAL :: pbaru( ijb_u:ije_u,llm ),pbarv( ijb_v:ije_v,llm)
-      REAL :: masse(ijb_u:ije_u,llm)
-      REAL :: teta( ijb_u:ije_u,llm)
-      REAL :: phi(ijb_u:ije_u,llm)
-      
-      INTEGER,SAVE :: pasflx=0
-!$OMP THREADPRIVATE(pasflx)
-      INTEGER ::  ijb,ije,ijbu,ijbv,ijeu,ijev,j
-      INTEGER :: ij,l
-      TYPE(Request),SAVE :: Request_vanleer
-!$OMP THREADPRIVATE(Request_vanleer)
-
-
-
-      !write(*,*) 'caladvtrac 58: entree'     
-      ijbu=ij_begin
-      ijeu=ij_end
-      
-      ijbv=ij_begin-iip1
-      ijev=ij_end
-      if (pole_nord) ijbv=ij_begin
-      if (pole_sud)  ijev=ij_end-iip1
-
-      IF(pasflx==0) THEN
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)        
-      DO l=1,llm   
-          tetac(ijbu:ijeu,l)=0.
-          phic(ijbu:ijeu,l)=0.
-          pbarucc(ijbu:ijeu,l)=0.
-          pbarvcc(ijbv:ijev,l)=0.
-        ENDDO
-c$OMP END DO NOWAIT  
-      ENDIF
-
-c   accumulation des flux de masse horizontaux
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
-      DO l=1,llm
-         DO ij = ijbu,ijeu
-            pbarucc(ij,l) = pbarucc(ij,l) + pbaru(ij,l)
-            tetac(ij,l) = tetac(ij,l) + teta(ij,l) 
-            phic(ij,l) = phic(ij,l) + phi(ij,l)
-
-         ENDDO
-         DO ij = ijbv,ijev
-            pbarvcc(ij,l) = pbarvcc(ij,l) + pbarv(ij,l)
-         ENDDO
-      ENDDO
-c$OMP END DO NOWAIT
-
-c   selection de la masse instantannee des mailles avant le transport.
-      IF(pasflx==0) THEN
-
-          ijb=ij_begin
-          ije=ij_end
-
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
-      DO l=1,llm
-          massec(ijb:ije,l)=masse(ijb:ije,l)
-       ENDDO
-c$OMP END DO NOWAIT
-
-      ENDIF
-
-      pasflx   = pasflx+1
-
-
-c   Test pour savoir si on advecte a ce pas de temps
-
-      IF ( pasflx==(iphysiq*istphy) ) THEN
-      !write(*,*) 'caladvtrac 133'
-c$OMP MASTER
-      call suspend_timer(timer_caldyn)
-c$OMP END MASTER
-      
-      ijb=ij_begin
-      ije=ij_end
-
-
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
-      DO l=1,llm
-            pbarucc(ijb:ije,l) = pbarucc(ijb:ije,l)/REAL(iphysiq*istphy)
-            tetac(ijb:ije,l) = tetac(ijb:ije,l)/REAL(iphysiq*istphy)
-            phic(ijb:ije,l) = phic(ijb:ije,l)/REAL(iphysiq*istphy)
-      ENDDO
-c$OMP ENDDO NOWAIT
-
-      if (pole_sud) ije=ij_end-iip1
-
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
-      DO l=1,llm
-            pbarvcc(ijb:ije,l) = pbarvcc(ijb:ije,l)/REAL(iphysiq*istphy)
-      ENDDO
-c$OMP ENDDO NOWAIT
-
-
-c$OMP BARRIER
-        call Register_Hallo_u(pbarucc,llm,1,1,1,1,Request_vanleer)
-        call Register_Hallo_v(pbarvcc,llm,1,1,1,1,Request_vanleer)
-        call SendRequest(Request_vanleer)
-c$OMP BARRIER
-        call WaitRequest(Request_vanleer)
-c$OMP BARRIER
-
-
-
-      
-cc   ..  Modif P.Le Van  ( 20/12/97 )  ....
-cc
-
-c   traitement des flux de masse avant advection.
-c     1. calcul de w
-c     2. groupement des mailles pres du pole.
-
-        CALL groupe_loc( massec, pbarucc,pbarvcc, pbarugg,pbarvgg,wgg )
-
-
-
-         ijb=ij_begin
-         ije=ij_end
-
-c$OMP BARRIER
-         CALL WriteField_u('pbarug',pbarugg)
-         CALL WriteField_v('pbarvg',pbarvgg)
-         CALL WriteField_u('wg',wgg)
-         CALL WriteField_u('tetag',tetac)
-         CALL WriteField_u('phig',phic)
-         CALL WriteField_u('masseg',massec)
-
-
-c$OMP MASTER
-        call Set_Distrib(distrib_caldyn)
-        call VTe(VThallo)
-        call resume_timer(timer_caldyn)
-c$OMP END MASTER
-
-
-c$OMP BARRIER
-          pasflx=0
-       ENDIF ! if iadvtr.EQ.iapp_tracvl
-
-      END
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/fluxstokenc_p.f90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/fluxstokenc_p.f90	(revision 5101)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/fluxstokenc_p.f90	(revision 5101)
@@ -0,0 +1,167 @@
+! $Id: caladvtrac_p.F 1299 2010-01-20 14:27:21Z fairhead $
+
+!
+!
+SUBROUTINE fluxstokenc_p(pbaru, pbarv, masse, teta, phi)
+  USE parallel_lmdz
+  USE control_mod, ONLY: iapp_tracvl, planet_type, iphysiq
+  USE caladvtrac_mod
+  USE mod_hallo
+  USE bands
+  USE times
+  USE Vampir
+  USE write_field_loc
+
+
+  IMPLICIT NONE
+  !
+  ! Auteurs:   F.Hourdin , P.Le Van, F.Forget, F.Codron
+  !
+  !=======================================================================
+  !
+  !   Shema de  Van Leer
+  !
+  !=======================================================================
+
+  include "dimensions.h"
+  include "paramet.h"
+  include "tracstoke.h"
+
+  !   Arguments:
+  !   ----------
+  REAL :: pbaru(ijb_u:ije_u, llm), pbarv(ijb_v:ije_v, llm)
+  REAL :: masse(ijb_u:ije_u, llm)
+  REAL :: teta(ijb_u:ije_u, llm)
+  REAL :: phi(ijb_u:ije_u, llm)
+
+  INTEGER, SAVE :: pasflx = 0
+  !$OMP THREADPRIVATE(pasflx)
+  INTEGER :: ijb, ije, ijbu, ijbv, ijeu, ijev, j
+  INTEGER :: ij, l
+  TYPE(Request), SAVE :: Request_vanleer
+  !$OMP THREADPRIVATE(Request_vanleer)
+
+
+
+  ! !write(*,*) 'caladvtrac 58: entree'
+  ijbu = ij_begin
+  ijeu = ij_end
+
+  ijbv = ij_begin - iip1
+  ijev = ij_end
+  if (pole_nord) ijbv = ij_begin
+  if (pole_sud)  ijev = ij_end - iip1
+
+  IF(pasflx==0) THEN
+    !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+    DO l = 1, llm
+      tetac(ijbu:ijeu, l) = 0.
+      phic(ijbu:ijeu, l) = 0.
+      pbarucc(ijbu:ijeu, l) = 0.
+      pbarvcc(ijbv:ijev, l) = 0.
+    ENDDO
+    !$OMP END DO NOWAIT
+  ENDIF
+
+  !   accumulation des flux de masse horizontaux
+  !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+  DO l = 1, llm
+    DO ij = ijbu, ijeu
+      pbarucc(ij, l) = pbarucc(ij, l) + pbaru(ij, l)
+      tetac(ij, l) = tetac(ij, l) + teta(ij, l)
+      phic(ij, l) = phic(ij, l) + phi(ij, l)
+
+    ENDDO
+    DO ij = ijbv, ijev
+      pbarvcc(ij, l) = pbarvcc(ij, l) + pbarv(ij, l)
+    ENDDO
+  ENDDO
+  !$OMP END DO NOWAIT
+
+  !   selection de la masse instantannee des mailles avant le transport.
+  IF(pasflx==0) THEN
+
+    ijb = ij_begin
+    ije = ij_end
+
+    !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+    DO l = 1, llm
+      massec(ijb:ije, l) = masse(ijb:ije, l)
+    ENDDO
+    !$OMP END DO NOWAIT
+
+  ENDIF
+
+  pasflx = pasflx + 1
+
+
+  !   Test pour savoir si on advecte a ce pas de temps
+
+  IF (pasflx==(iphysiq * istphy)) THEN
+    ! !write(*,*) 'caladvtrac 133'
+    !$OMP MASTER
+    CALL suspend_timer(timer_caldyn)
+    !$OMP END MASTER
+
+    ijb = ij_begin
+    ije = ij_end
+
+
+    !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+    DO l = 1, llm
+      pbarucc(ijb:ije, l) = pbarucc(ijb:ije, l) / REAL(iphysiq * istphy)
+      tetac(ijb:ije, l) = tetac(ijb:ije, l) / REAL(iphysiq * istphy)
+      phic(ijb:ije, l) = phic(ijb:ije, l) / REAL(iphysiq * istphy)
+    ENDDO
+    !$OMP ENDDO NOWAIT
+
+    if (pole_sud) ije = ij_end - iip1
+
+    !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+    DO l = 1, llm
+      pbarvcc(ijb:ije, l) = pbarvcc(ijb:ije, l) / REAL(iphysiq * istphy)
+    ENDDO
+    !$OMP ENDDO NOWAIT
+
+
+    !$OMP BARRIER
+    CALL Register_Hallo_u(pbarucc, llm, 1, 1, 1, 1, Request_vanleer)
+    CALL Register_Hallo_v(pbarvcc, llm, 1, 1, 1, 1, Request_vanleer)
+    CALL SendRequest(Request_vanleer)
+    !$OMP BARRIER
+    CALL WaitRequest(Request_vanleer)
+    !$OMP BARRIER
+
+    !c   ..  Modif P.Le Van  ( 20/12/97 )  ....
+    !c
+
+    !   traitement des flux de masse avant advection.
+    ! 1. calcul de w
+    ! 2. groupement des mailles pres du pole.
+
+    CALL groupe_loc(massec, pbarucc, pbarvcc, pbarugg, pbarvgg, wgg)
+
+    ijb = ij_begin
+    ije = ij_end
+
+    !$OMP BARRIER
+    CALL WriteField_u('pbarug', pbarugg)
+    CALL WriteField_v('pbarvg', pbarvgg)
+    CALL WriteField_u('wg', wgg)
+    CALL WriteField_u('tetag', tetac)
+    CALL WriteField_u('phig', phic)
+    CALL WriteField_u('masseg', massec)
+
+
+    !$OMP MASTER
+    CALL Set_Distrib(distrib_caldyn)
+    CALL VTe(VThallo)
+    CALL resume_timer(timer_caldyn)
+    !$OMP END MASTER
+
+
+    !$OMP BARRIER
+    pasflx = 0
+  ENDIF ! if iadvtr.EQ.iapp_tracvl
+
+END SUBROUTINE fluxstokenc_p
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/friction_loc.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/friction_loc.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/friction_loc.F	(revision 5101)
@@ -55,9 +55,9 @@
       IF (firstcall) THEN
         ! set friction type
-        call getin("friction_type",friction_type)
+        CALL getin("friction_type",friction_type)
         if ((friction_type<0).or.(friction_type>1)) then
           abort_message="wrong friction type"
           write(lunout,*)'Friction: wrong friction type',friction_type
-          call abort_gcm(modname,abort_message,42)
+          CALL abort_gcm(modname,abort_message,42)
         endif
         firstcall=.false.
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/gcm.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/gcm.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/gcm.F90	(revision 5101)
@@ -134,5 +134,5 @@
 
   CALL conf_gcm( 99, .TRUE. )
-  if (mod(iphysiq, iperiod) /= 0) call abort_gcm("conf_gcm", &
+  if (mod(iphysiq, iperiod) /= 0) CALL abort_gcm("conf_gcm", &
        "iphysiq must be a multiple of iperiod", 1)
 
@@ -143,6 +143,6 @@
   CALL init_const_mpi
 
-  call init_parallel
-  call Read_Distrib
+  CALL init_parallel
+  CALL Read_Distrib
 
 !#ifdef CPP_PHYS
@@ -156,14 +156,14 @@
 
   CALL set_bands
-  if (mpi_rank==0) call WriteBands
-  call Set_Distrib(distrib_caldyn)
+  if (mpi_rank==0) CALL WriteBands
+  CALL Set_Distrib(distrib_caldyn)
 
   !$OMP PARALLEL
-  call Init_Mod_hallo
+  CALL Init_Mod_hallo
   !$OMP END PARALLEL
 
   !#ifdef CPP_PHYS
   !c$OMP PARALLEL
-  !      call InitComgeomphy ! now done in iniphysiq
+  !      CALL InitComgeomphy ! now done in iniphysiq
   !c$OMP END PARALLEL 
   !#endif
@@ -177,18 +177,18 @@
 #ifdef CPP_IOIPSL
   if (calend == 'earth_360d') then
-     call ioconf_calendar('360_day')
+     CALL ioconf_calendar('360_day')
      write(lunout,*)'CALENDRIER CHOISI: Terrestre a 360 jours/an'
      xios_cal_type='d360'
   else if (calend == 'earth_365d') then
-     call ioconf_calendar('noleap')
+     CALL ioconf_calendar('noleap')
      write(lunout,*)'CALENDRIER CHOISI: Terrestre a 365 jours/an'
      xios_cal_type='noleap'
   else if (calend == 'gregorian') then
-     call ioconf_calendar('gregorian')
+     CALL ioconf_calendar('gregorian')
      write(lunout,*)'CALENDRIER CHOISI: Terrestre bissextile'
      xios_cal_type='gregorian'
   else
      abort_message = 'Mauvais choix de calendrier'
-     call abort_gcm(modname,abort_message,1)
+     CALL abort_gcm(modname,abort_message,1)
   endif
 #endif
@@ -200,5 +200,5 @@
   !  Choix du nombre de traceurs et du schema pour l'advection
   !  dans fichier traceur.def, par default ou via INCA
-  call init_infotrac
+  CALL init_infotrac
 
   ! Allocation de la tableau q : champs advectes   
@@ -254,5 +254,5 @@
      abort_message =  &
           'Il faut choisir un nb de pas par jour multiple de iperiod'
-     call abort_gcm(modname,abort_message,1)
+     CALL abort_gcm(modname,abort_message,1)
   ENDIF
 
@@ -260,5 +260,5 @@
      abort_message =  &
           'Il faut choisir un nb de pas par jour multiple de iphysiq'
-     call abort_gcm(modname,abort_message,1)
+     CALL abort_gcm(modname,abort_message,1)
   ENDIF
 
@@ -329,14 +329,14 @@
   mois = 1
   heure = 0.
-  call ymds2ju(annee_ref, mois, day_ref, heure, jD_ref)
+  CALL ymds2ju(annee_ref, mois, day_ref, heure, jD_ref)
   jH_ref = jD_ref - int(jD_ref)
   jD_ref = int(jD_ref)
 
-  call ioconf_startdate(INT(jD_ref), jH_ref)
+  CALL ioconf_startdate(INT(jD_ref), jH_ref)
 
   write(lunout,*)'DEBUG'
   write(lunout,*)'annee_ref, mois, day_ref, heure, jD_ref'
   write(lunout,*)annee_ref, mois, day_ref, heure, jD_ref
-  call ju2ymds(jD_ref+jH_ref,anref, moisref, jourref, heureref)
+  CALL ju2ymds(jD_ref+jH_ref,anref, moisref, jourref, heureref)
   write(lunout,*)'jD_ref+jH_ref,an, mois, jour, heure'
   write(lunout,*)jD_ref+jH_ref,anref, moisref, jourref, heureref
@@ -391,7 +391,7 @@
 
 #ifdef CPP_IOIPSL
-  call ju2ymds(jD_ref + day_ini - day_ref, an, mois, jour, heure)
+  CALL ju2ymds(jD_ref + day_ini - day_ref, an, mois, jour, heure)
   write (lunout,301)jour, mois, an
-  call ju2ymds(jD_ref + day_end - day_ref, an, mois, jour, heure)
+  CALL ju2ymds(jD_ref + day_end - day_ref, an, mois, jour, heure)
   write (lunout,302)jour, mois, an
 301 FORMAT('1'/,15x,'run du ', i2,'/',i2,'/',i4)
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/getparam.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/getparam.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/getparam.F90	(revision 5101)
@@ -53,5 +53,5 @@
 
     ret_val=def_val
-    call getin(TARGET,ret_val)
+    CALL getin(TARGET,ret_val)
 
     IF (mpi_rank==0) THEN
@@ -79,5 +79,5 @@
 
     ret_val=def_val
-    call getin(TARGET,ret_val)
+    CALL getin(TARGET,ret_val)
 
     IF (mpi_rank==0) THEN
@@ -106,5 +106,5 @@
 
     ret_val=def_val
-    call getin(TARGET,ret_val)
+    CALL getin(TARGET,ret_val)
 
     IF (mpi_rank==0) THEN
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/gradiv2_loc.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/gradiv2_loc.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/gradiv2_loc.F	(revision 5101)
@@ -66,8 +66,8 @@
 
 c$OMP BARRIER
-       call Register_Hallo_v(gdy,llm,1,0,0,1,Request_dissip)
-       call SendRequest(Request_dissip)
+       CALL Register_Hallo_v(gdy,llm,1,0,0,1,Request_dissip)
+       CALL SendRequest(Request_dissip)
 c$OMP BARRIER
-       call WaitRequest(Request_dissip)
+       CALL WaitRequest(Request_dissip)
 c$OMP BARRIER
 c
@@ -79,24 +79,24 @@
 
       CALL    divergf_loc( klevel, gdx,   gdy , div )
-c      call write_field3d_p('div1',reshape(div,(/iip1,jjp1,llm/)))
+c      CALL write_field3d_p('div1',reshape(div,(/iip1,jjp1,llm/)))
 
       IF( ld>1 )   THEN
 c$OMP BARRIER
-       call Register_Hallo_u(div,llm,1,1,1,1,Request_dissip)
-       call SendRequest(Request_dissip)
+       CALL Register_Hallo_u(div,llm,1,1,1,1,Request_dissip)
+       CALL SendRequest(Request_dissip)
 c$OMP BARRIER
-       call WaitRequest(Request_dissip)
+       CALL WaitRequest(Request_dissip)
 c$OMP BARRIER
 	CALL laplacien_loc( klevel, div,  div     )
 
 c    ......  Iteration de l'operateur laplacien_gam   .......
-c         call write_field3d_p('div2',reshape(div,(/iip1,jjp1,llm/)))
+c         CALL write_field3d_p('div2',reshape(div,(/iip1,jjp1,llm/)))
 
         DO iter = 1, ld -2
 c$OMP BARRIER
-       call Register_Hallo_u(div,llm,1,1,1,1,Request_dissip)
-       call SendRequest(Request_dissip)
+       CALL Register_Hallo_u(div,llm,1,1,1,1,Request_dissip)
+       CALL SendRequest(Request_dissip)
 c$OMP BARRIER
-       call WaitRequest(Request_dissip)
+       CALL WaitRequest(Request_dissip)
 
 c$OMP BARRIER
@@ -106,5 +106,5 @@
      &                          div, div       )
         ENDDO
-c        call write_field3d_p('div3',reshape(div,(/iip1,jjp1,llm/)))
+c        CALL write_field3d_p('div3',reshape(div,(/iip1,jjp1,llm/)))
       ENDIF
 
@@ -114,10 +114,10 @@
        CALL filtreg_p( div   ,jjb_u,jje_u,jjb,jje, jjp1, 
      &                 klevel, 2, 1, .TRUE., 1 )
-c       call exchange_Hallo(div,ip1jmp1,llm,0,1)
+c       CALL exchange_Hallo(div,ip1jmp1,llm,0,1)
 c$OMP BARRIER
-       call Register_Hallo_u(div,llm,1,1,1,1,Request_dissip)
-       call SendRequest(Request_dissip)
+       CALL Register_Hallo_u(div,llm,1,1,1,1,Request_dissip)
+       CALL SendRequest(Request_dissip)
 c$OMP BARRIER
-       call WaitRequest(Request_dissip)
+       CALL WaitRequest(Request_dissip)
 
 c$OMP BARRIER
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/groupe_loc.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/groupe_loc.F	(revision 5100)
+++ 	(revision )
@@ -1,128 +1,0 @@
-      subroutine groupe_loc(pext,pbaru,pbarv,pbarum,pbarvm,wm)
-      USE parallel_lmdz
-      USE Write_field_loc
-      USE groupe_mod
-      USE comconst_mod, ONLY: ngroup
-      implicit none
-
-c   sous-programme servant a fitlrer les champs de flux de masse aux
-c   poles en "regroupant" les mailles 2 par 2 puis 4 par 4 etc. au fur
-c   et a mesure qu'on se rapproche du pole.
-c
-c   en entree: pext, pbaru et pbarv
-c
-c   en sortie:  pbarum,pbarvm et wm.
-c
-c   remarque, le wm est recalcule a partir des pbaru pbarv et on n'a donc
-c   pas besoin de w en entree.
-
-      include "dimensions.h"
-      include "paramet.h"
-      include "comgeom2.h"
-
-!     integer ngroup
-!     parameter (ngroup=3)
-
-
-      real pbaru(iip1,jjb_u:jje_u,llm),pbarv(iip1,jjb_v:jje_v,llm)
-      real pext(iip1,jjb_u:jje_u,llm)
-
-      real pbarum(iip1,jjb_u:jje_u,llm),pbarvm(iip1,jjb_v:jje_v,llm)
-      real wm(iip1,jjb_u:jje_u,llm)
-
-
-      real uu
-
-      integer i,j,l
-
-      logical firstcall
-      save firstcall
-c$OMP THREADPRIVATE(firstcall)
-
-      integer ijb,ije,jjb,jje
-      
-c   Champs 1D
-
-      call convflu_loc(pbaru,pbarv,llm,zconvm)
-
-c
-c      call scopy(ijp1llm,zconvm,1,zconvmm,1)
-c      call scopy(ijmllm,pbarv,1,pbarvm,1)
-      
-      jjb=jj_begin
-      jje=jj_end
-
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)      
-      do l=1,llm
-        zconvmm(:,jjb:jje,l)=zconvm(:,jjb:jje,l)
-      enddo
-c$OMP END DO NOWAIT
-
-      call groupeun_loc(jjp1,llm,jjb_u,jje_u,jjb,jje,zconvmm)
-      
-      jjb=jj_begin-1
-      jje=jj_end
-      if (pole_nord) jjb=jj_begin
-      if (pole_sud)  jje=jj_end-1
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)      
-      do l=1,llm
-        pbarvm(:,jjb:jje,l)=pbarv(:,jjb:jje,l)
-      enddo
-c$OMP END DO NOWAIT
-
-#ifdef DEBUG_IO    
-      CALL WriteField_v('pbarvm',reshape(pbarvm,(/ip1jm,llm/)))
-#endif
-      call groupeun_loc(jjm,llm,jjb_v,jje_v,jjb,jje,pbarvm)
-#ifdef DEBUG_IO    
-      CALL WriteField_v('pbarvm',reshape(pbarvm,(/ip1jm,llm/)))
-#endif
-c   Champs 3D
-   
-      jjb=jj_begin
-      jje=jj_end
-      if (pole_nord) jjb=jj_begin+1
-      if (pole_sud)  jje=jj_end-1
-      
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)      
-      do l=1,llm
-         do j=jjb,jje
-            uu=pbaru(iim,j,l)
-            do i=1,iim
-               uu=uu+pbarvm(i,j,l)-pbarvm(i,j-1,l)-zconvmm(i,j,l)
-               pbarum(i,j,l)=uu
-c     zconvm(i,j,l ) =  xflu(i-1,j,l)-xflu(i,j,l)+
-c    *                      yflu(i,j,l)-yflu(i,j-1,l)
-            enddo
-            pbarum(iip1,j,l)=pbarum(1,j,l)
-         enddo
-      enddo
-c$OMP END DO NOWAIT
-c    integration de la convergence de masse de haut  en bas ......
-   
-      jjb=jj_begin
-      jje=jj_end
-
-c$OMP BARRIER
-c$OMP MASTER      
-      do  l = llm-1,1,-1
-          do j=jjb,jje
-             do i=1,iip1
-                zconvmm(i,j,l)=zconvmm(i,j,l)+zconvmm(i,j,l+1)
-             enddo
-          enddo
-      enddo
-
-      if (.not. pole_sud) then
-        zconvmm(:,jj_end+1,:)=0
-cym	wm(:,jj_end+1,:)=0
-      endif
-      
-c$OMP END MASTER
-c$OMP BARRIER      
-
-      CALL vitvert_loc(zconvmm,wm)
-
-      return
-      end
-
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/groupe_loc.f90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/groupe_loc.f90	(revision 5101)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/groupe_loc.f90	(revision 5101)
@@ -0,0 +1,127 @@
+subroutine groupe_loc(pext, pbaru, pbarv, pbarum, pbarvm, wm)
+  USE parallel_lmdz
+  USE Write_field_loc
+  USE groupe_mod
+  USE comconst_mod, ONLY: ngroup
+  USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO
+  implicit none
+
+  !   sous-programme servant a fitlrer les champs de flux de masse aux
+  !   poles en "regroupant" les mailles 2 par 2 puis 4 par 4 etc. au fur
+  !   et a mesure qu'on se rapproche du pole.
+  !
+  !   en entree: pext, pbaru et pbarv
+  !
+  !   en sortie:  pbarum,pbarvm et wm.
+  !
+  !   remarque, le wm est recalcule a partir des pbaru pbarv et on n'a donc
+  !   pas besoin de w en entree.
+
+  include "dimensions.h"
+  include "paramet.h"
+  include "comgeom2.h"
+
+  ! integer ngroup
+  ! parameter (ngroup=3)
+
+  real :: pbaru(iip1, jjb_u:jje_u, llm), pbarv(iip1, jjb_v:jje_v, llm)
+  real :: pext(iip1, jjb_u:jje_u, llm)
+
+  real :: pbarum(iip1, jjb_u:jje_u, llm), pbarvm(iip1, jjb_v:jje_v, llm)
+  real :: wm(iip1, jjb_u:jje_u, llm)
+
+  real :: uu
+
+  integer :: i, j, l
+
+  logical :: firstcall
+  save firstcall
+  !$OMP THREADPRIVATE(firstcall)
+
+  integer :: ijb, ije, jjb, jje
+
+  !   Champs 1D
+
+  CALL convflu_loc(pbaru, pbarv, llm, zconvm)
+
+  !
+  !  CALL scopy(ijp1llm,zconvm,1,zconvmm,1)
+  !  CALL scopy(ijmllm,pbarv,1,pbarvm,1)
+
+  jjb = jj_begin
+  jje = jj_end
+
+  !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+  do l = 1, llm
+    zconvmm(:, jjb:jje, l) = zconvm(:, jjb:jje, l)
+  enddo
+  !$OMP END DO NOWAIT
+
+  CALL groupeun_loc(jjp1, llm, jjb_u, jje_u, jjb, jje, zconvmm)
+
+  jjb = jj_begin - 1
+  jje = jj_end
+  if (pole_nord) jjb = jj_begin
+  if (pole_sud)  jje = jj_end - 1
+  !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+  do l = 1, llm
+    pbarvm(:, jjb:jje, l) = pbarv(:, jjb:jje, l)
+  enddo
+  !$OMP END DO NOWAIT
+
+  IF (CPPKEY_DEBUGIO) THEN
+    CALL WriteField_v('pbarvm', reshape(pbarvm, (/ip1jm, llm/)))
+  END IF
+  CALL groupeun_loc(jjm, llm, jjb_v, jje_v, jjb, jje, pbarvm)
+  IF (CPPKEY_DEBUGIO) THEN
+    CALL WriteField_v('pbarvm', reshape(pbarvm, (/ip1jm, llm/)))
+  END IF
+  !   Champs 3D
+
+  jjb = jj_begin
+  jje = jj_end
+  if (pole_nord) jjb = jj_begin + 1
+  if (pole_sud)  jje = jj_end - 1
+
+  !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+  do l = 1, llm
+    do j = jjb, jje
+      uu = pbaru(iim, j, l)
+      do i = 1, iim
+        uu = uu + pbarvm(i, j, l) - pbarvm(i, j - 1, l) - zconvmm(i, j, l)
+        pbarum(i, j, l) = uu
+        ! zconvm(i,j,l ) =  xflu(i-1,j,l)-xflu(i,j,l)+
+        !    *                      yflu(i,j,l)-yflu(i,j-1,l)
+      enddo
+      pbarum(iip1, j, l) = pbarum(1, j, l)
+    enddo
+  enddo
+  !$OMP END DO NOWAIT
+  !    integration de la convergence de masse de haut  en bas ......
+
+  jjb = jj_begin
+  jje = jj_end
+
+  !$OMP BARRIER
+  !$OMP MASTER
+  do  l = llm - 1, 1, -1
+    do j = jjb, jje
+      do i = 1, iip1
+        zconvmm(i, j, l) = zconvmm(i, j, l) + zconvmm(i, j, l + 1)
+      enddo
+    enddo
+  enddo
+
+  if (.not. pole_sud) then
+    zconvmm(:, jj_end + 1, :) = 0
+    !ym	wm(:,jj_end+1,:)=0
+  endif
+
+  !$OMP END MASTER
+  !$OMP BARRIER
+
+  CALL vitvert_loc(zconvmm, wm)
+
+  return
+end subroutine groupe_loc
+
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/groupe_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/groupe_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/groupe_mod.F90	(revision 5101)
@@ -11,5 +11,5 @@
   USE parallel_lmdz
 !  USE infotrac
-  USE advtrac_mod, ONLY : advtrac_allocate 
+  USE advtrac_mod, ONLY: advtrac_allocate
   IMPLICIT NONE
   INCLUDE "dimensions.h"
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/guide_loc_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/guide_loc_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/guide_loc_mod.F90	(revision 5101)
@@ -90,5 +90,5 @@
 ! Lecture des parametres:  
 ! ---------------------------------------------
-    call ini_getparam("nudging_parameters_out.txt")
+    CALL ini_getparam("nudging_parameters_out.txt")
 ! Variables guidees
     CALL getpar('guide_u',.true.,guide_u,'guidage de u')
@@ -103,5 +103,5 @@
     CALL getpar('guide_zon',.false.,guide_zon,'guidage moy zonale')
     if (guide_zon .and. abs(grossismx - 1.) > 0.01) &
-         call abort_gcm("guide_init", &
+         CALL abort_gcm("guide_init", &
          "zonal nudging requires grid regular in longitude", 1)
 
@@ -166,5 +166,5 @@
     CALL getpar('guide_2D',.false.,guide_2D,'fichier guidage lat-P')
 
-    call fin_getparam
+    CALL fin_getparam
     
 ! ---------------------------------------------
@@ -445,9 +445,9 @@
         factt=dtvr*iperiod/daysec 
 !$OMP MASTER
-        call tau2alpha(3, iip1, jjb_v, jje_v, factt, tau_min_v, tau_max_v, alpha_v)
-        call tau2alpha(2, iip1, jjb_u, jje_u, factt, tau_min_u, tau_max_u, alpha_u)
-        call tau2alpha(1, iip1, jjb_u, jje_u, factt, tau_min_T, tau_max_T, alpha_T)
-        call tau2alpha(1, iip1, jjb_u, jje_u, factt, tau_min_P, tau_max_P, alpha_P)
-        call tau2alpha(1, iip1, jjb_u, jje_u, factt, tau_min_Q, tau_max_Q, alpha_Q)
+        CALL tau2alpha(3, iip1, jjb_v, jje_v, factt, tau_min_v, tau_max_v, alpha_v)
+        CALL tau2alpha(2, iip1, jjb_u, jje_u, factt, tau_min_u, tau_max_u, alpha_u)
+        CALL tau2alpha(1, iip1, jjb_u, jje_u, factt, tau_min_T, tau_max_T, alpha_T)
+        CALL tau2alpha(1, iip1, jjb_u, jje_u, factt, tau_min_P, tau_max_P, alpha_P)
+        CALL tau2alpha(1, iip1, jjb_u, jje_u, factt, tau_min_Q, tau_max_Q, alpha_Q)
 ! correction de rappel dans couche limite
         if (guide_BL) then
@@ -1086,5 +1086,5 @@
 !$OMP BARRIER
 
-    call massbar_loc(pext, pbarx, pbary )
+    CALL massbar_loc(pext, pbarx, pbary )
 !$OMP BARRIER
 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
@@ -2165,5 +2165,5 @@
   SUBROUTINE guide_out(varname,hsize,vsize,field_loc,factt)
     USE parallel_lmdz
-    USE mod_hallo, ONLY : gather_field_u, gather_field_v
+    USE mod_hallo, ONLY: gather_field_u, gather_field_v
     USE comconst_mod, ONLY: pi
     USE comvert_mod, ONLY: presnivs
@@ -2249,7 +2249,7 @@
         ierr=nf90_def_var(nid,"au",nf90_float,(/id_lonu,id_latu/),vid_au)
         ierr=nf90_def_var(nid,"av",nf90_float,(/id_lonv,id_latv/),vid_av)
-        call nf95_def_var(nid, "alpha_T", nf90_float, (/id_lonv, id_latu/), &
+        CALL nf95_def_var(nid, "alpha_T", nf90_float, (/id_lonv, id_latu/), &
              varid_alpha_t)
-        call nf95_def_var(nid, "alpha_q", nf90_float, (/id_lonv, id_latu/), &
+        CALL nf95_def_var(nid, "alpha_q", nf90_float, (/id_lonv, id_latu/), &
              varid_alpha_q)
         
@@ -2266,6 +2266,6 @@
         ierr = nf90_put_var(nid,vid_au,zu)
         ierr = nf90_put_var(nid,vid_av,zv)
-        call nf95_put_var(nid, varid_alpha_t, zt)
-        call nf95_put_var(nid, varid_alpha_q, zq)
+        CALL nf95_put_var(nid, varid_alpha_t, zt)
+        CALL nf95_put_var(nid, varid_alpha_q, zq)
 ! --------------------------------------------------------------------
 ! Création des variables sauvegardées
@@ -2349,6 +2349,6 @@
 
 !    if (varname=="ua") then
-!    call dump2d(iip1,jjp1,field_glo,'ua gui1 1ere couche ')
-!    call dump2d(iip1,jjp1,field_glo(:,:,llm),'ua gui1 llm ')
+!    CALL dump2d(iip1,jjp1,field_glo,'ua gui1 1ere couche ')
+!    CALL dump2d(iip1,jjp1,field_glo(:,:,llm),'ua gui1 llm ')
 !    endif
 
@@ -2405,13 +2405,13 @@
     RETURN
 
-    call barrier
+    CALL barrier
     CALL Gather_field_u(var,var_glob,1)
-    call barrier
+    CALL barrier
 
     if (mpi_rank==0) then
-       call dump2d(iip1,jjp1,var_glob,varname)
+       CALL dump2d(iip1,jjp1,var_glob,varname)
     endif
 
-    call barrier
+    CALL barrier
 
     return
@@ -2426,8 +2426,8 @@
      include "paramet.h"
      include "comgeom.h"
-     call barrier
-     call dump2du(alpha_u(ijb_u:ije_u),'  alpha_u couche 1')
-     call dump2du(unat2(:,jjbu:jjeu,nlevnc),'  unat2 couche nlevnc')
-     call dump2du(ugui1(ijb_u:ije_u,1)*sqrt(unscu2(ijb_u:ije_u)),'  ugui1 couche 1')
+     CALL barrier
+     CALL dump2du(alpha_u(ijb_u:ije_u),'  alpha_u couche 1')
+     CALL dump2du(unat2(:,jjbu:jjeu,nlevnc),'  unat2 couche nlevnc')
+     CALL dump2du(ugui1(ijb_u:ije_u,1)*sqrt(unscu2(ijb_u:ije_u)),'  ugui1 couche 1')
      return
 end subroutine dumpall
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/iniacademic_loc.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/iniacademic_loc.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/iniacademic_loc.F90	(revision 5101)
@@ -23,5 +23,5 @@
   USE ener_mod, ONLY: etot0,ptot0,ztot0,stot0,ang0
   USE readTracFiles_mod, ONLY: addPhase
-  use netcdf, only : nf90_nowrite,nf90_open,nf90_noerr,NF90_INQ_VARID,nf90_close, nf90_get_var
+  use netcdf, ONLY: nf90_nowrite,nf90_open,nf90_noerr,nf90_inq_varid,nf90_close, nf90_get_var
 
   !   Author:    Frederic Hourdin      original: 15/01/93
@@ -94,5 +94,5 @@
     write(lunout,*) "You most likely want an aquaplanet initialisation", &
     " (iflag_phys >= 100)"
-    call abort_gcm(modname,"incompatible iflag_phys==1 and read_start==.false.",1)
+    CALL abort_gcm(modname,"incompatible iflag_phys==1 and read_start==.false.",1)
   endif
   
@@ -102,5 +102,5 @@
 
   ! initialize planet radius, rotation rate,...
-  call conf_planete
+  CALL conf_planete
 
   time_0=0.
@@ -154,5 +154,5 @@
      ierr = nf90_open ('relief_in.nc', nf90_nowrite,nid_relief)
      if (ierr==nf90_noerr) THEN
-         ierr=NF90_INQ_VARID(nid_relief,'RELIEF',varid)
+         ierr=nf90_inq_varid(nid_relief,'RELIEF',varid)
          if (ierr==nf90_noerr) THEN
               ierr=nf90_get_var(nid_relief,varid,relief(1:iim,1:jjp1))
@@ -181,5 +181,5 @@
        CALL exner_hyb( ip1jmp1, ps_glo, p, pks, pk )
      else
-       call exner_milieu(ip1jmp1,ps_glo,p,pks,pk)
+       CALL exner_milieu(ip1jmp1,ps_glo,p,pks,pk)
      endif
      CALL massdair(p,masse_glo)
@@ -301,5 +301,5 @@
         ! winds
         if (ok_geost) then
-           call ugeostr(phi,ucov_glo)
+           CALL ugeostr(phi,ucov_glo)
         else
            ucov_glo(:,:)=0.
@@ -345,5 +345,5 @@
         endif ! of if (planet_type=="earth")
 
-        call check_isotopes(q,ijb_u,ije_u,'iniacademic_loc')
+        CALL check_isotopes(q,ijb_u,ije_u,'iniacademic_loc')
 
         ! add random perturbation to temperature
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/initdynav_loc.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/initdynav_loc.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/initdynav_loc.F	(revision 5101)
@@ -12,5 +12,5 @@
        use misc_mod
 !       USE infotrac
-       use com_io_dyn_mod, only : histaveid,histvaveid,histuaveid,       &
+       use com_io_dyn_mod, ONLY: histaveid,histvaveid,histuaveid,       &
      &        dynhistave_file,dynhistvave_file,dynhistuave_file
        USE comconst_mod, ONLY: pi
@@ -124,8 +124,8 @@
 
 
-      call flio_dom_set(mpi_size,mpi_rank,ddid,dsg,dsl,dpf,dpl,dhs,dhe, 
+      CALL flio_dom_set(mpi_size,mpi_rank,ddid,dsg,dsl,dpf,dpl,dhs,dhe,
      .                 'box',dynhistave_domain_id)
              
-      call histbeg(dynhistave_file,iip1, rlong(:,1), jjn,
+      CALL histbeg(dynhistave_file,iip1, rlong(:,1), jjn,
      .             rlat(1,jjb:jje), 1, iip1, 1, jjn,tau0,
      .             zjulian, tstep, thoriid,
@@ -160,8 +160,8 @@
 
 
-      call flio_dom_set(mpi_size,mpi_rank,ddid,dsg,dsl,dpf,dpl,dhs,dhe, 
+      CALL flio_dom_set(mpi_size,mpi_rank,ddid,dsg,dsl,dpf,dpl,dhs,dhe,
      .                 'box',dynhistvave_domain_id)
 
-      call histbeg(dynhistvave_file,iip1, rlong(:,1), jjn,
+      CALL histbeg(dynhistvave_file,iip1, rlong(:,1), jjn,
      .             rlat(1,jjb:jje), 1, iip1, 1, jjn,tau0,
      .             zjulian, tstep, vhoriid,
@@ -190,8 +190,8 @@
 
 
-      call flio_dom_set(mpi_size,mpi_rank,ddid,dsg,dsl,dpf,dpl,dhs,dhe, 
+      CALL flio_dom_set(mpi_size,mpi_rank,ddid,dsg,dsl,dpf,dpl,dhs,dhe,
      .                 'box',dynhistuave_domain_id)
              
-      call histbeg(dynhistuave_file,iip1, rlong(:,1), jjn,
+      CALL histbeg(dynhistuave_file,iip1, rlong(:,1), jjn,
      .             rlat(1,jjb:jje), 1, iip1, 1, jjn,tau0,
      .             zjulian, tstep, uhoriid,
@@ -202,9 +202,9 @@
 C  Appel a histvert pour la grille verticale
 C
-      call histvert(histaveid,'presnivs','Niveaux Pression
+      CALL histvert(histaveid,'presnivs','Niveaux Pression
      &     approximatifs','mb',llm, presnivs/100., zvertiid,'down')
-      call histvert(histuaveid,'presnivs','Niveaux Pression
+      CALL histvert(histuaveid,'presnivs','Niveaux Pression
      &     approximatifs','mb',llm, presnivs/100., zvertiidv,'down')
-      call histvert(histvaveid,'presnivs','Niveaux Pression
+      CALL histvert(histvaveid,'presnivs','Niveaux Pression
      &     approximatifs','mb',llm, presnivs/100., zvertiidu,'down')
 
@@ -215,5 +215,5 @@
 C
       jjn=jj_nb
-      call histdef(histuaveid, 'u', 'vent u moyen ',
+      CALL histdef(histuaveid, 'u', 'vent u moyen ',
      .             'm/s', iip1, jjn, uhoriid, llm, 1, llm, zvertiidu,
      .             32, 'ave(X)', t_ops, t_wrt)
@@ -223,5 +223,5 @@
 C
       if (pole_sud) jjn=jj_nb-1
-      call histdef(histvaveid, 'v', 'vent v moyen',
+      CALL histdef(histvaveid, 'v', 'vent v moyen',
      .             'm/s', iip1, jjn, vhoriid, llm, 1, llm, zvertiidv,
      .             32, 'ave(X)', t_ops, t_wrt)
@@ -231,5 +231,5 @@
 C
       jjn=jj_nb
-      call histdef(histaveid, 'temp', 'temperature moyenne', 'K',
+      CALL histdef(histaveid, 'temp', 'temperature moyenne', 'K',
      .             iip1, jjn, thoriid, llm, 1, llm, zvertiid,
      .             32, 'ave(X)', t_ops, t_wrt)
@@ -237,5 +237,5 @@
 C  Temperature potentielle
 C
-      call histdef(histaveid, 'theta', 'temperature potentielle', 'K',
+      CALL histdef(histaveid, 'theta', 'temperature potentielle', 'K',
      .             iip1, jjn, thoriid, llm, 1, llm, zvertiid,
      .             32, 'ave(X)', t_ops, t_wrt)
@@ -245,5 +245,5 @@
 C  Geopotentiel
 C
-      call histdef(histaveid, 'phi', 'geopotentiel moyen', '-',
+      CALL histdef(histaveid, 'phi', 'geopotentiel moyen', '-',
      .             iip1, jjn, thoriid, llm, 1, llm, zvertiid,
      .             32, 'ave(X)', t_ops, t_wrt)
@@ -252,5 +252,5 @@
 C
 !        DO iq=1,nqtot
-!          call histdef(histaveid, tracers(iq)%name,
+!          CALL histdef(histaveid, tracers(iq)%name,
 !     .                            tracers(iq)%longName, '-',
 !     .             iip1, jjn, thoriid, llm, 1, llm, zvertiid,
@@ -260,5 +260,5 @@
 C  Masse
 C
-      call histdef(histaveid, 'masse', 'masse moyenne', 'kg',
+      CALL histdef(histaveid, 'masse', 'masse moyenne', 'kg',
      .             iip1, jjn, thoriid, llm, 1, llm, zvertiid,
      .             32, 'ave(X)', t_ops, t_wrt)
@@ -266,5 +266,5 @@
 C  Pression au sol
 C
-      call histdef(histaveid, 'ps', 'pression naturelle au sol', 'Pa',
+      CALL histdef(histaveid, 'ps', 'pression naturelle au sol', 'Pa',
      .             iip1, jjn, thoriid, 1, 1, 1, -99,
      .             32, 'ave(X)', t_ops, t_wrt)
@@ -272,5 +272,5 @@
 C  Geopotentiel au sol
 C
-!      call histdef(histaveid, 'phis', 'geopotentiel au sol', '-',
+!      CALL histdef(histaveid, 'phis', 'geopotentiel au sol', '-',
 !     .             iip1, jjn, thoriid, 1, 1, 1, -99,
 !     .             32, 'ave(X)', t_ops, t_wrt)
@@ -278,7 +278,7 @@
 C  Fin
 C
-      call histend(histaveid)
-      call histend(histuaveid)
-      call histend(histvaveid)
+      CALL histend(histaveid)
+      CALL histend(histuaveid)
+      CALL histend(histvaveid)
 #else
       write(lunout,*)'initdynav_loc: Needs IOIPSL to function'
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/initfluxsto_p.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/initfluxsto_p.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/initfluxsto_p.F	(revision 5101)
@@ -123,8 +123,8 @@
       dhe=(/ 0,0 /)
 
-      call flio_dom_set(mpi_size,mpi_rank,ddid,dsg,dsl,dpf,dpl,dhs,dhe, 
+      CALL flio_dom_set(mpi_size,mpi_rank,ddid,dsg,dsl,dpf,dpl,dhs,dhe,
      .                 'box',dynu_domain_id)
        
-      call histbeg(trim(infile),iip1, rlong(:,1), jjn, rlat(1,jjb:jje),
+      CALL histbeg(trim(infile),iip1, rlong(:,1), jjn, rlat(1,jjb:jje),
      .             1, iip1, 1, jjn, tau0, zjulian, tstep, uhoriid,
      .             fileid,dynu_domain_id)
@@ -156,8 +156,8 @@
       dhe=(/ 0,0 /)
 
-      call flio_dom_set(mpi_size,mpi_rank,ddid,dsg,dsl,dpf,dpl,dhs,dhe, 
+      CALL flio_dom_set(mpi_size,mpi_rank,ddid,dsg,dsl,dpf,dpl,dhs,dhe,
      .                 'box',dynv_domain_id)
      
-      call histbeg('fluxstokev',iip1, rlong(:,1), jjn, rlat(1,jjb:jje),
+      CALL histbeg('fluxstokev',iip1, rlong(:,1), jjn, rlat(1,jjb:jje),
      .             1, iip1, 1, jjn,tau0, zjulian, tstep, vhoriid,
      .             filevid,dynv_domain_id)
@@ -167,5 +167,5 @@
       if (mpi_rank==0) then
           
-        call histbeg('defstoke.nc', 1, rl, 1, rl,
+        CALL histbeg('defstoke.nc', 1, rl, 1, rl,
      .               1, 1, 1, 1,
      .               tau0, zjulian, tstep, dhoriid, filedid)
@@ -186,5 +186,5 @@
       jjn=jj_nb
 
-      call histhori(fileid, iip1, rlong(:,jjb:jje),jjn,rlat(:,jjb:jje),
+      CALL histhori(fileid, iip1, rlong(:,jjb:jje),jjn,rlat(:,jjb:jje),
      .             'scalar','Grille points scalaires', thoriid)
         
@@ -192,9 +192,9 @@
 C  Appel a histvert pour la grille verticale
 C
-      call histvert(fileid, 'sig_s', 'Niveaux sigma',
+      CALL histvert(fileid, 'sig_s', 'Niveaux sigma',
      . 'sigma_level',
      .              llm, nivsigs, zvertiid)
 C Pour le fichier V
-      call histvert(filevid, 'sig_s', 'Niveaux sigma',
+      CALL histvert(filevid, 'sig_s', 'Niveaux sigma',
      .  'sigma_level',
      .              llm, nivsigs, zvertiid)
@@ -202,5 +202,5 @@
       if (mpi_rank==0) then
          nivd(1) = 1
-         call histvert(filedid, 'sig_s', 'Niveaux sigma',
+         CALL histvert(filedid, 'sig_s', 'Niveaux sigma',
      .        'sigma_level',
      .        1, nivd, dvertiid)
@@ -235,5 +235,5 @@
 C Masse 
 C
-      call histdef(fileid, 'masse', 'Masse', 'kg',
+      CALL histdef(fileid, 'masse', 'Masse', 'kg',
      .             iip1, jjn, thoriid, llm, 1, llm, zvertiid,
      .             32, 'inst(X)', t_ops, t_wrt)
@@ -241,5 +241,5 @@
 C  Pbaru 
 C
-      call histdef(fileid, 'pbaru', 'flx de masse zonal', 'kg m/s',
+      CALL histdef(fileid, 'pbaru', 'flx de masse zonal', 'kg m/s',
      .             iip1, jjn, uhoriid, llm, 1, llm, zvertiid,
      .             32, 'inst(X)', t_ops, t_wrt)
@@ -250,5 +250,5 @@
       if (pole_sud) jjn=jj_nb-1
       
-      call histdef(filevid, 'pbarv', 'flx de masse mer', 'kg m/s',
+      CALL histdef(filevid, 'pbarv', 'flx de masse mer', 'kg m/s',
      .             iip1, jjn, vhoriid, llm, 1, llm, zvertiid,
      .             32, 'inst(X)', t_ops, t_wrt)
@@ -257,5 +257,5 @@
 C
       if (pole_sud) jjn=jj_nb
-      call histdef(fileid, 'w', 'flx de masse vert', 'kg m/s',
+      CALL histdef(fileid, 'w', 'flx de masse vert', 'kg m/s',
      .             iip1, jjn, thoriid, llm, 1, llm, zvertiid,
      .             32, 'inst(X)', t_ops, t_wrt)
@@ -264,5 +264,5 @@
 C  Temperature potentielle
 C
-      call histdef(fileid, 'teta', 'temperature potentielle', '-',
+      CALL histdef(fileid, 'teta', 'temperature potentielle', '-',
      .             iip1, jjn, thoriid, llm, 1, llm, zvertiid,
      .             32, 'inst(X)', t_ops, t_wrt)
@@ -272,5 +272,5 @@
 C Geopotentiel 
 C
-      call histdef(fileid, 'phi', 'geopotentiel instantane', '-',
+      CALL histdef(fileid, 'phi', 'geopotentiel instantane', '-',
      .             iip1, jjn, thoriid, llm, 1, llm, zvertiid,
      .             32, 'inst(X)', t_ops, t_wrt)
@@ -278,11 +278,11 @@
 C  Fin
 C
-      call histend(fileid)
-      call histend(filevid)
-      if (mpi_rank==0) call histend(filedid)
+      CALL histend(fileid)
+      CALL histend(filevid)
+      if (mpi_rank==0) CALL histend(filedid)
       if (ok_sync) then
-        call histsync(fileid)
-        call histsync(filevid)
-        if (mpi_rank==0) call histsync(filedid)
+        CALL histsync(fileid)
+        CALL histsync(filevid)
+        if (mpi_rank==0) CALL histsync(filedid)
       endif
         
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/inithist_loc.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/inithist_loc.F	(revision 5100)
+++ 	(revision )
@@ -1,287 +1,0 @@
-
-! $Id: initdynav_p.F 1279 2009-12-10 09:02:56Z fairhead $
-
-      subroutine inithist_loc(day0,anne0,tstep,t_ops,t_wrt)
-
-#ifdef CPP_IOIPSL
-! This routine needs IOIPSL
-       USE IOIPSL
-#endif
-       USE parallel_lmdz
-       use Write_field
-       use misc_mod
-       use com_io_dyn_mod, only : histid,histvid,histuid,               &
-     &                        dynhist_file,dynhistv_file,dynhistu_file
-       USE comconst_mod, ONLY: pi
-       USE comvert_mod, ONLY: presnivs
-       USE temps_mod, ONLY: itau_dyn
-       
-       implicit none
-
-C
-C   Routine d'initialisation des ecritures des fichiers histoires LMDZ
-C   au format IOIPSL
-C
-C   Appels succesifs des routines: histbeg
-C                                  histhori
-C                                  histver
-C                                  histdef
-C                                  histend
-C
-C   Entree:
-C
-C      day0,anne0: date de reference
-C      tstep: duree du pas de temps en seconde
-C      t_ops: frequence de l'operation pour IOIPSL
-C      t_wrt: frequence d'ecriture sur le fichier
-C      nq: nombre de traceurs
-C
-C
-C   L. Fairhead, LMD, 03/99
-C
-C =====================================================================
-C
-C   Declarations
-      include "dimensions.h"
-      include "paramet.h"
-      include "comgeom.h"
-      include "description.h"
-      include "iniprint.h"
-
-C   Arguments
-C
-      integer day0, anne0
-      real tstep, t_ops, t_wrt
-
-#ifdef CPP_IOIPSL
-! This routine needs IOIPSL
-C   Variables locales
-C
-      integer tau0
-      real zjulian
-      integer iq
-      real rlong(iip1,jjp1), rlat(iip1,jjp1)
-      integer uhoriid, vhoriid, thoriid
-      integer zvertiid,zvertiidv,zvertiidu
-      integer ii,jj
-      integer zan, dayref
-      integer :: jjb,jje,jjn
-
-! definition du domaine d'ecriture pour le rebuild
-
-      INTEGER,DIMENSION(2) :: ddid
-      INTEGER,DIMENSION(2) :: dsg
-      INTEGER,DIMENSION(2) :: dsl
-      INTEGER,DIMENSION(2) :: dpf
-      INTEGER,DIMENSION(2) :: dpl
-      INTEGER,DIMENSION(2) :: dhs
-      INTEGER,DIMENSION(2) :: dhe 
-      
-      INTEGER :: dynhist_domain_id
-      INTEGER :: dynhistv_domain_id
-      INTEGER :: dynhistu_domain_id
-      
-      if (adjust) return
-
-C
-C  Initialisations
-C
-      pi = 4. * atan (1.)
-C
-C  Appel a histbeg: creation du fichier netcdf et initialisations diverses
-C         
-
-      zan = anne0
-      dayref = day0
-      CALL ymds2ju(zan, 1, dayref, 0.0, zjulian)
-      tau0 = itau_dyn
-      
-      do jj = 1, jjp1
-        do ii = 1, iip1
-          rlong(ii,jj) = rlonv(ii) * 180. / pi
-          rlat(ii,jj)  = rlatu(jj) * 180. / pi
-        enddo
-      enddo
-
-
-! Creation de 3 fichiers pour les differentes grilles horizontales
-! Restriction de IOIPSL: seulement 2 coordonnees dans le meme fichier
-! Grille Scalaire       
-
-      jjb=jj_begin
-      jje=jj_end
-      jjn=jj_nb
-
-      ddid=(/ 1,2 /)
-      dsg=(/ iip1,jjp1 /)
-      dsl=(/ iip1,jjn /)
-      dpf=(/ 1,jjb /)
-      dpl=(/ iip1,jje /)
-      dhs=(/ 0,0 /)
-      dhe=(/ 0,0 /)
-
-
-      call flio_dom_set(mpi_size,mpi_rank,ddid,dsg,dsl,dpf,dpl,dhs,dhe, 
-     .                 'box',dynhist_domain_id)
-             
-      call histbeg(dynhist_file,iip1, rlong(:,1), jjn,
-     .             rlat(1,jjb:jje), 1, iip1, 1, jjn,tau0,
-     .             zjulian, tstep, thoriid,
-     .             histid,dynhist_domain_id)
-
-
-C  Creation du fichier histoire pour les grilles en V et U (oblige pour l'instant,
-C  IOIPSL ne permet pas de grilles avec des nombres de point differents dans
-C  un meme fichier)
-! Grille V
-
-      jjb=jj_begin
-      jje=jj_end
-      jjn=jj_nb
-      IF (pole_sud) jjn=jjn-1
-      IF (pole_sud) jje=jje-1
-      
-      do jj = jjb, jje
-        do ii = 1, iip1
-          rlong(ii,jj) = rlonv(ii) * 180. / pi
-          rlat(ii,jj) = rlatv(jj) * 180. / pi
-        enddo
-      enddo
-
-      ddid=(/ 1,2 /)
-      dsg=(/ iip1,jjm /)
-      dsl=(/ iip1,jjn /)
-      dpf=(/ 1,jjb /)
-      dpl=(/ iip1,jje /)
-      dhs=(/ 0,0 /)
-      dhe=(/ 0,0 /)
-
-
-      call flio_dom_set(mpi_size,mpi_rank,ddid,dsg,dsl,dpf,dpl,dhs,dhe, 
-     .                 'box',dynhistv_domain_id)
-
-      call histbeg(dynhistv_file,iip1, rlong(:,1), jjn,
-     .             rlat(1,jjb:jje), 1, iip1, 1, jjn,tau0,
-     .             zjulian, tstep, vhoriid,
-     .             histvid,dynhistv_domain_id)
-     
-! Grille U
-
-      do jj = 1, jjp1
-        do ii = 1, iip1
-          rlong(ii,jj) = rlonu(ii) * 180. / pi
-          rlat(ii,jj) = rlatu(jj) * 180. / pi
-        enddo
-      enddo
-
-      jjb=jj_begin
-      jje=jj_end
-      jjn=jj_nb
-
-      ddid=(/ 1,2 /)
-      dsg=(/ iip1,jjp1 /)
-      dsl=(/ iip1,jjn /)
-      dpf=(/ 1,jjb /)
-      dpl=(/ iip1,jje /)
-      dhs=(/ 0,0 /)
-      dhe=(/ 0,0 /)
-
-
-      call flio_dom_set(mpi_size,mpi_rank,ddid,dsg,dsl,dpf,dpl,dhs,dhe, 
-     .                 'box',dynhistu_domain_id)
-             
-      call histbeg(dynhistu_file,iip1, rlong(:,1), jjn,
-     .             rlat(1,jjb:jje), 1, iip1, 1, jjn,tau0,
-     .             zjulian, tstep, uhoriid,
-     .             histuid,dynhistu_domain_id)
-     
-     
-! -------------------------------------------------------------
-C  Appel a histvert pour la grille verticale
-! -------------------------------------------------------------
-      call histvert(histid, 'presnivs', 'Niveaux pression','mb',
-     .              llm, presnivs/100., zvertiid,'down')
-      call histvert(histvid, 'presnivs', 'Niveaux pression','mb',
-     .              llm, presnivs/100., zvertiidv,'down')
-      call histvert(histuid, 'presnivs', 'Niveaux pression','mb',
-     .              llm, presnivs/100., zvertiidu,'down')
-
-C
-! -------------------------------------------------------------
-C  Appels a histdef pour la definition des variables a sauvegarder
-! -------------------------------------------------------------
-C
-C  Vents U
-C
-      jjn=jj_nb
-      call histdef(histuid, 'u', 'vent u',
-     .             'm/s', iip1, jjn, uhoriid, llm, 1, llm, zvertiidu,
-     .             32, 'inst(X)', t_ops, t_wrt)
-
-C
-C  Vents V
-C
-      if (pole_sud) jjn=jj_nb-1
-      call histdef(histvid, 'v', 'vent v',
-     .             'm/s', iip1, jjn, vhoriid, llm, 1, llm, zvertiidv,
-     .             32, 'inst(X)', t_ops, t_wrt)
-
-C
-C  Temperature
-C
-      jjn=jj_nb
-      call histdef(histid, 'temp', 'temperature', 'K',
-     .             iip1, jjn, thoriid, llm, 1, llm, zvertiid,
-     .             32, 'inst(X)', t_ops, t_wrt)
-C
-C  Temperature potentielle
-C
-      call histdef(histid, 'theta', 'temperature potentielle', 'K',
-     .             iip1, jjn, thoriid, llm, 1, llm, zvertiid,
-     .             32, 'inst(X)', t_ops, t_wrt)
-
-
-C
-C  Geopotentiel
-C
-      call histdef(histid, 'phi', 'geopotentiel', '-',
-     .             iip1, jjn, thoriid, llm, 1, llm, zvertiid,
-     .             32, 'inst(X)', t_ops, t_wrt)
-C
-C  Traceurs
-C
-!        DO iq=1,nqtot
-!          call histdef(histid, tracers(iq)%name, 
-!     .             tracers(iq)%longName, '-', 
-!     .             iip1, jjn, thoriid, llm, 1, llm, zvertiid,
-!     .             32, 'inst(X)', t_ops, t_wrt)
-!        enddo
-C
-C  Masse
-C
-      call histdef(histid, 'masse', 'masse', 'kg',
-     .             iip1, jjn, thoriid, llm, 1, llm, zvertiid,
-     .             32, 'inst(X)', t_ops, t_wrt)
-C
-C  Pression au sol
-C
-      call histdef(histid, 'ps', 'pression naturelle au sol', 'Pa',
-     .             iip1, jjn, thoriid, 1, 1, 1, -99,
-     .             32, 'inst(X)', t_ops, t_wrt)
-C
-C  Geopotentiel au sol
-C
-!      call histdef(histid, 'phis', 'geopotentiel au sol', '-',
-!     .             iip1, jjn, thoriid, 1, 1, 1, -99,
-!     .             32, 'inst(X)', t_ops, t_wrt)
-C
-C  Fin
-C
-      call histend(histid)
-      call histend(histuid)
-      call histend(histvid)
-#else
-      write(lunout,*)'inithist_loc: Needs IOIPSL to function'
-#endif
-! #endif of #ifdef CPP_IOIPSL
-      end
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/inithist_loc.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/inithist_loc.F90	(revision 5101)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/inithist_loc.F90	(revision 5101)
@@ -0,0 +1,286 @@
+! $Id: initdynav_p.F 1279 2009-12-10 09:02:56Z fairhead $
+
+subroutine inithist_loc(day0, anne0, tstep, t_ops, t_wrt)
+
+#ifdef CPP_IOIPSL
+  ! This routine needs IOIPSL
+   USE IOIPSL
+#endif
+  USE parallel_lmdz
+  use Write_field
+  use misc_mod
+  use com_io_dyn_mod, ONLY: histid, histvid, histuid, &
+          dynhist_file, dynhistv_file, dynhistu_file
+  USE comconst_mod, ONLY: pi
+  USE comvert_mod, ONLY: presnivs
+  USE temps_mod, ONLY: itau_dyn
+
+  implicit none
+
+  !
+  !   Routine d'initialisation des ecritures des fichiers histoires LMDZ
+  !   au format IOIPSL
+  !
+  !   Appels succesifs des routines: histbeg
+  !                              histhori
+  !                              histver
+  !                              histdef
+  !                              histend
+  !
+  !   Entree:
+  !
+  !  day0,anne0: date de reference
+  !  tstep: duree du pas de temps en seconde
+  !  t_ops: frequence de l'operation pour IOIPSL
+  !  t_wrt: frequence d'ecriture sur le fichier
+  !  nq: nombre de traceurs
+  !
+  !
+  !   L. Fairhead, LMD, 03/99
+  !
+  ! =====================================================================
+  !
+  !   Declarations
+  include "dimensions.h"
+  include "paramet.h"
+  include "comgeom.h"
+  include "description.h"
+  include "iniprint.h"
+
+  !   Arguments
+  !
+  integer :: day0, anne0
+  real :: tstep, t_ops, t_wrt
+
+#ifdef CPP_IOIPSL
+  ! This routine needs IOIPSL
+  !   Variables locales
+  !
+  integer :: tau0
+  real :: zjulian
+  integer :: iq
+  real :: rlong(iip1,jjp1), rlat(iip1,jjp1)
+  integer :: uhoriid, vhoriid, thoriid
+  integer :: zvertiid,zvertiidv,zvertiidu
+  integer :: ii,jj
+  integer :: zan, dayref
+  integer :: jjb,jje,jjn
+
+  ! definition du domaine d'ecriture pour le rebuild
+
+  INTEGER,DIMENSION(2) :: ddid
+  INTEGER,DIMENSION(2) :: dsg
+  INTEGER,DIMENSION(2) :: dsl
+  INTEGER,DIMENSION(2) :: dpf
+  INTEGER,DIMENSION(2) :: dpl
+  INTEGER,DIMENSION(2) :: dhs
+  INTEGER,DIMENSION(2) :: dhe
+
+  INTEGER :: dynhist_domain_id
+  INTEGER :: dynhistv_domain_id
+  INTEGER :: dynhistu_domain_id
+
+  if (adjust) return
+
+  !
+  !  Initialisations
+  !
+  pi = 4. * atan (1.)
+  !
+  !  Appel a histbeg: creation du fichier netcdf et initialisations diverses
+  !
+
+  zan = anne0
+  dayref = day0
+  CALL ymds2ju(zan, 1, dayref, 0.0, zjulian)
+  tau0 = itau_dyn
+
+  do jj = 1, jjp1
+    do ii = 1, iip1
+      rlong(ii,jj) = rlonv(ii) * 180. / pi
+      rlat(ii,jj)  = rlatu(jj) * 180. / pi
+    enddo
+  enddo
+
+
+  ! Creation de 3 fichiers pour les differentes grilles horizontales
+  ! Restriction de IOIPSL: seulement 2 coordonnees dans le meme fichier
+  ! Grille Scalaire
+
+  jjb=jj_begin
+  jje=jj_end
+  jjn=jj_nb
+
+  ddid=(/ 1,2 /)
+  dsg=(/ iip1,jjp1 /)
+  dsl=(/ iip1,jjn /)
+  dpf=(/ 1,jjb /)
+  dpl=(/ iip1,jje /)
+  dhs=(/ 0,0 /)
+  dhe=(/ 0,0 /)
+
+
+  CALL flio_dom_set(mpi_size,mpi_rank,ddid,dsg,dsl,dpf,dpl,dhs,dhe, &
+        'box',dynhist_domain_id)
+
+  CALL histbeg(dynhist_file,iip1, rlong(:,1), jjn, &
+        rlat(1,jjb:jje), 1, iip1, 1, jjn,tau0, &
+        zjulian, tstep, thoriid, &
+        histid,dynhist_domain_id)
+
+
+  !  Creation du fichier histoire pour les grilles en V et U (oblige pour l'instant,
+  !  IOIPSL ne permet pas de grilles avec des nombres de point differents dans
+  !  un meme fichier)
+  ! Grille V
+
+  jjb=jj_begin
+  jje=jj_end
+  jjn=jj_nb
+  IF (pole_sud) jjn=jjn-1
+  IF (pole_sud) jje=jje-1
+
+  do jj = jjb, jje
+    do ii = 1, iip1
+      rlong(ii,jj) = rlonv(ii) * 180. / pi
+      rlat(ii,jj) = rlatv(jj) * 180. / pi
+    enddo
+  enddo
+
+  ddid=(/ 1,2 /)
+  dsg=(/ iip1,jjm /)
+  dsl=(/ iip1,jjn /)
+  dpf=(/ 1,jjb /)
+  dpl=(/ iip1,jje /)
+  dhs=(/ 0,0 /)
+  dhe=(/ 0,0 /)
+
+
+  CALL flio_dom_set(mpi_size,mpi_rank,ddid,dsg,dsl,dpf,dpl,dhs,dhe, &
+        'box',dynhistv_domain_id)
+
+  CALL histbeg(dynhistv_file,iip1, rlong(:,1), jjn, &
+        rlat(1,jjb:jje), 1, iip1, 1, jjn,tau0, &
+        zjulian, tstep, vhoriid, &
+        histvid,dynhistv_domain_id)
+
+  ! Grille U
+
+  do jj = 1, jjp1
+    do ii = 1, iip1
+      rlong(ii,jj) = rlonu(ii) * 180. / pi
+      rlat(ii,jj) = rlatu(jj) * 180. / pi
+    enddo
+  enddo
+
+  jjb=jj_begin
+  jje=jj_end
+  jjn=jj_nb
+
+  ddid=(/ 1,2 /)
+  dsg=(/ iip1,jjp1 /)
+  dsl=(/ iip1,jjn /)
+  dpf=(/ 1,jjb /)
+  dpl=(/ iip1,jje /)
+  dhs=(/ 0,0 /)
+  dhe=(/ 0,0 /)
+
+
+  CALL flio_dom_set(mpi_size,mpi_rank,ddid,dsg,dsl,dpf,dpl,dhs,dhe, &
+        'box',dynhistu_domain_id)
+
+  CALL histbeg(dynhistu_file,iip1, rlong(:,1), jjn, &
+        rlat(1,jjb:jje), 1, iip1, 1, jjn,tau0, &
+        zjulian, tstep, uhoriid, &
+        histuid,dynhistu_domain_id)
+
+
+  ! -------------------------------------------------------------
+  !  Appel a histvert pour la grille verticale
+  ! -------------------------------------------------------------
+  CALL histvert(histid, 'presnivs', 'Niveaux pression','mb', &
+        llm, presnivs/100., zvertiid,'down')
+  CALL histvert(histvid, 'presnivs', 'Niveaux pression','mb', &
+        llm, presnivs/100., zvertiidv,'down')
+  CALL histvert(histuid, 'presnivs', 'Niveaux pression','mb', &
+        llm, presnivs/100., zvertiidu,'down')
+
+  !
+  ! -------------------------------------------------------------
+  !  Appels a histdef pour la definition des variables a sauvegarder
+  ! -------------------------------------------------------------
+  !
+  !  Vents U
+  !
+  jjn=jj_nb
+  CALL histdef(histuid, 'u', 'vent u', &
+        'm/s', iip1, jjn, uhoriid, llm, 1, llm, zvertiidu, &
+        32, 'inst(X)', t_ops, t_wrt)
+
+  !
+  !  Vents V
+  !
+  if (pole_sud) jjn=jj_nb-1
+  CALL histdef(histvid, 'v', 'vent v', &
+        'm/s', iip1, jjn, vhoriid, llm, 1, llm, zvertiidv, &
+        32, 'inst(X)', t_ops, t_wrt)
+
+  !
+  !  Temperature
+  !
+  jjn=jj_nb
+  CALL histdef(histid, 'temp', 'temperature', 'K', &
+        iip1, jjn, thoriid, llm, 1, llm, zvertiid, &
+        32, 'inst(X)', t_ops, t_wrt)
+  !
+  !  Temperature potentielle
+  !
+  CALL histdef(histid, 'theta', 'temperature potentielle', 'K', &
+        iip1, jjn, thoriid, llm, 1, llm, zvertiid, &
+        32, 'inst(X)', t_ops, t_wrt)
+
+
+  !
+  !  Geopotentiel
+  !
+  CALL histdef(histid, 'phi', 'geopotentiel', '-', &
+        iip1, jjn, thoriid, llm, 1, llm, zvertiid, &
+        32, 'inst(X)', t_ops, t_wrt)
+  !
+  !  Traceurs
+  !
+  !    DO iq=1,nqtot
+  !      CALL histdef(histid, tracers(iq)%name,
+  ! .             tracers(iq)%longName, '-',
+  ! .             iip1, jjn, thoriid, llm, 1, llm, zvertiid,
+  ! .             32, 'inst(X)', t_ops, t_wrt)
+  !    enddo
+  !
+  !  Masse
+  !
+  CALL histdef(histid, 'masse', 'masse', 'kg', &
+        iip1, jjn, thoriid, llm, 1, llm, zvertiid, &
+        32, 'inst(X)', t_ops, t_wrt)
+  !
+  !  Pression au sol
+  !
+  CALL histdef(histid, 'ps', 'pression naturelle au sol', 'Pa', &
+        iip1, jjn, thoriid, 1, 1, 1, -99, &
+        32, 'inst(X)', t_ops, t_wrt)
+  !
+  !  Geopotentiel au sol
+  !
+  !  CALL histdef(histid, 'phis', 'geopotentiel au sol', '-',
+  ! .             iip1, jjn, thoriid, 1, 1, 1, -99,
+  ! .             32, 'inst(X)', t_ops, t_wrt)
+  !
+  !  Fin
+  !
+  CALL histend(histid)
+  CALL histend(histuid)
+  CALL histend(histvid)
+#else
+  write(lunout, *)'inithist_loc: Needs IOIPSL to function'
+#endif
+  ! #endif of #ifdef CPP_IOIPSL
+end subroutine inithist_loc
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/integrd_loc.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/integrd_loc.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/integrd_loc.F	(revision 5101)
@@ -157,5 +157,5 @@
           write(lunout,*) " lon = ",rlonv(i)*180./pi, " deg",
      &                    " lat = ",rlatu(j)*180./pi, " deg"
-         call abort_gcm("integrd_loc", "negative surface pressure", 1)
+         CALL abort_gcm("integrd_loc", "negative surface pressure", 1)
       ENDIF
 
@@ -164,28 +164,28 @@
         !write(*,*) 'integrd 170'
       IF (.NOT. Checksum_all) THEN
-        call WriteField_v('int_vcov',vcov)
-        call WriteField_u('int_ucov',ucov)
-        call WriteField_u('int_teta',teta)
-        call WriteField_u('int_ps0',ps0)
-        call WriteField_u('int_masse',masse)
-        call WriteField_u('int_phis',phis)
-        call WriteField_v('int_vcovm1',vcovm1)
-        call WriteField_u('int_ucovm1',ucovm1)
-        call WriteField_u('int_tetam1',tetam1)
-        call WriteField_u('int_psm1',psm1)
-        call WriteField_u('int_massem1',massem1)
-
-        call WriteField_v('int_dv',dv)
-        call WriteField_u('int_du',du)
-        call WriteField_u('int_dteta',dteta)
-        call WriteField_u('int_dp',dp)
-!        call WriteField_u('int_finvmaold',finvmaold)
+        CALL WriteField_v('int_vcov',vcov)
+        CALL WriteField_u('int_ucov',ucov)
+        CALL WriteField_u('int_teta',teta)
+        CALL WriteField_u('int_ps0',ps0)
+        CALL WriteField_u('int_masse',masse)
+        CALL WriteField_u('int_phis',phis)
+        CALL WriteField_v('int_vcovm1',vcovm1)
+        CALL WriteField_u('int_ucovm1',ucovm1)
+        CALL WriteField_u('int_tetam1',tetam1)
+        CALL WriteField_u('int_psm1',psm1)
+        CALL WriteField_u('int_massem1',massem1)
+
+        CALL WriteField_v('int_dv',dv)
+        CALL WriteField_u('int_du',du)
+        CALL WriteField_u('int_dteta',dteta)
+        CALL WriteField_u('int_dp',dp)
+!        CALL WriteField_u('int_finvmaold',finvmaold)
         do j=1,nq
-          call WriteField_u('int_q'//trim(int2str(j)),
+          CALL WriteField_u('int_q'//trim(int2str(j)),
      .                q(:,:,j))
-          call WriteField_u('int_dq'//trim(int2str(j)),
+          CALL WriteField_u('int_dq'//trim(int2str(j)),
      .                dq(:,:,j))
         enddo
-        call abort_gcm("integrd_loc", "", 1)
+        CALL abort_gcm("integrd_loc", "", 1)
       ENDIF
     
@@ -346,5 +346,5 @@
 c$OMP BARRIER
 
-        call check_isotopes(q,ijb,ije,'integrd 342')
+        CALL check_isotopes(q,ijb,ije,'integrd 342')
 
         !write(*,*) 'integrd 341'
@@ -352,5 +352,5 @@
         !write(*,*) 'integrd 343'
 
-        call check_isotopes(q,ijb,ije,'integrd 346')
+        CALL check_isotopes(q,ijb,ije,'integrd 346')
 c
 c    .....  Calcul de la valeur moyenne, unique  aux poles pour  q .....
@@ -403,5 +403,5 @@
       ENDIF
 
-      call check_isotopes(q,ijb,ije,'integrd 409')
+      CALL check_isotopes(q,ijb,ije,'integrd 409')
       
 ! Ehouarn: forget about finvmaold
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/integrd_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/integrd_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/integrd_mod.F90	(revision 5101)
@@ -14,5 +14,5 @@
   USE parallel_lmdz
   USE dimensions_mod
-  USE advect_new_mod,ONLY : advect_new_allocate
+  USE advect_new_mod,ONLY: advect_new_allocate
   IMPLICIT NONE
   TYPE(distrib),POINTER :: d
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/leapfrog_loc.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/leapfrog_loc.F	(revision 5100)
+++ 	(revision )
@@ -1,1887 +1,0 @@
-
-! $Id$
-
-c
-c
-#define DEBUG_IO
-#undef DEBUG_IO
-
-
-      SUBROUTINE leapfrog_loc(ucov0,vcov0,teta0,ps0,
-     &                        masse0,phis0,q0,time_0)
-
-       USE misc_mod
-       USE parallel_lmdz
-       USE times
-       USE mod_hallo
-       USE Bands
-       USE Write_Field
-       USE Write_Field_p
-       USE vampir
-       USE timer_filtre, ONLY : print_filtre_timer
-       USE infotrac
-       USE guide_loc_mod, ONLY : guide_main
-       USE getparam
-       USE control_mod
-       USE mod_filtreg_p
-       USE write_field_loc
-       USE allocate_field_mod
-       USE call_dissip_mod, ONLY : call_dissip
-       USE lmdz_call_calfis, ONLY : call_calfis
-       USE leapfrog_mod, ONLY : ucov,vcov,teta,ps,masse,phis,q,dq
-     & ,ucovm1,vcovm1,tetam1,massem1,psm1,p,pks,pk,pkf,flxw
-     & ,pbaru,pbarv,du,dv,dteta,phi,dp,w
-     & ,leapfrog_allocate,leapfrog_switch_caldyn,leapfrog_switch_dissip
-
-       use exner_hyb_loc_m, only: exner_hyb_loc
-       use exner_milieu_loc_m, only: exner_milieu_loc
-       USE comconst_mod, ONLY: cpp, dtvr, ihf
-       USE comvert_mod, ONLY: ap, bp, pressure_exner
-       USE logic_mod, ONLY: iflag_phys,ok_guide,forward,leapf,apphys,
-     &                      statcl,conser,apdiss,purmats,ok_strato
-       USE temps_mod, ONLY: itaufin,jD_ref,jH_ref,day_ini,
-     &                        day_ref,start_time,dt
-       USE mod_xios_dyn3dmem, ONLY : dyn3d_ctx_handle
-       USE lmdz_xios, ONLY: xios_update_calendar, 
-     &                      xios_set_current_context, 
-     &                      using_xios
-       USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA
-       
-      IMPLICIT NONE
-
-c      ......   Version  du 10/01/98    ..........
-
-c             avec  coordonnees  verticales hybrides 
-c   avec nouveaux operat. dissipation * ( gradiv2,divgrad2,nxgraro2 )
-
-c=======================================================================
-c
-c   Auteur:  P. Le Van /L. Fairhead/F.Hourdin
-c   -------
-c
-c   Objet:
-c   ------
-c
-c   GCM LMD nouvelle grille
-c
-c=======================================================================
-c
-c  ... Dans inigeom , nouveaux calculs pour les elongations  cu , cv
-c      et possibilite d'appeler une fonction f(y)  a derivee tangente
-c      hyperbolique a la  place de la fonction a derivee sinusoidale.
-
-c  ... Possibilite de choisir le shema pour l'advection de
-c        q  , en modifiant iadv dans traceur.def  (10/02) .
-c
-c      Pour Van-Leer + Vapeur d'eau saturee, iadv(1)=4. (F.Codron,10/99)
-c      Pour Van-Leer iadv=10 
-c
-c-----------------------------------------------------------------------
-c   Declarations:
-c   -------------
-
-      include "dimensions.h"
-      include "paramet.h"
-      include "comdissnew.h"
-      include "comgeom.h"
-      include "description.h"
-      include "iniprint.h"
-      include "academic.h"
-      
-      REAL,INTENT(IN) :: time_0 ! not used
-
-c   dynamical variables:
-      REAL,INTENT(IN) :: ucov0(ijb_u:ije_u,llm)    ! zonal covariant wind
-      REAL,INTENT(IN) :: vcov0(ijb_v:ije_v,llm)    ! meridional covariant wind
-      REAL,INTENT(IN) :: teta0(ijb_u:ije_u,llm)    ! potential temperature
-      REAL,INTENT(IN) :: q0(ijb_u:ije_u,llm,nqtot) ! advected tracers
-      REAL,INTENT(IN) :: ps0(ijb_u:ije_u)          ! surface pressure (Pa)
-      REAL,INTENT(IN) :: masse0(ijb_u:ije_u,llm)   ! air mass
-      REAL,INTENT(IN) :: phis0(ijb_u:ije_u)        ! geopotentiat at the surface
-
-      real zqmin,zqmax
-
-!      REAL,SAVE,ALLOCATABLE :: p (:,:  )               ! pression aux interfac.des couches
-!      REAL,SAVE,ALLOCATABLE :: pks(:)                      ! exner au  sol
-!      REAL,SAVE,ALLOCATABLE :: pk(:,:)                   ! exner au milieu des couches
-!      REAL,SAVE,ALLOCATABLE :: pkf(:,:)                  ! exner filt.au milieu des couches
-!      REAL,SAVE,ALLOCATABLE :: phi(:,:)                  ! geopotentiel
-!      REAL,SAVE,ALLOCATABLE :: w(:,:)                    ! vitesse verticale
-
-c variables dynamiques intermediaire pour le transport
-!      REAL,SAVE,ALLOCATABLE :: pbaru(:,:),pbarv(:,:) !flux de masse
-
-c   variables dynamiques au pas -1
-!      REAL,SAVE,ALLOCATABLE :: vcovm1(:,:),ucovm1(:,:)
-!      REAL,SAVE,ALLOCATABLE :: tetam1(:,:),psm1(:)
-!      REAL,SAVE,ALLOCATABLE :: massem1(:,:)
-
-c   tendances dynamiques
-!      REAL,SAVE,ALLOCATABLE :: dv(:,:),du(:,:)
-!      REAL,SAVE,ALLOCATABLE :: dteta(:,:),dp(:)
-!      REAL,DIMENSION(:,:,:), ALLOCATABLE, SAVE :: dq
-
-c   tendances de la dissipation
-!      REAL,SAVE,ALLOCATABLE :: dvdis(:,:),dudis(:,:)
-!      REAL,SAVE,ALLOCATABLE :: dtetadis(:,:)
-
-c   tendances physiques
-      REAL,SAVE,ALLOCATABLE :: dvfi(:,:),dufi(:,:)
-      REAL,SAVE,ALLOCATABLE :: dtetafi(:,:)
-      REAL,SAVE,ALLOCATABLE :: dpfi(:)
-      REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: dqfi
-
-c   variables pour le fichier histoire
-      REAL dtav      ! intervalle de temps elementaire
-
-      REAL tppn(iim),tpps(iim),tpn,tps
-c
-      INTEGER itau,itaufinp1,iav
-!      INTEGER  iday ! jour julien
-      REAL       time 
-
-      REAL  SSUM 
-!      REAL,SAVE,ALLOCATABLE :: finvmaold(:,:)
-
-cym      LOGICAL  lafin
-      LOGICAL :: lafin
-      INTEGER ij,iq,l
-      INTEGER ik
-
-      real time_step, t_wrt, t_ops
-
-! jD_cur: jour julien courant
-! jH_cur: heure julienne courante
-      REAL :: jD_cur, jH_cur
-      INTEGER :: an, mois, jour
-      REAL :: secondes
-
-      logical :: physic
-      LOGICAL first,callinigrads
-
-      data callinigrads/.true./
-      character*10 string10
-
-!      REAL,SAVE,ALLOCATABLE :: flxw(:,:) ! flux de masse verticale
-
-c+jld variables test conservation energie
-!      REAL,SAVE,ALLOCATABLE :: ecin(:,:),ecin0(:,:)
-C     Tendance de la temp. potentiel d (theta)/ d t due a la 
-C     tansformation d'energie cinetique en energie thermique
-C     cree par la dissipation
-!      REAL,SAVE,ALLOCATABLE :: dtetaecdt(:,:)
-!      REAL,SAVE,ALLOCATABLE :: vcont(:,:),ucont(:,:)
-!      REAL,SAVE,ALLOCATABLE :: vnat(:,:),unat(:,:)
-      REAL      d_h_vcol, d_qt, d_qw, d_ql, d_ec
-      CHARACTER*15 ztit
-!!      INTEGER   ip_ebil_dyn  ! PRINT level for energy conserv. diag.
-!      SAVE      ip_ebil_dyn
-!      DATA      ip_ebil_dyn/0/
-c-jld 
-
-      character*80 dynhist_file, dynhistave_file
-      character(len=*),parameter :: modname="leapfrog_loc"
-      character*80 abort_message
-
-
-      logical,PARAMETER :: dissip_conservative=.TRUE.
- 
-      INTEGER testita
-      PARAMETER (testita = 9)
-
-      logical , parameter :: flag_verif = .false.
-      
-c declaration liees au parallelisme
-      INTEGER :: ierr
-      LOGICAL :: FirstCaldyn
-      LOGICAL :: FirstPhysic
-      INTEGER :: ijb,ije,j,i
-      type(Request) :: TestRequest
-      type(Request) :: Request_Dissip
-      type(Request) :: Request_physic
-
-      INTEGER :: true_itau
-      INTEGER :: iapptrac
-      INTEGER :: AdjustCount
-!      INTEGER :: var_time
-      LOGICAL :: ok_start_timer=.FALSE.
-      LOGICAL, SAVE :: firstcall=.TRUE.
-      TYPE(distrib),SAVE :: new_dist
-
-      call check_isotopes(q0,ijb_u,ije_u,'leapfrog204: debut')
-      
-c$OMP MASTER
-      ItCount=0
-c$OMP END MASTER      
-      true_itau=0
-      FirstCaldyn=.TRUE.
-      FirstPhysic=.TRUE.
-      iapptrac=0
-      AdjustCount = 0
-      lafin=.false.
-      
-      if (nday>=0) then
-         itaufin   = nday*day_step
-      else
-         itaufin   = -nday
-      endif
-
-      itaufinp1 = itaufin +1
-
-      call check_isotopes(q0,ijb_u,ije_u,'leapfrog 226')
-
-      itau = 0
-      physic=.true.
-      if (iflag_phys==0.or.iflag_phys==2) physic=.false.
-      CALL init_nan
-      CALL leapfrog_allocate
-      ucov=ucov0
-      vcov=vcov0
-      teta=teta0
-      ps=ps0
-      masse=masse0
-      phis=phis0
-      q=q0
-
-      call check_isotopes(q,ijb_u,ije_u,'leapfrog 239')
-      
-!      iday = day_ini+itau/day_step
-!      time = REAL(itau-(iday-day_ini)*day_step)/day_step+time_0
-!         IF(time.GT.1.) THEN
-!          time = time-1.
-!          iday = iday+1
-!         ENDIF
-
-c Allocate variables depending on dynamic variable nqtot
-!$OMP MASTER
-      if (firstcall) then
-
-!      ALLOCATE(p(ijb_u:ije_u,llmp1))
-!      ALLOCATE(pks(ijb_u:ije_u))
-!      ALLOCATE(pk(ijb_u:ije_u,llm))
-!      ALLOCATE(pkf(ijb_u:ije_u,llm))
-!      ALLOCATE(phi(ijb_u:ije_u,llm))
-!      ALLOCATE(w(ijb_u:ije_u,llm))
-!      ALLOCATE(pbaru(ip1jmp1,llm),pbarv(ip1jm,llm))
-!      ALLOCATE(vcovm1(ijb_v:ije_v,llm),ucovm1(ijb_u:ije_u,llm))
-!      ALLOCATE(tetam1(ijb_u:ije_u,llm),psm1(ijb_u:ije_u))
-!      ALLOCATE(massem1(ijb_u:ije_u,llm))
-!      ALLOCATE(dv(ijb_v:ije_v,llm),du(ijb_u:ije_u,llm))
-!      ALLOCATE(dteta(ijb_u:ije_u,llm),dp(ijb_u:ije_u))      
-!      ALLOCATE(dvdis(ijb_v:ije_v,llm),dudis(ijb_u:ije_u,llm))
-!      ALLOCATE(dtetadis(ijb_u:ije_u,llm))
-      ALLOCATE(dvfi(ijb_v:ije_v,llm),dufi(ijb_u:ije_u,llm))
-      ALLOCATE(dtetafi(ijb_u:ije_u,llm))
-      ALLOCATE(dpfi(ijb_u:ije_u))
-!      ALLOCATE(dq(ijb_u:ije_u,llm,nqtot))
-      ALLOCATE(dqfi(ijb_u:ije_u,llm,nqtot))
-!      ALLOCATE(dqfi_tmp(iip1,llm,nqtot))
-!      ALLOCATE(finvmaold(ijb_u:ije_u,llm))
-!      ALLOCATE(flxw(ijb_u:ije_u,llm))
-!      ALLOCATE(ecin(ijb_u:ije_u,llm),ecin0(ijb_u:ije_u,llm))
-!      ALLOCATE(dtetaecdt(ijb_u:ije_u,llm))
-!      ALLOCATE(vcont(ijb_v:ije_v,llm),ucont(ijb_u:ije_u,llm))
-!      ALLOCATE(vnat(ijb_v:ije_v,llm),unat(ijb_u:ije_u,llm))
-      endif
-!$OMP END MASTER      
-!$OMP BARRIER
-
-!                CALL dynredem1_loc("restart.nc",0.0,
-!     &                           vcov,ucov,teta,q,masse,ps)
-
-
-c-----------------------------------------------------------------------
-c   On initialise la pression et la fonction d'Exner :
-c   --------------------------------------------------
-
-c$OMP MASTER
-      dq(:,:,:)=0.
-      CALL pression ( ijnb_u, ap, bp, ps, p       )
-c$OMP END MASTER
-      if (pressure_exner) then
-      CALL exner_hyb_loc( ijnb_u, ps, p, pks, pk, pkf)
-      else 
-        CALL exner_milieu_loc( ijnb_u, ps, p, pks, pk, pkf )
-      endif
-c-----------------------------------------------------------------------
-c   Debut de l'integration temporelle:
-c   ----------------------------------
-c et du parallelisme !!
-
-   1  CONTINUE ! Matsuno Forward step begins here
-
-c   date: (NB: date remains unchanged for Backward step)
-c   -----
-
-      jD_cur = jD_ref + day_ini - day_ref +
-     &          (itau+1)/day_step
-      jH_cur = jH_ref + start_time +
-     &         mod(itau+1,day_step)/float(day_step) 
-      if (jH_cur > 1.0 ) then
-        jD_cur = jD_cur +1.
-        jH_cur = jH_cur -1.
-      endif
-
-      call check_isotopes(q,ijb_u,ije_u,'leapfrog 321')
-
-#ifdef CPP_IOIPSL
-      if (ok_guide) then
-        call guide_main(itau,ucov,vcov,teta,q,masse,ps)
-!$OMP BARRIER
-      endif
-#endif
-
-
-c
-c     IF( MOD( itau, 10* day_step ).EQ.0 )  THEN
-c       CALL  test_period ( ucov,vcov,teta,q,p,phis )
-c       PRINT *,' ----   Test_period apres continue   OK ! -----', itau
-c     ENDIF 
-c
-cym      CALL SCOPY( ijmllm ,vcov , 1, vcovm1 , 1 )
-cym      CALL SCOPY( ijp1llm,ucov , 1, ucovm1 , 1 )
-cym      CALL SCOPY( ijp1llm,teta , 1, tetam1 , 1 )
-cym      CALL SCOPY( ijp1llm,masse, 1, massem1, 1 )
-cym      CALL SCOPY( ip1jmp1, ps  , 1,   psm1 , 1 )
-
-       if (FirstCaldyn) then
-c$OMP MASTER
-         ucovm1=ucov
-         vcovm1=vcov
-         tetam1= teta
-         massem1= masse
-         psm1= ps
-         
-! Ehouarn: finvmaold is actually not used       
-!         finvmaold = masse
-c$OMP END MASTER
-c$OMP BARRIER
-!         CALL filtreg_p ( finvmaold ,jjb_u,jje_u,jjb_u,jje_u,jjp1, llm,
-!     &                    -2,2, .TRUE., 1 )
-       else
-! Save fields obtained at previous time step as '...m1'
-         ijb=ij_begin
-         ije=ij_end
-
-c$OMP MASTER           
-         psm1     (ijb:ije) = ps    (ijb:ije)
-c$OMP END MASTER
-
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)         
-         DO l=1,llm      
-           ije=ij_end
-           ucovm1   (ijb:ije,l) = ucov  (ijb:ije,l)
-           tetam1   (ijb:ije,l) = teta  (ijb:ije,l)
-           massem1  (ijb:ije,l) = masse (ijb:ije,l)
-!           finvmaold(ijb:ije,l)=masse(ijb:ije,l)
-                 
-           if (pole_sud) ije=ij_end-iip1
-           vcovm1(ijb:ije,l) = vcov  (ijb:ije,l)
-       
-
-         ENDDO
-c$OMP ENDDO  
-
-
-! Ehouarn: finvmaold not used
-!          CALL filtreg_p(finvmaold ,jjb_u,jje_u,jj_begin,jj_end,jjp1, 
-!     .                    llm, -2,2, .TRUE., 1 )
-
-       endif ! of if (FirstCaldyn)
-       
-      forward = .TRUE.
-      leapf   = .FALSE.
-      dt      =  dtvr
-
-c   ...    P.Le Van .26/04/94  ....
-
-cym      CALL SCOPY   ( ijp1llm,   masse, 1, finvmaold,     1 )
-cym      CALL filtreg ( finvmaold ,jjp1, llm, -2,2, .TRUE., 1 )
-
-cym  ne sert a rien
-cym      call minmax(ijp1llm,q(:,:,3),zqmin,zqmax)
-
-
-         call check_isotopes(q,ijb_u,ije_u,'leapfrog 400')
-
-   2  CONTINUE ! Matsuno backward or leapfrog step begins here
-
-
-      call check_isotopes(q,ijb_u,ije_u,'leapfrog 402')
-
-c$OMP MASTER
-      ItCount=ItCount+1
-      if (MOD(ItCount,1)==1) then
-        debug=.true.
-      else
-        debug=.false.
-      endif
-c$OMP END MASTER
-c-----------------------------------------------------------------------
-
-c   date: (NB: only leapfrog step requires recomputing date)
-c   -----
-
-      IF (leapf) THEN
-        jD_cur = jD_ref + day_ini - day_ref +
-     &          (itau+1)/day_step
-        jH_cur = jH_ref + start_time +
-     &         mod(itau+1,day_step)/float(day_step) 
-        if (jH_cur > 1.0 ) then
-          jD_cur = jD_cur +1.
-          jH_cur = jH_cur -1.
-        endif
-      ENDIF
-
-c   gestion des appels de la physique et des dissipations:
-c   ------------------------------------------------------
-c
-c   ...    P.Le Van  ( 6/02/95 )  ....
-
-      apphys = .FALSE.
-      statcl = .FALSE.
-      conser = .FALSE.
-      apdiss = .FALSE.
-
-      IF( purmats ) THEN
-      ! Purely Matsuno time stepping
-         IF( MOD(itau,iconser) ==0.AND.  forward    ) conser = .TRUE.
-         IF( MOD(itau,dissip_period )==0.AND..NOT.forward )
-     s        apdiss = .TRUE.
-         IF( MOD(itau,iphysiq )==0.AND..NOT.forward
-     s          .and. physic                        ) apphys = .TRUE.
-      ELSE
-      ! Leapfrog/Matsuno time stepping 
-         IF( MOD(itau   ,iconser) == 0              ) conser = .TRUE.
-         IF( MOD(itau+1,dissip_period)==0 .AND. .NOT. forward )
-     s        apdiss = .TRUE.
-         IF( MOD(itau+1,iphysiq)==0.AND.physic) apphys=.TRUE.
-      END IF
-
-! Ehouarn: for Shallow Water case (ie: 1 vertical layer),
-!          supress dissipation step
-      if (llm==1) then
-        apdiss=.false.
-      endif
-
-cym    ---> Pour le moment      
-cym      apphys = .FALSE.
-      statcl = .FALSE.
-!     conser = .FALSE. ! ie: no output of control variables to stdout in //
-      
-      if (firstCaldyn) then
-c$OMP MASTER
-          call Set_Distrib(distrib_caldyn)
-c$OMP END MASTER
-c$OMP BARRIER
-          firstCaldyn=.FALSE.
-cym          call InitTime
-c$OMP MASTER
-          call Init_timer
-c$OMP END MASTER
-      endif
-
-c$OMP MASTER      
-      IF (ok_start_timer) THEN
-        CALL InitTime
-        ok_start_timer=.FALSE.
-      ENDIF      
-c$OMP END MASTER      
-
-
-      call check_isotopes(q,ijb_u,ije_u,'leapfrog 471')
-
-!ym  PAS D'AJUSTEMENT POUR LE MOMENT     
-      if (Adjust) then
-        AdjustCount=AdjustCount+1
-!        if (iapptrac==iapp_tracvl .and. (forward .OR.  leapf)
-!     &         .and. itau/iphysiq>2 .and. Adjustcount>30) then
-        if (Adjustcount>1) then
-           AdjustCount=0
-c$OMP MASTER 
-           call allgather_timer_average
-
-        if (prt_level > 9) then
-        
-        print *,'*********************************'
-        print *,'******    TIMER CALDYN     ******'
-        do i=0,mpi_size-1
-          print *,'proc',i,' :   Nb Bandes  :',jj_nb_caldyn(i),
-     &            '  : temps moyen :',
-     &             timer_average(jj_nb_caldyn(i),timer_caldyn,i),
-     &            '+-',timer_delta(jj_nb_caldyn(i),timer_caldyn,i)
-        enddo
-      
-        print *,'*********************************'
-        print *,'******    TIMER VANLEER    ******'
-        do i=0,mpi_size-1
-          print *,'proc',i,' :   Nb Bandes  :',jj_nb_vanleer(i),
-     &            '  : temps moyen :',
-     &             timer_average(jj_nb_vanleer(i),timer_vanleer,i),
-     &            '+-',timer_delta(jj_nb_vanleer(i),timer_vanleer,i)
-        enddo
-      
-        print *,'*********************************'
-        print *,'******    TIMER DISSIP    ******'
-        do i=0,mpi_size-1
-          print *,'proc',i,' :   Nb Bandes  :',jj_nb_dissip(i),
-     &            '  : temps moyen :',
-     &             timer_average(jj_nb_dissip(i),timer_dissip,i),
-     &             '+-',timer_delta(jj_nb_dissip(i),timer_dissip,i)
-        enddo
-        
-!        if (mpi_rank==0) call WriteBands
-        
-       endif
-       
-         call AdjustBands_caldyn(new_dist)
-!$OMP END MASTER
-!$OMP BARRIER
-         CALL leapfrog_switch_caldyn(new_dist)
-!$OMP BARRIER
-
-
-!$OMP MASTER
-         distrib_caldyn=new_dist
-         CALL set_distrib(distrib_caldyn)
-!$OMP END MASTER
-!$OMP BARRIER
-!         call Register_SwapFieldHallo(ucov,ucov,ip1jmp1,llm,
-!     &                                jj_Nb_caldyn,0,0,TestRequest)
-!         call Register_SwapFieldHallo(ucovm1,ucovm1,ip1jmp1,llm,
-!     &                                jj_Nb_caldyn,0,0,TestRequest)
-!         call Register_SwapFieldHallo(vcov,vcov,ip1jm,llm,
-!     &                                jj_Nb_caldyn,0,0,TestRequest)
-!         call Register_SwapFieldHallo(vcovm1,vcovm1,ip1jm,llm,
-!     &                                jj_Nb_caldyn,0,0,TestRequest)
-!         call Register_SwapFieldHallo(teta,teta,ip1jmp1,llm,
-!     &                                jj_Nb_caldyn,0,0,TestRequest)
-!         call Register_SwapFieldHallo(tetam1,tetam1,ip1jmp1,llm,
-!     &                                jj_Nb_caldyn,0,0,TestRequest)
-!         call Register_SwapFieldHallo(masse,masse,ip1jmp1,llm,
-!     &                                jj_Nb_caldyn,0,0,TestRequest)
-!         call Register_SwapFieldHallo(massem1,massem1,ip1jmp1,llm,
-!     &                                jj_Nb_caldyn,0,0,TestRequest)
-!         call Register_SwapFieldHallo(ps,ps,ip1jmp1,1,
-!     &                                jj_Nb_caldyn,0,0,TestRequest)
-!         call Register_SwapFieldHallo(psm1,psm1,ip1jmp1,1,
-!     &                                jj_Nb_caldyn,0,0,TestRequest)
-!         call Register_SwapFieldHallo(pkf,pkf,ip1jmp1,llm,
-!     &                                jj_Nb_caldyn,0,0,TestRequest)
-!         call Register_SwapFieldHallo(pk,pk,ip1jmp1,llm,
-!     &                                jj_Nb_caldyn,0,0,TestRequest)
-!         call Register_SwapFieldHallo(pks,pks,ip1jmp1,1,
-!     &                                jj_Nb_caldyn,0,0,TestRequest)
-!         call Register_SwapFieldHallo(phis,phis,ip1jmp1,1,
-!     &                                jj_Nb_caldyn,0,0,TestRequest)
-!         call Register_SwapFieldHallo(phi,phi,ip1jmp1,llm,
-!     &                                jj_Nb_caldyn,0,0,TestRequest)
-!         call Register_SwapFieldHallo(finvmaold,finvmaold,ip1jmp1,llm,
-!     &                                jj_Nb_caldyn,0,0,TestRequest)
-
-!        do j=1,nqtot
-!         call Register_SwapFieldHallo(q(:,:,j),q(:,:,j),ip1jmp1,llm,
-!     &                                jj_nb_caldyn,0,0,TestRequest)
-!        enddo
-
-!         call Set_Distrib(distrib_caldyn)
-!         call SendRequest(TestRequest)
-!         call WaitRequest(TestRequest)
-         
-!$OMP MASTER
-        call AdjustBands_dissip(new_dist)
-!$OMP END MASTER
-!$OMP BARRIER
-        CALL leapfrog_switch_dissip(new_dist)
-!$OMP BARRIER
-!$OMP MASTER
-        distrib_dissip=new_dist
-!$OMP END MASTER
-!$OMP BARRIER
-!        call AdjustBands_physic
-
-c$OMP MASTER  
-        if (mpi_rank==0) call WriteBands
-c$OMP END MASTER  
-
-
-      endif
-      endif       
-     
-      
-      call check_isotopes(q,ijb_u,ije_u,'leapfrog 589')
-      
-c-----------------------------------------------------------------------
-c   calcul des tendances dynamiques:
-c   --------------------------------
-c$OMP BARRIER
-c$OMP MASTER
-       call VTb(VThallo)
-c$OMP END MASTER
-
-       call Register_Hallo_u(ucov,llm,1,1,1,1,TestRequest)
-       call Register_Hallo_v(vcov,llm,1,1,1,1,TestRequest)
-       call Register_Hallo_u(teta,llm,1,1,1,1,TestRequest)
-       call Register_Hallo_u(ps,1,1,2,2,1,TestRequest)
-       call Register_Hallo_u(pkf,llm,1,1,1,1,TestRequest)
-       call Register_Hallo_u(pk,llm,1,1,1,1,TestRequest)
-       call Register_Hallo_u(pks,1,1,1,1,1,TestRequest)
-       call Register_Hallo_u(p,llmp1,1,1,1,1,TestRequest)
-       
-c       do j=1,nqtot
-c         call Register_Hallo(q(1,1,j),ip1jmp1,llm,1,1,1,1,
-c     *                       TestRequest)
-c        enddo
-
-       call SendRequest(TestRequest)
-c$OMP BARRIER
-       call WaitRequest(TestRequest)
-
-c$OMP MASTER
-       call VTe(VThallo)
-c$OMP END MASTER
-c$OMP BARRIER
-      
-      if (debug) then        
-        call WriteField_u('ucov',ucov)
-        call WriteField_v('vcov',vcov)
-        call WriteField_u('teta',teta)
-        call WriteField_u('ps',ps)
-        call WriteField_u('masse',masse)
-        call WriteField_u('pk',pk)
-        call WriteField_u('pks',pks)
-        call WriteField_u('pkf',pkf)
-        call WriteField_u('phis',phis)
-        do iq=1,nqtot
-          call WriteField_u('q'//trim(int2str(iq)),
-     .                q(:,:,iq))
-        enddo
-      endif
-
-      
-      True_itau=True_itau+1
-
-c$OMP MASTER
-      IF (prt_level>9) THEN
-        WRITE(lunout,*)"leapfrog_p: Iteration No",True_itau
-      ENDIF
-
-
-      call start_timer(timer_caldyn)
-
-      ! compute geopotential phi()
-      CALL geopot_loc  ( ip1jmp1, teta  , pk , pks,  phis  , phi   )
-        
-      call check_isotopes(q,ijb_u,ije_u,'leapfrog 651')
-      
-      call VTb(VTcaldyn)
-c$OMP END MASTER
-!      var_time=time+iday-day_ini
-
-c$OMP BARRIER
-!      CALL FTRACE_REGION_BEGIN("caldyn")
-      time = jD_cur + jH_cur 
-
-      CALL caldyn_loc 
-     $  ( itau,ucov,vcov,teta,ps,masse,pk,pkf,phis ,
-     $    phi,conser,du,dv,dteta,dp,w, pbaru,pbarv, time )
-
-!      CALL FTRACE_REGION_END("caldyn")
-
-c$OMP MASTER
-      if (mpi_rank==0.AND.conser) THEN
-         WRITE(lunout,*) 'leapfrog_loc, Time step: ',itau,' Day:',time
-      ENDIF
-      call VTe(VTcaldyn)
-c$OMP END MASTER      
-
-#ifdef DEBUG_IO    
-      call WriteField_u('du',du)
-      call WriteField_v('dv',dv)
-      call WriteField_u('dteta',dteta)
-      call WriteField_u('dp',dp)
-      call WriteField_u('w',w)
-      call WriteField_u('pbaru',pbaru)
-      call WriteField_v('pbarv',pbarv)
-      call WriteField_u('p',p)
-      call WriteField_u('masse',masse)
-      call WriteField_u('pk',pk)
-#endif
-c-----------------------------------------------------------------------
-c   calcul des tendances advection des traceurs (dont l'humidite)
-c   -------------------------------------------------------------
-
-      call check_isotopes(q,ijb_u,ije_u,
-     &           'leapfrog 686: avant caladvtrac')
-      
-      IF( forward .OR.  leapf )  THEN
-! Ehouarn: NB: fields sent to advtrac are those at the beginning of the time step
-        !write(*,*) 'leapfrog 679: avant CALL caladvtrac_loc'
-         CALL caladvtrac_loc(q,pbaru,pbarv,
-     *        p, masse, dq,  teta,
-     .        flxw,pk, iapptrac)
-
-! call creation of mass flux 
-         IF (offline .AND. .NOT. adjust) THEN
-            CALL fluxstokenc_p(pbaru,pbarv,masse,teta,phi)
-         ENDIF
-
-         !write(*,*) 'leapfrog 719'
-         call check_isotopes(q,ijb_u,ije_u,
-     &           'leapfrog 698: apres caladvtrac')
-
-!      do j=1,nqtot
-!        call WriteField_u('qadv'//trim(int2str(j)),q(:,:,j))
-!      enddo
-
-! Ehouarn: Storage of mass flux for off-line tracers... not implemented...
-
-      ENDIF ! of IF( forward .OR.  leapf )
-
-
-c-----------------------------------------------------------------------
-c   integrations dynamique et traceurs:
-c   ----------------------------------
-
-c$OMP MASTER 
-       call VTb(VTintegre)
-c$OMP END MASTER
-#ifdef DEBUG_IO    
-      if (true_itau>20) then
-      call WriteField_u('ucovm1',ucovm1)
-      call WriteField_v('vcovm1',vcovm1)
-      call WriteField_u('tetam1',tetam1)
-      call WriteField_u('psm1',psm1)
-      call WriteField_u('ucov_int',ucov)
-      call WriteField_v('vcov_int',vcov)
-      call WriteField_u('teta_int',teta)
-      call WriteField_u('ps_int',ps)
-      endif
-#endif
-c$OMP BARRIER
-!       CALL FTRACE_REGION_BEGIN("integrd")
-
-       !write(*,*) 'leapfrog 720' 
-       call check_isotopes(q,ijb_u,ije_u,'leapfrog 756')
-
-       ! CRisi: pourquoi aller jusqu'à 2 et non pas jusqu'à nqtot?? 
-       CALL integrd_loc ( nqtot,vcovm1,ucovm1,tetam1,psm1,massem1 ,
-     $         dv,du,dteta,dq,dp,vcov,ucov,teta,q,ps,masse,phis)
-!     $              finvmaold                                    )
-
-       !write(*,*) 'leapfrog 724'       
-       call check_isotopes(q,ijb_u,ije_u,'leapfrog 762')
- 
-!       CALL FTRACE_REGION_END("integrd")
-c$OMP BARRIER
-#ifdef DEBUG_IO    
-      call WriteField_u('ucovm1',ucovm1)
-      call WriteField_v('vcovm1',vcovm1)
-      call WriteField_u('tetam1',tetam1)
-      call WriteField_u('psm1',psm1)
-      call WriteField_u('ucov_int',ucov)
-      call WriteField_v('vcov_int',vcov)
-      call WriteField_u('teta_int',teta)
-      call WriteField_u('ps_int',ps)
-#endif    
-
-      call check_isotopes(q,ijb_u,ije_u,'leapfrog 775')
-
-c      do j=1,nqtot
-c        call WriteField_p('q'//trim(int2str(j)),
-c     .                reshape(q(:,:,j),(/iip1,jmp1,llm/)))
-c        call WriteField_p('dq'//trim(int2str(j)),
-c     .                reshape(dq(:,:,j),(/iip1,jmp1,llm/)))
-c      enddo
-
-
-c$OMP MASTER 
-       call VTe(VTintegre)
-c$OMP END MASTER
-c .P.Le Van (26/04/94  ajout de  finvpold dans l'appel d'integrd)
-c
-c-----------------------------------------------------------------------
-c   calcul des tendances physiques:
-c   -------------------------------
-c    ########   P.Le Van ( Modif le  6/02/95 )   ###########
-c
-       IF( purmats )  THEN
-          IF( itau==itaufin.AND..NOT.forward ) lafin = .TRUE.
-       ELSE
-          IF( itau+1 == itaufin )              lafin = .TRUE.
-       ENDIF
-
-cc$OMP END PARALLEL
-
-c
-c
-       IF( apphys )  THEN
-       
-         CALL call_calfis(itau,lafin,ucov,vcov,teta,masse,ps,  
-     &                     phis,q,flxw)
-! #ifdef DEBUG_IO    
-!         call WriteField_u('ucovfi',ucov)
-!         call WriteField_v('vcovfi',vcov)
-!         call WriteField_u('tetafi',teta)
-!         call WriteField_u('pfi',p)
-!         call WriteField_u('pkfi',pk)
-!         do j=1,nqtot
-!           call WriteField_u('qfi'//trim(int2str(j)),q(:,:,j))
-!         enddo
-! #endif
-! c
-! c     .......   Ajout   P.Le Van ( 17/04/96 )   ...........
-! c
-! cc$OMP PARALLEL DEFAULT(SHARED)
-! cc$OMP+         PRIVATE(rdaym_ini,rdayvrai,ijb,ije)
-
-! c$OMP MASTER
-!          call suspend_timer(timer_caldyn)
-
-!          write(lunout,*)
-!      &   'leapfrog_p: Entree dans la physique : Iteration No ',true_itau
-! c$OMP END MASTER
-
-!          CALL pression_loc (  ip1jmp1, ap, bp, ps,  p      )
-
-! c$OMP BARRIER
-!          CALL exner_hyb_loc(  ip1jmp1, ps, p,pks, pk, pkf )
-! c$OMP BARRIER
-!            jD_cur = jD_ref + day_ini - day_ref
-!      $        + int (itau * dtvr / daysec) 
-!            jH_cur = jH_ref +                                            &
-!      &              (itau * dtvr / daysec - int(itau * dtvr / daysec)) 
-! !         call ju2ymds(jD_cur+jH_cur, an, mois, jour, secondes)
-
-! c rajout debug
-! c       lafin = .true.
-
-
-! c   Inbterface avec les routines de phylmd (phymars ... )
-! c   -----------------------------------------------------
-
-! c+jld
-
-! c  Diagnostique de conservation de l'energie : initialisation
-
-! c-jld
-! c$OMP BARRIER
-! c$OMP MASTER
-!         call VTb(VThallo)
-! c$OMP END MASTER
-
-! #ifdef DEBUG_IO    
-!         call WriteField_u('ucovfi',ucov)
-!         call WriteField_v('vcovfi',vcov)
-!         call WriteField_u('tetafi',teta)
-!         call WriteField_u('pfi',p)
-!         call WriteField_u('pkfi',pk)
-! #endif
-!         call SetTag(Request_physic,800)
-
-!         call Register_SwapField_u(ucov,ucov,distrib_physic,
-!      *                            Request_physic,up=2,down=2)
-
-!         call Register_SwapField_v(vcov,vcov,distrib_physic,
-!      *                            Request_physic,up=2,down=2)
-
-!         call Register_SwapField_u(teta,teta,distrib_physic,
-!      *                            Request_physic,up=2,down=2)
-
-!         call Register_SwapField_u(masse,masse,distrib_physic,
-!      *                            Request_physic,up=1,down=2)
-
-!         call Register_SwapField_u(p,p,distrib_physic,
-!      *                            Request_physic,up=2,down=2)
-
-!         call Register_SwapField_u(pk,pk,distrib_physic,
-!      *                            Request_physic,up=2,down=2)
-
-!         call Register_SwapField_u(phis,phis,distrib_physic,
-!      *                            Request_physic,up=2,down=2)
-
-!         call Register_SwapField_u(phi,phi,distrib_physic,
-!      *                            Request_physic,up=2,down=2)
-
-!         call Register_SwapField_u(w,w,distrib_physic,
-!      *                            Request_physic,up=2,down=2)
-
-!         call Register_SwapField_u(q,q,distrib_physic,
-!      *                            Request_physic,up=2,down=2)
-
-!         call Register_SwapField_u(flxw,flxw,distrib_physic,
-!      *                            Request_physic,up=2,down=2)
-
-!         call SendRequest(Request_Physic)
-! c$OMP BARRIER
-!         call WaitRequest(Request_Physic)       
-
-! c$OMP BARRIER
-! c$OMP MASTER
-!         call Set_Distrib(distrib_Physic)
-!         call VTe(VThallo)
-
-!         call VTb(VTphysiq)
-! c$OMP END MASTER
-! c$OMP BARRIER
-
-! #ifdef DEBUG_IO    
-!       call WriteField_u('ucovfi',ucov)
-!       call WriteField_v('vcovfi',vcov)
-!       call WriteField_u('tetafi',teta)
-!       call WriteField_u('pfi',p)
-!       call WriteField_u('pkfi',pk)
-!       do j=1,nqtot
-!         call WriteField_u('qfi'//trim(int2str(j)),q(:,:,j))
-!       enddo
-! #endif
-!        STOP
-! c$OMP BARRIER
-! !        CALL FTRACE_REGION_BEGIN("calfis")
-!         CALL calfis_loc(lafin ,jD_cur, jH_cur,
-!      $               ucov,vcov,teta,q,masse,ps,p,pk,phis,phi ,
-!      $               du,dv,dteta,dq,
-!      $               flxw,
-!      $               dufi,dvfi,dtetafi,dqfi,dpfi  )
-! !        CALL FTRACE_REGION_END("calfis")
-! !        ijb=ij_begin
-! !        ije=ij_end  
-! !        if ( .not. pole_nord) then
-! !c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
-! !          DO l=1,llm
-! !          dufi_tmp(1:iip1,l)   = dufi(ijb:ijb+iim,l) 
-! !          dvfi_tmp(1:iip1,l)   = dvfi(ijb:ijb+iim,l)  
-! !          dtetafi_tmp(1:iip1,l)= dtetafi(ijb:ijb+iim,l)  
-! !          dqfi_tmp(1:iip1,l,:) = dqfi(ijb:ijb+iim,l,:)  
-! !          ENDDO
-! !c$OMP END DO NOWAIT
-! !
-! !c$OMP MASTER
-! !          dpfi_tmp(1:iip1)     = dpfi(ijb:ijb+iim)  
-! !c$OMP END MASTER
-! !        endif ! of if ( .not. pole_nord)
-
-! !c$OMP BARRIER
-! !c$OMP MASTER
-! !        call Set_Distrib(distrib_physic_bis)
-
-! !        call VTb(VThallo)
-! !c$OMP END MASTER
-! !c$OMP BARRIER
-! ! 
-! !        call Register_Hallo_u(dufi,llm,
-! !     *                      1,0,0,1,Request_physic)
-! !        
-! !        call Register_Hallo_v(dvfi,llm,
-! !     *                      1,0,0,1,Request_physic)
-! !        
-! !        call Register_Hallo_u(dtetafi,llm,
-! !     *                      1,0,0,1,Request_physic)
-! !
-! !        call Register_Hallo_u(dpfi,1,
-! !     *                      1,0,0,1,Request_physic)
-! !
-! !        do j=1,nqtot
-! !          call Register_Hallo_u(dqfi(ijb_u,1,j),llm,
-! !     *                        1,0,0,1,Request_physic)
-! !        enddo
-! !        
-! !        call SendRequest(Request_Physic)
-! !c$OMP BARRIER
-! !        call WaitRequest(Request_Physic)
-! !             
-! !c$OMP BARRIER
-! !c$OMP MASTER
-! !        call VTe(VThallo)
-! ! 
-! !        call set_Distrib(distrib_Physic)
-! !c$OMP END MASTER
-! !c$OMP BARRIER        
-! !                ijb=ij_begin
-! !        if (.not. pole_nord) then
-! !        
-! !c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
-! !          DO l=1,llm
-! !            dufi(ijb:ijb+iim,l) = dufi(ijb:ijb+iim,l)+dufi_tmp(1:iip1,l)
-! !            dvfi(ijb:ijb+iim,l) = dvfi(ijb:ijb+iim,l)+dvfi_tmp(1:iip1,l) 
-! !            dtetafi(ijb:ijb+iim,l) = dtetafi(ijb:ijb+iim,l)
-! !     &                              +dtetafi_tmp(1:iip1,l)
-! !            dqfi(ijb:ijb+iim,l,:) = dqfi(ijb:ijb+iim,l,:)
-! !     &                              + dqfi_tmp(1:iip1,l,:)
-! !          ENDDO
-! !c$OMP END DO NOWAIT
-! !
-! !c$OMP MASTER
-! !          dpfi(ijb:ijb+iim)   = dpfi(ijb:ijb+iim)+ dpfi_tmp(1:iip1)
-! !c$OMP END MASTER
-! !          
-! !        endif ! of if (.not. pole_nord)
-
-! #ifdef DEBUG_IO           
-!         call WriteField_u('dufi',dufi)
-!         call WriteField_v('dvfi',dvfi) 
-!         call WriteField_u('dtetafi',dtetafi)
-!         call WriteField_u('dpfi',dpfi)
-!         do j=1,nqtot
-!           call WriteField_u('dqfi'//trim(int2str(j)),dqfi(:,:,j))
-!        enddo
-! #endif
-
-! c$OMP BARRIER
-
-! c      ajout des tendances physiques:
-! c      ------------------------------
-! #ifdef DEBUG_IO    
-!         call WriteField_u('ucovfi',ucov)
-!         call WriteField_v('vcovfi',vcov)
-!         call WriteField_u('tetafi',teta)
-!         call WriteField_u('psfi',ps)
-!         do j=1,nqtot
-!           call WriteField_u('qfi'//trim(int2str(j)),q(:,:,j))
-!        enddo
-! #endif
-
-!          IF (ok_strato) THEN
-!            CALL top_bound_loc( vcov,ucov,teta,masse,dufi,dvfi,dtetafi)
-!          ENDIF
-
-! #ifdef DEBUG_IO           
-!         call WriteField_u('ucovfi',ucov)
-!         call WriteField_v('vcovfi',vcov)
-!         call WriteField_u('tetafi',teta)
-!         call WriteField_u('psfi',ps)
-!         do j=1,nqtot
-!           call WriteField_u('qfi'//trim(int2str(j)),q(:,:,j))
-!        enddo
-! #endif
-
-!           CALL addfi_loc( dtphys, leapf, forward   ,
-!      $                  ucov, vcov, teta , q   ,ps ,
-!      $                 dufi, dvfi, dtetafi , dqfi ,dpfi  )
-
-! #ifdef DEBUG_IO    
-!         call WriteField_u('ucovfi',ucov)
-!         call WriteField_v('vcovfi',vcov)
-!         call WriteField_u('tetafi',teta)
-!         call WriteField_u('psfi',ps)
-!         do j=1,nqtot
-!           call WriteField_u('qfi'//trim(int2str(j)),q(:,:,j))
-!        enddo
-! #endif
-
-! c$OMP BARRIER
-! c$OMP MASTER
-!         call VTe(VTphysiq)
-
-!         call VTb(VThallo)
-! c$OMP END MASTER
-
-!         call SetTag(Request_physic,800)
-!         call Register_SwapField_u(ucov,ucov,
-!      *                               distrib_caldyn,Request_physic)
-
-!         call Register_SwapField_v(vcov,vcov,
-!      *                               distrib_caldyn,Request_physic)
-
-!         call Register_SwapField_u(teta,teta,
-!      *                               distrib_caldyn,Request_physic)
-
-!         call Register_SwapField_u(masse,masse,
-!      *                               distrib_caldyn,Request_physic)
-
-!         call Register_SwapField_u(p,p,
-!      *                               distrib_caldyn,Request_physic)
-
-!         call Register_SwapField_u(pk,pk,
-!      *                               distrib_caldyn,Request_physic)
-
-!         call Register_SwapField_u(phis,phis,
-!      *                               distrib_caldyn,Request_physic)
-
-!         call Register_SwapField_u(phi,phi,
-!      *                               distrib_caldyn,Request_physic)
-
-!         call Register_SwapField_u(w,w,
-!      *                               distrib_caldyn,Request_physic)
-
-!         call Register_SwapField_u(q,q,
-!      *                               distrib_caldyn,Request_physic)
-
-!         call SendRequest(Request_Physic)
-! c$OMP BARRIER
-!         call WaitRequest(Request_Physic)     
-
-! c$OMP BARRIER
-! c$OMP MASTER
-!        call VTe(VThallo)
-!        call set_distrib(distrib_caldyn)
-! c$OMP END MASTER
-! c$OMP BARRIER
-! c
-! c  Diagnostique de conservation de l'energie : difference
-!       IF (ip_ebil_dyn.ge.1 ) THEN 
-!           ztit='bil phys'
-!           CALL diagedyn(ztit,2,1,1,dtphys
-!      e  , ucov    , vcov , ps, p ,pk , teta , q(:,:,1), q(:,:,2))
-!       ENDIF 
-
-! #ifdef DEBUG_IO    
-!         call WriteField_u('ucovfi',ucov)
-!         call WriteField_v('vcovfi',vcov)
-!         call WriteField_u('tetafi',teta)
-!         call WriteField_u('psfi',ps)
-!         do j=1,nqtot
-!           call WriteField_u('qfi'//trim(int2str(j)),q(:,:,j))
-!        enddo
-! #endif
-
-
-! c-jld
-c$OMP MASTER
-         if (FirstPhysic) then
-           ok_start_timer=.TRUE.
-           FirstPhysic=.false.
-         endif
-c$OMP END MASTER
-       ENDIF ! of IF( apphys )
-
-       call check_isotopes(q,ijb_u,ije_u,'leapfrog 1132')
-        !write(*,*) 'leapfrog 1134: iflag_phys=',iflag_phys
-
-      IF(iflag_phys==2) THEN ! "Newtonian" case
-c$OMP MASTER
-         if (FirstPhysic) then
-           ok_start_timer=.TRUE.
-           FirstPhysic=.false.
-         endif
-c$OMP END MASTER
-
-
-c   Calcul academique de la physique = Rappel Newtonien + fritcion 
-c   --------------------------------------------------------------
-cym       teta(:,:)=teta(:,:)
-cym     s  -iphysiq*dtvr*(teta(:,:)-tetarappel(:,:))/taurappel
-       ijb=ij_begin
-       ije=ij_end
-!LF       teta(ijb:ije,:)=teta(ijb:ije,:)
-!LF     s  -iphysiq*dtvr*(teta(ijb:ije,:)-tetarappel(ijb:ije,:))/taurappel
-!$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 
-       do l=1,llm
-       teta(ijb:ije,l)=teta(ijb:ije,l) -dtvr*
-     &        (teta(ijb:ije,l)-tetarappel(ijb:ije,l))*
-     &                 (knewt_g+knewt_t(l)*clat4(ijb:ije))        
-       enddo
-!$OMP END DO
-
-!$OMP MASTER
-       if (planet_type=="giant") then
-         ! add an intrinsic heat flux at the base of the atmosphere
-         teta(ijb:ije,1) = teta(ijb:ije,1)
-     &        + dtvr * aire(ijb:ije) * ihf / cpp / masse(ijb:ije,1)
-       endif
-!$OMP END MASTER
-!$OMP BARRIER
-
-
-       call Register_Hallo_u(ucov,llm,0,1,1,0,Request_Physic)
-       call Register_Hallo_v(vcov,llm,1,1,1,1,Request_Physic)
-       call SendRequest(Request_Physic)
-c$OMP BARRIER
-       call WaitRequest(Request_Physic)     
-c$OMP BARRIER
-       call friction_loc(ucov,vcov,dtvr)
-!$OMP BARRIER
-
-        ! Sponge layer (if any)
-        IF (ok_strato) THEN
-          CALL top_bound_loc(vcov,ucov,teta,masse,dtvr)
-!$OMP BARRIER
-        ENDIF ! of IF (ok_strato) 
-      ENDIF ! of IF(iflag_phys.EQ.2)
-
-
-        CALL pression_loc ( ip1jmp1, ap, bp, ps, p                  )
-c$OMP BARRIER
-        if (pressure_exner) then
-        CALL exner_hyb_loc( ijnb_u, ps, p, pks, pk, pkf )
-        else 
-          CALL exner_milieu_loc( ijnb_u, ps, p, pks, pk, pkf )
-        endif
-c$OMP BARRIER
-        CALL massdair_loc(p,masse)
-c$OMP BARRIER
-
-cc$OMP END PARALLEL
-        call check_isotopes(q,ijb_u,ije_u,'leapfrog 1196')
-
-c-----------------------------------------------------------------------
-c   dissipation horizontale et verticale  des petites echelles:
-c   ----------------------------------------------------------
-      !write(*,*) 'leapfrog 1163: apdiss=',apdiss
-      IF(apdiss) THEN
-      
-        CALL call_dissip(ucov,vcov,teta,p,pk,ps)
-!cc$OMP  PARALLEL DEFAULT(SHARED) 
-!cc$OMP+          PRIVATE(ijb,ije,tppn,tpn,tpps,tps)
-!c$OMP MASTER
-!        call suspend_timer(timer_caldyn)
-
-!c       print*,'Entree dans la dissipation : Iteration No ',true_itau
-!c   calcul de l'energie cinetique avant dissipation
-!c       print *,'Passage dans la dissipation'
-
-!        call VTb(VThallo)
-!c$OMP END MASTER
-
-!c$OMP BARRIER
-
-!        call Register_SwapField_u(ucov,ucov,distrib_dissip,
-!     *                            Request_dissip,up=1,down=1)
-
-!        call Register_SwapField_v(vcov,vcov,distrib_dissip,
-!     *                            Request_dissip,up=1,down=1)
-
-!        call Register_SwapField_u(teta,teta,distrib_dissip,
-!     *                            Request_dissip)
-
-!        call Register_SwapField_u(p,p,distrib_dissip,
-!     *                            Request_dissip)
-
-!        call Register_SwapField_u(pk,pk,distrib_dissip,
-!     *                            Request_dissip)
-
-!        call SendRequest(Request_dissip)       
-!c$OMP BARRIER
-!        call WaitRequest(Request_dissip)       
-
-!c$OMP BARRIER
-!c$OMP MASTER
-!        call set_distrib(distrib_dissip)
-!        call VTe(VThallo)
-!        call VTb(VTdissipation)
-!        call start_timer(timer_dissip)
-!c$OMP END MASTER
-!c$OMP BARRIER
-
-!        call covcont_loc(llm,ucov,vcov,ucont,vcont)
-!        call enercin_loc(vcov,ucov,vcont,ucont,ecin0)
-
-!c   dissipation
-
-!!        CALL FTRACE_REGION_BEGIN("dissip")
-!        CALL dissip_loc(vcov,ucov,teta,p,dvdis,dudis,dtetadis)
-
-!#ifdef DEBUG_IO    
-!        call WriteField_u('dudis',dudis)
-!        call WriteField_v('dvdis',dvdis)
-!        call WriteField_u('dtetadis',dtetadis)
-!#endif
-
-!!      CALL FTRACE_REGION_END("dissip")
-
-!        ijb=ij_begin
-!        ije=ij_end
-!c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)        
-!        DO l=1,llm
-!          ucov(ijb:ije,l)=ucov(ijb:ije,l)+dudis(ijb:ije,l)
-!        ENDDO
-!c$OMP END DO NOWAIT        
-!        if (pole_sud) ije=ije-iip1
-!c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)        
-!        DO l=1,llm
-!          vcov(ijb:ije,l)=vcov(ijb:ije,l)+dvdis(ijb:ije,l)
-!        ENDDO
-!c$OMP END DO NOWAIT        
-
-!c       teta=teta+dtetadis
-
-
-!c------------------------------------------------------------------------
-!        if (dissip_conservative) then
-!C       On rajoute la tendance due a la transform. Ec -> E therm. cree
-!C       lors de la dissipation
-!c$OMP BARRIER
-!c$OMP MASTER
-!            call suspend_timer(timer_dissip)
-!            call VTb(VThallo)
-!c$OMP END MASTER
-!            call Register_Hallo_u(ucov,llm,1,1,1,1,Request_Dissip)
-!            call Register_Hallo_v(vcov,llm,1,1,1,1,Request_Dissip)
-!            call SendRequest(Request_Dissip)
-!c$OMP BARRIER
-!            call WaitRequest(Request_Dissip)
-!c$OMP MASTER
-!            call VTe(VThallo)
-!            call resume_timer(timer_dissip)
-!c$OMP END MASTER
-!c$OMP BARRIER            
-!            call covcont_loc(llm,ucov,vcov,ucont,vcont)
-!            call enercin_loc(vcov,ucov,vcont,ucont,ecin)
-
-!            ijb=ij_begin
-!            ije=ij_end
-!c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)            
-!            do l=1,llm
-!              do ij=ijb,ije
-!                dtetaecdt(ij,l)= (ecin0(ij,l)-ecin(ij,l))/ pk(ij,l)
-!                dtetadis(ij,l)=dtetadis(ij,l)+dtetaecdt(ij,l)
-!              enddo
-!            enddo
-!c$OMP END DO NOWAIT            
-!       endif
-
-!       ijb=ij_begin
-!       ije=ij_end
-!c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)            
-!         do l=1,llm
-!           do ij=ijb,ije
-!              teta(ij,l)=teta(ij,l)+dtetadis(ij,l)
-!           enddo
-!         enddo
-!c$OMP END DO NOWAIT         
-!c------------------------------------------------------------------------
-
-
-!c    .......        P. Le Van (  ajout  le 17/04/96  )   ...........
-!c   ...      Calcul de la valeur moyenne, unique de h aux poles  .....
-!c
-
-!        ijb=ij_begin
-!        ije=ij_end
-
-!        if (pole_nord) then
-!c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
-!          DO l  =  1, llm
-!            DO ij =  1,iim
-!             tppn(ij)  = aire(  ij    ) * teta(  ij    ,l)
-!            ENDDO
-!             tpn  = SSUM(iim,tppn,1)/apoln
-
-!            DO ij = 1, iip1
-!             teta(  ij    ,l) = tpn
-!            ENDDO
-!          ENDDO
-!c$OMP END DO NOWAIT
-
-!c$OMP MASTER               
-!          DO ij =  1,iim
-!            tppn(ij)  = aire(  ij    ) * ps (  ij    )
-!          ENDDO
-!            tpn  = SSUM(iim,tppn,1)/apoln
-
-!          DO ij = 1, iip1
-!            ps(  ij    ) = tpn
-!          ENDDO
-!c$OMP END MASTER
-!        endif
-
-!        if (pole_sud) then
-!c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
-!          DO l  =  1, llm
-!            DO ij =  1,iim
-!             tpps(ij)  = aire(ij+ip1jm) * teta(ij+ip1jm,l)
-!            ENDDO
-!             tps  = SSUM(iim,tpps,1)/apols
-
-!            DO ij = 1, iip1
-!             teta(ij+ip1jm,l) = tps
-!            ENDDO
-!          ENDDO
-!c$OMP END DO NOWAIT
-
-!c$OMP MASTER               
-!          DO ij =  1,iim
-!            tpps(ij)  = aire(ij+ip1jm) * ps (ij+ip1jm)
-!          ENDDO
-!            tps  = SSUM(iim,tpps,1)/apols
-
-!          DO ij = 1, iip1
-!            ps(ij+ip1jm) = tps
-!          ENDDO
-!c$OMP END MASTER
-!        endif
-
-
-!c$OMP BARRIER
-!c$OMP MASTER
-!        call VTe(VTdissipation)
-
-!        call stop_timer(timer_dissip)
-
-!        call VTb(VThallo)
-!c$OMP END MASTER
-!        call Register_SwapField_u(ucov,ucov,distrib_caldyn,
-!     *                            Request_dissip)
-
-!        call Register_SwapField_v(vcov,vcov,distrib_caldyn,
-!     *                            Request_dissip)
-
-!        call Register_SwapField_u(teta,teta,distrib_caldyn,
-!     *                            Request_dissip)
-
-!        call Register_SwapField_u(p,p,distrib_caldyn,
-!     *                            Request_dissip)
-
-!        call Register_SwapField_u(pk,pk,distrib_caldyn,
-!     *                            Request_dissip)
-
-!        call SendRequest(Request_dissip)       
-!c$OMP BARRIER
-!        call WaitRequest(Request_dissip)       
-
-!c$OMP BARRIER
-!c$OMP MASTER
-!        call set_distrib(distrib_caldyn)
-!        call VTe(VThallo)
-!        call resume_timer(timer_caldyn)
-!c        print *,'fin dissipation'
-!c$OMP END MASTER
-!c$OMP BARRIER
-       END IF ! of IF(apdiss)
-
-cc$OMP END PARALLEL
-
-c ajout debug
-c              IF( lafin ) then  
-c                abort_message = 'Simulation finished'
-c                call abort_gcm(modname,abort_message,0)
-c              ENDIF
-
-       call check_isotopes(q,ijb_u,ije_u,'leapfrog 1430')
- 
-c   ********************************************************************
-c   ********************************************************************
-c   .... fin de l'integration dynamique  et physique pour le pas itau ..
-c   ********************************************************************
-c   ********************************************************************
-
-c   preparation du pas d'integration suivant  ......
-cym      call WriteField('ucov',reshape(ucov,(/iip1,jmp1,llm/)))
-cym      call WriteField('vcov',reshape(vcov,(/iip1,jjm,llm/)))
-c$OMP MASTER      
-      call stop_timer(timer_caldyn)
-c$OMP END MASTER
-      IF (itau==itaumax) then
-c$OMP MASTER
-         call allgather_timer_average
-         call barrier
-         if (mpi_rank==0) then
-            
-            print *,'*********************************'
-            print *,'******    TIMER CALDYN     ******'
-            do i=0,mpi_size-1
-               print *,'proc',i,' :   Nb Bandes  :',jj_nb_caldyn(i),
-     &              '  : temps moyen :',
-     &              timer_average(jj_nb_caldyn(i),timer_caldyn,i)
-            enddo
-            
-            print *,'*********************************'
-            print *,'******    TIMER VANLEER    ******'
-            do i=0,mpi_size-1
-               print *,'proc',i,' :   Nb Bandes  :',jj_nb_vanleer(i),
-     &              '  : temps moyen :',
-     &              timer_average(jj_nb_vanleer(i),timer_vanleer,i)
-            enddo
-            
-            print *,'*********************************'
-            print *,'******    TIMER DISSIP    ******'
-            do i=0,mpi_size-1
-               print *,'proc',i,' :   Nb Bandes  :',jj_nb_dissip(i),
-     &              '  : temps moyen :',
-     &              timer_average(jj_nb_dissip(i),timer_dissip,i)
-            enddo
-            
-            print *,'*********************************'
-            print *,'******    TIMER PHYSIC    ******'
-            do i=0,mpi_size-1
-               print *,'proc',i,' :   Nb Bandes  :',jj_nb_physic(i),
-     &              '  : temps moyen :',
-     &              timer_average(jj_nb_physic(i),timer_physic,i)
-            enddo
-            
-         endif  
-         CALL barrier
-         print *,'Taille du Buffer MPI (REAL*8)',MaxBufferSize
-      print *,'Taille du Buffer MPI utilise (REAL*8)',MaxBufferSize_Used
-       print *, 'Temps total ecoule sur la parallelisation :',DiffTime()
-      print *, 'Temps CPU ecoule sur la parallelisation :',DiffCpuTime()
-         CALL print_filtre_timer
-c$OMP END MASTER
-         CALL dynredem1_loc("restart.nc",0.0,
-     .        vcov,ucov,teta,q,masse,ps)
-c$OMP MASTER
-         call fin_getparam
-c$OMP END MASTER
-
-         if (ok_guide) then
-           ! set ok_guide to false to avoid extra output
-           ! in following forward step
-           ok_guide=.false.
-         endif
-
-         IF (CPPKEY_INCA) THEN
-         IF (ANY(type_trac == ['inca','inco'])) THEN
-            CALL finalize_inca
-!     switching back to LMDZDYN context
-!$OMP MASTER
-            IF (ok_dyn_xios) THEN
-               CALL xios_set_current_context(dyn3d_ctx_handle)
-            ENDIF
-!$OMP END MASTER
-         ENDIF
-         END IF
-#ifdef REPROBUS
-         if (type_trac == 'repr') CALL finalize_reprobus
-#endif
-
-c$OMP MASTER
-         call finalize_parallel
-c$OMP END MASTER
-c$OMP BARRIER
-         RETURN
-      ENDIF
-      
-      call check_isotopes(q,ijb_u,ije_u,'leapfrog 1509')
-
-      IF ( .NOT.purmats ) THEN
-c       ........................................................
-c       ..............  schema matsuno + leapfrog  ..............
-c       ........................................................
-
-            IF(forward .OR. leapf) THEN
-              itau= itau + 1
-!              iday= day_ini+itau/day_step
-!              time= REAL(itau-(iday-day_ini)*day_step)/day_step+time_0
-!                IF(time.GT.1.) THEN
-!                  time = time-1.
-!                  iday = iday+1
-!                ENDIF
-            ENDIF
-
-
-            IF( itau == itaufinp1 ) then
-
-              if (flag_verif) then
-                write(79,*) 'ucov',ucov
-                write(80,*) 'vcov',vcov
-                write(81,*) 'teta',teta
-                write(82,*) 'ps',ps
-                write(83,*) 'q',q
-                WRITE(85,*) 'q1 = ',q(:,:,1)
-                WRITE(86,*) 'q3 = ',q(:,:,3)
-              endif
-  
-
-c$OMP MASTER
-              call fin_getparam
-c$OMP END MASTER
-
-              IF (CPPKEY_INCA) THEN
-              IF (ANY(type_trac == ['inca','inco'])) THEN
-                 CALL finalize_inca
-!     switching back to LMDZDYN context
-!$OMP MASTER
-                 IF (ok_dyn_xios) THEN
-                    CALL xios_set_current_context(dyn3d_ctx_handle)
-                 ENDIF
-!$OMP END MASTER
-              ENDIF
-              END IF
-#ifdef REPROBUS
-              if (type_trac == 'repr') CALL finalize_reprobus
-#endif
-
-c$OMP MASTER
-              call finalize_parallel
-c$OMP END MASTER
-              abort_message = 'Simulation finished'
-              call abort_gcm(modname,abort_message,0)
-              RETURN
-            ENDIF
-c-----------------------------------------------------------------------
-c   ecriture du fichier histoire moyenne:
-c   -------------------------------------
-
-            IF(MOD(itau,iperiod)==0 .OR. itau==itaufin) THEN
-c$OMP BARRIER
-               IF(itau==itaufin) THEN
-                  iav=1
-               ELSE
-                  iav=0
-               ENDIF
-
-              ! Ehouarn: re-compute geopotential for outputs
-c$OMP BARRIER
-c$OMP MASTER
-              CALL geopot_loc(ip1jmp1,teta,pk,pks,phis,phi)
-c$OMP END MASTER
-c$OMP BARRIER
-
-#ifdef CPP_IOIPSL
-             IF (ok_dynzon) THEN 
-
-              CALL bilan_dyn_loc(2,dtvr*iperiod,dtvr*day_step*periodav, 
-     ,             ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q) 
-
-              ENDIF !ok_dynzon
-
-              IF (ok_dyn_ave) THEN
-                 CALL writedynav_loc(itau,vcov,
-     &                 ucov,teta,pk,phi,q,masse,ps,phis)
-              ENDIF
-#endif
-
-
-            ENDIF
-
-            call check_isotopes(q,ijb_u,ije_u,'leapfrog 1584')
-
-c-----------------------------------------------------------------------
-c   ecriture de la bande histoire:
-c   ------------------------------
-
-            IF( MOD(itau,iecri)==0) THEN
-             ! Ehouarn: output only during LF or Backward Matsuno
-             if (leapf.or.(.not.leapf.and.(.not.forward))) then
-
-c$OMP BARRIER
-c$OMP MASTER
-              CALL geopot_loc(ip1jmp1,teta,pk,pks,phis,phi)
-c$OMP END MASTER
-c$OMP BARRIER
-       
-#ifdef CPP_IOIPSL
-             if (ok_dyn_ins) then
-                 CALL writehist_loc(itau,vcov,ucov,teta,pk,phi,q,
-     &                              masse,ps,phis)
-             endif
-#endif
-             
-              IF (ok_dyn_xios) THEN
-c$OMP MASTER
-                 CALL xios_update_calendar(itau)
-c$OMP END MASTER
-c$OMP BARRIER
-                 CALL writedyn_xios(vcov,
-     &                 ucov,teta,pk,phi,q,masse,ps,phis)
-              ENDIF
-              
-          endif                 ! of if (leapf.or.(.not.leapf.and.(.not.forward)))
-
-
-           ENDIF ! of IF(MOD(itau,iecri).EQ.0)
-
-            IF(itau==itaufin) THEN
-
-c$OMP BARRIER
-
-!              if (planet_type.eq."earth") then
-! Write an Earth-format restart file
-                CALL dynredem1_loc("restart.nc",0.0,
-     &                           vcov,ucov,teta,q,masse,ps)
-!              endif ! of if (planet_type.eq."earth")
-                if (ok_guide) then
-                  ! set ok_guide to false to avoid extra output
-                  ! in following forward step
-                  ok_guide=.false.
-                endif
-
-!              CLOSE(99)
-            ENDIF ! of IF (itau.EQ.itaufin)
-
-            call check_isotopes(q,ijb_u,ije_u,'leapfrog 1624')
-
-c-----------------------------------------------------------------------
-c   gestion de l'integration temporelle:
-c   ------------------------------------
-
-            IF( MOD(itau,iperiod)==0 )    THEN
-                    GO TO 1
-            ELSE IF ( MOD(itau-1,iperiod) == 0 ) THEN
-
-                   IF( forward )  THEN
-c      fin du pas forward et debut du pas backward
-
-                      forward = .FALSE.
-                        leapf = .FALSE.
-                           GO TO 2
-
-                   ELSE
-c      fin du pas backward et debut du premier pas leapfrog
-
-                        leapf =  .TRUE.
-                        dt  =  2.*dtvr
-                        GO TO 2
-                   END IF
-            ELSE
-
-c      ......   pas leapfrog  .....
-
-                 leapf = .TRUE.
-                 dt  = 2.*dtvr
-                 GO TO 2
-            END IF ! of IF (MOD(itau,iperiod).EQ.0)
-                   !    ELSEIF (MOD(itau-1,iperiod).EQ.0)
-
-
-      ELSE ! of IF (.not.purmats)
-
-
-        call check_isotopes(q,ijb_u,ije_u,'leapfrog 1664')
-
-c       ........................................................
-c       ..............       schema  matsuno        ...............
-c       ........................................................
-            IF( forward )  THEN
-
-             itau =  itau + 1
-!             iday = day_ini+itau/day_step
-!             time = REAL(itau-(iday-day_ini)*day_step)/day_step+time_0
-
-!                  IF(time.GT.1.) THEN
-!                   time = time-1.
-!                   iday = iday+1
-!                  ENDIF
-
-               forward =  .FALSE.
-               IF( itau == itaufinp1 ) then
-c$OMP MASTER
-                 call fin_getparam
-c$OMP END MASTER
-
-                 IF (CPPKEY_INCA) THEN
-                 IF (ANY(type_trac == ['inca','inco'])) THEN
-                    CALL finalize_inca
-!     switching back to LMDZDYN context
-!$OMP MASTER
-                    IF (ok_dyn_xios) THEN
-                       CALL xios_set_current_context(dyn3d_ctx_handle)
-                    ENDIF
-!$OMP END MASTER
-                 ENDIF
-
-                 END IF
-#ifdef REPROBUS
-                 if (type_trac == 'repr') CALL finalize_reprobus
-#endif
-
-c$OMP MASTER
-                 call finalize_parallel
-c$OMP END MASTER
-                 abort_message = 'Simulation finished'
-                 call abort_gcm(modname,abort_message,0)
-                 RETURN
-               ENDIF
-               GO TO 2
-
-            ELSE ! of IF(forward) i.e. backward step
-
-              
-              call check_isotopes(q,ijb_u,ije_u,'leapfrog 1698')
-
-              IF(MOD(itau,iperiod)==0 .OR. itau==itaufin) THEN
-               IF(itau==itaufin) THEN
-                  iav=1
-               ELSE
-                  iav=0
-               ENDIF
-
-#ifdef CPP_IOIPSL
-              ! Ehouarn: re-compute geopotential for outputs
-c$OMP BARRIER
-c$OMP MASTER
-              CALL geopot_loc(ip1jmp1,teta,pk,pks,phis,phi)
-c$OMP END MASTER
-c$OMP BARRIER
-               
-               IF (ok_dynzon) THEN
-               CALL bilan_dyn_loc(2,dtvr*iperiod,dtvr*day_step*periodav,
-     ,           ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q)
-               ENDIF
-              
-               IF (ok_dyn_ave) THEN
-                 CALL writedynav_loc(itau,vcov,
-     &                 ucov,teta,pk,phi,q,masse,ps,phis)
-               ENDIF
-#endif
-               
-
-              ENDIF ! of IF(MOD(itau,iperiod).EQ.0 .OR. itau.EQ.itaufin)
-
-
-               IF(MOD(itau,iecri         )==0) THEN
-
-c$OMP BARRIER
-c$OMP MASTER
-              CALL geopot_loc(ip1jmp1,teta,pk,pks,phis,phi)
-c$OMP END MASTER
-c$OMP BARRIER
-
-
-#ifdef CPP_IOIPSL
-              if (ok_dyn_ins) then
-                 CALL writehist_loc(itau,vcov,ucov,teta,pk,phi,q,
-     &                              masse,ps,phis)
-              endif ! of if (ok_dyn_ins)
-#endif
-
-              IF (ok_dyn_xios) THEN
-c$OMP MASTER
-                 CALL xios_update_calendar(itau)
-c$OMP END MASTER
-c$OMP BARRIER
-                 CALL writedyn_xios(vcov,
-     &                 ucov,teta,pk,phi,q,masse,ps,phis)
-              ENDIF
-              
-           ENDIF                ! of IF(MOD(itau,iecri).EQ.0)
-              
-
-              IF(itau==itaufin) THEN
-!                if (planet_type.eq."earth") then
-                   CALL dynredem1_loc("restart.nc",0.0,
-     .                               vcov,ucov,teta,q,masse,ps)
-!               endif ! of if (planet_type.eq."earth")
-                if (ok_guide) then
-                  ! set ok_guide to false to avoid extra output
-                  ! in following forward step
-                  ok_guide=.false.
-                endif
-
-              ENDIF ! of IF(itau.EQ.itaufin)
-
-              forward = .TRUE.
-              GO TO  1
-
-            ENDIF ! of IF (forward)
-
-
-            call check_isotopes(q,ijb_u,ije_u,'leapfrog 1750')
-
-      END IF ! of IF(.not.purmats)
-c$OMP MASTER
-      call fin_getparam
-c$OMP END MASTER
-
-      IF (CPPKEY_INCA) THEN
-      IF (ANY(type_trac == ['inca','inco'])) THEN
-         CALL finalize_inca
-!     switching back to LMDZDYN context
-!$OMP MASTER
-         IF (ok_dyn_xios) THEN
-            CALL xios_set_current_context(dyn3d_ctx_handle)
-         ENDIF
-!$OMP END MASTER
-      ENDIF
-      END IF
-#ifdef REPROBUS
-      if (type_trac == 'repr') CALL finalize_reprobus
-#endif
-
-c$OMP MASTER
-      call finalize_parallel
-c$OMP END MASTER
-      abort_message = 'Simulation finished'
-      call abort_gcm(modname,abort_message,0)
-      RETURN
-      END
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/leapfrog_loc.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/leapfrog_loc.F90	(revision 5101)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/leapfrog_loc.F90	(revision 5101)
@@ -0,0 +1,1312 @@
+! $Id$
+
+SUBROUTINE leapfrog_loc(ucov0, vcov0, teta0, ps0, &
+        masse0, phis0, q0, time_0)
+
+  USE misc_mod
+  USE parallel_lmdz
+  USE times
+  USE mod_hallo
+  USE Bands
+  USE Write_Field
+  USE Write_Field_p
+  USE vampir
+  USE timer_filtre, ONLY: print_filtre_timer
+  USE infotrac
+  USE guide_loc_mod, ONLY: guide_main
+  USE getparam
+  USE control_mod
+  USE mod_filtreg_p
+  USE write_field_loc
+  USE allocate_field_mod
+  USE call_dissip_mod, ONLY: call_dissip
+  USE lmdz_call_calfis, ONLY: call_calfis
+  USE leapfrog_mod, ONLY: ucov, vcov, teta, ps, masse, phis, q, dq &
+          , ucovm1, vcovm1, tetam1, massem1, psm1, p, pks, pk, pkf, flxw &
+          , pbaru, pbarv, du, dv, dteta, phi, dp, w &
+          , leapfrog_allocate, leapfrog_switch_caldyn, leapfrog_switch_dissip
+
+  use exner_hyb_loc_m, only: exner_hyb_loc
+  use exner_milieu_loc_m, only: exner_milieu_loc
+  USE comconst_mod, ONLY: cpp, dtvr, ihf
+  USE comvert_mod, ONLY: ap, bp, pressure_exner
+  USE logic_mod, ONLY: iflag_phys, ok_guide, forward, leapf, apphys, &
+          statcl, conser, apdiss, purmats, ok_strato
+  USE temps_mod, ONLY: itaufin, jD_ref, jH_ref, day_ini, &
+          day_ref, start_time, dt
+  USE mod_xios_dyn3dmem, ONLY: dyn3d_ctx_handle
+  USE lmdz_xios, ONLY: xios_update_calendar, &
+          xios_set_current_context, &
+          using_xios
+  USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA, CPPKEY_DEBUGIO
+
+  IMPLICIT NONE
+
+  ! ......   Version  du 10/01/98    ..........
+
+  !        avec  coordonnees  verticales hybrides
+  !   avec nouveaux operat. dissipation * ( gradiv2,divgrad2,nxgraro2 )
+
+  !=======================================================================
+  !
+  !   Auteur:  P. Le Van /L. Fairhead/F.Hourdin
+  !   -------
+  !
+  !   Objet:
+  !   ------
+  !
+  !   GCM LMD nouvelle grille
+  !
+  !=======================================================================
+  !
+  !  ... Dans inigeom , nouveaux calculs pour les elongations  cu , cv
+  !  et possibilite d'appeler une fonction f(y)  a derivee tangente
+  !  hyperbolique a la  place de la fonction a derivee sinusoidale.
+
+  !  ... Possibilite de choisir le shema pour l'advection de
+  !    q  , en modifiant iadv dans traceur.def  (10/02) .
+  !
+  !  Pour Van-Leer + Vapeur d'eau saturee, iadv(1)=4. (F.Codron,10/99)
+  !  Pour Van-Leer iadv=10
+  !
+  !-----------------------------------------------------------------------
+  !   Declarations:
+  !   -------------
+
+  include "dimensions.h"
+  include "paramet.h"
+  include "comdissnew.h"
+  include "comgeom.h"
+  include "description.h"
+  include "iniprint.h"
+  include "academic.h"
+
+  REAL, INTENT(IN) :: time_0 ! not used
+
+  !   dynamical variables:
+  REAL, INTENT(IN) :: ucov0(ijb_u:ije_u, llm)    ! zonal covariant wind
+  REAL, INTENT(IN) :: vcov0(ijb_v:ije_v, llm)    ! meridional covariant wind
+  REAL, INTENT(IN) :: teta0(ijb_u:ije_u, llm)    ! potential temperature
+  REAL, INTENT(IN) :: q0(ijb_u:ije_u, llm, nqtot) ! advected tracers
+  REAL, INTENT(IN) :: ps0(ijb_u:ije_u)          ! surface pressure (Pa)
+  REAL, INTENT(IN) :: masse0(ijb_u:ije_u, llm)   ! air mass
+  REAL, INTENT(IN) :: phis0(ijb_u:ije_u)        ! geopotentiat at the surface
+
+  real :: zqmin, zqmax
+
+  ! REAL,SAVE,ALLOCATABLE :: p (:,:  )               ! pression aux interfac.des couches
+  ! REAL,SAVE,ALLOCATABLE :: pks(:)                      ! exner au  sol
+  ! REAL,SAVE,ALLOCATABLE :: pk(:,:)                   ! exner au milieu des couches
+  ! REAL,SAVE,ALLOCATABLE :: pkf(:,:)                  ! exner filt.au milieu des couches
+  ! REAL,SAVE,ALLOCATABLE :: phi(:,:)                  ! geopotentiel
+  ! REAL,SAVE,ALLOCATABLE :: w(:,:)                    ! vitesse verticale
+
+  ! variables dynamiques intermediaire pour le transport
+  ! REAL,SAVE,ALLOCATABLE :: pbaru(:,:),pbarv(:,:) !flux de masse
+
+  !   variables dynamiques au pas -1
+  ! REAL,SAVE,ALLOCATABLE :: vcovm1(:,:),ucovm1(:,:)
+  !      REAL,SAVE,ALLOCATABLE :: tetam1(:,:),psm1(:)
+  ! REAL,SAVE,ALLOCATABLE :: massem1(:,:)
+
+  !   tendances dynamiques
+  ! REAL,SAVE,ALLOCATABLE :: dv(:,:),du(:,:)
+  ! REAL,SAVE,ALLOCATABLE :: dteta(:,:),dp(:)
+  ! REAL,DIMENSION(:,:,:), ALLOCATABLE, SAVE :: dq
+
+  !   tendances de la dissipation
+  ! REAL,SAVE,ALLOCATABLE :: dvdis(:,:),dudis(:,:)
+  ! REAL,SAVE,ALLOCATABLE :: dtetadis(:,:)
+
+  !   tendances physiques
+  REAL, SAVE, ALLOCATABLE :: dvfi(:, :), dufi(:, :)
+  REAL, SAVE, ALLOCATABLE :: dtetafi(:, :)
+  REAL, SAVE, ALLOCATABLE :: dpfi(:)
+  REAL, DIMENSION(:, :, :), ALLOCATABLE, SAVE :: dqfi
+
+  !   variables pour le fichier histoire
+  REAL :: dtav      ! intervalle de temps elementaire
+
+  REAL :: tppn(iim), tpps(iim), tpn, tps
+  !
+  INTEGER :: itau, itaufinp1, iav
+  ! INTEGER  iday ! jour julien
+  REAL :: time
+
+  REAL :: SSUM
+  ! REAL,SAVE,ALLOCATABLE :: finvmaold(:,:)
+
+  !ym      LOGICAL  lafin
+  LOGICAL :: lafin
+  INTEGER :: ij, iq, l
+  INTEGER :: ik
+
+  real :: time_step, t_wrt, t_ops
+
+  ! jD_cur: jour julien courant
+  ! jH_cur: heure julienne courante
+  REAL :: jD_cur, jH_cur
+  INTEGER :: an, mois, jour
+  REAL :: secondes
+
+  logical :: physic
+  LOGICAL :: first, callinigrads
+
+  data callinigrads/.true./
+  character(len = 10) :: string10
+
+  ! REAL,SAVE,ALLOCATABLE :: flxw(:,:) ! flux de masse verticale
+
+  !+jld variables test conservation energie
+  ! REAL,SAVE,ALLOCATABLE :: ecin(:,:),ecin0(:,:)
+  ! Tendance de la temp. potentiel d (theta)/ d t due a la
+  ! tansformation d'energie cinetique en energie thermique
+  ! cree par la dissipation
+  !  REAL,SAVE,ALLOCATABLE :: dtetaecdt(:,:)
+  !  REAL,SAVE,ALLOCATABLE :: vcont(:,:),ucont(:,:)
+  !  REAL,SAVE,ALLOCATABLE :: vnat(:,:),unat(:,:)
+  REAL :: d_h_vcol, d_qt, d_qw, d_ql, d_ec
+  CHARACTER(len = 15) :: ztit
+  !!      INTEGER   ip_ebil_dyn  ! PRINT level for energy conserv. diag.
+  ! SAVE      ip_ebil_dyn
+  ! DATA      ip_ebil_dyn/0/
+  !-jld
+
+  character(len = 80) :: dynhist_file, dynhistave_file
+  character(len = *), parameter :: modname = "leapfrog_loc"
+  character(len = 80) :: abort_message
+
+  logical, PARAMETER :: dissip_conservative = .TRUE.
+
+  INTEGER :: testita
+  PARAMETER (testita = 9)
+
+  logical, parameter :: flag_verif = .false.
+
+  ! declaration liees au parallelisme
+  INTEGER :: ierr
+  LOGICAL :: FirstCaldyn
+  LOGICAL :: FirstPhysic
+  INTEGER :: ijb, ije, j, i
+  type(Request) :: TestRequest
+  type(Request) :: Request_Dissip
+  type(Request) :: Request_physic
+
+  INTEGER :: true_itau
+  INTEGER :: iapptrac
+  INTEGER :: AdjustCount
+  ! INTEGER :: var_time
+  LOGICAL :: ok_start_timer = .FALSE.
+  LOGICAL, SAVE :: firstcall = .TRUE.
+  TYPE(distrib), SAVE :: new_dist
+
+  CALL check_isotopes(q0, ijb_u, ije_u, 'leapfrog204: debut')
+
+  !$OMP MASTER
+  ItCount = 0
+  !$OMP END MASTER
+  true_itau = 0
+  FirstCaldyn = .TRUE.
+  FirstPhysic = .TRUE.
+  iapptrac = 0
+  AdjustCount = 0
+  lafin = .false.
+
+  if (nday>=0) then
+    itaufin = nday * day_step
+  else
+    itaufin = -nday
+  endif
+
+  itaufinp1 = itaufin + 1
+
+  CALL check_isotopes(q0, ijb_u, ije_u, 'leapfrog 226')
+
+  itau = 0
+  physic = .true.
+  if (iflag_phys==0.or.iflag_phys==2) physic = .false.
+  CALL init_nan
+  CALL leapfrog_allocate
+  ucov = ucov0
+  vcov = vcov0
+  teta = teta0
+  ps = ps0
+  masse = masse0
+  phis = phis0
+  q = q0
+
+  CALL check_isotopes(q, ijb_u, ije_u, 'leapfrog 239')
+
+  ! iday = day_ini+itau/day_step
+  ! time = REAL(itau-(iday-day_ini)*day_step)/day_step+time_0
+  !    IF(time.GT.1.) THEN
+  !     time = time-1.
+  !     iday = iday+1
+  !    ENDIF
+
+  ! Allocate variables depending on dynamic variable nqtot
+  !$OMP MASTER
+  if (firstcall) then
+
+    ! ALLOCATE(p(ijb_u:ije_u,llmp1))
+    !      ALLOCATE(pks(ijb_u:ije_u))
+    ! ALLOCATE(pk(ijb_u:ije_u,llm))
+    ! ALLOCATE(pkf(ijb_u:ije_u,llm))
+    ! ALLOCATE(phi(ijb_u:ije_u,llm))
+    ! ALLOCATE(w(ijb_u:ije_u,llm))
+    ! ALLOCATE(pbaru(ip1jmp1,llm),pbarv(ip1jm,llm))
+    ! ALLOCATE(vcovm1(ijb_v:ije_v,llm),ucovm1(ijb_u:ije_u,llm))
+    ! ALLOCATE(tetam1(ijb_u:ije_u,llm),psm1(ijb_u:ije_u))
+    ! ALLOCATE(massem1(ijb_u:ije_u,llm))
+    ! ALLOCATE(dv(ijb_v:ije_v,llm),du(ijb_u:ije_u,llm))
+    ! ALLOCATE(dteta(ijb_u:ije_u,llm),dp(ijb_u:ije_u))
+    ! ALLOCATE(dvdis(ijb_v:ije_v,llm),dudis(ijb_u:ije_u,llm))
+    ! ALLOCATE(dtetadis(ijb_u:ije_u,llm))
+    ALLOCATE(dvfi(ijb_v:ije_v, llm), dufi(ijb_u:ije_u, llm))
+    ALLOCATE(dtetafi(ijb_u:ije_u, llm))
+    ALLOCATE(dpfi(ijb_u:ije_u))
+    ! ALLOCATE(dq(ijb_u:ije_u,llm,nqtot))
+    ALLOCATE(dqfi(ijb_u:ije_u, llm, nqtot))
+    ! ALLOCATE(dqfi_tmp(iip1,llm,nqtot))
+    ! ALLOCATE(finvmaold(ijb_u:ije_u,llm))
+    ! ALLOCATE(flxw(ijb_u:ije_u,llm))
+    ! ALLOCATE(ecin(ijb_u:ije_u,llm),ecin0(ijb_u:ije_u,llm))
+    ! ALLOCATE(dtetaecdt(ijb_u:ije_u,llm))
+    ! ALLOCATE(vcont(ijb_v:ije_v,llm),ucont(ijb_u:ije_u,llm))
+    ! ALLOCATE(vnat(ijb_v:ije_v,llm),unat(ijb_u:ije_u,llm))
+  endif
+  !$OMP END MASTER
+  !$OMP BARRIER
+
+  ! CALL dynredem1_loc("restart.nc",0.0,
+  ! &                           vcov,ucov,teta,q,masse,ps)
+
+
+  !-----------------------------------------------------------------------
+  !   On initialise la pression et la fonction d'Exner :
+  !   --------------------------------------------------
+
+  !$OMP MASTER
+  dq(:, :, :) = 0.
+  CALL pression (ijnb_u, ap, bp, ps, p)
+  !$OMP END MASTER
+  if (pressure_exner) then
+    CALL exner_hyb_loc(ijnb_u, ps, p, pks, pk, pkf)
+  else
+    CALL exner_milieu_loc(ijnb_u, ps, p, pks, pk, pkf)
+  endif
+  !-----------------------------------------------------------------------
+  !   Debut de l'integration temporelle:
+  !   ----------------------------------
+  ! et du parallelisme !!
+
+  1   CONTINUE ! Matsuno Forward step begins here
+
+  !   date: (NB: date remains unchanged for Backward step)
+  !   -----
+
+  jD_cur = jD_ref + day_ini - day_ref + &
+          (itau + 1) / day_step
+  jH_cur = jH_ref + start_time + &
+          mod(itau + 1, day_step) / float(day_step)
+  if (jH_cur > 1.0) then
+    jD_cur = jD_cur + 1.
+    jH_cur = jH_cur - 1.
+  endif
+
+  CALL check_isotopes(q, ijb_u, ije_u, 'leapfrog 321')
+
+#ifdef CPP_IOIPSL
+  if (ok_guide) then
+    CALL guide_main(itau,ucov,vcov,teta,q,masse,ps)
+!$OMP BARRIER
+  endif
+#endif
+
+
+  !
+  ! IF( MOD( itau, 10* day_step ).EQ.0 )  THEN
+  !   CALL  test_period ( ucov,vcov,teta,q,p,phis )
+  !   PRINT *,' ----   Test_period apres continue   OK ! -----', itau
+  ! ENDIF
+  !
+  !ym      CALL SCOPY( ijmllm ,vcov , 1, vcovm1 , 1 )
+  !ym      CALL SCOPY( ijp1llm,ucov , 1, ucovm1 , 1 )
+  !ym      CALL SCOPY( ijp1llm,teta , 1, tetam1 , 1 )
+  !ym      CALL SCOPY( ijp1llm,masse, 1, massem1, 1 )
+  !ym      CALL SCOPY( ip1jmp1, ps  , 1,   psm1 , 1 )
+
+  if (FirstCaldyn) then
+    !$OMP MASTER
+    ucovm1 = ucov
+    vcovm1 = vcov
+    tetam1 = teta
+    massem1 = masse
+    psm1 = ps
+
+    ! Ehouarn: finvmaold is actually not used
+    ! finvmaold = masse
+    !$OMP END MASTER
+    !$OMP BARRIER
+    ! CALL filtreg_p ( finvmaold ,jjb_u,jje_u,jjb_u,jje_u,jjp1, llm,
+    ! &                    -2,2, .TRUE., 1 )
+  else
+    ! Save fields obtained at previous time step as '...m1'
+    ijb = ij_begin
+    ije = ij_end
+
+    !$OMP MASTER
+    psm1     (ijb:ije) = ps    (ijb:ije)
+    !$OMP END MASTER
+
+    !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+    DO l = 1, llm
+      ije = ij_end
+      ucovm1   (ijb:ije, l) = ucov  (ijb:ije, l)
+      tetam1   (ijb:ije, l) = teta  (ijb:ije, l)
+      massem1  (ijb:ije, l) = masse (ijb:ije, l)
+      ! finvmaold(ijb:ije,l)=masse(ijb:ije,l)
+
+      if (pole_sud) ije = ij_end - iip1
+      vcovm1(ijb:ije, l) = vcov  (ijb:ije, l)
+
+    ENDDO
+    !$OMP ENDDO
+
+
+    ! Ehouarn: finvmaold not used
+    ! CALL filtreg_p(finvmaold ,jjb_u,jje_u,jj_begin,jj_end,jjp1,
+    ! .                    llm, -2,2, .TRUE., 1 )
+
+  endif ! of if (FirstCaldyn)
+
+  forward = .TRUE.
+  leapf = .FALSE.
+  dt = dtvr
+
+  !   ...    P.Le Van .26/04/94  ....
+
+  !ym      CALL SCOPY   ( ijp1llm,   masse, 1, finvmaold,     1 )
+  !ym      CALL filtreg ( finvmaold ,jjp1, llm, -2,2, .TRUE., 1 )
+
+  !ym  ne sert a rien
+  !ym      CALL minmax(ijp1llm,q(:,:,3),zqmin,zqmax)
+
+  CALL check_isotopes(q, ijb_u, ije_u, 'leapfrog 400')
+
+  2   CONTINUE ! Matsuno backward or leapfrog step begins here
+
+  CALL check_isotopes(q, ijb_u, ije_u, 'leapfrog 402')
+
+  !$OMP MASTER
+  ItCount = ItCount + 1
+  if (MOD(ItCount, 1)==1) then
+    debug = .true.
+  else
+    debug = .false.
+  endif
+  !$OMP END MASTER
+  !-----------------------------------------------------------------------
+
+  !   date: (NB: only leapfrog step requires recomputing date)
+  !   -----
+
+  IF (leapf) THEN
+    jD_cur = jD_ref + day_ini - day_ref + &
+            (itau + 1) / day_step
+    jH_cur = jH_ref + start_time + &
+            mod(itau + 1, day_step) / float(day_step)
+    if (jH_cur > 1.0) then
+      jD_cur = jD_cur + 1.
+      jH_cur = jH_cur - 1.
+    endif
+  ENDIF
+
+  !   gestion des appels de la physique et des dissipations:
+  !   ------------------------------------------------------
+  !
+  !   ...    P.Le Van  ( 6/02/95 )  ....
+
+  apphys = .FALSE.
+  statcl = .FALSE.
+  conser = .FALSE.
+  apdiss = .FALSE.
+
+  IF(purmats) THEN
+    ! ! Purely Matsuno time stepping
+    IF(MOD(itau, iconser) ==0.AND.  forward) conser = .TRUE.
+    IF(MOD(itau, dissip_period)==0.AND..NOT.forward) &
+            apdiss = .TRUE.
+    IF(MOD(itau, iphysiq)==0.AND..NOT.forward &
+            .and. physic) apphys = .TRUE.
+  ELSE
+    ! ! Leapfrog/Matsuno time stepping
+    IF(MOD(itau, iconser) == 0) conser = .TRUE.
+    IF(MOD(itau + 1, dissip_period)==0 .AND. .NOT. forward) &
+            apdiss = .TRUE.
+    IF(MOD(itau + 1, iphysiq)==0.AND.physic) apphys = .TRUE.
+  END IF
+
+  ! Ehouarn: for Shallow Water case (ie: 1 vertical layer),
+  ! supress dissipation step
+  if (llm==1) then
+    apdiss = .false.
+  endif
+
+  !ym    ---> Pour le moment
+  !ym      apphys = .FALSE.
+  statcl = .FALSE.
+  ! conser = .FALSE. ! ie: no output of control variables to stdout in //
+
+  if (firstCaldyn) then
+    !$OMP MASTER
+    CALL Set_Distrib(distrib_caldyn)
+    !$OMP END MASTER
+    !$OMP BARRIER
+    firstCaldyn = .FALSE.
+    !ym          CALL InitTime
+    !$OMP MASTER
+    CALL Init_timer
+    !$OMP END MASTER
+  endif
+
+  !$OMP MASTER
+  IF (ok_start_timer) THEN
+    CALL InitTime
+    ok_start_timer = .FALSE.
+  ENDIF
+  !$OMP END MASTER
+
+  CALL check_isotopes(q, ijb_u, ije_u, 'leapfrog 471')
+
+  !ym  PAS D'AJUSTEMENT POUR LE MOMENT
+  if (Adjust) then
+    AdjustCount = AdjustCount + 1
+    ! if (iapptrac==iapp_tracvl .and. (forward .OR.  leapf)
+    ! &         .and. itau/iphysiq>2 .and. Adjustcount>30) then
+    if (Adjustcount>1) then
+      AdjustCount = 0
+      !$OMP MASTER
+      CALL allgather_timer_average
+
+      if (prt_level > 9) then
+
+        print *, '*********************************'
+        print *, '******    TIMER CALDYN     ******'
+        do i = 0, mpi_size - 1
+          print *, 'proc', i, ' :   Nb Bandes  :', jj_nb_caldyn(i), &
+                  '  : temps moyen :', &
+                  timer_average(jj_nb_caldyn(i), timer_caldyn, i), &
+                  '+-', timer_delta(jj_nb_caldyn(i), timer_caldyn, i)
+        enddo
+
+        print *, '*********************************'
+        print *, '******    TIMER VANLEER    ******'
+        do i = 0, mpi_size - 1
+          print *, 'proc', i, ' :   Nb Bandes  :', jj_nb_vanleer(i), &
+                  '  : temps moyen :', &
+                  timer_average(jj_nb_vanleer(i), timer_vanleer, i), &
+                  '+-', timer_delta(jj_nb_vanleer(i), timer_vanleer, i)
+        enddo
+
+        print *, '*********************************'
+        print *, '******    TIMER DISSIP    ******'
+        do i = 0, mpi_size - 1
+          print *, 'proc', i, ' :   Nb Bandes  :', jj_nb_dissip(i), &
+                  '  : temps moyen :', &
+                  timer_average(jj_nb_dissip(i), timer_dissip, i), &
+                  '+-', timer_delta(jj_nb_dissip(i), timer_dissip, i)
+        enddo
+
+        ! if (mpi_rank==0) CALL WriteBands
+
+      endif
+
+      CALL AdjustBands_caldyn(new_dist)
+      !$OMP END MASTER
+      !$OMP BARRIER
+      CALL leapfrog_switch_caldyn(new_dist)
+      !$OMP BARRIER
+
+
+      !$OMP MASTER
+      distrib_caldyn = new_dist
+      CALL set_distrib(distrib_caldyn)
+      !$OMP END MASTER
+      !$OMP BARRIER
+      ! CALL Register_SwapFieldHallo(ucov,ucov,ip1jmp1,llm,
+      ! &                                jj_Nb_caldyn,0,0,TestRequest)
+      !     CALL Register_SwapFieldHallo(ucovm1,ucovm1,ip1jmp1,llm,
+      ! &                                jj_Nb_caldyn,0,0,TestRequest)
+      !     CALL Register_SwapFieldHallo(vcov,vcov,ip1jm,llm,
+      ! &                                jj_Nb_caldyn,0,0,TestRequest)
+      !     CALL Register_SwapFieldHallo(vcovm1,vcovm1,ip1jm,llm,
+      ! &                                jj_Nb_caldyn,0,0,TestRequest)
+      !     CALL Register_SwapFieldHallo(teta,teta,ip1jmp1,llm,
+      ! &                                jj_Nb_caldyn,0,0,TestRequest)
+      !     CALL Register_SwapFieldHallo(tetam1,tetam1,ip1jmp1,llm,
+      ! &                                jj_Nb_caldyn,0,0,TestRequest)
+      !     CALL Register_SwapFieldHallo(masse,masse,ip1jmp1,llm,
+      ! &                                jj_Nb_caldyn,0,0,TestRequest)
+      !     CALL Register_SwapFieldHallo(massem1,massem1,ip1jmp1,llm,
+      ! &                                jj_Nb_caldyn,0,0,TestRequest)
+      !     CALL Register_SwapFieldHallo(ps,ps,ip1jmp1,1,
+      ! &                                jj_Nb_caldyn,0,0,TestRequest)
+      !     CALL Register_SwapFieldHallo(psm1,psm1,ip1jmp1,1,
+      ! &                                jj_Nb_caldyn,0,0,TestRequest)
+      !     CALL Register_SwapFieldHallo(pkf,pkf,ip1jmp1,llm,
+      ! &                                jj_Nb_caldyn,0,0,TestRequest)
+      !     CALL Register_SwapFieldHallo(pk,pk,ip1jmp1,llm,
+      ! &                                jj_Nb_caldyn,0,0,TestRequest)
+      !     CALL Register_SwapFieldHallo(pks,pks,ip1jmp1,1,
+      ! &                                jj_Nb_caldyn,0,0,TestRequest)
+      !     CALL Register_SwapFieldHallo(phis,phis,ip1jmp1,1,
+      ! &                                jj_Nb_caldyn,0,0,TestRequest)
+      !     CALL Register_SwapFieldHallo(phi,phi,ip1jmp1,llm,
+      ! &                                jj_Nb_caldyn,0,0,TestRequest)
+      !     CALL Register_SwapFieldHallo(finvmaold,finvmaold,ip1jmp1,llm,
+      ! &                                jj_Nb_caldyn,0,0,TestRequest)
+
+      !    do j=1,nqtot
+      !     CALL Register_SwapFieldHallo(q(:,:,j),q(:,:,j),ip1jmp1,llm,
+      ! &                                jj_nb_caldyn,0,0,TestRequest)
+      !    enddo
+
+      !     CALL Set_Distrib(distrib_caldyn)
+      !     CALL SendRequest(TestRequest)
+      !     CALL WaitRequest(TestRequest)
+
+      !$OMP MASTER
+      CALL AdjustBands_dissip(new_dist)
+      !$OMP END MASTER
+      !$OMP BARRIER
+      CALL leapfrog_switch_dissip(new_dist)
+      !$OMP BARRIER
+      !$OMP MASTER
+      distrib_dissip = new_dist
+      !$OMP END MASTER
+      !$OMP BARRIER
+      ! CALL AdjustBands_physic
+
+      !$OMP MASTER
+      if (mpi_rank==0) CALL WriteBands
+      !$OMP END MASTER
+
+    endif
+  endif
+
+  CALL check_isotopes(q, ijb_u, ije_u, 'leapfrog 589')
+
+  !-----------------------------------------------------------------------
+  !   calcul des tendances dynamiques:
+  !   --------------------------------
+  !$OMP BARRIER
+  !$OMP MASTER
+  CALL VTb(VThallo)
+  !$OMP END MASTER
+
+  CALL Register_Hallo_u(ucov, llm, 1, 1, 1, 1, TestRequest)
+  CALL Register_Hallo_v(vcov, llm, 1, 1, 1, 1, TestRequest)
+  CALL Register_Hallo_u(teta, llm, 1, 1, 1, 1, TestRequest)
+  CALL Register_Hallo_u(ps, 1, 1, 2, 2, 1, TestRequest)
+  CALL Register_Hallo_u(pkf, llm, 1, 1, 1, 1, TestRequest)
+  CALL Register_Hallo_u(pk, llm, 1, 1, 1, 1, TestRequest)
+  CALL Register_Hallo_u(pks, 1, 1, 1, 1, 1, TestRequest)
+  CALL Register_Hallo_u(p, llmp1, 1, 1, 1, 1, TestRequest)
+
+  ! do j=1,nqtot
+  !   CALL Register_Hallo(q(1,1,j),ip1jmp1,llm,1,1,1,1,
+  ! *                       TestRequest)
+  !    enddo
+
+  CALL SendRequest(TestRequest)
+  !$OMP BARRIER
+  CALL WaitRequest(TestRequest)
+
+  !$OMP MASTER
+  CALL VTe(VThallo)
+  !$OMP END MASTER
+  !$OMP BARRIER
+
+  if (debug) then
+    CALL WriteField_u('ucov', ucov)
+    CALL WriteField_v('vcov', vcov)
+    CALL WriteField_u('teta', teta)
+    CALL WriteField_u('ps', ps)
+    CALL WriteField_u('masse', masse)
+    CALL WriteField_u('pk', pk)
+    CALL WriteField_u('pks', pks)
+    CALL WriteField_u('pkf', pkf)
+    CALL WriteField_u('phis', phis)
+    do iq = 1, nqtot
+      CALL WriteField_u('q' // trim(int2str(iq)), &
+              q(:, :, iq))
+    enddo
+  endif
+
+  True_itau = True_itau + 1
+
+  !$OMP MASTER
+  IF (prt_level>9) THEN
+    WRITE(lunout, *)"leapfrog_p: Iteration No", True_itau
+  ENDIF
+
+  CALL start_timer(timer_caldyn)
+
+  ! ! compute geopotential phi()
+  CALL geopot_loc  (ip1jmp1, teta, pk, pks, phis, phi)
+
+  CALL check_isotopes(q, ijb_u, ije_u, 'leapfrog 651')
+
+  CALL VTb(VTcaldyn)
+  !$OMP END MASTER
+  ! var_time=time+iday-day_ini
+
+  !$OMP BARRIER
+  ! CALL FTRACE_REGION_BEGIN("caldyn")
+  time = jD_cur + jH_cur
+
+  CALL caldyn_loc &
+          (itau, ucov, vcov, teta, ps, masse, pk, pkf, phis, &
+          phi, conser, du, dv, dteta, dp, w, pbaru, pbarv, time)
+
+  ! CALL FTRACE_REGION_END("caldyn")
+
+  !$OMP MASTER
+  if (mpi_rank==0.AND.conser) THEN
+    WRITE(lunout, *) 'leapfrog_loc, Time step: ', itau, ' Day:', time
+  ENDIF
+  CALL VTe(VTcaldyn)
+  !$OMP END MASTER
+
+  IF (CPPKEY_DEBUGIO) THEN
+    CALL WriteField_u('du', du)
+    CALL WriteField_v('dv', dv)
+    CALL WriteField_u('dteta', dteta)
+    CALL WriteField_u('dp', dp)
+    CALL WriteField_u('w', w)
+    CALL WriteField_u('pbaru', pbaru)
+    CALL WriteField_v('pbarv', pbarv)
+    CALL WriteField_u('p', p)
+    CALL WriteField_u('masse', masse)
+    CALL WriteField_u('pk', pk)
+  END IF
+  !-----------------------------------------------------------------------
+  !   calcul des tendances advection des traceurs (dont l'humidite)
+  !   -------------------------------------------------------------
+
+  CALL check_isotopes(q, ijb_u, ije_u, &
+          'leapfrog 686: avant caladvtrac')
+
+  IF(forward .OR.  leapf)  THEN
+    ! Ehouarn: NB: fields sent to advtrac are those at the beginning of the time step
+    ! !write(*,*) 'leapfrog 679: avant CALL caladvtrac_loc'
+    CALL caladvtrac_loc(q, pbaru, pbarv, &
+            p, masse, dq, teta, &
+            flxw, pk, iapptrac)
+
+    ! CALL creation of mass flux
+    IF (offline .AND. .NOT. adjust) THEN
+      CALL fluxstokenc_p(pbaru, pbarv, masse, teta, phi)
+    ENDIF
+
+    ! !write(*,*) 'leapfrog 719'
+    CALL check_isotopes(q, ijb_u, ije_u, &
+            'leapfrog 698: apres caladvtrac')
+
+    ! do j=1,nqtot
+    !   CALL WriteField_u('qadv'//trim(int2str(j)),q(:,:,j))
+    ! enddo
+
+    ! Ehouarn: Storage of mass flux for off-line tracers... not implemented...
+
+  ENDIF ! of IF( forward .OR.  leapf )
+
+
+  !-----------------------------------------------------------------------
+  !   integrations dynamique et traceurs:
+  !   ----------------------------------
+
+  !$OMP MASTER
+  CALL VTb(VTintegre)
+  !$OMP END MASTER
+  IF (CPPKEY_DEBUGIO) THEN
+    if (true_itau>20) then
+      CALL WriteField_u('ucovm1', ucovm1)
+      CALL WriteField_v('vcovm1', vcovm1)
+      CALL WriteField_u('tetam1', tetam1)
+      CALL WriteField_u('psm1', psm1)
+      CALL WriteField_u('ucov_int', ucov)
+      CALL WriteField_v('vcov_int', vcov)
+      CALL WriteField_u('teta_int', teta)
+      CALL WriteField_u('ps_int', ps)
+    endif
+  END IF
+  !$OMP BARRIER
+  ! CALL FTRACE_REGION_BEGIN("integrd")
+
+  ! !write(*,*) 'leapfrog 720'
+  CALL check_isotopes(q, ijb_u, ije_u, 'leapfrog 756')
+
+  ! ! CRisi: pourquoi aller jusqu'à 2 et non pas jusqu'à nqtot??
+  CALL integrd_loc (nqtot, vcovm1, ucovm1, tetam1, psm1, massem1, &
+          dv, du, dteta, dq, dp, vcov, ucov, teta, q, ps, masse, phis)
+  ! $              finvmaold                                    )
+
+  !  !write(*,*) 'leapfrog 724'
+  CALL check_isotopes(q, ijb_u, ije_u, 'leapfrog 762')
+
+  ! CALL FTRACE_REGION_END("integrd")
+  !$OMP BARRIER
+  IF (CPPKEY_DEBUGIO) THEN
+    CALL WriteField_u('ucovm1', ucovm1)
+    CALL WriteField_v('vcovm1', vcovm1)
+    CALL WriteField_u('tetam1', tetam1)
+    CALL WriteField_u('psm1', psm1)
+    CALL WriteField_u('ucov_int', ucov)
+    CALL WriteField_v('vcov_int', vcov)
+    CALL WriteField_u('teta_int', teta)
+    CALL WriteField_u('ps_int', ps)
+  END IF
+
+  CALL check_isotopes(q, ijb_u, ije_u, 'leapfrog 775')
+
+  ! do j=1,nqtot
+  !   CALL WriteField_p('q'//trim(int2str(j)),
+  ! .                reshape(q(:,:,j),(/iip1,jmp1,llm/)))
+  !    CALL WriteField_p('dq'//trim(int2str(j)),
+  ! .                reshape(dq(:,:,j),(/iip1,jmp1,llm/)))
+  !  enddo
+
+
+  !$OMP MASTER
+  CALL VTe(VTintegre)
+  !$OMP END MASTER
+  ! .P.Le Van (26/04/94  ajout de  finvpold dans l'appel d'integrd)
+  !
+  !-----------------------------------------------------------------------
+  !   calcul des tendances physiques:
+  !   -------------------------------
+  !    ########   P.Le Van ( Modif le  6/02/95 )   ###########
+  !
+  IF(purmats)  THEN
+    IF(itau==itaufin.AND..NOT.forward) lafin = .TRUE.
+  ELSE
+    IF(itau + 1 == itaufin)              lafin = .TRUE.
+  ENDIF
+
+  !c$OMP END PARALLEL
+
+  !
+  !
+  IF(apphys)  THEN
+
+    CALL call_calfis(itau, lafin, ucov, vcov, teta, masse, ps, phis, q, flxw)
+
+    ! c-jld
+    !$OMP MASTER
+    if (FirstPhysic) then
+      ok_start_timer = .TRUE.
+      FirstPhysic = .false.
+    endif
+    !$OMP END MASTER
+  ENDIF ! of IF( apphys )
+
+  CALL check_isotopes(q, ijb_u, ije_u, 'leapfrog 1132')
+  ! !write(*,*) 'leapfrog 1134: iflag_phys=',iflag_phys
+
+  IF(iflag_phys==2) THEN ! "Newtonian" case
+    !$OMP MASTER
+    if (FirstPhysic) then
+      ok_start_timer = .TRUE.
+      FirstPhysic = .false.
+    endif
+    !$OMP END MASTER
+
+
+    !   Calcul academique de la physique = Rappel Newtonien + fritcion
+    !   --------------------------------------------------------------
+    !ym       teta(:,:)=teta(:,:)
+    !ym     s  -iphysiq*dtvr*(teta(:,:)-tetarappel(:,:))/taurappel
+    ijb = ij_begin
+    ije = ij_end
+    !LF       teta(ijb:ije,:)=teta(ijb:ije,:)
+    !LF     s  -iphysiq*dtvr*(teta(ijb:ije,:)-tetarappel(ijb:ije,:))/taurappel
+    !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+    do l = 1, llm
+      teta(ijb:ije, l) = teta(ijb:ije, l) - dtvr * &
+              (teta(ijb:ije, l) - tetarappel(ijb:ije, l)) * &
+              (knewt_g + knewt_t(l) * clat4(ijb:ije))
+    enddo
+    !$OMP END DO
+
+    !$OMP MASTER
+    if (planet_type=="giant") then
+      ! ! add an intrinsic heat flux at the base of the atmosphere
+      teta(ijb:ije, 1) = teta(ijb:ije, 1) &
+              + dtvr * aire(ijb:ije) * ihf / cpp / masse(ijb:ije, 1)
+    endif
+    !$OMP END MASTER
+    !$OMP BARRIER
+
+    CALL Register_Hallo_u(ucov, llm, 0, 1, 1, 0, Request_Physic)
+    CALL Register_Hallo_v(vcov, llm, 1, 1, 1, 1, Request_Physic)
+    CALL SendRequest(Request_Physic)
+    !$OMP BARRIER
+    CALL WaitRequest(Request_Physic)
+    !$OMP BARRIER
+    CALL friction_loc(ucov, vcov, dtvr)
+    !$OMP BARRIER
+
+    ! ! Sponge layer (if any)
+    IF (ok_strato) THEN
+      CALL top_bound_loc(vcov, ucov, teta, masse, dtvr)
+      !$OMP BARRIER
+    ENDIF ! of IF (ok_strato)
+  ENDIF ! of IF(iflag_phys.EQ.2)
+
+  CALL pression_loc (ip1jmp1, ap, bp, ps, p)
+  !$OMP BARRIER
+  if (pressure_exner) then
+    CALL exner_hyb_loc(ijnb_u, ps, p, pks, pk, pkf)
+  else
+    CALL exner_milieu_loc(ijnb_u, ps, p, pks, pk, pkf)
+  endif
+  !$OMP BARRIER
+  CALL massdair_loc(p, masse)
+  !$OMP BARRIER
+
+  !c$OMP END PARALLEL
+  CALL check_isotopes(q, ijb_u, ije_u, 'leapfrog 1196')
+
+  !-----------------------------------------------------------------------
+  !   dissipation horizontale et verticale  des petites echelles:
+  !   ----------------------------------------------------------
+  IF(apdiss) THEN
+    CALL call_dissip(ucov, vcov, teta, p, pk, ps)
+  END IF
+
+  CALL check_isotopes(q, ijb_u, ije_u, 'leapfrog 1430')
+
+  !   ********************************************************************
+  !   .... fin de l'integration dynamique  et physique pour le pas itau ..
+  !   ********************************************************************
+
+  !   preparation du pas d'integration suivant  ......
+  !$OMP MASTER
+  CALL stop_timer(timer_caldyn)
+  !$OMP END MASTER
+  IF (itau==itaumax) then
+    !$OMP MASTER
+    CALL allgather_timer_average
+    CALL barrier
+    if (mpi_rank==0) then
+
+      print *, '*********************************'
+      print *, '******    TIMER CALDYN     ******'
+      do i = 0, mpi_size - 1
+        print *, 'proc', i, ' :   Nb Bandes  :', jj_nb_caldyn(i), &
+                '  : temps moyen :', &
+                timer_average(jj_nb_caldyn(i), timer_caldyn, i)
+      enddo
+
+      print *, '*********************************'
+      print *, '******    TIMER VANLEER    ******'
+      do i = 0, mpi_size - 1
+        print *, 'proc', i, ' :   Nb Bandes  :', jj_nb_vanleer(i), &
+                '  : temps moyen :', &
+                timer_average(jj_nb_vanleer(i), timer_vanleer, i)
+      enddo
+
+      print *, '*********************************'
+      print *, '******    TIMER DISSIP    ******'
+      do i = 0, mpi_size - 1
+        print *, 'proc', i, ' :   Nb Bandes  :', jj_nb_dissip(i), &
+                '  : temps moyen :', &
+                timer_average(jj_nb_dissip(i), timer_dissip, i)
+      enddo
+
+      print *, '*********************************'
+      print *, '******    TIMER PHYSIC    ******'
+      do i = 0, mpi_size - 1
+        print *, 'proc', i, ' :   Nb Bandes  :', jj_nb_physic(i), &
+                '  : temps moyen :', &
+                timer_average(jj_nb_physic(i), timer_physic, i)
+      enddo
+
+    endif
+    CALL barrier
+    print *, 'Taille du Buffer MPI (REAL*8)', MaxBufferSize
+    print *, 'Taille du Buffer MPI utilise (REAL*8)', MaxBufferSize_Used
+    print *, 'Temps total ecoule sur la parallelisation :', DiffTime()
+    print *, 'Temps CPU ecoule sur la parallelisation :', DiffCpuTime()
+    CALL print_filtre_timer
+    !$OMP END MASTER
+    CALL dynredem1_loc("restart.nc", 0.0, &
+            vcov, ucov, teta, q, masse, ps)
+    !$OMP MASTER
+    CALL fin_getparam
+    !$OMP END MASTER
+
+    if (ok_guide) then
+      ! ! set ok_guide to false to avoid extra output
+      ! ! in following forward step
+      ok_guide = .false.
+    endif
+
+    IF (CPPKEY_INCA) THEN
+      IF (ANY(type_trac == ['inca', 'inco'])) THEN
+        CALL finalize_inca
+        ! switching back to LMDZDYN context
+        !$OMP MASTER
+        IF (ok_dyn_xios) THEN
+          CALL xios_set_current_context(dyn3d_ctx_handle)
+        ENDIF
+        !$OMP END MASTER
+      ENDIF
+    END IF
+#ifdef REPROBUS
+     if (type_trac == 'repr') CALL finalize_reprobus
+#endif
+
+    !$OMP MASTER
+    CALL finalize_parallel
+    !$OMP END MASTER
+    !$OMP BARRIER
+    RETURN
+  ENDIF
+
+  CALL check_isotopes(q, ijb_u, ije_u, 'leapfrog 1509')
+
+  IF (.NOT.purmats) THEN
+    ! ........................................................
+    ! ..............  schema matsuno + leapfrog  ..............
+    ! ........................................................
+
+    IF(forward .OR. leapf) THEN
+      itau = itau + 1
+      ! iday= day_ini+itau/day_step
+      ! time= REAL(itau-(iday-day_ini)*day_step)/day_step+time_0
+      !   IF(time.GT.1.) THEN
+      !     time = time-1.
+      !     iday = iday+1
+      !   ENDIF
+    ENDIF
+
+    IF(itau == itaufinp1) then
+
+      if (flag_verif) then
+        write(79, *) 'ucov', ucov
+        write(80, *) 'vcov', vcov
+        write(81, *) 'teta', teta
+        write(82, *) 'ps', ps
+        write(83, *) 'q', q
+        WRITE(85, *) 'q1 = ', q(:, :, 1)
+        WRITE(86, *) 'q3 = ', q(:, :, 3)
+      endif
+
+
+      !$OMP MASTER
+      CALL fin_getparam
+      !$OMP END MASTER
+
+      IF (CPPKEY_INCA) THEN
+        IF (ANY(type_trac == ['inca', 'inco'])) THEN
+          CALL finalize_inca
+          ! switching back to LMDZDYN context
+          !$OMP MASTER
+          IF (ok_dyn_xios) THEN
+            CALL xios_set_current_context(dyn3d_ctx_handle)
+          ENDIF
+          !$OMP END MASTER
+        ENDIF
+      END IF
+#ifdef REPROBUS
+          if (type_trac == 'repr') CALL finalize_reprobus
+#endif
+
+      !$OMP MASTER
+      CALL finalize_parallel
+      !$OMP END MASTER
+      abort_message = 'Simulation finished'
+      CALL abort_gcm(modname, abort_message, 0)
+      RETURN
+    ENDIF
+    !-----------------------------------------------------------------------
+    !   ecriture du fichier histoire moyenne:
+    !   -------------------------------------
+
+    IF(MOD(itau, iperiod)==0 .OR. itau==itaufin) THEN
+      !$OMP BARRIER
+      IF(itau==itaufin) THEN
+        iav = 1
+      ELSE
+        iav = 0
+      ENDIF
+
+      ! ! Ehouarn: re-compute geopotential for outputs
+      !$OMP BARRIER
+      !$OMP MASTER
+      CALL geopot_loc(ip1jmp1, teta, pk, pks, phis, phi)
+      !$OMP END MASTER
+      !$OMP BARRIER
+
+#ifdef CPP_IOIPSL
+         IF (ok_dynzon) THEN
+
+          CALL bilan_dyn_loc(2,dtvr*iperiod,dtvr*day_step*periodav, &
+                ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q)
+
+          ENDIF !ok_dynzon
+
+          IF (ok_dyn_ave) THEN
+             CALL writedynav_loc(itau,vcov, &
+                   ucov,teta,pk,phi,q,masse,ps,phis)
+          ENDIF
+#endif
+
+    ENDIF
+
+    CALL check_isotopes(q, ijb_u, ije_u, 'leapfrog 1584')
+
+    !-----------------------------------------------------------------------
+    !   ecriture de la bande histoire:
+    !   ------------------------------
+
+    IF(MOD(itau, iecri)==0) THEN
+      ! ! Ehouarn: output only during LF or Backward Matsuno
+      if (leapf.or.(.not.leapf.and.(.not.forward))) then
+
+        !$OMP BARRIER
+        !$OMP MASTER
+        CALL geopot_loc(ip1jmp1, teta, pk, pks, phis, phi)
+        !$OMP END MASTER
+        !$OMP BARRIER
+
+#ifdef CPP_IOIPSL
+         if (ok_dyn_ins) then
+             CALL writehist_loc(itau,vcov,ucov,teta,pk,phi,q, &
+                   masse,ps,phis)
+         endif
+#endif
+
+        IF (ok_dyn_xios) THEN
+          !$OMP MASTER
+          CALL xios_update_calendar(itau)
+          !$OMP END MASTER
+          !$OMP BARRIER
+          CALL writedyn_xios(vcov, &
+                  ucov, teta, pk, phi, q, masse, ps, phis)
+        ENDIF
+
+      endif                 ! of if (leapf.or.(.not.leapf.and.(.not.forward)))
+
+    ENDIF ! of IF(MOD(itau,iecri).EQ.0)
+
+    IF(itau==itaufin) THEN
+
+      !$OMP BARRIER
+
+      ! if (planet_type.eq."earth") then
+      ! Write an Earth-format restart file
+      CALL dynredem1_loc("restart.nc", 0.0, &
+              vcov, ucov, teta, q, masse, ps)
+      ! endif ! of if (planet_type.eq."earth")
+      if (ok_guide) then
+        ! ! set ok_guide to false to avoid extra output
+        ! ! in following forward step
+        ok_guide = .false.
+      endif
+
+      ! CLOSE(99)
+    ENDIF ! of IF (itau.EQ.itaufin)
+
+    CALL check_isotopes(q, ijb_u, ije_u, 'leapfrog 1624')
+
+    !-----------------------------------------------------------------------
+    !   gestion de l'integration temporelle:
+    !   ------------------------------------
+
+    IF(MOD(itau, iperiod)==0)    THEN
+      GO TO 1
+    ELSE IF (MOD(itau - 1, iperiod) == 0) THEN
+
+      IF(forward)  THEN
+        ! fin du pas forward et debut du pas backward
+
+        forward = .FALSE.
+        leapf = .FALSE.
+        GO TO 2
+
+      ELSE
+        ! fin du pas backward et debut du premier pas leapfrog
+
+        leapf = .TRUE.
+        dt = 2. * dtvr
+        GO TO 2
+      END IF
+    ELSE
+
+      ! ......   pas leapfrog  .....
+
+      leapf = .TRUE.
+      dt = 2. * dtvr
+      GO TO 2
+    END IF ! of IF (MOD(itau,iperiod).EQ.0)
+    ! !    ELSEIF (MOD(itau-1,iperiod).EQ.0)
+
+  ELSE ! of IF (.not.purmats)
+
+    CALL check_isotopes(q, ijb_u, ije_u, 'leapfrog 1664')
+
+    ! ........................................................
+    ! ..............       schema  matsuno        ...............
+    ! ........................................................
+    IF(forward)  THEN
+
+      itau = itau + 1
+      ! iday = day_ini+itau/day_step
+      ! time = REAL(itau-(iday-day_ini)*day_step)/day_step+time_0
+
+      !      IF(time.GT.1.) THEN
+      !       time = time-1.
+      !       iday = iday+1
+      !      ENDIF
+
+      forward = .FALSE.
+      IF(itau == itaufinp1) then
+        !$OMP MASTER
+        CALL fin_getparam
+        !$OMP END MASTER
+
+        IF (CPPKEY_INCA) THEN
+          IF (ANY(type_trac == ['inca', 'inco'])) THEN
+            CALL finalize_inca
+            ! switching back to LMDZDYN context
+            !$OMP MASTER
+            IF (ok_dyn_xios) THEN
+              CALL xios_set_current_context(dyn3d_ctx_handle)
+            ENDIF
+            !$OMP END MASTER
+          ENDIF
+
+        END IF
+#ifdef REPROBUS
+             if (type_trac == 'repr') CALL finalize_reprobus
+#endif
+
+        !$OMP MASTER
+        CALL finalize_parallel
+        !$OMP END MASTER
+        abort_message = 'Simulation finished'
+        CALL abort_gcm(modname, abort_message, 0)
+        RETURN
+      ENDIF
+      GO TO 2
+
+    ELSE ! of IF(forward) i.e. backward step
+
+      CALL check_isotopes(q, ijb_u, ije_u, 'leapfrog 1698')
+
+      IF(MOD(itau, iperiod)==0 .OR. itau==itaufin) THEN
+        IF(itau==itaufin) THEN
+          iav = 1
+        ELSE
+          iav = 0
+        ENDIF
+
+#ifdef CPP_IOIPSL
+          ! ! Ehouarn: re-compute geopotential for outputs
+!$OMP BARRIER
+!$OMP MASTER
+          CALL geopot_loc(ip1jmp1,teta,pk,pks,phis,phi)
+!$OMP END MASTER
+!$OMP BARRIER
+
+           IF (ok_dynzon) THEN
+           CALL bilan_dyn_loc(2,dtvr*iperiod,dtvr*day_step*periodav, &
+                 ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q)
+           ENDIF
+
+           IF (ok_dyn_ave) THEN
+             CALL writedynav_loc(itau,vcov, &
+                   ucov,teta,pk,phi,q,masse,ps,phis)
+           ENDIF
+#endif
+
+      ENDIF ! of IF(MOD(itau,iperiod).EQ.0 .OR. itau.EQ.itaufin)
+
+      IF(MOD(itau, iecri)==0) THEN
+
+        !$OMP BARRIER
+        !$OMP MASTER
+        CALL geopot_loc(ip1jmp1, teta, pk, pks, phis, phi)
+        !$OMP END MASTER
+        !$OMP BARRIER
+
+
+#ifdef CPP_IOIPSL
+          if (ok_dyn_ins) then
+             CALL writehist_loc(itau,vcov,ucov,teta,pk,phi,q, &
+                   masse,ps,phis)
+          endif ! of if (ok_dyn_ins)
+#endif
+
+        IF (ok_dyn_xios) THEN
+          !$OMP MASTER
+          CALL xios_update_calendar(itau)
+          !$OMP END MASTER
+          !$OMP BARRIER
+          CALL writedyn_xios(vcov, &
+                  ucov, teta, pk, phi, q, masse, ps, phis)
+        ENDIF
+
+      ENDIF                ! of IF(MOD(itau,iecri).EQ.0)
+
+      IF(itau==itaufin) THEN
+        ! if (planet_type.eq."earth") then
+        CALL dynredem1_loc("restart.nc", 0.0, &
+                vcov, ucov, teta, q, masse, ps)
+        ! endif ! of if (planet_type.eq."earth")
+        if (ok_guide) then
+          ! ! set ok_guide to false to avoid extra output
+          ! ! in following forward step
+          ok_guide = .false.
+        endif
+
+      ENDIF ! of IF(itau.EQ.itaufin)
+
+      forward = .TRUE.
+      GO TO  1
+
+    ENDIF ! of IF (forward)
+
+    CALL check_isotopes(q, ijb_u, ije_u, 'leapfrog 1750')
+
+  END IF ! of IF(.not.purmats)
+  !$OMP MASTER
+  CALL fin_getparam
+  !$OMP END MASTER
+
+  IF (CPPKEY_INCA) THEN
+    IF (ANY(type_trac == ['inca', 'inco'])) THEN
+      CALL finalize_inca
+      ! switching back to LMDZDYN context
+      !$OMP MASTER
+      IF (ok_dyn_xios) THEN
+        CALL xios_set_current_context(dyn3d_ctx_handle)
+      ENDIF
+      !$OMP END MASTER
+    ENDIF
+  END IF
+#ifdef REPROBUS
+  if (type_trac == 'repr') CALL finalize_reprobus
+#endif
+
+  !$OMP MASTER
+  CALL finalize_parallel
+  !$OMP END MASTER
+  abort_message = 'Simulation finished'
+  CALL abort_gcm(modname, abort_message, 0)
+  RETURN
+END SUBROUTINE leapfrog_loc
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/leapfrog_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/leapfrog_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/leapfrog_mod.F90	(revision 5101)
@@ -41,9 +41,9 @@
   USE dimensions_mod
   USE infotrac
-  USE caldyn_mod,ONLY : caldyn_allocate
-  USE integrd_mod,ONLY : integrd_allocate
-  USE caladvtrac_mod,ONLY : caladvtrac_allocate
-  USE lmdz_call_calfis,ONLY : call_calfis_allocate
-  USE call_dissip_mod, ONLY : call_dissip_allocate
+  USE caldyn_mod,ONLY: caldyn_allocate
+  USE integrd_mod,ONLY: integrd_allocate
+  USE caladvtrac_mod,ONLY: caladvtrac_allocate
+  USE lmdz_call_calfis,ONLY: call_calfis_allocate
+  USE call_dissip_mod, ONLY: call_dissip_allocate
   IMPLICIT NONE
   TYPE(distrib),POINTER :: d
@@ -93,7 +93,7 @@
   USE bands
   USE parallel_lmdz
-  USE caldyn_mod,ONLY : caldyn_switch_caldyn
-  USE integrd_mod,ONLY : integrd_switch_caldyn
-  USE caladvtrac_mod,ONLY : caladvtrac_switch_caldyn
+  USE caldyn_mod,ONLY: caldyn_switch_caldyn
+  USE integrd_mod,ONLY: integrd_switch_caldyn
+  USE caladvtrac_mod,ONLY: caladvtrac_switch_caldyn
   IMPLICIT NONE
     TYPE(distrib),INTENT(IN) :: dist
@@ -140,5 +140,5 @@
   USE bands
   USE parallel_lmdz
-  USE call_dissip_mod,ONLY : call_dissip_switch_dissip
+  USE call_dissip_mod,ONLY: call_dissip_switch_dissip
   IMPLICIT NONE
     TYPE(distrib),INTENT(IN) :: dist
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/lmdz_call_calfis.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/lmdz_call_calfis.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/lmdz_call_calfis.F90	(revision 5101)
@@ -1,414 +1,407 @@
-!#define DEBUG_IO
 MODULE lmdz_call_calfis
 
-    REAL,POINTER,SAVE :: ucov(:,:)
-    REAL,POINTER,SAVE :: vcov(:,:) 
-    REAL,POINTER,SAVE :: teta(:,:) 
-    REAL,POINTER,SAVE :: masse(:,:) 
-    REAL,POINTER,SAVE :: ps(:) 
-    REAL,POINTER,SAVE :: phis(:) 
-    REAL,POINTER,SAVE :: q(:,:,:) 
-    REAL,POINTER,SAVE :: flxw(:,:) 
-
-    REAL,POINTER,SAVE :: p(:,:) 
-    REAL,POINTER,SAVE :: pks(:) 
-    REAL,POINTER,SAVE :: pk(:,:) 
-    REAL,POINTER,SAVE :: pkf(:,:) 
-    REAL,POINTER,SAVE :: phi(:,:) 
-    REAL,POINTER,SAVE :: du(:,:) 
-    REAL,POINTER,SAVE :: dv(:,:) 
-    REAL,POINTER,SAVE :: dteta(:,:) 
-    REAL,POINTER,SAVE :: dq(:,:,:) 
-    REAL,POINTER,SAVE :: dufi(:,:) 
-    REAL,POINTER,SAVE :: dvfi(:,:) 
-    REAL,POINTER,SAVE :: dtetafi(:,:) 
-    REAL,POINTER,SAVE :: dqfi(:,:,:) 
-    REAL,POINTER,SAVE :: dpfi(:) 
-   
-    
-    
-    
-    
+  USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO
+
+  REAL, POINTER, SAVE :: ucov(:, :)
+  REAL, POINTER, SAVE :: vcov(:, :)
+  REAL, POINTER, SAVE :: teta(:, :)
+  REAL, POINTER, SAVE :: masse(:, :)
+  REAL, POINTER, SAVE :: ps(:)
+  REAL, POINTER, SAVE :: phis(:)
+  REAL, POINTER, SAVE :: q(:, :, :)
+  REAL, POINTER, SAVE :: flxw(:, :)
+
+  REAL, POINTER, SAVE :: p(:, :)
+  REAL, POINTER, SAVE :: pks(:)
+  REAL, POINTER, SAVE :: pk(:, :)
+  REAL, POINTER, SAVE :: pkf(:, :)
+  REAL, POINTER, SAVE :: phi(:, :)
+  REAL, POINTER, SAVE :: du(:, :)
+  REAL, POINTER, SAVE :: dv(:, :)
+  REAL, POINTER, SAVE :: dteta(:, :)
+  REAL, POINTER, SAVE :: dq(:, :, :)
+  REAL, POINTER, SAVE :: dufi(:, :)
+  REAL, POINTER, SAVE :: dvfi(:, :)
+  REAL, POINTER, SAVE :: dtetafi(:, :)
+  REAL, POINTER, SAVE :: dqfi(:, :, :)
+  REAL, POINTER, SAVE :: dpfi(:)
+
+
 CONTAINS
 
   SUBROUTINE call_calfis_allocate
-  USE bands
-  USE allocate_field_mod
-  USE parallel_lmdz
-  USE dimensions_mod
-  USE infotrac, ONLY: nqtot
-  IMPLICIT NONE
-    TYPE(distrib),POINTER :: d
-    d=>distrib_physic
-
-    CALL allocate_u(ucov,llm,d)
-    CALL allocate_v(vcov,llm,d)
-    CALL allocate_u(teta,llm,d)
-    CALL allocate_u(masse,llm,d)
-    CALL allocate_u(ps,d)
-    CALL allocate_u(phis,d)
-    CALL allocate_u(q,llm,nqtot,d)
-    CALL allocate_u(flxw,llm,d)
-    CALL allocate_u(p,llmp1,d)
-    CALL allocate_u(pks,d)
-    pks(:)=0
-    CALL allocate_u(pk,llm,d)
-    pk(:,:)=0
-    CALL allocate_u(pkf,llm,d)
-    CALL allocate_u(phi,llm,d)
-    CALL allocate_u(du,llm,d)
-    CALL allocate_v(dv,llm,d)
-    CALL allocate_u(dteta,llm,d)
-    CALL allocate_u(dq,llm,nqtot,d)
-    CALL allocate_u(dufi,llm,d)
-    CALL allocate_v(dvfi,llm,d)
-    CALL allocate_u(dtetafi,llm,d)
-    CALL allocate_u(dqfi,llm,nqtot,d)
-    CALL allocate_u(dpfi,d)
-  
+    USE bands
+    USE allocate_field_mod
+    USE parallel_lmdz
+    USE dimensions_mod
+    USE infotrac, ONLY: nqtot
+    IMPLICIT NONE
+    TYPE(distrib), POINTER :: d
+    d => distrib_physic
+
+    CALL allocate_u(ucov, llm, d)
+    CALL allocate_v(vcov, llm, d)
+    CALL allocate_u(teta, llm, d)
+    CALL allocate_u(masse, llm, d)
+    CALL allocate_u(ps, d)
+    CALL allocate_u(phis, d)
+    CALL allocate_u(q, llm, nqtot, d)
+    CALL allocate_u(flxw, llm, d)
+    CALL allocate_u(p, llmp1, d)
+    CALL allocate_u(pks, d)
+    pks(:) = 0
+    CALL allocate_u(pk, llm, d)
+    pk(:, :) = 0
+    CALL allocate_u(pkf, llm, d)
+    CALL allocate_u(phi, llm, d)
+    CALL allocate_u(du, llm, d)
+    CALL allocate_v(dv, llm, d)
+    CALL allocate_u(dteta, llm, d)
+    CALL allocate_u(dq, llm, nqtot, d)
+    CALL allocate_u(dufi, llm, d)
+    CALL allocate_v(dvfi, llm, d)
+    CALL allocate_u(dtetafi, llm, d)
+    CALL allocate_u(dqfi, llm, nqtot, d)
+    CALL allocate_u(dpfi, d)
+
   END SUBROUTINE call_calfis_allocate
-  
-  
-  SUBROUTINE call_calfis(itau,lafin,ucov_dyn,vcov_dyn,teta_dyn,masse_dyn,ps_dyn, &
-                         phis_dyn,q_dyn,flxw_dyn)
-  USE dimensions_mod
-  use exner_hyb_loc_m, only: exner_hyb_loc
-  use exner_milieu_loc_m, only: exner_milieu_loc
-  USE parallel_lmdz
-  USE times
-  USE mod_hallo
-  USE Bands
-  USE vampir
-  USE infotrac, ONLY: nqtot
-  USE control_mod
-  USE write_field_loc
-  USE write_field
-  USE comconst_mod, ONLY: dtphys
-  USE logic_mod, ONLY: leapf, forward, ok_strato
-  USE comvert_mod, ONLY: ap, bp, pressure_exner
-  USE temps_mod, ONLY: day_ini, day_ref, jd_ref, jh_ref, start_time
-  USE lmdz_calfis_loc
-  USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_PHYS
-
-  IMPLICIT NONE
+
+
+  SUBROUTINE call_calfis(itau, lafin, ucov_dyn, vcov_dyn, teta_dyn, masse_dyn, ps_dyn, &
+          phis_dyn, q_dyn, flxw_dyn)
+    USE dimensions_mod
+    use exner_hyb_loc_m, only: exner_hyb_loc
+    use exner_milieu_loc_m, only: exner_milieu_loc
+    USE parallel_lmdz
+    USE times
+    USE mod_hallo
+    USE Bands
+    USE vampir
+    USE infotrac, ONLY: nqtot
+    USE control_mod
+    USE write_field_loc
+    USE write_field
+    USE comconst_mod, ONLY: dtphys
+    USE logic_mod, ONLY: leapf, forward, ok_strato
+    USE comvert_mod, ONLY: ap, bp, pressure_exner
+    USE temps_mod, ONLY: day_ini, day_ref, jd_ref, jh_ref, start_time
+    USE lmdz_calfis_loc
+    USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_PHYS
+
+    IMPLICIT NONE
     INCLUDE "iniprint.h"
 
-    INTEGER,INTENT(IN) :: itau ! (time) iteration step number
-    LOGICAL,INTENT(IN) :: lafin ! .true. if final time step
-    REAL,INTENT(INOUT) :: ucov_dyn(ijb_u:ije_u,llm) ! covariant zonal wind
-    REAL,INTENT(INOUT) :: vcov_dyn(ijb_v:ije_v,llm) ! covariant meridional wind
-    REAL,INTENT(INOUT) :: teta_dyn(ijb_u:ije_u,llm) ! potential temperature
-    REAL,INTENT(INOUT) :: masse_dyn(ijb_u:ije_u,llm) ! air mass
-    REAL,INTENT(INOUT) :: ps_dyn(ijb_u:ije_u) ! surface pressure
-    REAL,INTENT(INOUT) :: phis_dyn(ijb_u:ije_u) ! surface geopotential
-    REAL,INTENT(INOUT) :: q_dyn(ijb_u:ije_u,llm,nqtot) ! advected tracers
-    REAL,INTENT(INOUT) :: flxw_dyn(ijb_u:ije_u,llm) ! vertical mass flux
-
-    REAL :: dufi_tmp(iip1,llm)    
-    REAL :: dvfi_tmp(iip1,llm)  
-    REAL :: dtetafi_tmp(iip1,llm)
+    INTEGER, INTENT(IN) :: itau ! (time) iteration step number
+    LOGICAL, INTENT(IN) :: lafin ! .true. if final time step
+    REAL, INTENT(INOUT) :: ucov_dyn(ijb_u:ije_u, llm) ! covariant zonal wind
+    REAL, INTENT(INOUT) :: vcov_dyn(ijb_v:ije_v, llm) ! covariant meridional wind
+    REAL, INTENT(INOUT) :: teta_dyn(ijb_u:ije_u, llm) ! potential temperature
+    REAL, INTENT(INOUT) :: masse_dyn(ijb_u:ije_u, llm) ! air mass
+    REAL, INTENT(INOUT) :: ps_dyn(ijb_u:ije_u) ! surface pressure
+    REAL, INTENT(INOUT) :: phis_dyn(ijb_u:ije_u) ! surface geopotential
+    REAL, INTENT(INOUT) :: q_dyn(ijb_u:ije_u, llm, nqtot) ! advected tracers
+    REAL, INTENT(INOUT) :: flxw_dyn(ijb_u:ije_u, llm) ! vertical mass flux
+
+    REAL :: dufi_tmp(iip1, llm)
+    REAL :: dvfi_tmp(iip1, llm)
+    REAL :: dtetafi_tmp(iip1, llm)
     REAL :: dpfi_tmp(iip1)
-    REAL :: dqfi_tmp(iip1,llm,nqtot)
+    REAL :: dqfi_tmp(iip1, llm, nqtot)
 
     REAL :: jD_cur, jH_cur
-    CHARACTER(LEN=15) :: ztit
-    TYPE(Request),SAVE :: Request_physic
-!$OMP THREADPRIVATE(Request_physic )
-    INTEGER :: ijb,ije,l,iq
-    
-    
-#ifdef DEBUG_IO    
-    CALL WriteField_u('ucovfi',ucov)
-    CALL WriteField_v('vcovfi',vcov)
-    CALL WriteField_u('tetafi',teta)
-    CALL WriteField_u('pfi',p)
-    CALL WriteField_u('pkfi',pk)
-    DO iq=1,nqtot
-      CALL WriteField_u('qfi'//trim(int2str(iq)),q(:,:,iq))
-    ENDDO
-#endif
-
-!     .......   Ajout   P.Le Van ( 17/04/96 )   ...........
-
-  !$OMP MASTER
+    CHARACTER(LEN = 15) :: ztit
+    TYPE(Request), SAVE :: Request_physic
+    !$OMP THREADPRIVATE(Request_physic )
+    INTEGER :: ijb, ije, l, iq
+
+    IF (CPPKEY_DEBUGIO) THEN
+      CALL WriteField_u('ucovfi', ucov)
+      CALL WriteField_v('vcovfi', vcov)
+      CALL WriteField_u('tetafi', teta)
+      CALL WriteField_u('pfi', p)
+      CALL WriteField_u('pkfi', pk)
+      DO iq = 1, nqtot
+        CALL WriteField_u('qfi' // trim(int2str(iq)), q(:, :, iq))
+      ENDDO
+    END IF
+
+    !     .......   Ajout   P.Le Van ( 17/04/96 )   ...........
+
+    !$OMP MASTER
     CALL suspend_timer(timer_caldyn)
     IF (prt_level >= 10) THEN
-      WRITE(lunout,*) 'leapfrog_p: Entree dans la physique : Iteration No ',itau
+      WRITE(lunout, *) 'leapfrog_p: Entree dans la physique : Iteration No ', itau
     ENDIF
-  !$OMP END MASTER
-   
-           jD_cur = jD_ref + day_ini - day_ref                           &
-          + (itau+1)/day_step
-
-           IF (planet_type =="generic") THEN
-              ! AS: we make jD_cur to be pday
-              jD_cur = int(day_ini + itau/day_step)
-           ENDIF
-
-           jH_cur = jH_ref + start_time +                                &
-                mod(itau+1,day_step)/float(day_step)
-    if (jH_cur > 1.0 ) then
-      jD_cur = jD_cur +1.
-      jH_cur = jH_cur -1.
+    !$OMP END MASTER
+
+    jD_cur = jD_ref + day_ini - day_ref + (itau + 1) / day_step
+
+    IF (planet_type =="generic") THEN
+      ! AS: we make jD_cur to be pday
+      jD_cur = int(day_ini + itau / day_step)
+    ENDIF
+
+    jH_cur = jH_ref + start_time + &
+            mod(itau + 1, day_step) / float(day_step)
+    if (jH_cur > 1.0) then
+      jD_cur = jD_cur + 1.
+      jH_cur = jH_cur - 1.
     endif
 
-!   Inbterface avec les routines de phylmd (phymars ... )
-!   -----------------------------------------------------
-
-!+jld
-
-!  Diagnostique de conservation de l'energie : initialisation
- 
-!-jld
-  !$OMP BARRIER
-  !$OMP MASTER
+    !   Inbterface avec les routines de phylmd (phymars ... )
+    !   -----------------------------------------------------
+
+    !+jld
+
+    !  Diagnostique de conservation de l'energie : initialisation
+
+    !-jld
+    !$OMP BARRIER
+    !$OMP MASTER
     CALL VTb(VThallo)
-  !$OMP END MASTER
-
-#ifdef DEBUG_IO    
-    CALL WriteField_u('ucovfi',ucov)
-    CALL WriteField_v('vcovfi',vcov)
-    CALL WriteField_u('tetafi',teta)
-    CALL WriteField_u('pfi',p)
-    CALL WriteField_u('pkfi',pk)
-#endif
-    
-    CALL SetTag(Request_physic,800)
-    CALL Register_SwapField_u(ucov_dyn,ucov,distrib_physic,Request_physic,up=2,down=2)
-    CALL Register_SwapField_v(vcov_dyn,vcov,distrib_physic,Request_physic,up=2,down=2)
-    CALL Register_SwapField_u(teta_dyn,teta,distrib_physic,Request_physic,up=2,down=2)
-    CALL Register_SwapField_u(masse_dyn,masse,distrib_physic,Request_physic,up=1,down=2)
-    CALL Register_SwapField_u(ps_dyn,ps,distrib_physic,Request_physic,up=2,down=2)
-    CALL Register_SwapField_u(phis_dyn,phis,distrib_physic,Request_physic,up=2,down=2)
-    CALL Register_SwapField_u(q_dyn,q,distrib_physic,Request_physic,up=2,down=2)
-    CALL Register_SwapField_u(flxw_dyn,flxw,distrib_physic,Request_physic,up=2,down=2)
- 
+    !$OMP END MASTER
+
+    IF (CPPKEY_DEBUGIO) THEN
+      CALL WriteField_u('ucovfi', ucov)
+      CALL WriteField_v('vcovfi', vcov)
+      CALL WriteField_u('tetafi', teta)
+      CALL WriteField_u('pfi', p)
+      CALL WriteField_u('pkfi', pk)
+    END IF
+
+    CALL SetTag(Request_physic, 800)
+    CALL Register_SwapField_u(ucov_dyn, ucov, distrib_physic, Request_physic, up = 2, down = 2)
+    CALL Register_SwapField_v(vcov_dyn, vcov, distrib_physic, Request_physic, up = 2, down = 2)
+    CALL Register_SwapField_u(teta_dyn, teta, distrib_physic, Request_physic, up = 2, down = 2)
+    CALL Register_SwapField_u(masse_dyn, masse, distrib_physic, Request_physic, up = 1, down = 2)
+    CALL Register_SwapField_u(ps_dyn, ps, distrib_physic, Request_physic, up = 2, down = 2)
+    CALL Register_SwapField_u(phis_dyn, phis, distrib_physic, Request_physic, up = 2, down = 2)
+    CALL Register_SwapField_u(q_dyn, q, distrib_physic, Request_physic, up = 2, down = 2)
+    CALL Register_SwapField_u(flxw_dyn, flxw, distrib_physic, Request_physic, up = 2, down = 2)
+
     CALL SendRequest(Request_Physic)
-  !$OMP BARRIER
-    CALL WaitRequest(Request_Physic)       
-
-  !$OMP BARRIER
-  !$OMP MASTER
+    !$OMP BARRIER
+    CALL WaitRequest(Request_Physic)
+
+    !$OMP BARRIER
+    !$OMP MASTER
     CALL Set_Distrib(distrib_Physic)
     CALL VTe(VThallo)
-        
+
     CALL VTb(VTphysiq)
-  !$OMP END MASTER
-  !$OMP BARRIER
-
-    CALL pression_loc (  ip1jmp1, ap, bp, ps,  p      )
-
-  !$OMP BARRIER
-    CALL exner_hyb_loc(  ip1jmp1, ps, p, pks, pk, pkf )
-  !$OMP BARRIER
-    CALL geopot_loc  ( ip1jmp1, teta  , pk , pks,  phis  , phi   )
-
-
-    CALL Register_Hallo_u(p,llmp1,2,2,2,2,Request_physic)
-    CALL Register_Hallo_u(pk,llm,2,2,2,2,Request_physic)
-    CALL Register_Hallo_u(phi,llm,2,2,2,2,Request_physic)
-        
+    !$OMP END MASTER
+    !$OMP BARRIER
+
+    CALL pression_loc (ip1jmp1, ap, bp, ps, p)
+
+    !$OMP BARRIER
+    CALL exner_hyb_loc(ip1jmp1, ps, p, pks, pk, pkf)
+    !$OMP BARRIER
+    CALL geopot_loc  (ip1jmp1, teta, pk, pks, phis, phi)
+
+    CALL Register_Hallo_u(p, llmp1, 2, 2, 2, 2, Request_physic)
+    CALL Register_Hallo_u(pk, llm, 2, 2, 2, 2, Request_physic)
+    CALL Register_Hallo_u(phi, llm, 2, 2, 2, 2, Request_physic)
+
     CALL SendRequest(Request_Physic)
-  !$OMP BARRIER
+    !$OMP BARRIER
     CALL WaitRequest(Request_Physic)
-             
-  !$OMP BARRIER
-  
-  
-#ifdef DEBUG_IO    
-    CALL WriteField_u('ucovfi',ucov)
-    CALL WriteField_v('vcovfi',vcov)
-    CALL WriteField_u('tetafi',teta)
-    CALL WriteField_u('pfi',p)
-    CALL WriteField_u('pkfi',pk)
-    DO iq=1,nqtot
-      CALL WriteField_u('qfi'//trim(int2str(iq)),q(:,:,iq))
-    ENDDO
-#endif
-
-  !$OMP BARRIER
+
+    !$OMP BARRIER
+
+    IF (CPPKEY_DEBUGIO) THEN
+      CALL WriteField_u('ucovfi', ucov)
+      CALL WriteField_v('vcovfi', vcov)
+      CALL WriteField_u('tetafi', teta)
+      CALL WriteField_u('pfi', p)
+      CALL WriteField_u('pkfi', pk)
+      DO iq = 1, nqtot
+        CALL WriteField_u('qfi' // trim(int2str(iq)), q(:, :, iq))
+      ENDDO
+    END IF
+
+    !$OMP BARRIER
 
     IF (CPPKEY_PHYS) THEN
-      CALL calfis_loc(lafin ,jD_cur, jH_cur,                       &
-                     ucov,vcov,teta,q,masse,ps,p,pk,phis,phi ,   &
-                     du,dv,dteta,dq,                             &
-                     flxw, dufi,dvfi,dtetafi,dqfi,dpfi  )
-    END IF
-    ijb=ij_begin
-    ije=ij_end  
-    IF ( .not. pole_nord) THEN
-  
-    !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
-      DO l=1,llm
-        dufi_tmp(1:iip1,l)   = dufi(ijb:ijb+iim,l) 
-        dvfi_tmp(1:iip1,l)   = dvfi(ijb:ijb+iim,l)  
-        dtetafi_tmp(1:iip1,l)= dtetafi(ijb:ijb+iim,l)  
-        dqfi_tmp(1:iip1,l,:) = dqfi(ijb:ijb+iim,l,:)  
-      ENDDO
-    !$OMP END DO NOWAIT
-
-    !$OMP MASTER
-      dpfi_tmp(1:iip1)     = dpfi(ijb:ijb+iim)  
-    !$OMP END MASTER
-    
+      CALL calfis_loc(lafin, jD_cur, jH_cur, &
+              ucov, vcov, teta, q, masse, ps, p, pk, phis, phi, &
+              du, dv, dteta, dq, &
+              flxw, dufi, dvfi, dtetafi, dqfi, dpfi)
+    END IF
+    ijb = ij_begin
+    ije = ij_end
+    IF (.not. pole_nord) THEN
+
+      !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+      DO l = 1, llm
+        dufi_tmp(1:iip1, l) = dufi(ijb:ijb + iim, l)
+        dvfi_tmp(1:iip1, l) = dvfi(ijb:ijb + iim, l)
+        dtetafi_tmp(1:iip1, l) = dtetafi(ijb:ijb + iim, l)
+        dqfi_tmp(1:iip1, l, :) = dqfi(ijb:ijb + iim, l, :)
+      ENDDO
+      !$OMP END DO NOWAIT
+
+      !$OMP MASTER
+      dpfi_tmp(1:iip1) = dpfi(ijb:ijb + iim)
+      !$OMP END MASTER
+
     ENDIF ! of if ( .not. pole_nord)
 
-  !$OMP BARRIER
-  !$OMP MASTER
+    !$OMP BARRIER
+    !$OMP MASTER
     CALL Set_Distrib(distrib_Physic_bis)
     CALL VTb(VThallo)
-  !$OMP END MASTER
-  !$OMP BARRIER
- 
-    CALL Register_Hallo_u(dufi,llm,1,0,0,1,Request_physic)
-    CALL Register_Hallo_v(dvfi,llm,1,0,0,1,Request_physic)
-    CALL Register_Hallo_u(dtetafi,llm,1,0,0,1,Request_physic)
-    CALL Register_Hallo_u(dpfi,1,1,0,0,1,Request_physic)
-
-    DO iq=1,nqtot
-      CALL Register_Hallo_u(dqfi(:,:,iq),llm,1,0,0,1,Request_physic)
+    !$OMP END MASTER
+    !$OMP BARRIER
+
+    CALL Register_Hallo_u(dufi, llm, 1, 0, 0, 1, Request_physic)
+    CALL Register_Hallo_v(dvfi, llm, 1, 0, 0, 1, Request_physic)
+    CALL Register_Hallo_u(dtetafi, llm, 1, 0, 0, 1, Request_physic)
+    CALL Register_Hallo_u(dpfi, 1, 1, 0, 0, 1, Request_physic)
+
+    DO iq = 1, nqtot
+      CALL Register_Hallo_u(dqfi(:, :, iq), llm, 1, 0, 0, 1, Request_physic)
     ENDDO
-        
+
     CALL SendRequest(Request_Physic)
-  !$OMP BARRIER
+    !$OMP BARRIER
     CALL WaitRequest(Request_Physic)
-             
-  !$OMP BARRIER
-  !$OMP MASTER
+
+    !$OMP BARRIER
+    !$OMP MASTER
     CALL VTe(VThallo)
     CALL Set_Distrib(distrib_Physic)
-  !$OMP END MASTER
-  !$OMP BARRIER        
-    ijb=ij_begin
+    !$OMP END MASTER
+    !$OMP BARRIER
+    ijb = ij_begin
     IF (.not. pole_nord) THEN
-        
-    !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
-      DO l=1,llm
-        dufi(ijb:ijb+iim,l) = dufi(ijb:ijb+iim,l)+dufi_tmp(1:iip1,l)
-        dvfi(ijb:ijb+iim,l) = dvfi(ijb:ijb+iim,l)+dvfi_tmp(1:iip1,l) 
-        dtetafi(ijb:ijb+iim,l) = dtetafi(ijb:ijb+iim,l)+dtetafi_tmp(1:iip1,l)
-        dqfi(ijb:ijb+iim,l,:) = dqfi(ijb:ijb+iim,l,:) + dqfi_tmp(1:iip1,l,:)
-      ENDDO
-    !$OMP END DO NOWAIT
-
-    !$OMP MASTER
-      dpfi(ijb:ijb+iim)   = dpfi(ijb:ijb+iim)+ dpfi_tmp(1:iip1)
-    !$OMP END MASTER
-          
+
+      !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+      DO l = 1, llm
+        dufi(ijb:ijb + iim, l) = dufi(ijb:ijb + iim, l) + dufi_tmp(1:iip1, l)
+        dvfi(ijb:ijb + iim, l) = dvfi(ijb:ijb + iim, l) + dvfi_tmp(1:iip1, l)
+        dtetafi(ijb:ijb + iim, l) = dtetafi(ijb:ijb + iim, l) + dtetafi_tmp(1:iip1, l)
+        dqfi(ijb:ijb + iim, l, :) = dqfi(ijb:ijb + iim, l, :) + dqfi_tmp(1:iip1, l, :)
+      ENDDO
+      !$OMP END DO NOWAIT
+
+      !$OMP MASTER
+      dpfi(ijb:ijb + iim) = dpfi(ijb:ijb + iim) + dpfi_tmp(1:iip1)
+      !$OMP END MASTER
+
     endif ! of if (.not. pole_nord)
-        
-        
-#ifdef DEBUG_IO           
-    CALL WriteField_u('dufi',dufi)
-    CALL WriteField_v('dvfi',dvfi) 
-    CALL WriteField_u('dtetafi',dtetafi)
-    CALL WriteField_u('dpfi',dpfi)
-    DO iq=1,nqtot
-      CALL WriteField_u('dqfi'//trim(int2str(iq)),dqfi(:,:,iq))
-    ENDDO
-#endif
-
-  !$OMP BARRIER
-
-!      ajout des tendances physiques:
-!      ------------------------------
-#ifdef DEBUG_IO    
-    CALL WriteField_u('ucovfi',ucov)
-    CALL WriteField_v('vcovfi',vcov)
-    CALL WriteField_u('tetafi',teta)
-    CALL WriteField_u('psfi',ps)
-    DO iq=1,nqtot
-      CALL WriteField_u('qfi'//trim(int2str(iq)),q(:,:,iq))
-    ENDDO
-#endif
-
-#ifdef DEBUG_IO           
-    CALL WriteField_u('ucovfi',ucov)
-    CALL WriteField_v('vcovfi',vcov)
-    CALL WriteField_u('tetafi',teta)
-    CALL WriteField_u('psfi',ps)
-    DO iq=1,nqtot
-      CALL WriteField_u('qfi'//trim(int2str(iq)),q(:,:,iq))
-    ENDDO
-#endif
-
-    CALL addfi_loc( dtphys, leapf, forward   ,              &
-                    ucov, vcov, teta , q   ,ps ,            &
-                    dufi, dvfi, dtetafi , dqfi ,dpfi  )
+
+    IF (CPPKEY_DEBUGIO) THEN
+      CALL WriteField_u('dufi', dufi)
+      CALL WriteField_v('dvfi', dvfi)
+      CALL WriteField_u('dtetafi', dtetafi)
+      CALL WriteField_u('dpfi', dpfi)
+      DO iq = 1, nqtot
+        CALL WriteField_u('dqfi' // trim(int2str(iq)), dqfi(:, :, iq))
+      ENDDO
+    END IF
+
+    !$OMP BARRIER
+
+    !      ajout des tendances physiques:
+    !      ------------------------------
+    IF (CPPKEY_DEBUGIO) THEN
+      CALL WriteField_u('ucovfi', ucov)
+      CALL WriteField_v('vcovfi', vcov)
+      CALL WriteField_u('tetafi', teta)
+      CALL WriteField_u('psfi', ps)
+      DO iq = 1, nqtot
+        CALL WriteField_u('qfi' // trim(int2str(iq)), q(:, :, iq))
+      ENDDO
+    END IF
+
+    IF (CPPKEY_DEBUGIO) THEN
+      CALL WriteField_u('ucovfi', ucov)
+      CALL WriteField_v('vcovfi', vcov)
+      CALL WriteField_u('tetafi', teta)
+      CALL WriteField_u('psfi', ps)
+      DO iq = 1, nqtot
+        CALL WriteField_u('qfi' // trim(int2str(iq)), q(:, :, iq))
+      ENDDO
+    END IF
+
+    CALL addfi_loc(dtphys, leapf, forward, &
+            ucov, vcov, teta, q, ps, &
+            dufi, dvfi, dtetafi, dqfi, dpfi)
     ! since addfi updates ps(), also update p(), masse() and pk()
-    CALL pression_loc(ip1jmp1,ap,bp,ps,p)
-!$OMP BARRIER
-    CALL massdair_loc(p,masse)
-!$OMP BARRIER
+    CALL pression_loc(ip1jmp1, ap, bp, ps, p)
+    !$OMP BARRIER
+    CALL massdair_loc(p, masse)
+    !$OMP BARRIER
     if (pressure_exner) then
-      CALL exner_hyb_loc(ijnb_u,ps,p,pks,pk,pkf)
-    else 
-      CALL exner_milieu_loc(ijnb_u,ps,p,pks,pk,pkf)
+      CALL exner_hyb_loc(ijnb_u, ps, p, pks, pk, pkf)
+    else
+      CALL exner_milieu_loc(ijnb_u, ps, p, pks, pk, pkf)
     endif
-!$OMP BARRIER
-
-#ifdef DEBUG_IO    
-    CALL WriteField_u('ucovfi',ucov)
-    CALL WriteField_v('vcovfi',vcov)
-    CALL WriteField_u('tetafi',teta)
-    CALL WriteField_u('psfi',ps)
-    DO iq=1,nqtot
-      CALL WriteField_u('qfi'//trim(int2str(iq)),q(:,:,iq))
-    ENDDO
-#endif
+    !$OMP BARRIER
+
+    IF (CPPKEY_DEBUGIO) THEN
+      CALL WriteField_u('ucovfi', ucov)
+      CALL WriteField_v('vcovfi', vcov)
+      CALL WriteField_u('tetafi', teta)
+      CALL WriteField_u('psfi', ps)
+      DO iq = 1, nqtot
+        CALL WriteField_u('qfi' // trim(int2str(iq)), q(:, :, iq))
+      ENDDO
+    END IF
 
     IF (ok_strato) THEN
-!      CALL top_bound_loc( vcov,ucov,teta,masse,dufi,dvfi,dtetafi)
-      CALL top_bound_loc(vcov,ucov,teta,masse,dtphys)
+      !      CALL top_bound_loc( vcov,ucov,teta,masse,dufi,dvfi,dtetafi)
+      CALL top_bound_loc(vcov, ucov, teta, masse, dtphys)
     ENDIF
 
-  !$OMP BARRIER
-  !$OMP MASTER
+    !$OMP BARRIER
+    !$OMP MASTER
     CALL VTe(VTphysiq)
     CALL VTb(VThallo)
-  !$OMP END MASTER
-
-    CALL SetTag(Request_physic,800)
-    CALL Register_SwapField_u(ucov,ucov_dyn,distrib_caldyn,Request_physic)
-    CALL Register_SwapField_v(vcov,vcov_dyn,distrib_caldyn,Request_physic)
-    CALL Register_SwapField_u(teta,teta_dyn,distrib_caldyn,Request_physic)
-    CALL Register_SwapField_u(masse,masse_dyn,distrib_caldyn,Request_physic)
-    CALL Register_SwapField_u(ps,ps_dyn,distrib_caldyn,Request_physic)
-    CALL Register_SwapField_u(q,q_dyn,distrib_caldyn,Request_physic)
+    !$OMP END MASTER
+
+    CALL SetTag(Request_physic, 800)
+    CALL Register_SwapField_u(ucov, ucov_dyn, distrib_caldyn, Request_physic)
+    CALL Register_SwapField_v(vcov, vcov_dyn, distrib_caldyn, Request_physic)
+    CALL Register_SwapField_u(teta, teta_dyn, distrib_caldyn, Request_physic)
+    CALL Register_SwapField_u(masse, masse_dyn, distrib_caldyn, Request_physic)
+    CALL Register_SwapField_u(ps, ps_dyn, distrib_caldyn, Request_physic)
+    CALL Register_SwapField_u(q, q_dyn, distrib_caldyn, Request_physic)
     CALL SendRequest(Request_Physic)
-  !$OMP BARRIER
-    CALL WaitRequest(Request_Physic)     
-
-  !$OMP BARRIER
-  !$OMP MASTER
+    !$OMP BARRIER
+    CALL WaitRequest(Request_Physic)
+
+    !$OMP BARRIER
+    !$OMP MASTER
     CALL VTe(VThallo)
     CALL set_distrib(distrib_caldyn)
-  !$OMP END MASTER
-  !$OMP BARRIER
-
-!  Diagnostique de conservation de l'energie : difference
-    IF (ip_ebil_dyn>=1 ) THEN
-      ztit='bil phys'
-!      CALL diagedyn(ztit,2,1,1,dtphys,ucov, vcov , ps, p ,pk , teta , q(:,:,1), q(:,:,2))
-      write(lunout,*)"call_calfis: diagedyn disabled in dyn3dmem !!"
-    ENDIF 
-
-#ifdef DEBUG_IO    
-    CALL WriteField_u('ucovfi',ucov_dyn)
-    CALL WriteField_v('vcovfi',vcov_dyn)
-    CALL WriteField_u('tetafi',teta_dyn)
-    CALL WriteField_u('psfi',ps_dyn)
-    DO iq=1,nqtot
-      CALL WriteField_u('qfi'//trim(int2str(iq)),q_dyn(:,:,iq))
-    ENDDO
-#endif
-
-
-!-jld
-    !$OMP MASTER
-      CALL resume_timer(timer_caldyn)
+    !$OMP END MASTER
+    !$OMP BARRIER
+
+    !  Diagnostique de conservation de l'energie : difference
+    IF (ip_ebil_dyn>=1) THEN
+      ztit = 'bil phys'
+      !      CALL diagedyn(ztit,2,1,1,dtphys,ucov, vcov , ps, p ,pk , teta , q(:,:,1), q(:,:,2))
+      write(lunout, *)"call_calfis: diagedyn disabled in dyn3dmem !!"
+    ENDIF
+
+    IF (CPPKEY_DEBUGIO) THEN
+      CALL WriteField_u('ucovfi', ucov_dyn)
+      CALL WriteField_v('vcovfi', vcov_dyn)
+      CALL WriteField_u('tetafi', teta_dyn)
+      CALL WriteField_u('psfi', ps_dyn)
+      DO iq = 1, nqtot
+        CALL WriteField_u('qfi' // trim(int2str(iq)), q_dyn(:, :, iq))
+      ENDDO
+    END IF
+
+
+    !-jld
+    !$OMP MASTER
+    CALL resume_timer(timer_caldyn)
     !$OMP END MASTER
 
   END SUBROUTINE call_calfis
-  
+
 END MODULE lmdz_call_calfis
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/logic_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/logic_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/logic_mod.F90	(revision 5101)
@@ -44,5 +44,5 @@
 !WARNING: when adding a threadprivate variable in this module
 !        do not forget to add it to the copyin clause when opening an OpenMP
-!        parallel section. e.g. in gcm before call leapfrog_loc 
+!        parallel section. e.g. in gcm before CALL leapfrog_loc
 
 END MODULE logic_mod
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/mod_const_mpi.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/mod_const_mpi.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/mod_const_mpi.F90	(revision 5101)
@@ -82,5 +82,5 @@
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
       IF (using_xios) THEN
-        WRITE(*,*)'IN Init_mpi call wxios_init'
+        WRITE(*,*)'IN Init_mpi CALL wxios_init'
         CALL wxios_init("LMDZ", outcom=COMM_LMDZ)
       ENDIF
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/mod_filtreg_p.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/mod_filtreg_p.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/mod_filtreg_p.F	(revision 5101)
@@ -5,5 +5,5 @@
       SUBROUTINE filtreg_p ( champ,jjb,jje, ibeg, iend, nlat, nbniv, 
      &     ifiltre, iaire, griscal ,iter)
-      USE parallel_lmdz, only : OMP_CHUNK
+      USE parallel_lmdz, ONLY: OMP_CHUNK
       USE mod_filtre_fft_loc, ONLY: use_filtre_fft, filtre_u_fft,
      &                              filtre_v_fft, filtre_inv_fft
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/mod_hallo.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/mod_hallo.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/mod_hallo.F90	(revision 5101)
@@ -226,5 +226,5 @@
       Ptr_Request=>a_request%RequestSend(target)
 
-      call New_Hallo(Field,ij,ll,offset,size,Ptr_request)
+      CALL New_Hallo(Field,ij,ll,offset,size,Ptr_request)
       
    end subroutine Register_SendField      
@@ -242,5 +242,5 @@
       Ptr_Request=>a_request%RequestRecv(target)
             
-      call New_Hallo(Field,ij,ll,offset,size,Ptr_request)
+      CALL New_Hallo(Field,ij,ll,offset,size,Ptr_request)
 
       
@@ -276,5 +276,5 @@
         
         if (jje >= jjb) then
-          call Register_SendField(FieldS,ij,ll,jjb,jje-jjb+1,i,a_request) 
+          CALL Register_SendField(FieldS,ij,ll,jjb,jje-jjb+1,i,a_request)
         endif
         
@@ -285,5 +285,5 @@
         
         if (jje >= jjb) then
-          call Register_RecvField(FieldR,ij,ll,jjb,jje-jjb+1,i,a_request) 
+          CALL Register_RecvField(FieldR,ij,ll,jjb,jje-jjb+1,i,a_request)
         endif
         
@@ -329,5 +329,5 @@
         
         if (jje >= jjb) then
-          call Register_SendField(FieldS,ij,ll,jjb,jje-jjb+1,i,a_request) 
+          CALL Register_SendField(FieldS,ij,ll,jjb,jje-jjb+1,i,a_request)
         endif
         
@@ -338,5 +338,5 @@
         
         if (jje >= jjb) then
-          call Register_RecvField(FieldR,ij,ll,jjb,jje-jjb+1,i,a_request) 
+          CALL Register_RecvField(FieldR,ij,ll,jjb,jje-jjb+1,i,a_request)
         endif
         
@@ -1193,18 +1193,18 @@
       
       IF (SendUp) THEN
-        call Register_SendField(Field,ij,ll,jj_begin,SUp,MPI_Rank-1,a_request)
+        CALL Register_SendField(Field,ij,ll,jj_begin,SUp,MPI_Rank-1,a_request)
       ENDIF
   
       IF (SendDown) THEN
-        call Register_SendField(Field,ij,ll,jj_end-SDown+1,SDown,MPI_Rank+1,a_request)
+        CALL Register_SendField(Field,ij,ll,jj_end-SDown+1,SDown,MPI_Rank+1,a_request)
       ENDIF
     
   
       IF (RecvUp) THEN
-        call Register_RecvField(Field,ij,ll,jj_begin-Rup,RUp,MPI_Rank-1,a_request)
+        CALL Register_RecvField(Field,ij,ll,jj_begin-Rup,RUp,MPI_Rank-1,a_request)
       ENDIF
   
       IF (RecvDown) THEN
-        call Register_RecvField(Field,ij,ll,jj_end+1,RDown,MPI_Rank+1,a_request)
+        CALL Register_RecvField(Field,ij,ll,jj_end+1,RDown,MPI_Rank+1,a_request)
       ENDIF
   
@@ -1257,18 +1257,18 @@
       
       IF (SendUp) THEN
-        call Register_SendField(Field,ijnb_u,ll,jj_begin-jjb_u+1,SUp,MPI_Rank-1,a_request)
+        CALL Register_SendField(Field,ijnb_u,ll,jj_begin-jjb_u+1,SUp,MPI_Rank-1,a_request)
       ENDIF
   
       IF (SendDown) THEN
-        call Register_SendField(Field,ijnb_u,ll,jj_end-SDown+1-jjb_u+1,SDown,MPI_Rank+1,a_request)
+        CALL Register_SendField(Field,ijnb_u,ll,jj_end-SDown+1-jjb_u+1,SDown,MPI_Rank+1,a_request)
       ENDIF
     
   
       IF (RecvUp) THEN
-        call Register_RecvField(Field,ijnb_u,ll,jj_begin-Rup-jjb_u+1,RUp,MPI_Rank-1,a_request)
+        CALL Register_RecvField(Field,ijnb_u,ll,jj_begin-Rup-jjb_u+1,RUp,MPI_Rank-1,a_request)
       ENDIF
   
       IF (RecvDown) THEN
-        call Register_RecvField(Field,ijnb_u,ll,jj_end+1-jjb_u+1,RDown,MPI_Rank+1,a_request)
+        CALL Register_RecvField(Field,ijnb_u,ll,jj_end+1-jjb_u+1,RDown,MPI_Rank+1,a_request)
       ENDIF
   
@@ -1320,18 +1320,18 @@
       
       IF (SendUp) THEN
-        call Register_SendField(Field,ijnb_v,ll,jj_begin-jjb_v+1,SUp,MPI_Rank-1,a_request)
+        CALL Register_SendField(Field,ijnb_v,ll,jj_begin-jjb_v+1,SUp,MPI_Rank-1,a_request)
       ENDIF
   
       IF (SendDown) THEN
-        call Register_SendField(Field,ijnb_v,ll,jj_end-SDown+1-jjb_v+1,SDown,MPI_Rank+1,a_request)
+        CALL Register_SendField(Field,ijnb_v,ll,jj_end-SDown+1-jjb_v+1,SDown,MPI_Rank+1,a_request)
       ENDIF
     
   
       IF (RecvUp) THEN
-        call Register_RecvField(Field,ijnb_v,ll,jj_begin-Rup-jjb_v+1,RUp,MPI_Rank-1,a_request)
+        CALL Register_RecvField(Field,ijnb_v,ll,jj_begin-Rup-jjb_v+1,RUp,MPI_Rank-1,a_request)
       ENDIF
   
       IF (RecvDown) THEN
-        call Register_RecvField(Field,ijnb_v,ll,jj_end+1-jjb_v+1,RDown,MPI_Rank+1,a_request)
+        CALL Register_RecvField(Field,ijnb_v,ll,jj_end+1-jjb_v+1,RDown,MPI_Rank+1,a_request)
       ENDIF
   
@@ -1369,5 +1369,5 @@
          if (Req%NbRequest>0) then
        
-          call allocate_buffer(SizeBuffer,Req%Index,Req%pos)
+          CALL allocate_buffer(SizeBuffer,Req%Index,Req%pos)
 
           Pos=Req%Pos
@@ -1393,5 +1393,5 @@
 !$OMP CRITICAL (MPI)
          
-         call MPI_ISEND(Buffer(req%Pos),SizeBuffer,MPI_REAL_LMDZ,rank,a_request%tag+1000*omp_rank,     &
+         CALL MPI_ISEND(Buffer(req%Pos),SizeBuffer,MPI_REAL_LMDZ,rank,a_request%tag+1000*omp_rank,     &
                          COMM_LMDZ,Req%MSG_Request,ierr)
          IF (.NOT.using_mpi) THEN
@@ -1428,5 +1428,5 @@
           
           if (Req%NbRequest>0) then
-          call allocate_buffer(SizeBuffer,Req%Index,Req%Pos)
+          CALL allocate_buffer(SizeBuffer,Req%Index,Req%Pos)
    
           if (SizeBuffer>0) then
@@ -1434,5 +1434,5 @@
 !$OMP CRITICAL (MPI)
 
-             call MPI_IRECV(Buffer(Req%Pos),SizeBuffer,MPI_REAL_LMDZ,rank,a_request%tag+1000*omp_rank,     &
+             CALL MPI_IRECV(Buffer(Req%Pos),SizeBuffer,MPI_REAL_LMDZ,rank,a_request%tag+1000*omp_rank,     &
                            COMM_LMDZ,Req%MSG_Request,ierr)
 
@@ -1494,5 +1494,5 @@
 !        PRINT *,"Process de rang",mpi_rank,"Task : ",omp_rank,"--->",NbRequest,"en attente"
 !        PRINT *,"No des requetes :",TabRequest(1:NbRequest)
-        call MPI_WAITALL(NbRequest,TabRequest,TabStatus,ierr)
+        CALL MPI_WAITALL(NbRequest,TabRequest,TabStatus,ierr)
 !        PRINT *,"Process de rang",mpi_rank,"Task : ",omp_rank,"--->",NbRequest,"complete"
 !        PRINT *,"-------------------------------------------------------------------"
@@ -1525,5 +1525,5 @@
         Req=>a_request%RequestSend(rank)
         if (Req%NbRequest>0) then
-          call deallocate_buffer(Req%Index)
+          CALL deallocate_buffer(Req%Index)
           Req%NbRequest=0 
         endif
@@ -1533,5 +1533,5 @@
         Req=>a_request%RequestRecv(rank)
         if (Req%NbRequest>0) then
-          call deallocate_buffer(Req%Index)
+          CALL deallocate_buffer(Req%Index)
           Req%NbRequest=0 
         endif
@@ -1571,5 +1571,5 @@
 !        PRINT *,"Process de rang",mpi_rank,"Task : ",omp_rank,"--->",NbRequest,"en attente"
 !        PRINT *,"No des requetes :",TabRequest(1:NbRequest)
-         call MPI_WAITALL(NbRequest,TabRequest,TabStatus,ierr)
+         CALL MPI_WAITALL(NbRequest,TabRequest,TabStatus,ierr)
 !        PRINT *,"Process de rang",mpi_rank,"Task : ",omp_rank,"--->",NbRequest,"complete"
 !        PRINT *,"-------------------------------------------------------------------"
@@ -1581,5 +1581,5 @@
         Req=>a_request%RequestSend(rank)
         if (Req%NbRequest>0) then
-          call deallocate_buffer(Req%Index)
+          CALL deallocate_buffer(Req%Index)
           Req%NbRequest=0 
         endif
@@ -1619,5 +1619,5 @@
 !        PRINT *,"Process de rang",mpi_rank,"Task : ",omp_rank,"--->",NbRequest,"en attente"
 !        PRINT *,"No des requetes :",TabRequest(1:NbRequest)
-         call MPI_WAITALL(NbRequest,TabRequest,TabStatus,ierr)
+         CALL MPI_WAITALL(NbRequest,TabRequest,TabStatus,ierr)
 !        PRINT *,"Process de rang",mpi_rank,"Task : ",omp_rank,"--->",NbRequest,"complete"
 !        PRINT *,"-------------------------------------------------------------------"
@@ -1650,5 +1650,5 @@
         Req=>a_request%RequestRecv(rank)
         if (Req%NbRequest>0) then
-          call deallocate_buffer(Req%Index)
+          CALL deallocate_buffer(Req%Index)
           Req%NbRequest=0 
         endif
@@ -1753,8 +1753,8 @@
      ENDDO
      
-     call register_SwapField(field_glo,field_glo,ip1jmp1,ll,distrib_gather%jj_nb_para,request_gather)
-     call SendRequest(request_gather)
+     CALL register_SwapField(field_glo,field_glo,ip1jmp1,ll,distrib_gather%jj_nb_para,request_gather)
+     CALL SendRequest(request_gather)
 !$OMP BARRIER
-     call WaitRequest(request_gather)       
+     CALL WaitRequest(request_gather)
 !$OMP BARRIER
 
@@ -1781,8 +1781,8 @@
      ENDDO
      
-     call register_SwapField(field_glo,field_glo,ip1jm,ll,distrib_gather%jj_nb_para,request_gather)
-     call SendRequest(request_gather)
+     CALL register_SwapField(field_glo,field_glo,ip1jm,ll,distrib_gather%jj_nb_para,request_gather)
+     CALL SendRequest(request_gather)
 !$OMP BARRIER
-     call WaitRequest(request_gather)       
+     CALL WaitRequest(request_gather)
 !$OMP BARRIER
 
@@ -1801,16 +1801,16 @@
 !$OMP BARRIER
 !$OMP MASTER     
-     call get_current_distrib(distrib_swap)
-     call set_Distrib(distrib_gather)
+     CALL get_current_distrib(distrib_swap)
+     CALL set_Distrib(distrib_gather)
 !$OMP END MASTER
 !$OMP BARRIER
  
-     call register_SwapField(field_glo,field_glo,ip1jmp1,ll,distrib_swap%jj_nb_para,request_gather)
-     call SendRequest(request_gather)
+     CALL register_SwapField(field_glo,field_glo,ip1jmp1,ll,distrib_swap%jj_nb_para,request_gather)
+     CALL SendRequest(request_gather)
 !$OMP BARRIER
-     call WaitRequest(request_gather)       
+     CALL WaitRequest(request_gather)
 !$OMP BARRIER
 !$OMP MASTER     
-     call set_Distrib(distrib_swap)
+     CALL set_Distrib(distrib_swap)
 !$OMP END MASTER
 !$OMP BARRIER
@@ -1836,15 +1836,15 @@
 !$OMP BARRIER
 !$OMP MASTER     
-     call get_current_distrib(distrib_swap)
-     call set_Distrib(distrib_gather)
+     CALL get_current_distrib(distrib_swap)
+     CALL set_Distrib(distrib_gather)
 !$OMP END MASTER
 !$OMP BARRIER
-     call register_SwapField(field_glo,field_glo,ip1jm,ll,distrib_swap%jj_nb_para,request_gather)
-     call SendRequest(request_gather)
+     CALL register_SwapField(field_glo,field_glo,ip1jm,ll,distrib_swap%jj_nb_para,request_gather)
+     CALL SendRequest(request_gather)
 !$OMP BARRIER
-     call WaitRequest(request_gather)       
+     CALL WaitRequest(request_gather)
 !$OMP BARRIER
 !$OMP MASTER
-     call set_Distrib(distrib_swap)
+     CALL set_Distrib(distrib_swap)
 !$OMP END MASTER
 !$OMP BARRIER
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/mod_xios_dyn3dmem.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/mod_xios_dyn3dmem.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/mod_xios_dyn3dmem.F90	(revision 5101)
@@ -15,5 +15,5 @@
 
      USE lmdz_xios
-     USE wxios, ONLY : g_comm
+     USE wxios, ONLY: g_comm
      CHARACTER(len=100), SAVE :: dyn3d_ctx_name = "LMDZDYN"
      TYPE(xios_context), SAVE :: dyn3d_ctx_handle
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/nxgraro2_loc.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/nxgraro2_loc.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/nxgraro2_loc.F	(revision 5101)
@@ -58,8 +58,8 @@
 
 c$OMP BARRIER
-       call Register_Hallo_u(grx,llm,0,1,1,0,Request_dissip)
-       call SendRequest(Request_dissip)
+       CALL Register_Hallo_u(grx,llm,0,1,1,0,Request_dissip)
+       CALL SendRequest(Request_dissip)
 c$OMP BARRIER
-       call WaitRequest(Request_dissip)
+       CALL WaitRequest(Request_dissip)
 c$OMP BARRIER
 
@@ -76,15 +76,15 @@
 c
       CALL     rotatf_loc ( klevel, grx, gry, rot )
-c      call write_field3d_p('rot1',reshape(rot,(/iip1,jjm,llm/)))
+c      CALL write_field3d_p('rot1',reshape(rot,(/iip1,jjm,llm/)))
 
 c$OMP BARRIER
-       call Register_Hallo_v(rot,llm,1,1,1,1,Request_dissip)
-       call SendRequest(Request_dissip)
+       CALL Register_Hallo_v(rot,llm,1,1,1,1,Request_dissip)
+       CALL SendRequest(Request_dissip)
 c$OMP BARRIER
-       call WaitRequest(Request_dissip)
+       CALL WaitRequest(Request_dissip)
 c$OMP BARRIER
       
       CALL laplacien_rot_loc ( klevel, rot, rot,grx,gry      )
-c       call write_field3d_p('rot2',reshape(rot,(/iip1,jjm,llm/)))
+c       CALL write_field3d_p('rot2',reshape(rot,(/iip1,jjm,llm/)))
 c
 c    .....   Iteration de l'operateur laplacien_rotgam  .....
@@ -92,8 +92,8 @@
       DO  iter = 1, lr -2
 c$OMP BARRIER
-       call Register_Hallo_v(rot,llm,1,1,1,1,Request_dissip)
-       call SendRequest(Request_dissip)
+       CALL Register_Hallo_v(rot,llm,1,1,1,1,Request_dissip)
+       CALL SendRequest(Request_dissip)
 c$OMP BARRIER
-       call WaitRequest(Request_dissip)
+       CALL WaitRequest(Request_dissip)
 c$OMP BARRIER
 
@@ -101,5 +101,5 @@
       ENDDO
       
-c       call write_field3d_p('rot3',reshape(rot,(/iip1,jjm,llm/)))
+c       CALL write_field3d_p('rot3',reshape(rot,(/iip1,jjm,llm/)))
       
 c
@@ -112,8 +112,8 @@
      &                klevel, 2,1, .FALSE.,1)
 c$OMP BARRIER
-       call Register_Hallo_v(rot,llm,1,0,0,1,Request_dissip)
-       call SendRequest(Request_dissip)
+       CALL Register_Hallo_v(rot,llm,1,0,0,1,Request_dissip)
+       CALL SendRequest(Request_dissip)
 c$OMP BARRIER
-       call WaitRequest(Request_dissip)
+       CALL WaitRequest(Request_dissip)
 c$OMP BARRIER
 
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/parallel_lmdz.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/parallel_lmdz.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/parallel_lmdz.F90	(revision 5101)
@@ -4,5 +4,5 @@
   MODULE parallel_lmdz
   USE mod_const_mpi
-  USE lmdz_mpi, ONLY : using_mpi
+  USE lmdz_mpi, ONLY: using_mpi
 #ifdef CPP_IOIPSL
       use IOIPSL
@@ -115,9 +115,9 @@
 #endif
       
-      call InitVampir
+      CALL InitVampir
       
       IF (using_mpi) THEN
-        call MPI_COMM_SIZE(COMM_LMDZ,mpi_size,ierr)
-        call MPI_COMM_RANK(COMM_LMDZ,mpi_rank,ierr)
+        CALL MPI_COMM_SIZE(COMM_LMDZ,mpi_size,ierr)
+        CALL MPI_COMM_RANK(COMM_LMDZ,mpi_rank,ierr)
       ELSE
         mpi_size=1
@@ -150,5 +150,5 @@
          write(lunout,*)" ---> diminuez le nombre de CPU ou augmentez la taille en lattitude"
           
-          IF (using_mpi) call MPI_ABORT(COMM_LMDZ,-1, ierr)
+          IF (using_mpi) CALL MPI_ABORT(COMM_LMDZ,-1, ierr)
 
         endif
@@ -395,5 +395,5 @@
 #endif
 ! Ehouarn: surface_data module is in 'phylmd' ...
-      use surface_data, only : type_ocean
+      use surface_data, ONLY: type_ocean
       implicit none
 #else
@@ -423,11 +423,11 @@
           ENDIF
         ELSE
-           call prism_terminate_proto(ierr)
+           CALL prism_terminate_proto(ierr)
            IF (ierr .ne. PRISM_Ok) THEN
-              call abort_gcm('Finalize_parallel',' Probleme dans prism_terminate_proto ',1)
+              CALL abort_gcm('Finalize_parallel',' Probleme dans prism_terminate_proto ',1)
            endif
         ENDIF
 #else
-        call abort_gcm('Finalize_parallel','type_ocean = couple but CPP_COUPLE not defined',1)
+        CALL abort_gcm('Finalize_parallel','type_ocean = couple but CPP_COUPLE not defined',1)
 #endif 
       else
@@ -436,5 +436,5 @@
           CALL wxios_close()
         ENDIF
-        IF (using_mpi) call MPI_FINALIZE(ierr)
+        IF (using_mpi) CALL MPI_FINALIZE(ierr)
       end if
       
@@ -526,5 +526,5 @@
         CALL barrier
       
-        call VTb(VThallo)
+        CALL VTb(VThallo)
       
         SendUp=.TRUE.
@@ -559,7 +559,7 @@
           buffer_size=down*iip1*ll
           allocate(Buffer_Send_up(Buffer_size))
-          call PACK_Data(Field(ij_begin,1),ij,ll,down,Buffer_Send_up)
+          CALL PACK_Data(Field(ij_begin,1),ij,ll,down,Buffer_Send_up)
 !$OMP CRITICAL (MPI)
-          call MPI_ISEND(Buffer_send_up,Buffer_Size,MPI_REAL8,MPI_Rank-1,1,     &
+          CALL MPI_ISEND(Buffer_send_up,Buffer_Size,MPI_REAL8,MPI_Rank-1,1,     &
                           COMM_LMDZ,Request(NbRequest),ierr)
 !$OMP END CRITICAL (MPI)
@@ -571,8 +571,8 @@
           buffer_size=up*iip1*ll
           allocate(Buffer_Send_down(Buffer_size))
-          call PACK_Data(Field(ij_end+1-up*iip1,1),ij,ll,up,Buffer_send_down)
+          CALL PACK_Data(Field(ij_end+1-up*iip1,1),ij,ll,up,Buffer_send_down)
         
 !$OMP CRITICAL (MPI)
-          call MPI_ISEND(Buffer_send_down,Buffer_Size,MPI_REAL8,MPI_Rank+1,1,     &
+          CALL MPI_ISEND(Buffer_send_down,Buffer_Size,MPI_REAL8,MPI_Rank+1,1,     &
                           COMM_LMDZ,Request(NbRequest),ierr)
 !$OMP END CRITICAL (MPI)
@@ -586,5 +586,5 @@
               
 !$OMP CRITICAL (MPI)
-          call MPI_IRECV(Buffer_recv_up,Buffer_size,MPI_REAL8,MPI_Rank-1,1,  &
+          CALL MPI_IRECV(Buffer_recv_up,Buffer_size,MPI_REAL8,MPI_Rank-1,1,  &
                           COMM_LMDZ,Request(NbRequest),ierr)
 !$OMP END CRITICAL (MPI)
@@ -599,5 +599,5 @@
         
 !$OMP CRITICAL (MPI)
-          call MPI_IRECV(Buffer_recv_down,Buffer_size,MPI_REAL8,MPI_Rank+1,1,     &
+          CALL MPI_IRECV(Buffer_recv_down,Buffer_size,MPI_REAL8,MPI_Rank+1,1,     &
                           COMM_LMDZ,Request(NbRequest),ierr)
 !$OMP END CRITICAL (MPI)
@@ -605,10 +605,10 @@
         ENDIF
   
-        if (NbRequest > 0) call MPI_WAITALL(NbRequest,Request,Status,ierr)
-        IF (RecvUp)  call Unpack_Data(Field(ij_begin-up*iip1,1),ij,ll,up,Buffer_Recv_up)
-        IF (RecvDown) call Unpack_Data(Field(ij_end+1,1),ij,ll,down,Buffer_Recv_down)  
-
-        call VTe(VThallo)
-        call barrier
+        if (NbRequest > 0) CALL MPI_WAITALL(NbRequest,Request,Status,ierr)
+        IF (RecvUp)  CALL Unpack_Data(Field(ij_begin-up*iip1,1),ij,ll,up,Buffer_Recv_up)
+        IF (RecvDown) CALL Unpack_Data(Field(ij_end+1,1),ij,ll,down,Buffer_Recv_down)
+
+        CALL VTe(VThallo)
+        CALL barrier
       
       ENDIF  ! using_mpi
@@ -637,8 +637,8 @@
         if (ij==ip1jmp1) then 
            allocate(Buffer_send(iip1*ll*(jj_end-jj_begin+1)))
-           call Pack_Data(Field(ij_begin,1),ij,ll,jj_end-jj_begin+1,Buffer_send)
+           CALL Pack_Data(Field(ij_begin,1),ij,ll,jj_end-jj_begin+1,Buffer_send)
         else if (ij==ip1jm) then
            allocate(Buffer_send(iip1*ll*(min(jj_end,jjm)-jj_begin+1)))
-           call Pack_Data(Field(ij_begin,1),ij,ll,min(jj_end,jjm)-jj_begin+1,Buffer_send)
+           CALL Pack_Data(Field(ij_begin,1),ij,ll,min(jj_end,jjm)-jj_begin+1,Buffer_send)
         else
            write(lunout,*)ij  
@@ -669,5 +669,5 @@
           
         else
-          ! Ehouarn: When in debug mode, ifort complains (for call MPI_GATHERV
+          ! Ehouarn: When in debug mode, ifort complains (for CALL MPI_GATHERV
           !          below) about Buffer_Recv() being not allocated.
           !          So make a dummy allocation.
@@ -676,5 +676,5 @@
   
 !$OMP CRITICAL (MPI)
-        call MPI_GATHERV(Buffer_send,(min(ij_end,ij)-ij_begin+1)*ll,MPI_REAL8,   &
+        CALL MPI_GATHERV(Buffer_send,(min(ij_end,ij)-ij_begin+1)*ll,MPI_REAL8,   &
                           Buffer_Recv,Recv_count,displ,MPI_REAL8,rank,COMM_LMDZ,ierr)
 !$OMP END CRITICAL (MPI)
@@ -684,10 +684,10 @@
           if (ij==ip1jmp1) then 
             do i=0,MPI_Size-1
-              call Unpack_Data(Field((jj_begin_para(i)-1)*iip1+1,1),ij,ll,                 &
+              CALL Unpack_Data(Field((jj_begin_para(i)-1)*iip1+1,1),ij,ll,                 &
                                jj_end_para(i)-jj_begin_para(i)+1,Buffer_Recv(displ(i)+1))
             enddo
           else if (ij==ip1jm) then
             do i=0,MPI_Size-1
-               call Unpack_Data(Field((jj_begin_para(i)-1)*iip1+1,1),ij,ll,                       &
+               CALL Unpack_Data(Field((jj_begin_para(i)-1)*iip1+1,1),ij,ll,                       &
                                min(jj_end_para(i),jjm)-jj_begin_para(i)+1,Buffer_Recv(displ(i)+1))
             enddo
@@ -709,7 +709,7 @@
       
       IF (using_mpi) THEN
-        call Gather_Field(Field,ij,ll,0)
+        CALL Gather_Field(Field,ij,ll,0)
 !$OMP CRITICAL (MPI)
-      call MPI_BCAST(Field,ij*ll,MPI_REAL8,0,COMM_LMDZ,ierr)
+      CALL MPI_BCAST(Field,ij*ll,MPI_REAL8,0,COMM_LMDZ,ierr)
 !$OMP END CRITICAL (MPI)
       ENDIF
@@ -730,5 +730,5 @@
       
 !$OMP CRITICAL (MPI)
-      call MPI_BCAST(Field,ij*ll,MPI_REAL8,rank,COMM_LMDZ,ierr)
+      CALL MPI_BCAST(Field,ij*ll,MPI_REAL8,rank,COMM_LMDZ,ierr)
 !$OMP END CRITICAL (MPI)
       
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/qminimum_loc.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/qminimum_loc.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/qminimum_loc.F	(revision 5101)
@@ -67,5 +67,5 @@
 c
 
-      call check_isotopes(q,ij_begin,ij_end,'qminimum 52')   
+      CALL check_isotopes(q,ij_begin,ij_end,'qminimum 52')
 
       ijb=ij_begin
@@ -187,5 +187,5 @@
      :                   q_follow(i,:,1)
                 write(lunout,*) 'k=',k
-                call abort_gcm("qminimum","not enough vapor",1)
+                CALL abort_gcm("qminimum","not enough vapor",1)
               endif  
             do ixt=1,ntiso
@@ -254,5 +254,5 @@
         enddo !do k=2,llm
 
-        call check_isotopes(q,ijb,ije,'qminimum 168')
+        CALL check_isotopes(q,ijb,ije,'qminimum 168')
         
       
@@ -283,5 +283,5 @@
        enddo !do k=2,llm  
 
-       call check_isotopes(q,ijb,ije,'qminimum 197')
+       CALL check_isotopes(q,ijb,ije,'qminimum 197')
 
       endif !if (niso > 0) then
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/temps_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/temps_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/temps_mod.F90	(revision 5101)
@@ -30,5 +30,5 @@
 !WARNING: when adding a threadprivate variable in this module
 !        do not forget to add it to the copyin clause when opening an OpenMP
-!        parallel section. e.g. in gcm before call leapfrog_loc and/or
+!        parallel section. e.g. in gcm before CALL leapfrog_loc and/or
 !        possibly in iniphysiq
 
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/times.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/times.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/times.F90	(revision 5101)
@@ -61,5 +61,5 @@
       
       timer_running(no_timer)=0
-      call cpu_time(last_time(no_timer))
+      CALL cpu_time(last_time(no_timer))
     
     endif
@@ -79,5 +79,5 @@
     
       timer_running(no_timer)=timer_running(no_timer)-last_time(no_timer)
-      call cpu_time(last_time(no_timer))
+      CALL cpu_time(last_time(no_timer))
       timer_running(no_timer)=timer_running(no_timer)+last_time(no_timer)
     endif
@@ -95,5 +95,5 @@
       endif
       
-      call cpu_time(last_time(no_timer))
+      CALL cpu_time(last_time(no_timer))
     endif
     
@@ -116,5 +116,5 @@
     
       timer_running(no_timer)=timer_running(no_timer)-last_time(no_timer)
-      call cpu_time(last_time(no_timer))
+      CALL cpu_time(last_time(no_timer))
       timer_running(no_timer)=timer_running(no_timer)+last_time(no_timer)
     
@@ -154,7 +154,7 @@
     
       tmp_table(:,:)=timer_table(:,:,mpi_rank)
-      call mpi_allgather(tmp_table(1,1),data_size,MPI_REAL_LMDZ,timer_table(1,1,0),data_size,MPI_REAL_LMDZ,COMM_LMDZ,ierr)
+      CALL mpi_allgather(tmp_table(1,1),data_size,MPI_REAL_LMDZ,timer_table(1,1,0),data_size,MPI_REAL_LMDZ,COMM_LMDZ,ierr)
       tmp_table(:,:)=timer_table_sqr(:,:,mpi_rank)
-      call mpi_allgather(tmp_table(1,1),data_size,MPI_REAL_LMDZ,timer_table_sqr(1,1,0),data_size,MPI_REAL_LMDZ,COMM_LMDZ,ierr)
+      CALL mpi_allgather(tmp_table(1,1),data_size,MPI_REAL_LMDZ,timer_table_sqr(1,1,0),data_size,MPI_REAL_LMDZ,COMM_LMDZ,ierr)
       deallocate(tmp_table)
     
@@ -185,9 +185,9 @@
 
       tmp_table(:,:)=timer_average(:,:,mpi_rank)
-      call mpi_allgather(tmp_table(1,1),data_size,MPI_REAL_LMDZ,timer_average(1,1,0),data_size,MPI_REAL_LMDZ,COMM_LMDZ,ierr)
+      CALL mpi_allgather(tmp_table(1,1),data_size,MPI_REAL_LMDZ,timer_average(1,1,0),data_size,MPI_REAL_LMDZ,COMM_LMDZ,ierr)
       tmp_table(:,:)=timer_delta(:,:,mpi_rank)
-      call mpi_allgather(tmp_table(1,1),data_size,MPI_REAL_LMDZ,timer_delta(1,1,0),data_size,MPI_REAL_LMDZ,COMM_LMDZ,ierr)
+      CALL mpi_allgather(tmp_table(1,1),data_size,MPI_REAL_LMDZ,timer_delta(1,1,0),data_size,MPI_REAL_LMDZ,COMM_LMDZ,ierr)
       tmp_iter(:,:)=timer_iteration(:,:,mpi_rank)
-      call mpi_allgather(tmp_iter(1,1),data_size,MPI_INTEGER,timer_iteration(1,1,0),data_size,MPI_INTEGER,COMM_LMDZ,ierr)
+      CALL mpi_allgather(tmp_iter(1,1),data_size,MPI_INTEGER,timer_iteration(1,1,0),data_size,MPI_INTEGER,COMM_LMDZ,ierr)
       deallocate(tmp_table)
     
@@ -203,6 +203,6 @@
     AllTimer_IsActive=.TRUE.
     if (AllTimer_IsActive) then
-      call system_clock(count,count_rate,count_max)
-      call cpu_time(Last_cpuCount)
+      CALL system_clock(count,count_rate,count_max)
+      CALL cpu_time(Last_cpuCount)
       Last_Count=count
     endif
@@ -214,5 +214,5 @@
     integer :: count,count_rate,count_max
   
-    call system_clock(count,count_rate,count_max)
+    CALL system_clock(count,count_rate,count_max)
     if (Count>=Last_Count) then
       DiffTime=(1.*(Count-last_Count))/count_rate
@@ -228,5 +228,5 @@
     real :: Count
     
-    call cpu_time(Count)
+    CALL cpu_time(Count)
     DiffCpuTime=Count-Last_cpuCount
     Last_cpuCount=Count 
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/vlsplt_loc.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/vlsplt_loc.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/vlsplt_loc.F	(revision 5101)
@@ -14,5 +14,5 @@
 c   --------------------------------------------------------------------
       USE parallel_lmdz
-      USE infotrac, ONLY : nqtot,tracers, ! CRisi                 &
+      USE infotrac, ONLY: nqtot,tracers, ! CRisi                 &
      &                     min_qParent,min_qMass,min_ratio ! MVals et CRisi
       IMPLICIT NONE
@@ -327,5 +327,5 @@
       do ifils=1,tracers(iq)%nqChildren
         iq2=tracers(iq)%iqDescen(ifils)
-        call vlx_loc(Ratio,pente_max,masse,u_mq,ijb_x,ije_x,iq2)
+        CALL vlx_loc(Ratio,pente_max,masse,u_mq,ijb_x,ije_x,iq2)
       enddo
 ! end CRisi
@@ -390,5 +390,5 @@
 c   --------------------------------------------------------------------
       USE parallel_lmdz
-      USE infotrac, ONLY : nqtot,tracers, ! CRisi                 &
+      USE infotrac, ONLY: nqtot,tracers, ! CRisi                 &
      &                     min_qParent,min_qMass,min_ratio ! MVals et CRisi
       USE comconst_mod, ONLY: pi
@@ -737,5 +737,5 @@
       do ifils=1,tracers(iq)%nqChildren
         iq2=tracers(iq)%iqDescen(ifils)
-        call vly_loc(Ratio,pente_max,masse,qbyv,iq2)
+        CALL vly_loc(Ratio,pente_max,masse,qbyv,iq2)
       enddo
 ! end CRisi
@@ -858,5 +858,5 @@
       USE parallel_lmdz
       USE vlz_mod
-      USE infotrac, ONLY : nqtot,tracers, ! CRisi                 &
+      USE infotrac, ONLY: nqtot,tracers, ! CRisi                 &
      &                     min_qParent,min_qMass,min_ratio ! MVals et CRisi
 
@@ -1059,5 +1059,5 @@
              ! pour seg fault
              if (lorig(ij,l)==0) then
-                call abort_gcm("vlz in vlsplt_loc",
+                CALL abort_gcm("vlz in vlsplt_loc",
      :           "unfixable violation of CFL",1)
              endif
@@ -1125,5 +1125,5 @@
       do ifils=1,tracers(iq)%nqChildren
         iq2=tracers(iq)%iqDescen(ifils)
-        call vlz_loc(Ratio,pente_max,masse,w,ijb_x,ije_x,iq2)
+        CALL vlz_loc(Ratio,pente_max,masse,w,ijb_x,ije_x,iq2)
       enddo
 ! end CRisi
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/vlspltgen_loc.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/vlspltgen_loc.F	(revision 5100)
+++ 	(revision )
@@ -1,546 +1,0 @@
-
-! $Header$
-
-       SUBROUTINE vlspltgen_loc( q,pente_max,masse,w,pbaru,pbarv,
-     &                           pdt, p,pk,teta                 )
-     
-c
-c     Auteurs:   P.Le Van, F.Hourdin, F.Forget, F.Codron 
-c
-c    ********************************************************************
-c          Schema  d'advection " pseudo amont " .
-c      + test sur humidite specifique: Q advecte< Qsat aval
-c                   (F. Codron, 10/99)
-c    ********************************************************************
-c     q,pbaru,pbarv,w sont des arguments d'entree  pour le s-pg ....
-c
-c     pente_max facteur de limitation des pentes: 2 en general
-c                                                0 pour un schema amont
-c     pbaru,pbarv,w flux de masse en u ,v ,w
-c     pdt pas de temps
-c
-c     teta temperature potentielle, p pression aux interfaces,
-c     pk exner au milieu des couches necessaire pour calculer Qsat
-c   --------------------------------------------------------------------
-      USE parallel_lmdz
-      USE mod_hallo
-      USE Write_Field_loc
-      USE VAMPIR
-      ! CRisi: on rajoute variables utiles d'infotrac  
-      USE infotrac, ONLY : nqtot, tracers, isoCheck
-      USE vlspltgen_mod
-      USE comconst_mod, ONLY: cpp
-      USE logic_mod, ONLY: adv_qsat_liq
-      IMPLICIT NONE
-
-c
-      include "dimensions.h"
-      include "paramet.h"
-
-c
-c   Arguments:
-c   ----------
-      REAL masse(ijb_u:ije_u,llm),pente_max
-      REAL pbaru( ijb_u:ije_u,llm ),pbarv( ijb_v:ije_v,llm)
-      REAL q(ijb_u:ije_u,llm,nqtot)
-      REAL w(ijb_u:ije_u,llm),pdt
-      REAL p(ijb_u:ije_u,llmp1),teta(ijb_u:ije_u,llm)
-      REAL pk(ijb_u:ije_u,llm)
-c
-c      Local 
-c   ---------
-c
-      INTEGER ij,l
-c
-      REAL zzpbar, zzw
-
-      REAL qmin,qmax
-      DATA qmin,qmax/0.,1.e33/
-
-c--pour rapport de melange saturant--
-
-      REAL rtt,retv,r2es,r3les,r3ies,r4les,r4ies,play
-      REAL ptarg,pdelarg,foeew,zdelta
-      REAL tempe(ijb_u:ije_u)
-      INTEGER ijb,ije,iq,iq2,ifils
-      LOGICAL, SAVE :: firstcall=.TRUE.
-!$OMP THREADPRIVATE(firstcall)
-      type(request),SAVE :: MyRequest1
-!$OMP THREADPRIVATE(MyRequest1)
-      type(request),SAVE :: MyRequest2
-!$OMP THREADPRIVATE(MyRequest2)
-c    fonction psat(T)
-
-       FOEEW ( PTARG,PDELARG ) = EXP (
-     *          (R3LES*(1.-PDELARG)+R3IES*PDELARG) * (PTARG-RTT)
-     * / (PTARG-(R4LES*(1.-PDELARG)+R4IES*PDELARG)) )
-
-        r2es  = 380.11733 
-        r3les = 17.269
-        r3ies = 21.875
-        r4les = 35.86
-        r4ies = 7.66
-        retv = 0.6077667
-        rtt  = 273.16
-
-c Allocate variables depending on dynamic variable nqtot
-
-         IF (firstcall) THEN
-            firstcall=.FALSE.
-         END IF
-c-- Calcul de Qsat en chaque point
-c-- approximation: au milieu des couches play(l)=(p(l)+p(l+1))/2
-c   pour eviter une exponentielle.
-
-      call SetTag(MyRequest1,100)
-      call SetTag(MyRequest2,101)
-
-        
-        ijb=ij_begin-iip1
-        ije=ij_end+iip1
-        if (pole_nord) ijb=ij_begin
-        if (pole_sud) ije=ij_end
-        
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 
-        DO l = 1, llm
-         DO ij = ijb, ije
-          tempe(ij) = teta(ij,l) * pk(ij,l) /cpp
-         ENDDO
-         DO ij = ijb, ije
-          IF (adv_qsat_liq) THEN
-             zdelta = 0.
-          ELSE
-             zdelta = MAX( 0., SIGN(1., rtt - tempe(ij)) )
-          ENDIF
-          play   = 0.5*(p(ij,l)+p(ij,l+1))
-          qsat(ij,l) = MIN(0.5, r2es* FOEEW(tempe(ij),zdelta) / play )
-          qsat(ij,l) = qsat(ij,l) / ( 1. - retv * qsat(ij,l) )
-         ENDDO
-        ENDDO
-c$OMP END DO NOWAIT
-c      PRINT*,'Debut vlsplt version debug sans vlyqs'
-
-        zzpbar = 0.5 * pdt
-        zzw    = pdt
-
-      ijb=ij_begin
-      ije=ij_end
-      if (pole_nord) ijb=ijb+iip1
-      if (pole_sud)  ije=ije-iip1
-
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)       
-      DO l=1,llm
-        DO ij = ijb,ije
-            mu(ij,l)=pbaru(ij,l) * zzpbar
-         ENDDO
-      ENDDO
-c$OMP END DO NOWAIT
-      
-      ijb=ij_begin-iip1
-      ije=ij_end
-      if (pole_nord) ijb=ij_begin
-      if (pole_sud)  ije=ij_end-iip1
-
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
-      DO l=1,llm
-         DO ij=ijb,ije
-            mv(ij,l)=pbarv(ij,l) * zzpbar
-         ENDDO
-      ENDDO
-c$OMP END DO NOWAIT
-
-      ijb=ij_begin
-      ije=ij_end
-
-      DO iq=1,nqtot
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)      
-      DO l=1,llm
-         DO ij=ijb,ije
-            mw(ij,l,iq)=w(ij,l) * zzw
-         ENDDO
-      ENDDO
-c$OMP END DO NOWAIT
-      ENDDO
-
-      DO iq=1,nqtot  
-c$OMP MASTER
-      DO ij=ijb,ije
-         mw(ij,llm+1,iq)=0.
-      ENDDO
-c$OMP END MASTER
-      ENDDO
-
-c      CALL SCOPY(ijp1llm,q,1,zq,1)
-c      CALL SCOPY(ijp1llm,masse,1,zm,1)
-
-       ijb=ij_begin
-       ije=ij_end
-
-      DO iq=1,nqtot       
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 
-        DO l=1,llm
-          zq(ijb:ije,l,iq)=q(ijb:ije,l,iq)
-          zm(ijb:ije,l,iq)=masse(ijb:ije,l)
-        ENDDO
-c$OMP END DO NOWAIT
-      ENDDO
-
-#ifdef DEBUG_IO     
-       CALL WriteField_u('mu',mu)
-       CALL WriteField_v('mv',mv)
-       CALL WriteField_u('mw',mw)
-       CALL WriteField_u('qsat',qsat)
-#endif
-
-      ! verif temporaire
-      ijb=ij_begin
-      ije=ij_end  
-      call check_isotopes(zq,ijb,ije,'vlspltgen_loc 191')
-
-c$OMP BARRIER           
-      DO iq=1,nqtot
-        ! CRisi: on ne boucle que sur les pères= ceux qui sont transportés directement par l'air
-        IF(tracers(iq)%parent /= 'air') CYCLE
-        !write(*,*) 'vlspltgen 192: iq,iadv=',iq,tracers(iq)%iadv
-#ifdef DEBUG_IO    
-        CALL WriteField_u('zq',zq(:,:,iq))
-        CALL WriteField_u('zm',zm(:,:,iq)) 
-#endif
-        SELECT CASE(tracers(iq)%iadv)
-          CASE(0); CYCLE
-          CASE(10)
-#ifdef _ADV_HALO        
-! CRisi: on ajoute les nombres de fils et tableaux des fils
-! On suppose qu'on ne peut advecter les fils que par le schéma 10.  
-          call vlx_loc(zq,pente_max,zm,mu,
-     &                     ij_begin,ij_begin+2*iip1-1,iq)
-          call vlx_loc(zq,pente_max,zm,mu,
-     &               ij_end-2*iip1+1,ij_end,iq)
-#else
-          call vlx_loc(zq,pente_max,zm,mu,
-     &                     ij_begin,ij_end,iq)
-#endif
-
-c$OMP MASTER
-          call VTb(VTHallo)
-c$OMP END MASTER
-          call Register_Hallo_u(zq(:,:,iq),llm,2,2,2,2,MyRequest1)
-          call Register_Hallo_u(zm(:,:,iq),llm,1,1,1,1,MyRequest1)
-! CRisi
-          do ifils=1,tracers(iq)%nqDescen
-            iq2=tracers(iq)%iqDescen(ifils)
-            call Register_Hallo_u(zq(:,:,iq2),llm,2,2,2,2,MyRequest1)
-            call Register_Hallo_u(zm(:,:,iq2),llm,1,1,1,1,MyRequest1)
-          enddo
-
-c$OMP MASTER
-          call VTe(VTHallo)
-c$OMP END MASTER
-          CASE(14)
-#ifdef _ADV_HALO           
-          call vlxqs_loc(zq,pente_max,zm,mu,
-     &                   qsat,ij_begin,ij_begin+2*iip1-1,iq)
-          call vlxqs_loc(zq,pente_max,zm,mu,
-     &                   qsat,ij_end-2*iip1+1,ij_end,iq)
-#else
-          call vlxqs_loc(zq,pente_max,zm,mu,
-     &                   qsat,ij_begin,ij_end,iq)
-#endif
-
-c$OMP MASTER
-          call VTb(VTHallo)
-c$OMP END MASTER
-
-          call Register_Hallo_u(zq(:,:,iq),llm,2,2,2,2,MyRequest1)
-          call Register_Hallo_u(zm(:,:,iq),llm,1,1,1,1,MyRequest1)
-          do ifils=1,tracers(iq)%nqDescen
-            iq2=tracers(iq)%iqDescen(ifils)
-            call Register_Hallo_u(zq(:,:,iq2),llm,2,2,2,2,MyRequest1)
-            call Register_Hallo_u(zm(:,:,iq2),llm,1,1,1,1,MyRequest1)
-          enddo
-
-c$OMP MASTER
-          call VTe(VTHallo)
-c$OMP END MASTER 
-          CASE DEFAULT
-             CALL abort_gcm("vlspltgen_loc","schema non parallelise",1)
-        END SELECT
-      
-      enddo !DO iq=1,nqtot
-      
-      
-c$OMP BARRIER      
-c$OMP MASTER      
-      call VTb(VTHallo)
-c$OMP END MASTER
-
-      call SendRequest(MyRequest1)
-
-c$OMP MASTER
-      call VTe(VTHallo)
-c$OMP END MASTER       
-c$OMP BARRIER
-
-      ! verif temporaire
-      ijb=ij_begin-2*iip1
-      ije=ij_end+2*iip1  
-      if (pole_nord) ijb=ij_begin
-      if (pole_sud)  ije=ij_end  
-      call check_isotopes(zq,ij_begin,ij_end,'vlspltgen_loc 280')
-
-      do iq=1,nqtot
-        IF(tracers(iq)%parent /= 'air') CYCLE
-        !write(*,*) 'vlspltgen 279: iq=',iq
-
-        SELECT CASE(tracers(iq)%iadv)
-          CASE(0); CYCLE
-          CASE(10)
-#ifdef _ADV_HALLO
-          call vlx_loc(zq,pente_max,zm,mu,
-     &                 ij_begin+2*iip1,ij_end-2*iip1,iq)
-#endif        
-          CASE(14)
-#ifdef _ADV_HALLO
-          call vlxqs_loc(zq,pente_max,zm,mu,
-     &                    qsat,ij_begin+2*iip1,ij_end-2*iip1,iq)
-#endif    
-          CASE DEFAULT
-          CALL abort_gcm("vlspltgen_p","schema non parallelise",1)
-        END SELECT
-      
-      enddo
-c$OMP BARRIER      
-c$OMP MASTER
-      call VTb(VTHallo)
-c$OMP END MASTER
-
-!      call WaitRecvRequest(MyRequest1)
-!      call WaitSendRequest(MyRequest1)
-c$OMP BARRIER
-       call WaitRequest(MyRequest1)
-
-
-c$OMP MASTER
-      call VTe(VTHallo)
-c$OMP END MASTER
-c$OMP BARRIER
-
-      
-      IF(isoCheck) THEN
-           call check_isotopes(zq,ij_begin,ij_end,'vlspltgen_loc 326')
-           ijb=ij_begin-2*iip1
-           ije=ij_end+2*iip1
-           if (pole_nord) ijb=ij_begin
-           if (pole_sud)  ije=ij_end
-           call check_isotopes(zq,ijb,ije,'vlspltgen_loc 336')
-      END IF
-
-      do iq = 1, nqtot
-       IF(tracers(iq)%parent /= 'air') CYCLE
-       !write(*,*) 'vlspltgen 321: iq=',iq
-#ifdef DEBUG_IO    
-       CALL WriteField_u('zq',zq(:,:,iq))
-       CALL WriteField_u('zm',zm(:,:,iq))
-#endif
-
-        SELECT CASE(tracers(iq)%iadv)
-          CASE(0); CYCLE
-          CASE(10); call   vly_loc(zq,pente_max,zm,mv,     iq)
-          CASE(14); call vlyqs_loc(zq,pente_max,zm,mv,qsat,iq)
-          CASE DEFAULT
-          CALL abort_gcm("vlspltgen_p","schema non parallelise",1)
-        END SELECT
-       
-       enddo
-
-      call check_isotopes(zq,ij_begin,ij_end,'vlspltgen_loc 357')
-
-      do iq = 1, nqtot
-       IF(tracers(iq)%parent /= 'air') CYCLE
-      !write(*,*) 'vlspltgen 349: iq=',iq
-#ifdef DEBUG_IO    
-       CALL WriteField_u('zq',zq(:,:,iq))
-       CALL WriteField_u('zm',zm(:,:,iq))
-#endif
-        SELECT CASE(tracers(iq)%iadv)
-          CASE(0); CYCLE
-          CASE(10,14)
-c$OMP BARRIER        
-#ifdef _ADV_HALLO
-          call vlz_loc(zq,pente_max,zm,mw,
-     &               ij_begin,ij_begin+2*iip1-1,iq)
-          call vlz_loc(zq,pente_max,zm,mw,
-     &               ij_end-2*iip1+1,ij_end,iq)
-#else
-          call vlz_loc(zq,pente_max,zm,mw,
-     &               ij_begin,ij_end,iq)
-#endif
-c$OMP BARRIER
-
-c$OMP MASTER
-          call VTb(VTHallo)
-c$OMP END MASTER
-
-          call Register_Hallo_u(zq(:,:,iq),llm,2,2,2,2,MyRequest2)
-          call Register_Hallo_u(zm(:,:,iq),llm,1,1,1,1,MyRequest2)
-          ! CRisi
-          do ifils=1,tracers(iq)%nqDescen
-            iq2=tracers(iq)%iqDescen(ifils)
-            call Register_Hallo_u(zq(:,:,iq2),llm,2,2,2,2,MyRequest2)
-            call Register_Hallo_u(zm(:,:,iq2),llm,1,1,1,1,MyRequest2)
-          enddo      
-c$OMP MASTER
-          call VTe(VTHallo)
-c$OMP END MASTER        
-c$OMP BARRIER
-          CASE DEFAULT
-            
-            CALL abort_gcm("vlspltgen_p","schema non parallelise",1)
-         END SELECT
-      
-      enddo
-c$OMP BARRIER      
-
-c$OMP MASTER        
-      call VTb(VTHallo)
-c$OMP END MASTER
-
-      call SendRequest(MyRequest2)
-
-c$OMP MASTER
-      call VTe(VTHallo)
-c$OMP END MASTER        
-
-
-      call check_isotopes(zq,ij_begin,ij_end,'vlspltgen_loc 429')
-
-c$OMP BARRIER
-      do iq=1,nqtot
-        IF(tracers(iq)%parent /= 'air') CYCLE
-      !write(*,*) 'vlspltgen 409: iq=',iq
-
-        SELECT CASE(tracers(iq)%iadv)
-          CASE(0); CYCLE
-          CASE(10,14)
-c$OMP BARRIER        
-
-#ifdef _ADV_HALLO
-          call vlz_loc(zq,pente_max,zm,mw,
-     &               ij_begin+2*iip1,ij_end-2*iip1,iq)
-#endif
-
-c$OMP BARRIER        
-          CASE DEFAULT
-          CALL abort_gcm("vlspltgen_p","schema non parallelise",1)
-        END SELECT
-      
-      enddo
-      !write(*,*) 'vlspltgen_loc 476'
-
-c$OMP BARRIER
-      !write(*,*) 'vlspltgen_loc 477'
-c$OMP MASTER
-      call VTb(VTHallo)
-c$OMP END MASTER
-
-!      call WaitRecvRequest(MyRequest2)
-!      call WaitSendRequest(MyRequest2)
-c$OMP BARRIER
-       CALL WaitRequest(MyRequest2)
-
-c$OMP MASTER
-      call VTe(VTHallo)
-c$OMP END MASTER
-c$OMP BARRIER
-
-
-      !write(*,*) 'vlspltgen_loc 494'
-      call check_isotopes(zq,ij_begin,ij_end,'vlspltgen_loc 461')
-
-      do iq=1,nqtot
-        IF(tracers(iq)%parent /= 'air') CYCLE
-      !write(*,*) 'vlspltgen 449: iq=',iq
-#ifdef DEBUG_IO    
-       CALL WriteField_u('zq',zq(:,:,iq))
-       CALL WriteField_u('zm',zm(:,:,iq))
-#endif
-        SELECT CASE(tracers(iq)%iadv)
-          CASE(0); CYCLE
-          CASE(10); call   vly_loc(zq,pente_max,zm,mv,     iq)
-          CASE(14); call vlyqs_loc(zq,pente_max,zm,mv,qsat,iq)
-          CASE DEFAULT
-             CALL abort_gcm("vlspltgen_p","schema non parallelise",1)
-        END SELECT
-       
-       enddo !do iq=1,nqtot
-
-      call check_isotopes(zq,ij_begin,ij_end,'vlspltgen_loc 493')
-
-      do iq=1,nqtot
-        IF(tracers(iq)%parent /= 'air') CYCLE
-      !write(*,*) 'vlspltgen 477: iq=',iq
-#ifdef DEBUG_IO    
-       CALL WriteField_u('zq',zq(:,:,iq))
-       CALL WriteField_u('zm',zm(:,:,iq))
-#endif
-        SELECT CASE(tracers(iq)%iadv)
-          CASE(0); CYCLE
-          CASE(10); call   vlx_loc(zq,pente_max,zm,mu,
-     &               ij_begin,ij_end,iq)
-          CASE(14); call vlxqs_loc(zq,pente_max,zm,mu,
-     &                 qsat, ij_begin,ij_end,iq)
-          CASE DEFAULT
-          CALL abort_gcm("vlspltgen_p","schema non parallelise",1)
-        END SELECT
-       
-       enddo !do iq=1,nqtot
-
-      !write(*,*) 'vlspltgen 550: apres derniere serie de call vlx'
-      call check_isotopes(zq,ij_begin,ij_end,'vlspltgen_loc 521')
-     
-      ijb=ij_begin
-      ije=ij_end
-      !write(*,*) 'vlspltgen_loc 557'
-c$OMP BARRIER      
-
-      !write(*,*) 'vlspltgen_loc 559'  
-      DO iq=1,nqtot
-       !write(*,*) 'vlspltgen_loc 561, iq=',iq  
-#ifdef DEBUG_IO    
-       CALL WriteField_u('zq',zq(:,:,iq))
-       CALL WriteField_u('zm',zm(:,:,iq))
-#endif
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)          
-        DO l=1,llm
-           DO ij=ijb,ije
-c             print *,'zq-->',ij,l,iq,zq(ij,l,iq)
-c             print *,'q-->',ij,l,iq,q(ij,l,iq)
-             q(ij,l,iq)=zq(ij,l,iq)
-           ENDDO
-        ENDDO
-c$OMP END DO NOWAIT    
-      !write(*,*) 'vlspltgen_loc 575'      
-
-c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
-        DO l=1,llm
-           DO ij=ijb,ije-iip1+1,iip1
-              q(ij+iim,l,iq)=q(ij,l,iq)
-           ENDDO
-        ENDDO
-c$OMP END DO NOWAIT  
-      !write(*,*) 'vlspltgen_loc 583'  
-      ENDDO !DO iq=1,nqtot
-        
-      call check_isotopes(q,ij_begin,ij_end,'vlspltgen_loc 557')
-
-c$OMP BARRIER
-
-cc$OMP MASTER      
-c      call WaitSendRequest(MyRequest1) 
-c      call WaitSendRequest(MyRequest2)
-cc$OMP END MASTER
-cc$OMP BARRIER
-
-      !write(*,*) 'vlspltgen 597: sortie'  
-      RETURN
-      END
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/vlspltgen_loc.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/vlspltgen_loc.F90	(revision 5101)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/vlspltgen_loc.F90	(revision 5101)
@@ -0,0 +1,543 @@
+! $Header$
+
+SUBROUTINE vlspltgen_loc(q, pente_max, masse, w, pbaru, pbarv, &
+        pdt, p, pk, teta)
+
+  !
+  ! Auteurs:   P.Le Van, F.Hourdin, F.Forget, F.Codron
+  !
+  !    ********************************************************************
+  !      Schema  d'advection " pseudo amont " .
+  !  + test sur humidite specifique: Q advecte< Qsat aval
+  !               (F. Codron, 10/99)
+  !    ********************************************************************
+  ! q,pbaru,pbarv,w sont des arguments d'entree  pour le s-pg ....
+  !
+  ! pente_max facteur de limitation des pentes: 2 en general
+  !                                            0 pour un schema amont
+  ! pbaru,pbarv,w flux de masse en u ,v ,w
+  ! pdt pas de temps
+  !
+  ! teta temperature potentielle, p pression aux interfaces,
+  ! pk exner au milieu des couches necessaire pour calculer Qsat
+  !   --------------------------------------------------------------------
+  USE parallel_lmdz
+  USE mod_hallo
+  USE Write_Field_loc
+  USE VAMPIR
+  ! ! CRisi: on rajoute variables utiles d'infotrac
+  USE infotrac, ONLY: nqtot, tracers, isoCheck
+  USE vlspltgen_mod
+  USE comconst_mod, ONLY: cpp
+  USE logic_mod, ONLY: adv_qsat_liq
+  USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO
+  IMPLICIT NONE
+
+  !
+  include "dimensions.h"
+  include "paramet.h"
+
+  !
+  !   Arguments:
+  !   ----------
+  REAL :: masse(ijb_u:ije_u, llm), pente_max
+  REAL :: pbaru(ijb_u:ije_u, llm), pbarv(ijb_v:ije_v, llm)
+  REAL :: q(ijb_u:ije_u, llm, nqtot)
+  REAL :: w(ijb_u:ije_u, llm), pdt
+  REAL :: p(ijb_u:ije_u, llmp1), teta(ijb_u:ije_u, llm)
+  REAL :: pk(ijb_u:ije_u, llm)
+  !
+  !  Local
+  !   ---------
+  !
+  INTEGER :: ij, l
+  !
+  REAL :: zzpbar, zzw
+
+  REAL :: qmin, qmax
+  DATA qmin, qmax/0., 1.e33/
+
+  !--pour rapport de melange saturant--
+
+  REAL :: rtt, retv, r2es, r3les, r3ies, r4les, r4ies, play
+  REAL :: ptarg, pdelarg, foeew, zdelta
+  REAL :: tempe(ijb_u:ije_u)
+  INTEGER :: ijb, ije, iq, iq2, ifils
+  LOGICAL, SAVE :: firstcall = .TRUE.
+  !$OMP THREADPRIVATE(firstcall)
+  type(request), SAVE :: MyRequest1
+  !$OMP THREADPRIVATE(MyRequest1)
+  type(request), SAVE :: MyRequest2
+  !$OMP THREADPRIVATE(MyRequest2)
+  !    fonction psat(T)
+
+  FOEEW (PTARG, PDELARG) = EXP (&
+          (R3LES * (1. - PDELARG) + R3IES * PDELARG) * (PTARG - RTT) &
+                  / (PTARG - (R4LES * (1. - PDELARG) + R4IES * PDELARG)))
+
+  r2es = 380.11733
+  r3les = 17.269
+  r3ies = 21.875
+  r4les = 35.86
+  r4ies = 7.66
+  retv = 0.6077667
+  rtt = 273.16
+
+  ! Allocate variables depending on dynamic variable nqtot
+
+  IF (firstcall) THEN
+    firstcall = .FALSE.
+  END IF
+  !-- Calcul de Qsat en chaque point
+  !-- approximation: au milieu des couches play(l)=(p(l)+p(l+1))/2
+  !   pour eviter une exponentielle.
+
+  CALL SetTag(MyRequest1, 100)
+  CALL SetTag(MyRequest2, 101)
+
+  ijb = ij_begin - iip1
+  ije = ij_end + iip1
+  if (pole_nord) ijb = ij_begin
+  if (pole_sud) ije = ij_end
+
+  !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+  DO l = 1, llm
+    DO ij = ijb, ije
+      tempe(ij) = teta(ij, l) * pk(ij, l) / cpp
+    ENDDO
+    DO ij = ijb, ije
+      IF (adv_qsat_liq) THEN
+        zdelta = 0.
+      ELSE
+        zdelta = MAX(0., SIGN(1., rtt - tempe(ij)))
+      ENDIF
+      play = 0.5 * (p(ij, l) + p(ij, l + 1))
+      qsat(ij, l) = MIN(0.5, r2es * FOEEW(tempe(ij), zdelta) / play)
+      qsat(ij, l) = qsat(ij, l) / (1. - retv * qsat(ij, l))
+    ENDDO
+  ENDDO
+  !$OMP END DO NOWAIT
+  ! PRINT*,'Debut vlsplt version debug sans vlyqs'
+
+  zzpbar = 0.5 * pdt
+  zzw = pdt
+
+  ijb = ij_begin
+  ije = ij_end
+  if (pole_nord) ijb = ijb + iip1
+  if (pole_sud)  ije = ije - iip1
+
+  !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+  DO l = 1, llm
+    DO ij = ijb, ije
+      mu(ij, l) = pbaru(ij, l) * zzpbar
+    ENDDO
+  ENDDO
+  !$OMP END DO NOWAIT
+
+  ijb = ij_begin - iip1
+  ije = ij_end
+  if (pole_nord) ijb = ij_begin
+  if (pole_sud)  ije = ij_end - iip1
+
+  !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+  DO l = 1, llm
+    DO ij = ijb, ije
+      mv(ij, l) = pbarv(ij, l) * zzpbar
+    ENDDO
+  ENDDO
+  !$OMP END DO NOWAIT
+
+  ijb = ij_begin
+  ije = ij_end
+
+  DO iq = 1, nqtot
+    !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+    DO l = 1, llm
+      DO ij = ijb, ije
+        mw(ij, l, iq) = w(ij, l) * zzw
+      ENDDO
+    ENDDO
+    !$OMP END DO NOWAIT
+  ENDDO
+
+  DO iq = 1, nqtot
+    !$OMP MASTER
+    DO ij = ijb, ije
+      mw(ij, llm + 1, iq) = 0.
+    ENDDO
+    !$OMP END MASTER
+  ENDDO
+
+  ! CALL SCOPY(ijp1llm,q,1,zq,1)
+  ! CALL SCOPY(ijp1llm,masse,1,zm,1)
+
+  ijb = ij_begin
+  ije = ij_end
+
+  DO iq = 1, nqtot
+    !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+    DO l = 1, llm
+      zq(ijb:ije, l, iq) = q(ijb:ije, l, iq)
+      zm(ijb:ije, l, iq) = masse(ijb:ije, l)
+    ENDDO
+    !$OMP END DO NOWAIT
+  ENDDO
+
+  IF (CPPKEY_DEBUGIO) THEN
+    CALL WriteField_u('mu', mu)
+    CALL WriteField_v('mv', mv)
+    CALL WriteField_u('mw', mw)
+    CALL WriteField_u('qsat', qsat)
+  END IF
+
+  ! ! verif temporaire
+  ijb = ij_begin
+  ije = ij_end
+  CALL check_isotopes(zq, ijb, ije, 'vlspltgen_loc 191')
+
+  !$OMP BARRIER
+  DO iq = 1, nqtot
+    ! ! CRisi: on ne boucle que sur les pères= ceux qui sont transportés directement par l'air
+    IF(tracers(iq)%parent /= 'air') CYCLE
+    ! !write(*,*) 'vlspltgen 192: iq,iadv=',iq,tracers(iq)%iadv
+    IF (CPPKEY_DEBUGIO) THEN
+      CALL WriteField_u('zq', zq(:, :, iq))
+      CALL WriteField_u('zm', zm(:, :, iq))
+    END IF
+    SELECT CASE(tracers(iq)%iadv)
+    CASE(0); CYCLE
+    CASE(10)
+#ifdef _ADV_HALO
+  ! CRisi: on ajoute les nombres de fils et tableaux des fils
+  ! On suppose qu'on ne peut advecter les fils que par le schéma 10.
+      CALL vlx_loc(zq,pente_max,zm,mu, &
+            ij_begin,ij_begin+2*iip1-1,iq)
+      CALL vlx_loc(zq,pente_max,zm,mu, &
+            ij_end-2*iip1+1,ij_end,iq)
+#else
+      CALL vlx_loc(zq, pente_max, zm, mu, &
+              ij_begin, ij_end, iq)
+#endif
+
+      !$OMP MASTER
+      CALL VTb(VTHallo)
+      !$OMP END MASTER
+      CALL Register_Hallo_u(zq(:, :, iq), llm, 2, 2, 2, 2, MyRequest1)
+      CALL Register_Hallo_u(zm(:, :, iq), llm, 1, 1, 1, 1, MyRequest1)
+      ! CRisi
+      do ifils = 1, tracers(iq)%nqDescen
+        iq2 = tracers(iq)%iqDescen(ifils)
+        CALL Register_Hallo_u(zq(:, :, iq2), llm, 2, 2, 2, 2, MyRequest1)
+        CALL Register_Hallo_u(zm(:, :, iq2), llm, 1, 1, 1, 1, MyRequest1)
+      enddo
+
+      !$OMP MASTER
+      CALL VTe(VTHallo)
+      !$OMP END MASTER
+    CASE(14)
+#ifdef _ADV_HALO
+      CALL vlxqs_loc(zq,pente_max,zm,mu, &
+            qsat,ij_begin,ij_begin+2*iip1-1,iq)
+      CALL vlxqs_loc(zq,pente_max,zm,mu, &
+            qsat,ij_end-2*iip1+1,ij_end,iq)
+#else
+      CALL vlxqs_loc(zq, pente_max, zm, mu, &
+              qsat, ij_begin, ij_end, iq)
+#endif
+
+      !$OMP MASTER
+      CALL VTb(VTHallo)
+      !$OMP END MASTER
+
+      CALL Register_Hallo_u(zq(:, :, iq), llm, 2, 2, 2, 2, MyRequest1)
+      CALL Register_Hallo_u(zm(:, :, iq), llm, 1, 1, 1, 1, MyRequest1)
+      do ifils = 1, tracers(iq)%nqDescen
+        iq2 = tracers(iq)%iqDescen(ifils)
+        CALL Register_Hallo_u(zq(:, :, iq2), llm, 2, 2, 2, 2, MyRequest1)
+        CALL Register_Hallo_u(zm(:, :, iq2), llm, 1, 1, 1, 1, MyRequest1)
+      enddo
+
+      !$OMP MASTER
+      CALL VTe(VTHallo)
+      !$OMP END MASTER
+    CASE DEFAULT
+      CALL abort_gcm("vlspltgen_loc", "schema non parallelise", 1)
+    END SELECT
+
+  enddo !DO iq=1,nqtot
+
+
+  !$OMP BARRIER
+  !$OMP MASTER
+  CALL VTb(VTHallo)
+  !$OMP END MASTER
+
+  CALL SendRequest(MyRequest1)
+
+  !$OMP MASTER
+  CALL VTe(VTHallo)
+  !$OMP END MASTER
+  !$OMP BARRIER
+
+  ! ! verif temporaire
+  ijb = ij_begin - 2 * iip1
+  ije = ij_end + 2 * iip1
+  if (pole_nord) ijb = ij_begin
+  if (pole_sud)  ije = ij_end
+  CALL check_isotopes(zq, ij_begin, ij_end, 'vlspltgen_loc 280')
+
+  do iq = 1, nqtot
+    IF(tracers(iq)%parent /= 'air') CYCLE
+    ! !write(*,*) 'vlspltgen 279: iq=',iq
+
+    SELECT CASE(tracers(iq)%iadv)
+    CASE(0); CYCLE
+    CASE(10)
+#ifdef _ADV_HALLO
+      CALL vlx_loc(zq,pente_max,zm,mu, &
+            ij_begin+2*iip1,ij_end-2*iip1,iq)
+#endif
+    CASE(14)
+#ifdef _ADV_HALLO
+      CALL vlxqs_loc(zq,pente_max,zm,mu, &
+            qsat,ij_begin+2*iip1,ij_end-2*iip1,iq)
+#endif
+    CASE DEFAULT
+      CALL abort_gcm("vlspltgen_p", "schema non parallelise", 1)
+    END SELECT
+
+  enddo
+  !$OMP BARRIER
+  !$OMP MASTER
+  CALL VTb(VTHallo)
+  !$OMP END MASTER
+
+  ! CALL WaitRecvRequest(MyRequest1)
+  ! CALL WaitSendRequest(MyRequest1)
+  !$OMP BARRIER
+  CALL WaitRequest(MyRequest1)
+
+
+  !$OMP MASTER
+  CALL VTe(VTHallo)
+  !$OMP END MASTER
+  !$OMP BARRIER
+
+  IF(isoCheck) THEN
+    CALL check_isotopes(zq, ij_begin, ij_end, 'vlspltgen_loc 326')
+    ijb = ij_begin - 2 * iip1
+    ije = ij_end + 2 * iip1
+    if (pole_nord) ijb = ij_begin
+    if (pole_sud)  ije = ij_end
+    CALL check_isotopes(zq, ijb, ije, 'vlspltgen_loc 336')
+  END IF
+
+  do iq = 1, nqtot
+    IF(tracers(iq)%parent /= 'air') CYCLE
+    ! !write(*,*) 'vlspltgen 321: iq=',iq
+    IF (CPPKEY_DEBUGIO) THEN
+      CALL WriteField_u('zq', zq(:, :, iq))
+      CALL WriteField_u('zm', zm(:, :, iq))
+    END IF
+
+    SELECT CASE(tracers(iq)%iadv)
+    CASE(0); CYCLE
+    CASE(10); CALL   vly_loc(zq, pente_max, zm, mv, iq)
+    CASE(14); CALL vlyqs_loc(zq, pente_max, zm, mv, qsat, iq)
+    CASE DEFAULT
+      CALL abort_gcm("vlspltgen_p", "schema non parallelise", 1)
+    END SELECT
+
+  enddo
+
+  CALL check_isotopes(zq, ij_begin, ij_end, 'vlspltgen_loc 357')
+
+  do iq = 1, nqtot
+    IF(tracers(iq)%parent /= 'air') CYCLE
+    ! !write(*,*) 'vlspltgen 349: iq=',iq
+    IF (CPPKEY_DEBUGIO) THEN
+      CALL WriteField_u('zq', zq(:, :, iq))
+      CALL WriteField_u('zm', zm(:, :, iq))
+    END IF
+    SELECT CASE(tracers(iq)%iadv)
+    CASE(0); CYCLE
+    CASE(10, 14)
+      !$OMP BARRIER
+#ifdef _ADV_HALLO
+      CALL vlz_loc(zq,pente_max,zm,mw, &
+            ij_begin,ij_begin+2*iip1-1,iq)
+      CALL vlz_loc(zq,pente_max,zm,mw, &
+            ij_end-2*iip1+1,ij_end,iq)
+#else
+      CALL vlz_loc(zq, pente_max, zm, mw, &
+              ij_begin, ij_end, iq)
+#endif
+      !$OMP BARRIER
+
+      !$OMP MASTER
+      CALL VTb(VTHallo)
+      !$OMP END MASTER
+
+      CALL Register_Hallo_u(zq(:, :, iq), llm, 2, 2, 2, 2, MyRequest2)
+      CALL Register_Hallo_u(zm(:, :, iq), llm, 1, 1, 1, 1, MyRequest2)
+      ! ! CRisi
+      do ifils = 1, tracers(iq)%nqDescen
+        iq2 = tracers(iq)%iqDescen(ifils)
+        CALL Register_Hallo_u(zq(:, :, iq2), llm, 2, 2, 2, 2, MyRequest2)
+        CALL Register_Hallo_u(zm(:, :, iq2), llm, 1, 1, 1, 1, MyRequest2)
+      enddo
+      !$OMP MASTER
+      CALL VTe(VTHallo)
+      !$OMP END MASTER
+      !$OMP BARRIER
+    CASE DEFAULT
+
+      CALL abort_gcm("vlspltgen_p", "schema non parallelise", 1)
+    END SELECT
+
+  enddo
+  !$OMP BARRIER
+
+  !$OMP MASTER
+  CALL VTb(VTHallo)
+  !$OMP END MASTER
+
+  CALL SendRequest(MyRequest2)
+
+  !$OMP MASTER
+  CALL VTe(VTHallo)
+  !$OMP END MASTER
+
+  CALL check_isotopes(zq, ij_begin, ij_end, 'vlspltgen_loc 429')
+
+  !$OMP BARRIER
+  do iq = 1, nqtot
+    IF(tracers(iq)%parent /= 'air') CYCLE
+    ! !write(*,*) 'vlspltgen 409: iq=',iq
+
+    SELECT CASE(tracers(iq)%iadv)
+    CASE(0); CYCLE
+    CASE(10, 14)
+      !$OMP BARRIER
+
+#ifdef _ADV_HALLO
+      CALL vlz_loc(zq,pente_max,zm,mw, &
+            ij_begin+2*iip1,ij_end-2*iip1,iq)
+#endif
+
+      !$OMP BARRIER
+    CASE DEFAULT
+      CALL abort_gcm("vlspltgen_p", "schema non parallelise", 1)
+    END SELECT
+
+  enddo
+  ! !write(*,*) 'vlspltgen_loc 476'
+
+  !$OMP BARRIER
+  ! !write(*,*) 'vlspltgen_loc 477'
+  !$OMP MASTER
+  CALL VTb(VTHallo)
+  !$OMP END MASTER
+
+  ! CALL WaitRecvRequest(MyRequest2)
+  ! CALL WaitSendRequest(MyRequest2)
+  !$OMP BARRIER
+  CALL WaitRequest(MyRequest2)
+
+  !$OMP MASTER
+  CALL VTe(VTHallo)
+  !$OMP END MASTER
+  !$OMP BARRIER
+
+
+  ! !write(*,*) 'vlspltgen_loc 494'
+  CALL check_isotopes(zq, ij_begin, ij_end, 'vlspltgen_loc 461')
+
+  do iq = 1, nqtot
+    IF(tracers(iq)%parent /= 'air') CYCLE
+    ! !write(*,*) 'vlspltgen 449: iq=',iq
+    IF (CPPKEY_DEBUGIO) THEN
+      CALL WriteField_u('zq', zq(:, :, iq))
+      CALL WriteField_u('zm', zm(:, :, iq))
+    END IF
+    SELECT CASE(tracers(iq)%iadv)
+    CASE(0); CYCLE
+    CASE(10); CALL   vly_loc(zq, pente_max, zm, mv, iq)
+    CASE(14); CALL vlyqs_loc(zq, pente_max, zm, mv, qsat, iq)
+    CASE DEFAULT
+      CALL abort_gcm("vlspltgen_p", "schema non parallelise", 1)
+    END SELECT
+
+  enddo !do iq=1,nqtot
+
+  CALL check_isotopes(zq, ij_begin, ij_end, 'vlspltgen_loc 493')
+
+  do iq = 1, nqtot
+    IF(tracers(iq)%parent /= 'air') CYCLE
+    ! !write(*,*) 'vlspltgen 477: iq=',iq
+    IF (CPPKEY_DEBUGIO) THEN
+      CALL WriteField_u('zq', zq(:, :, iq))
+      CALL WriteField_u('zm', zm(:, :, iq))
+    END IF
+    SELECT CASE(tracers(iq)%iadv)
+    CASE(0); CYCLE
+    CASE(10); CALL   vlx_loc(zq, pente_max, zm, mu, &
+            ij_begin, ij_end, iq)
+    CASE(14); CALL vlxqs_loc(zq, pente_max, zm, mu, &
+            qsat, ij_begin, ij_end, iq)
+    CASE DEFAULT
+      CALL abort_gcm("vlspltgen_p", "schema non parallelise", 1)
+    END SELECT
+
+  enddo !do iq=1,nqtot
+
+  ! !write(*,*) 'vlspltgen 550: apres derniere serie de CALL vlx'
+  CALL check_isotopes(zq, ij_begin, ij_end, 'vlspltgen_loc 521')
+
+  ijb = ij_begin
+  ije = ij_end
+  ! !write(*,*) 'vlspltgen_loc 557'
+  !$OMP BARRIER
+
+  ! !write(*,*) 'vlspltgen_loc 559'
+  DO iq = 1, nqtot
+    ! !write(*,*) 'vlspltgen_loc 561, iq=',iq
+    IF (CPPKEY_DEBUGIO) THEN
+      CALL WriteField_u('zq', zq(:, :, iq))
+      CALL WriteField_u('zm', zm(:, :, iq))
+    END IF
+    !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+    DO l = 1, llm
+      DO ij = ijb, ije
+        ! print *,'zq-->',ij,l,iq,zq(ij,l,iq)
+        ! print *,'q-->',ij,l,iq,q(ij,l,iq)
+        q(ij, l, iq) = zq(ij, l, iq)
+      ENDDO
+    ENDDO
+    !$OMP END DO NOWAIT
+    ! !write(*,*) 'vlspltgen_loc 575'
+
+    !$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+    DO l = 1, llm
+      DO ij = ijb, ije - iip1 + 1, iip1
+        q(ij + iim, l, iq) = q(ij, l, iq)
+      ENDDO
+    ENDDO
+    !$OMP END DO NOWAIT
+    ! !write(*,*) 'vlspltgen_loc 583'
+  ENDDO !DO iq=1,nqtot
+
+  CALL check_isotopes(q, ij_begin, ij_end, 'vlspltgen_loc 557')
+
+  !$OMP BARRIER
+
+  !c$OMP MASTER
+  ! CALL WaitSendRequest(MyRequest1)
+  ! CALL WaitSendRequest(MyRequest2)
+  !c$OMP END MASTER
+  !c$OMP BARRIER
+
+  ! !write(*,*) 'vlspltgen 597: sortie'
+  RETURN
+END SUBROUTINE vlspltgen_loc
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/vlspltgen_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/vlspltgen_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/vlspltgen_mod.F90	(revision 5101)
@@ -15,5 +15,5 @@
   USE parallel_lmdz
   USE infotrac
-  USE vlz_mod,ONLY : vlz_allocate 
+  USE vlz_mod,ONLY: vlz_allocate
   IMPLICIT NONE
   INCLUDE "dimensions.h"
@@ -37,5 +37,5 @@
   USE bands
   USE parallel_lmdz
-  USE vlz_mod,ONLY : vlz_switch_vanleer 
+  USE vlz_mod,ONLY: vlz_switch_vanleer
   IMPLICIT NONE
     TYPE(distrib),INTENT(IN) :: dist
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/vlspltqs_loc.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/vlspltqs_loc.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/vlspltqs_loc.F	(revision 5101)
@@ -12,5 +12,5 @@
 c   --------------------------------------------------------------------
       USE parallel_lmdz
-      USE infotrac, ONLY : nqtot,tracers, ! CRisi                 &
+      USE infotrac, ONLY: nqtot,tracers, ! CRisi                 &
      &                     min_qParent,min_qMass,min_ratio ! MVals et CRisi7
       IMPLICIT NONE
@@ -331,5 +331,5 @@
         iq2=tracers(iq)%iqDescen(ifils)
         !write(*,*) 'vlxqs 349: on appelle vlx pour iq2=',iq2
-        call vlx_loc(Ratio,pente_max,masse,u_mq,ijb_x,ije_x,iq2)
+        CALL vlx_loc(Ratio,pente_max,masse,u_mq,ijb_x,ije_x,iq2)
       enddo
 ! end CRisi
@@ -394,5 +394,5 @@
 c   --------------------------------------------------------------------
       USE parallel_lmdz
-      USE infotrac, ONLY : nqtot,tracers, ! CRisi                 &
+      USE infotrac, ONLY: nqtot,tracers, ! CRisi                 &
      &                     min_qParent,min_qMass,min_ratio ! MVals et CRisi
       USE comconst_mod, ONLY: pi
@@ -743,5 +743,5 @@
         iq2=tracers(iq)%iqDescen(ifils)
         !write(lunout,*) 'vly: appel recursiv vly iq2=',iq2
-        call vly_loc(Ratio,pente_max,masse,qbyv,iq2)
+        CALL vly_loc(Ratio,pente_max,masse,qbyv,iq2)
       enddo
 
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/wrgrads.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/wrgrads.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/wrgrads.F	(revision 5101)
@@ -102,7 +102,7 @@
       write(unit(if),'(a12)') 'UNDEF 1.0E30'
       write(unit(if),'(a5,1x,a40)') 'TITLE ',title(if)
-      call formcoord(unit(if),im,xd(iii,if),1.,.false.,'XDEF')
-      call formcoord(unit(if),jm,yd(iji,if),1.,.true.,'YDEF')
-      call formcoord(unit(if),lm,zd(1,if),1.,.false.,'ZDEF')
+      CALL formcoord(unit(if),im,xd(iii,if),1.,.false.,'XDEF')
+      CALL formcoord(unit(if),jm,yd(iji,if),1.,.true.,'YDEF')
+      CALL formcoord(unit(if),lm,zd(1,if),1.,.false.,'ZDEF')
       write(unit(if),'(a4,i10,a30)')
      &       'TDEF ',itime(if),' LINEAR 02JAN1987 1MO '
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/write_field_loc.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/write_field_loc.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/write_field_loc.F90	(revision 5101)
@@ -63,12 +63,12 @@
     ENDDO
 !$OMP BARRIER    
-    call Register_SwapField(new_field,new_field,ip1jmp1,ll,jj_Nb_master,Request_write)
-    call SendRequest(Request_write)
+    CALL Register_SwapField(new_field,new_field,ip1jmp1,ll,jj_Nb_master,Request_write)
+    CALL SendRequest(Request_write)
 !$OMP BARRIER
-    call WaitRequest(Request_write)     
+    CALL WaitRequest(Request_write)
 !$OMP BARRIER
 
 !$OMP MASTER
-    if (MPI_Rank==0) call WriteField(name,New_Field)
+    if (MPI_Rank==0) CALL WriteField(name,New_Field)
     DEALLOCATE(New_Field)
 !$OMP END MASTER        
@@ -139,12 +139,12 @@
     ENDDO
 !$OMP BARRIER    
-    call Register_SwapField(new_field,new_field,ip1jm,ll,jj_Nb_master,Request_write)
-    call SendRequest(Request_write)
+    CALL Register_SwapField(new_field,new_field,ip1jm,ll,jj_Nb_master,Request_write)
+    CALL SendRequest(Request_write)
 !$OMP BARRIER
-    call WaitRequest(Request_write)     
+    CALL WaitRequest(Request_write)
 !$OMP BARRIER
 
 !$OMP MASTER
-    if (MPI_Rank==0) call WriteField(name,New_Field)
+    if (MPI_Rank==0) CALL WriteField(name,New_Field)
     DEALLOCATE(New_Field)
 !$OMP END MASTER        
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/write_field_p.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/write_field_p.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/write_field_p.F90	(revision 5101)
@@ -23,7 +23,7 @@
     allocate(New_Field(Dim(1)))
     New_Field(:)=Field(:)
-    call Gather_Field(New_Field,dim(1),1,0)
+    CALL Gather_Field(New_Field,dim(1),1,0)
     
-    if (MPI_Rank==0) call WriteField(name,New_Field)
+    if (MPI_Rank==0) CALL WriteField(name,New_Field)
     
     end subroutine write_field1D_p
@@ -43,7 +43,7 @@
     allocate(New_Field(Dim(1),Dim(2)))
     New_Field(:,:)=Field(:,:)
-    call Gather_Field(New_Field(1,1),dim(1)*dim(2),1,0)
+    CALL Gather_Field(New_Field(1,1),dim(1)*dim(2),1,0)
     
-    if (MPI_Rank==0) call WriteField(name,New_Field)
+    if (MPI_Rank==0) CALL WriteField(name,New_Field)
     
      
@@ -64,7 +64,7 @@
     allocate(New_Field(Dim(1),Dim(2),Dim(3)))
     New_Field(:,:,:)=Field(:,:,:)
-    call Gather_Field(New_Field(1,1,1),dim(1)*dim(2),dim(3),0)
+    CALL Gather_Field(New_Field(1,1,1),dim(1)*dim(2),dim(3),0)
     
-   if (MPI_Rank==0) call WriteField(name,New_Field)
+   if (MPI_Rank==0) CALL WriteField(name,New_Field)
     
   end subroutine write_field3D_p  
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/writedyn_xios.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/writedyn_xios.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/writedyn_xios.F90	(revision 5101)
@@ -8,9 +8,9 @@
       USE parallel_lmdz
       USE misc_mod
-      USE infotrac, ONLY : nqtot
-      use com_io_dyn_mod, only : histaveid,histvaveid,histuaveid
+      USE infotrac, ONLY: nqtot
+      use com_io_dyn_mod, ONLY: histaveid,histvaveid,histuaveid
       USE comconst_mod, ONLY: cpp
       USE temps_mod, ONLY: itau_dyn
-      USE mod_xios_dyn3dmem, ONLY : writefield_dyn_u, writefield_dyn_v
+      USE mod_xios_dyn3dmem, ONLY: writefield_dyn_u, writefield_dyn_v
       
       implicit none
@@ -97,5 +97,5 @@
 
 ! Passage aux composantes naturelles du vent
-      call covnat_loc(llm, ucov, vcov, unat, vnat)
+      CALL covnat_loc(llm, ucov, vcov, unat, vnat)
 
 !  Appels a histwrite pour l'ecriture des variables a sauvegarder
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/writedynav_loc.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/writedynav_loc.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/writedynav_loc.F	(revision 5101)
@@ -11,6 +11,6 @@
       USE parallel_lmdz
       USE misc_mod
-      USE infotrac, ONLY : nqtot
-      use com_io_dyn_mod, only : histaveid,histvaveid,histuaveid
+      USE infotrac, ONLY: nqtot
+      use com_io_dyn_mod, ONLY: histaveid,histvaveid,histuaveid
       USE comconst_mod, ONLY: cpp
       USE temps_mod, ONLY: itau_dyn
@@ -103,5 +103,5 @@
 
 C Passage aux composantes naturelles du vent
-      call covnat_loc(llm, ucov, vcov, unat, vnat)
+      CALL covnat_loc(llm, ucov, vcov, unat, vnat)
 
 C
@@ -117,5 +117,5 @@
       jjn=jj_nb
       
-      call histwrite(histuaveid, 'u', itau_w, unat(ijb:ije,:), 
+      CALL histwrite(histuaveid, 'u', itau_w, unat(ijb:ije,:),
      .               iip1*jjn*llm, ndexu)
 !$OMP END MASTER      
@@ -129,5 +129,5 @@
 !$OMP BARRIER
 !$OMP MASTER      
-      call histwrite(histvaveid, 'v', itau_w, vnat(ijb:ije,:), 
+      CALL histwrite(histvaveid, 'v', itau_w, vnat(ijb:ije,:),
      .               iip1*jjn*llm, ndexv)
 !$OMP END MASTER      
@@ -141,5 +141,5 @@
       jjn=jj_nb
 !$OMP MASTER      
-      call histwrite(histaveid, 'theta', itau_w, teta(ijb:ije,:), 
+      CALL histwrite(histaveid, 'theta', itau_w, teta(ijb:ije,:),
      .                iip1*jjn*llm, ndexu)
 !$OMP END MASTER      
@@ -158,5 +158,5 @@
 
 !$OMP MASTER      
-      call histwrite(histaveid, 'temp', itau_w, tm(ijb:ije,:), 
+      CALL histwrite(histaveid, 'temp', itau_w, tm(ijb:ije,:),
      .                iip1*jjn*llm, ndexu)
 !$OMP END MASTER
@@ -167,5 +167,5 @@
 C
 !$OMP MASTER      
-      call histwrite(histaveid, 'phi', itau_w, phi(ijb:ije,:), 
+      CALL histwrite(histaveid, 'phi', itau_w, phi(ijb:ije,:),
      .                iip1*jjn*llm, ndexu)
 !$OMP END MASTER
@@ -177,5 +177,5 @@
 !!$OMP MASTER      
 !        DO iq=1,nqtot
-!          call histwrite(histaveid, tracers(iq)%longName, itau_w, &
+!          CALL histwrite(histaveid, tracers(iq)%longName, itau_w, &
 !     .                   q(ijb:ije,:,iq), iip1*jjn*llm, ndexu)
 !        enddo
@@ -187,5 +187,5 @@
 C
 !$OMP MASTER      
-       call histwrite(histaveid, 'masse', itau_w, masse(ijb:ije,:),
+       CALL histwrite(histaveid, 'masse', itau_w, masse(ijb:ije,:),
      .                iip1*jjn*llm, ndexu)
 !$OMP END MASTER
@@ -197,5 +197,5 @@
 !$OMP MASTER      
 
-       call histwrite(histaveid, 'ps', itau_w, ps(ijb:ije), 
+       CALL histwrite(histaveid, 'ps', itau_w, ps(ijb:ije),
      .                 iip1*jjn, ndex2d)
 !$OMP END MASTER
@@ -205,5 +205,5 @@
 C
 !$OMP MASTER      
-!       call histwrite(histaveid, 'phis', itau_w, phis(ijb:ije),
+!       CALL histwrite(histaveid, 'phis', itau_w, phis(ijb:ije),
 !     .                 iip1*jjn, ndex2d)
 !$OMP END MASTER
@@ -214,7 +214,7 @@
 !$OMP MASTER      
       if (ok_sync) then
-          call histsync(histaveid)
-          call histsync(histvaveid)
-          call histsync(histuaveid)
+          CALL histsync(histaveid)
+          CALL histsync(histvaveid)
+          CALL histsync(histuaveid)
       ENDIF
 !$OMP END MASTER
Index: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/writehist_loc.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dyn3dmem/writehist_loc.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dyn3dmem/writehist_loc.F	(revision 5101)
@@ -11,6 +11,6 @@
       USE parallel_lmdz
       USE misc_mod
-      USE infotrac, ONLY : nqtot
-      use com_io_dyn_mod, only : histid,histvid,histuid
+      USE infotrac, ONLY: nqtot
+      use com_io_dyn_mod, ONLY: histid,histvid,histuid
       USE comconst_mod, ONLY: cpp
       USE temps_mod, ONLY: itau_dyn
@@ -103,5 +103,5 @@
 
 C Passage aux composantes naturelles du vent
-      call covnat_loc(llm, ucov, vcov, unat, vnat)
+      CALL covnat_loc(llm, ucov, vcov, unat, vnat)
 
 C
@@ -117,5 +117,5 @@
       jjn=jj_nb
       
-      call histwrite(histuid, 'u', itau_w, unat(ijb:ije,:), 
+      CALL histwrite(histuid, 'u', itau_w, unat(ijb:ije,:),
      .               iip1*jjn*llm, ndexu)
 !$OMP END MASTER      
@@ -129,5 +129,5 @@
 !$OMP BARRIER
 !$OMP MASTER      
-      call histwrite(histvid, 'v', itau_w, vnat(ijb:ije,:), 
+      CALL histwrite(histvid, 'v', itau_w, vnat(ijb:ije,:),
      .               iip1*jjn*llm, ndexv)
 !$OMP END MASTER      
@@ -141,5 +141,5 @@
       jjn=jj_nb
 !$OMP MASTER      
-      call histwrite(histid, 'theta', itau_w, teta(ijb:ije,:), 
+      CALL histwrite(histid, 'theta', itau_w, teta(ijb:ije,:),
      .                iip1*jjn*llm, ndexu)
 !$OMP END MASTER      
@@ -158,5 +158,5 @@
 
 !$OMP MASTER      
-      call histwrite(histid, 'temp', itau_w, tm(ijb:ije,:), 
+      CALL histwrite(histid, 'temp', itau_w, tm(ijb:ije,:),
      .                iip1*jjn*llm, ndexu)
 !$OMP END MASTER
@@ -167,5 +167,5 @@
 C
 !$OMP MASTER      
-      call histwrite(histid, 'phi', itau_w, phi(ijb:ije,:), 
+      CALL histwrite(histid, 'phi', itau_w, phi(ijb:ije,:),
      .                iip1*jjn*llm, ndexu)
 !$OMP END MASTER
@@ -177,5 +177,5 @@
 !!$OMP MASTER      
 !        DO iq=1,nqtot
-!          call histwrite(histid, tracers(iq)%longName, itau_w, 
+!          CALL histwrite(histid, tracers(iq)%longName, itau_w,
 !     .                   q(ijb:ije,:,iq), iip1*jjn*llm, ndexu)
 !        enddo
@@ -187,5 +187,5 @@
 C
 !$OMP MASTER      
-       call histwrite(histid, 'masse', itau_w, masse(ijb:ije,:),
+       CALL histwrite(histid, 'masse', itau_w, masse(ijb:ije,:),
      .                iip1*jjn*llm, ndexu)
 !$OMP END MASTER
@@ -196,5 +196,5 @@
 C
 !$OMP MASTER      
-       call histwrite(histid, 'ps', itau_w, ps(ijb:ije), 
+       CALL histwrite(histid, 'ps', itau_w, ps(ijb:ije),
      .                 iip1*jjn, ndex2d)
 !$OMP END MASTER
@@ -204,5 +204,5 @@
 C
 !$OMP MASTER      
-!       call histwrite(histid, 'phis', itau_w, phis(ijb:ije),
+!       CALL histwrite(histid, 'phis', itau_w, phis(ijb:ije),
 !     .                 iip1*jjn, ndex2d)
 !$OMP END MASTER
@@ -213,7 +213,7 @@
 !$OMP MASTER      
       if (ok_sync) then
-        call histsync(histid)
-        call histsync(histvid)
-        call histsync(histuid)
+        CALL histsync(histid)
+        CALL histsync(histvid)
+        CALL histsync(histuid)
       endif
 !$OMP END MASTER
Index: LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/calfis.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/calfis.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/calfis.F	(revision 5101)
@@ -101,5 +101,5 @@
 c    Arguments :
 c    -----------
-      LOGICAL,INTENT(IN) ::  lafin ! .true. for the very last call to physics
+      LOGICAL,INTENT(IN) ::  lafin ! .true. for the very last CALL to physics
       REAL,INTENT(IN):: jD_cur, jH_cur
       REAL,INTENT(IN) :: pvcov(iip1,jjm,llm) ! covariant meridional velocity
@@ -185,5 +185,5 @@
          write(lunout,*) '  ngridmx  jjm   iim   '
          write(lunout,*) ngridmx,jjm,iim
-         call abort_gcm("calfis", "", 1)
+         CALL abort_gcm("calfis", "", 1)
         ENDIF
       ELSE
Index: LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/gr_dyn_fi.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/gr_dyn_fi.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/gr_dyn_fi.F	(revision 5101)
@@ -23,5 +23,5 @@
 
       IF (ngrid/=2+(jm-2)*(im-1)) then
-         call abort_gcm("gr_dyn_fi", 'probleme de dim', 1)
+         CALL abort_gcm("gr_dyn_fi", 'probleme de dim', 1)
       end if
 c   traitement des poles
Index: LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/inigeomphy_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/inigeomphy_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/inigeomphy_mod.F90	(revision 5101)
@@ -16,11 +16,11 @@
                                 klon_omp_end, & ! end index of local omp subgrid
                                 klon_mpi_begin ! start indes of columns (on local mpi grid)
-  USE geometry_mod, ONLY : init_geometry
-  USE physics_distribution_mod, ONLY : init_physics_distribution
-  USE regular_lonlat_mod, ONLY : init_regular_lonlat, &
+  USE geometry_mod, ONLY: init_geometry
+  USE physics_distribution_mod, ONLY: init_physics_distribution
+  USE regular_lonlat_mod, ONLY: init_regular_lonlat, &
                                  east, west, north, south, &
                                  north_east, north_west, &
                                  south_west, south_east
-  USE mod_interface_dyn_phys, ONLY :  init_interface_dyn_phys
+  USE mod_interface_dyn_phys, ONLY:  init_interface_dyn_phys
   USE nrtype, ONLY: pi
   USE comvert_mod, ONLY: preff, ap, bp, aps, bps, presnivs, &
Index: LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/lmdz_calfis_loc.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/lmdz_calfis_loc.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/lmdz_calfis_loc.F90	(revision 5101)
@@ -43,11 +43,11 @@
     Use Write_field_p
     USE Times
-    USE infotrac, ONLY : nqtot, tracers
-    USE control_mod, ONLY : planet_type, nsplit_phys
+    USE infotrac, ONLY: nqtot, tracers
+    USE control_mod, ONLY: planet_type, nsplit_phys
     USE callphysiq_mod, ONLY: call_physiq
     USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_PHYS
 
-    USE comvert_mod, ONLY : preff, presnivs
-    USE comconst_mod, ONLY : cpp, daysec, dtphys, dtvr, kappa, pi
+    USE comvert_mod, ONLY: preff, presnivs
+    USE comconst_mod, ONLY: cpp, daysec, dtphys, dtvr, kappa, pi
 
     !=======================================================================
@@ -115,5 +115,5 @@
     !    Arguments :
     !    -----------
-    LOGICAL, INTENT(IN) :: lafin ! .true. for the very last call to physics
+    LOGICAL, INTENT(IN) :: lafin ! .true. for the very last CALL to physics
     REAL, INTENT(IN) :: jD_cur, jH_cur
     REAL, INTENT(IN) :: pvcov(iip1, jjb_v:jje_v, llm) ! covariant meridional velocity
@@ -248,5 +248,5 @@
       write(lunout,*) '  ngridmx  jjm   iim   '
       write(lunout,*) ngridmx,jjm,iim
-      call abort_gcm("calfis_loc", "", 1)
+      CALL abort_gcm("calfis_loc", "", 1)
     ENDIF
 !$OMP MASTER
@@ -279,5 +279,5 @@
 
 !$OMP MASTER
-  call start_timer(timer_physic)
+  CALL start_timer(timer_physic)
 !$OMP END MASTER
 
@@ -832,5 +832,5 @@
 
 !$OMP MASTER
-  call stop_timer(timer_physic)
+  CALL stop_timer(timer_physic)
 !$OMP END MASTER
 
@@ -850,7 +850,7 @@
 !$OMP MASTER
 !$OMP CRITICAL (MPI)
-    call MPI_ISSEND(du_send,iim*llm,MPI_REAL8,MPI_Rank-1,401, &
+    CALL MPI_ISSEND(du_send,iim*llm,MPI_REAL8,MPI_Rank-1,401, &
           COMM_LMDZ,Req(1),ierr)
-    call MPI_ISSEND(dv_send,iim*llm,MPI_REAL8,MPI_Rank-1,402, &
+    CALL MPI_ISSEND(dv_send,iim*llm,MPI_REAL8,MPI_Rank-1,402, &
           COMM_LMDZ,Req(2),ierr)
 !$OMP END CRITICAL (MPI)
@@ -866,7 +866,7 @@
 !$OMP MASTER
 !$OMP CRITICAL (MPI)
-    call MPI_IRECV(du_recv,iim*llm,MPI_REAL8,MPI_Rank+1,401, &
+    CALL MPI_IRECV(du_recv,iim*llm,MPI_REAL8,MPI_Rank+1,401, &
           COMM_LMDZ,Req(3),ierr)
-    call MPI_IRECV(dv_recv,iim*llm,MPI_REAL8,MPI_Rank+1,402, &
+    CALL MPI_IRECV(dv_recv,iim*llm,MPI_REAL8,MPI_Rank+1,402, &
           COMM_LMDZ,Req(4),ierr)
 !$OMP END CRITICAL (MPI)
@@ -881,9 +881,9 @@
 !$OMP CRITICAL (MPI)
   if (MPI_rank>0 .and. MPI_rank< MPI_Size-1) then
-    call MPI_WAITALL(4,Req(1),Status,ierr)
+    CALL MPI_WAITALL(4,Req(1),Status,ierr)
   else if (MPI_rank>0) then
-    call MPI_WAITALL(2,Req(1),Status,ierr)
+    CALL MPI_WAITALL(2,Req(1),Status,ierr)
   else if (MPI_rank <MPI_Size-1) then
-    call MPI_WAITALL(2,Req(3),Status,ierr)
+    CALL MPI_WAITALL(2,Req(3),Status,ierr)
   endif
 !$OMP END CRITICAL (MPI)
Index: LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/phydev/callphysiq_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/phydev/callphysiq_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/phydev/callphysiq_mod.F90	(revision 5101)
@@ -27,6 +27,6 @@
   INTEGER,INTENT(IN) :: nqtot ! number of tracers
   CHARACTER(len=*),INTENT(IN) :: tname(nqtot) ! tracer names
-  LOGICAL,INTENT(IN) :: debut_split ! .true. if very first call to physics
-  LOGICAL,INTENT(IN) :: lafin_split ! .true. if last call to physics
+  LOGICAL,INTENT(IN) :: debut_split ! .true. if very first CALL to physics
+  LOGICAL,INTENT(IN) :: lafin_split ! .true. if last CALL to physics
   REAL,INTENT(IN) :: JD_cur ! Julian day
   REAL,INTENT(IN) :: JH_cur_split ! Julian hour (fraction of day)
Index: LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/phylmd/callphysiq_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/phylmd/callphysiq_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/phylmd/callphysiq_mod.F90	(revision 5101)
@@ -22,5 +22,5 @@
   USE control_mod, ONLY: planet_type, ok_dyn_xios
   USE physiq_mod, ONLY: physiq
-  USE lmdz_xios, ONLY : xios_set_current_context, xios_get_current_context, xios_context
+  USE lmdz_xios, ONLY: xios_set_current_context, xios_get_current_context, xios_context
   IMPLICIT NONE
 
@@ -29,6 +29,6 @@
   INTEGER,INTENT(IN) :: nqtot ! number of tracers
   CHARACTER(len=*),INTENT(IN) :: tname(nqtot) ! tracer names
-  LOGICAL,INTENT(IN) :: debut_split ! .true. if very first call to physics
-  LOGICAL,INTENT(IN) :: lafin_split ! .true. if last call to physics
+  LOGICAL,INTENT(IN) :: debut_split ! .true. if very first CALL to physics
+  LOGICAL,INTENT(IN) :: lafin_split ! .true. if last CALL to physics
   REAL,INTENT(IN) :: JD_cur ! Julian day
   REAL,INTENT(IN) :: JH_cur_split ! Julian hour (fraction of day)
Index: LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/phylmd/ce0l.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/phylmd/ce0l.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/phylmd/ce0l.F90	(revision 5101)
@@ -22,5 +22,5 @@
   USE limit,          ONLY: limit_netcdf
   USE netcdf,         ONLY: nf90_open, nf90_nowrite, nf90_close, nf90_noerr,    &
-         nf90_inquire_dimension, nf90_inq_dimid, NF90_INQ_VARID, nf90_get_var
+         nf90_inquire_dimension, nf90_inq_dimid, nf90_inq_varid, nf90_get_var
   USE infotrac,       ONLY: init_infotrac
   USE dimphy,         ONLY: klon
@@ -200,5 +200,5 @@
     END IF
     ALLOCATE(masktmp(klon))
-    iret=NF90_INQ_VARID(nid_sta,'masque',nid_msk)
+    iret=nf90_inq_varid(nid_sta,'masque',nid_msk)
     iret=nf90_get_var(nid_sta,nid_msk,masktmp)
     iret=nf90_close(nid_sta)
@@ -249,5 +249,5 @@
   END IF
   IF (using_xios) CALL xios_finalize
-  IF (using_mpi) call MPI_FINALIZE(ierr)
+  IF (using_mpi) CALL MPI_FINALIZE(ierr)
 #endif
 
Index: LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/phylmd/etat0phys_netcdf.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/phylmd/etat0phys_netcdf.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/phylmd/etat0phys_netcdf.F90	(revision 5101)
@@ -564,7 +564,7 @@
      endif
   enddo
-  call dump2d(imp1,jmp1,phis,'phis ')
-  call dump2d(imp1,jmp1,masque,'masque ')
-  call dump2d(imp1,jmp1,phis-phiso,'dphis ')
+  CALL dump2d(imp1,jmp1,phis,'phis ')
+  CALL dump2d(imp1,jmp1,masque,'masque ')
+  CALL dump2d(imp1,jmp1,phis-phiso,'dphis ')
 
 END SUBROUTINE filtreoro
Index: LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/phylmd/iniphysiq_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/phylmd/iniphysiq_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/phylmd/iniphysiq_mod.F90	(revision 5101)
@@ -15,12 +15,12 @@
   USE mod_grid_phy_lmdz, ONLY: nbp_lon,nbp_lat,nbp_lev,klon_glo ! number of atmospheric columns (on full grid)
   USE mod_phys_lmdz_para, ONLY: klon_omp ! number of columns (on local omp grid)
-  USE vertical_layers_mod, ONLY : init_vertical_layers
+  USE vertical_layers_mod, ONLY: init_vertical_layers
   USE infotrac, ONLY: nbtr, type_trac
 
 #ifdef REPROBUS
-  USE CHEM_REP, ONLY : Init_chem_rep_phys
+  USE CHEM_REP, ONLY: Init_chem_rep_phys
 #ifdef CPP_PARA
-  USE parallel_lmdz, ONLY : mpi_size, mpi_rank
-  USE bands, ONLY : distrib_phys
+  USE parallel_lmdz, ONLY: mpi_size, mpi_rank
+  USE bands, ONLY: distrib_phys
 #endif
   USE mod_phys_lmdz_omp_data, ONLY: klon_omp
@@ -36,6 +36,6 @@
   USE indice_sol_mod, ONLY: nbsrf, is_oce, is_sic, is_ter, is_lic
 #ifdef CPP_PARA
-  USE parallel_lmdz, ONLY : mpi_size, mpi_rank
-  USE bands, ONLY : distrib_phys
+  USE parallel_lmdz, ONLY: mpi_size, mpi_rank
+  USE bands, ONLY: distrib_phys
 #endif
   USE mod_phys_lmdz_omp_data, ONLY: klon_omp 
@@ -137,6 +137,6 @@
   IF (type_trac == 'repr') THEN
 #ifdef REPROBUS
-    call Init_chem_rep_phys(klon_omp,nlayer)
-    call init_reprobus_para( &
+    CALL Init_chem_rep_phys(klon_omp,nlayer)
+    CALL init_reprobus_para( &
           nbp_lon,nbp_lat,nbp_lev,klon_glo,mpi_size, &
           distrib_phys,communicator)
@@ -148,5 +148,5 @@
   IF (type_trac == 'repr') THEN
 #ifdef REPROBUS
-    call init_reprobus_para( &
+    CALL init_reprobus_para( &
           nbp_lon,nbp_lat,nbp_lev,klon_glo,mpi_size, &
           distrib_phys,communicator)
Index: LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/phylmd/init_ssrf_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/phylmd/init_ssrf_m.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/phylmd/init_ssrf_m.F90	(revision 5101)
@@ -6,5 +6,5 @@
   USE dimphy,             ONLY: klon, zmasq
   USE phys_state_var_mod, ONLY: pctsrf
-  USE geometry_mod,       ONLY : longitude_deg, latitude_deg
+  USE geometry_mod,       ONLY: longitude_deg, latitude_deg
   USE grid_atob_m,        ONLY: grille_m
   USE ioipsl,             ONLY: flininfo, flinopen, flinget, flinclo
Index: LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/phylmd/limit_netcdf.f90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/phylmd/limit_netcdf.f90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/phylmd/limit_netcdf.f90	(revision 5101)
@@ -17,13 +17,13 @@
   !-------------------------------------------------------------------------------
 
-  USE ioipsl, ONLY : flininfo, flinopen, flinget, flinclo
-  USE assert_eq_m, ONLY : assert_eq
-  USE cal_tools_m, ONLY : year_len, mid_month
-  USE conf_dat_m, ONLY : conf_dat2d, conf_dat3d
-  USE dimphy, ONLY : klon, zmasq
-  USE geometry_mod, ONLY : longitude_deg, latitude_deg
-  USE phys_state_var_mod, ONLY : pctsrf
-  USE control_mod, ONLY : anneeref
-  USE init_ssrf_m, ONLY : start_init_subsurf
+  USE ioipsl, ONLY: flininfo, flinopen, flinget, flinclo
+  USE assert_eq_m, ONLY: assert_eq
+  USE cal_tools_m, ONLY: year_len, mid_month
+  USE conf_dat_m, ONLY: conf_dat2d, conf_dat3d
+  USE dimphy, ONLY: klon, zmasq
+  USE geometry_mod, ONLY: longitude_deg, latitude_deg
+  USE phys_state_var_mod, ONLY: pctsrf
+  USE control_mod, ONLY: anneeref
+  USE init_ssrf_m, ONLY: start_init_subsurf
 
   INTEGER, PARAMETER :: ns = 256
@@ -70,14 +70,14 @@
     !-------------------------------------------------------------------------------
     USE indice_sol_mod
-    USE netcdf, ONLY : nf90_open, nf90_create, nf90_close, &
+    USE netcdf, ONLY: nf90_open, nf90_create, nf90_close, &
             nf90_def_dim, nf90_def_var, nf90_put_var, nf90_put_att, &
             nf90_noerr, nf90_nowrite, nf90_global, &
             nf90_clobber, nf90_enddef, nf90_unlimited, nf90_float, &
             nf90_64bit_offset
-    USE lmdz_cppkeys_wrapper, ONLY : nf90_format
-    USE inter_barxy_m, ONLY : inter_barxy
-    USE netcdf95, ONLY : nf95_def_var, nf95_put_att, nf95_put_var
-    USE comconst_mod, ONLY : pi
-    USE phys_cal_mod, ONLY : calend
+    USE lmdz_cppkeys_wrapper, ONLY: nf90_format
+    USE inter_barxy_m, ONLY: inter_barxy
+    USE netcdf95, ONLY: nf95_def_var, nf95_put_att, nf95_put_var
+    USE comconst_mod, ONLY: pi
+    USE phys_cal_mod, ONLY: calend
     IMPLICIT NONE
     !-------------------------------------------------------------------------------
@@ -262,6 +262,6 @@
     CALL ncerr(nf90_def_var(nid, "ALB", nf90_format, dims, id_ALB), fnam)
     CALL ncerr(nf90_def_var(nid, "RUG", nf90_format, dims, id_RUG), fnam)
-    call nf95_def_var(nid, "longitude", nf90_float, ndim, varid_longitude)
-    call nf95_def_var(nid, "latitude", nf90_float, ndim, varid_latitude)
+    CALL nf95_def_var(nid, "longitude", nf90_float, ndim, varid_longitude)
+    CALL nf95_def_var(nid, "latitude", nf90_float, ndim, varid_latitude)
 
     !--- Attributes creation
@@ -277,9 +277,9 @@
     CALL ncerr(nf90_put_att(nid, id_RUG, "title", "Rugosite"), fnam)
 
-    call nf95_put_att(nid, varid_longitude, "standard_name", "longitude")
-    call nf95_put_att(nid, varid_longitude, "units", "degrees_east")
-
-    call nf95_put_att(nid, varid_latitude, "standard_name", "latitude")
-    call nf95_put_att(nid, varid_latitude, "units", "degrees_north")
+    CALL nf95_put_att(nid, varid_longitude, "standard_name", "longitude")
+    CALL nf95_put_att(nid, varid_longitude, "units", "degrees_east")
+
+    CALL nf95_put_att(nid, varid_latitude, "standard_name", "latitude")
+    CALL nf95_put_att(nid, varid_latitude, "units", "degrees_north")
 
     CALL ncerr(nf90_enddef(nid), fnam)
@@ -295,6 +295,6 @@
     CALL ncerr(nf90_put_var(nid, id_ALB, phy_alb(:, :), [1, 1], [klon, ndays]), fnam)
     CALL ncerr(nf90_put_var(nid, id_RUG, phy_rug(:, :), [1, 1], [klon, ndays]), fnam)
-    call nf95_put_var(nid, varid_longitude, longitude_deg)
-    call nf95_put_var(nid, varid_latitude, latitude_deg)
+    CALL nf95_put_var(nid, varid_longitude, longitude_deg)
+    CALL nf95_put_var(nid, varid_latitude, latitude_deg)
 
     CALL ncerr(nf90_close(nid), fnam)
@@ -323,10 +323,10 @@
       !     2) Dimensional variables have the same names as corresponding dimensions.
       !-----------------------------------------------------------------------------
-      USE netcdf, ONLY : nf90_open, NF90_INQ_VARID, NF90_INQUIRE_VARIABLE, &
+      USE netcdf, ONLY: nf90_open, nf90_inq_varid, nf90_inquire_variable, &
               nf90_close, nf90_inq_dimid, nf90_inquire_dimension, nf90_get_var, &
               nf90_get_att
-      USE pchsp_95_m, only : pchsp_95
-      USE pchfe_95_m, only : pchfe_95
-      USE arth_m, only : arth
+      USE pchsp_95_m, ONLY: pchsp_95
+      USE pchfe_95_m, ONLY: pchfe_95
+      USE arth_m, ONLY: arth
       USE indice_sol_mod
 
@@ -396,11 +396,11 @@
       CALL msg(5, ' Now reading file : ' // TRIM(fnam))
       CALL ncerr(nf90_open(fnam, nf90_nowrite, ncid), fnam)
-      CALL ncerr(NF90_INQ_VARID(ncid, trim(varname), varid), fnam)
-      CALL ncerr(NF90_INQUIRE_VARIABLE(ncid, varid, dimids = dids), fnam)
+      CALL ncerr(nf90_inq_varid(ncid, trim(varname), varid), fnam)
+      CALL ncerr(nf90_inquire_variable(ncid, varid, dimids = dids), fnam)
 
       !--- Longitude
       CALL ncerr(nf90_inquire_dimension(ncid, dids(1), name = dnam, len = imdep), fnam)
       ALLOCATE(dlon_ini(imdep), dlon(imdep))
-      CALL ncerr(NF90_INQ_VARID(ncid, dnam, varid), fnam)
+      CALL ncerr(nf90_inq_varid(ncid, dnam, varid), fnam)
       CALL ncerr(nf90_get_var(ncid, varid, dlon_ini), fnam)
       CALL msg(5, 'variable ' // TRIM(dnam) // ' dimension ', imdep)
@@ -409,5 +409,5 @@
       CALL ncerr(nf90_inquire_dimension(ncid, dids(2), name = dnam, len = jmdep), fnam)
       ALLOCATE(dlat_ini(jmdep), dlat(jmdep))
-      CALL ncerr(NF90_INQ_VARID(ncid, dnam, varid), fnam)
+      CALL ncerr(nf90_inq_varid(ncid, dnam, varid), fnam)
       CALL ncerr(nf90_get_var(ncid, varid, dlat_ini), fnam)
       CALL msg(5, 'variable ' // TRIM(dnam) // ' dimension ', jmdep)
@@ -416,5 +416,5 @@
       CALL ncerr(nf90_inquire_dimension(ncid, dids(3), name = dnam, len = lmdep), fnam)
       ALLOCATE(timeyear(lmdep + 2))
-      CALL ncerr(NF90_INQ_VARID(ncid, dnam, varid), fnam)
+      CALL ncerr(nf90_inq_varid(ncid, dnam, varid), fnam)
       cal_in = ' '
       IF(nf90_get_att(ncid, varid, 'calendar', cal_in)/=nf90_noerr) THEN
@@ -450,5 +450,5 @@
       CALL msg(5, '')
       CALL msg(5, 'READ AND INTERPOLATE HORIZONTALLY ', lmdep, ' FIELDS.')
-      CALL ncerr(NF90_INQ_VARID(ncid, varname, varid), fnam)
+      CALL ncerr(nf90_inq_varid(ncid, varname, varid), fnam)
       DO l = 1, lmdep
         CALL ncerr(nf90_get_var(ncid, varid, champ, [1, 1, l], [imdep, jmdep, 1]), fnam)
@@ -514,6 +514,6 @@
       IF(nf90_open(fnam_m, nf90_nowrite, ncid)==nf90_noerr) THEN
         CALL msg(0, 'Reading previous year file ("' // TRIM(fnam_m) // '") last record for ' // TRIM(title))
-        CALL ncerr(NF90_INQ_VARID(ncid, varname, varid), fnam_m)
-        CALL ncerr(NF90_INQUIRE_VARIABLE(ncid, varid, dimids = dids), fnam_m)
+        CALL ncerr(nf90_inq_varid(ncid, varname, varid), fnam_m)
+        CALL ncerr(nf90_inquire_variable(ncid, varid, dimids = dids), fnam_m)
         CALL ncerr(nf90_inquire_dimension(ncid, dids(3), len = l), fnam_m)
         CALL ncerr(nf90_get_var(ncid, varid, champ, [1, 1, l], [imdep, jmdep, 1]), fnam_m)
@@ -537,5 +537,5 @@
       IF(nf90_open(fnam_p, nf90_nowrite, ncid)==nf90_noerr) THEN
         CALL msg(0, 'Reading next year file ("' // TRIM(fnam_p) // '") first record for ' // TRIM(title))
-        CALL ncerr(NF90_INQ_VARID(ncid, varname, varid), fnam_p)
+        CALL ncerr(nf90_inq_varid(ncid, varname, varid), fnam_p)
         CALL ncerr(nf90_get_var(ncid, varid, champ, [1, 1, 1], [imdep, jmdep, 1]), fnam_p)
         CALL ncerr(nf90_close(ncid), fnam_p)
@@ -597,5 +597,5 @@
             CALL pchfe_95(timeyear, champtime(i, j, :), yder, skip, &
                     arth(0.5, real(ndays_in) / ndays, ndays), champan(i, j, :), ierr)
-            if (ierr < 0) call abort_physic("get_2Dfield", "", 1)
+            if (ierr < 0) CALL abort_physic("get_2Dfield", "", 1)
             n_extrap = n_extrap + ierr
           END DO
@@ -653,5 +653,5 @@
 
       !-------------------------------------------------------------------------------
-      USE grid_noro_m, ONLY : grid_noro0
+      USE grid_noro_m, ONLY: grid_noro0
       IMPLICIT NONE
       !===============================================================================
@@ -744,5 +744,5 @@
       ! Purpose: NetCDF errors handling.
       !-------------------------------------------------------------------------------
-      USE netcdf, ONLY : nf90_noerr, NF90_STRERROR
+      USE netcdf, ONLY: nf90_noerr, nf90_strerror
       IMPLICIT NONE
       !-------------------------------------------------------------------------------
@@ -753,5 +753,5 @@
       IF(ncres/=nf90_noerr) THEN
         WRITE(lunout, *)'Problem with file ' // TRIM(fnam) // ' in routine limit_netcdf.'
-        CALL abort_physic('limit_netcdf', NF90_STRERROR(ncres), 1)
+        CALL abort_physic('limit_netcdf', nf90_strerror(ncres), 1)
       END IF
 
Index: LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/phylmd/test_disvert_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/phylmd/test_disvert_m.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/phylmd/test_disvert_m.F90	(revision 5101)
@@ -37,5 +37,5 @@
     ps = (/(5e4 + delta_ps * i, i = 0, ngrid - 1)/)
     forall (l = 1: llm + 1) p(:, l) = ap(l) + bp(l) * ps
-    call exner_hyb(ngrid, ps, p, pks, pk)
+    CALL exner_hyb(ngrid, ps, p, pks, pk)
     p_lay = preff * (pk / cpp)**(1. / kappa)
 
@@ -57,5 +57,5 @@
           END DO
        END DO
-       call abort_physic("test_disvert", "bad order of pressure values", 1)
+       CALL abort_physic("test_disvert", "bad order of pressure values", 1)
     end if
 
Index: LMDZ6/branches/Amaury_dev/libf/filtrez/filtreg_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/filtrez/filtreg_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/filtrez/filtreg_mod.F90	(revision 5101)
@@ -11,6 +11,6 @@
   SUBROUTINE inifilr
 #ifdef CPP_PARA
-  USE mod_filtre_fft, ONLY : use_filtre_fft,Init_filtre_fft
-  USE mod_filtre_fft_loc, ONLY : Init_filtre_fft_loc=>Init_filtre_fft    !
+  USE mod_filtre_fft, ONLY: use_filtre_fft,Init_filtre_fft
+  USE mod_filtre_fft_loc, ONLY: Init_filtre_fft_loc=>Init_filtre_fft    !
 #endif
   USE serre_mod, ONLY: alphax
Index: LMDZ6/branches/Amaury_dev/libf/filtrez/mod_filtre_fft.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/filtrez/mod_filtre_fft.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/filtrez/mod_filtre_fft.F90	(revision 5101)
@@ -117,5 +117,5 @@
     USE mod_fft
 #ifdef CPP_PARA
-    USE parallel_lmdz,ONLY : OMP_CHUNK
+    USE parallel_lmdz,ONLY: OMP_CHUNK
 #endif
     IMPLICIT NONE
@@ -178,5 +178,5 @@
     USE mod_fft
 #ifdef CPP_PARA
-    USE parallel_lmdz,ONLY : OMP_CHUNK
+    USE parallel_lmdz,ONLY: OMP_CHUNK
 #endif
     IMPLICIT NONE
@@ -240,5 +240,5 @@
     USE mod_fft
 #ifdef CPP_PARA
-    USE parallel_lmdz,ONLY : OMP_CHUNK
+    USE parallel_lmdz,ONLY: OMP_CHUNK
 #endif
     IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/filtrez/mod_filtre_fft_loc.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/filtrez/mod_filtre_fft_loc.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/filtrez/mod_filtre_fft_loc.F90	(revision 5101)
@@ -107,5 +107,5 @@
     USE mod_fft
 #ifdef CPP_PARA
-    USE parallel_lmdz,ONLY : OMP_CHUNK
+    USE parallel_lmdz,ONLY: OMP_CHUNK
 #endif
     IMPLICIT NONE
@@ -187,5 +187,5 @@
     USE mod_fft
 #ifdef CPP_PARA
-    USE parallel_lmdz,ONLY : OMP_CHUNK
+    USE parallel_lmdz,ONLY: OMP_CHUNK
 #endif
     IMPLICIT NONE
@@ -250,5 +250,5 @@
     USE mod_fft
 #ifdef CPP_PARA
-    USE parallel_lmdz,ONLY : OMP_CHUNK
+    USE parallel_lmdz,ONLY: OMP_CHUNK
 #endif
     IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/misc/ioipsl_errioipsl.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/misc/ioipsl_errioipsl.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/misc/ioipsl_errioipsl.F90	(revision 5101)
@@ -129,5 +129,5 @@
 !! the current level of the error messages
 !! and the maximum level encountered since the
-!! last call to "ipslerr_act".
+!! last CALL to "ipslerr_act".
 !!
 !! SUBROUTINE ipslerr_inq (current_level,maximum_level)
Index: LMDZ6/branches/Amaury_dev/libf/misc/ioipsl_getincom.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/misc/ioipsl_getincom.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/misc/ioipsl_getincom.F90	(revision 5101)
@@ -11,7 +11,7 @@
 ! See IOIPSL/IOIPSL_License_CeCILL.txt
 !---------------------------------------------------------------------
-USE ioipsl_errioipsl, ONLY : ipslerr
+USE ioipsl_errioipsl, ONLY: ipslerr
 USE ioipsl_stringop, &
-     ONLY : nocomma,cmpblank,strlowercase
+     ONLY: nocomma,cmpblank,strlowercase
 !-
 IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/misc/j4save.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/misc/j4save.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/misc/j4save.F	(revision 5101)
@@ -4,5 +4,5 @@
 C***BEGIN PROLOGUE  J4SAVE
 C***SUBSIDIARY
-C***PURPOSE  Save or recall global variables needed by error
+C***PURPOSE  Save or reCALL global variables needed by error
 C            handling routines.
 C***LIBRARY   SLATEC (XERROR)
Index: LMDZ6/branches/Amaury_dev/libf/misc/lmdz_cppkeys_wrapper.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/misc/lmdz_cppkeys_wrapper.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/misc/lmdz_cppkeys_wrapper.F90	(revision 5101)
@@ -13,8 +13,9 @@
 
 MODULE lmdz_cppkeys_wrapper
-  USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY : REAL64, REAL32
+  USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY: REAL64, REAL32
   USE netcdf, ONLY: nf90_float, nf90_double
   IMPLICIT NONE; PRIVATE
-  PUBLIC nf90_format, CPPKEY_PHYS, CPPKEY_INCA, CPPKEY_STRATAER, CPPKEY_DUST
+  PUBLIC nf90_format, CPPKEY_PHYS, CPPKEY_INCA, CPPKEY_STRATAER, CPPKEY_DUST, &
+      CPPKEY_DEBUGIO
 
 #ifdef NC_DOUBLE
@@ -48,3 +49,9 @@
 #endif
 
+#ifdef DEBUG_IO
+  LOGICAL, PARAMETER :: CPPKEY_DEBUGIO = .TRUE.
+#else
+  LOGICAL, PARAMETER :: CPPKEY_DEBUGIO = .FALSE.
+#endif
+
 END MODULE lmdz_cppkeys_wrapper
Index: LMDZ6/branches/Amaury_dev/libf/misc/lmdz_mpi_wrappers.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/misc/lmdz_mpi_wrappers.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/misc/lmdz_mpi_wrappers.F90	(revision 5101)
@@ -66,5 +66,5 @@
 
 SUBROUTINE MPI_WAITALL(COUNT, ARRAY_OF_REQUESTS, ARRAY_OF_STATUSES, IERROR)
-USE lmdz_mpi, ONLY : MPI_STATUS_SIZE
+USE lmdz_mpi, ONLY: MPI_STATUS_SIZE
 IMPLICIT NONE
     INTEGER    COUNT, ARRAY_OF_REQUESTS(*)
@@ -105,5 +105,5 @@
 
 SUBROUTINE MPI_ALLOC_MEM(SIZE, INFO, BASEPTR, IERROR)
-USE lmdz_mpi, ONLY : MPI_ADDRESS_KIND
+USE lmdz_mpi, ONLY: MPI_ADDRESS_KIND
 IMPLICIT NONE
     INTEGER INFO, IERROR
@@ -131,5 +131,5 @@
 SUBROUTINE MPI_RECV(BUF, COUNT, DATATYPE, SOURCE, TAG, COMM, STATUS, IERROR)
 USE ISO_C_BINDING
-USE lmdz_mpi, ONLY : MPI_STATUS_SIZE
+USE lmdz_mpi, ONLY: MPI_STATUS_SIZE
 IMPLICIT NONE
     TYPE(C_PTR),VALUE ::    BUF
Index: LMDZ6/branches/Amaury_dev/libf/misc/pchfe.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/misc/pchfe.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/misc/pchfe.F	(revision 5101)
@@ -113,5 +113,5 @@
 C        b. Change the real declaration to double precision,
 C
-C     2. Most of the coding between the call to CHFEV and the end of
+C     2. Most of the coding between the CALL to CHFEV and the end of
 C        the IR-loop could be eliminated if it were permissible to
 C        assume that XE is ordered relative to X.
Index: LMDZ6/branches/Amaury_dev/libf/misc/pchfe_95_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/misc/pchfe_95_m.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/misc/pchfe_95_m.F90	(revision 5101)
@@ -70,5 +70,5 @@
     n = assert_eq(size(x), size(f), size(d), "PCHFE_95 n")
     ne = assert_eq(size(xe), size(fe), "PCHFE_95 ne")
-    call PCHFE(N, X, F, D, 1, SKIP, NE, XE, FE, IERR)
+    CALL PCHFE(N, X, F, D, 1, SKIP, NE, XE, FE, IERR)
 
   end SUBROUTINE PCHFE_95
Index: LMDZ6/branches/Amaury_dev/libf/misc/pchsp_95_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/misc/pchsp_95_m.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/misc/pchsp_95_m.F90	(revision 5101)
@@ -109,5 +109,5 @@
     if (present(vc_beg)) vc(1) = vc_beg
     if (present(vc_end)) vc(2) = vc_end
-    call PCHSP(IC, VC, N, X, F, pchsp_95, 1, WK, size(WK), IERR)
+    CALL PCHSP(IC, VC, N, X, F, pchsp_95, 1, WK, size(WK), IERR)
     if (ierr /= 0) stop 1
 
Index: LMDZ6/branches/Amaury_dev/libf/misc/regr1_step_av_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/misc/regr1_step_av_m.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/misc/regr1_step_av_m.F90	(revision 5101)
@@ -55,8 +55,8 @@
     nt = size(xt) - 1
     ! Quick check on sort order:
-    call assert(xs(1) < xs(2), "regr11_step_av xs bad order")
-    call assert(xt(1) < xt(2), "regr11_step_av xt bad order")
-
-    call assert(xs(1) <= xt(1) .and. xt(nt + 1) <= xs(ns + 1), &
+    CALL assert(xs(1) < xs(2), "regr11_step_av xs bad order")
+    CALL assert(xt(1) < xt(2), "regr11_step_av xt bad order")
+
+    CALL assert(xs(1) <= xt(1) .and. xt(nt + 1) <= xs(ns + 1), &
          "regr11_step_av extrapolation")
 
@@ -115,8 +115,8 @@
 
     ! Quick check on sort order:
-    call assert(xs(1) < xs(2), "regr12_step_av xs bad order")
-    call assert(xt(1) < xt(2), "regr12_step_av xt bad order")
-
-    call assert(xs(1) <= xt(1) .and. xt(nt + 1) <= xs(ns + 1), &
+    CALL assert(xs(1) < xs(2), "regr12_step_av xs bad order")
+    CALL assert(xt(1) < xt(2), "regr12_step_av xt bad order")
+
+    CALL assert(xs(1) <= xt(1) .and. xt(nt + 1) <= xs(ns + 1), &
          "regr12_step_av extrapolation")
 
@@ -176,8 +176,8 @@
 
     ! Quick check on sort order:
-    call assert(xs(1) < xs(2), "regr13_step_av xs bad order")
-    call assert(xt(1) < xt(2), "regr13_step_av xt bad order")
-
-    call assert(xs(1) <= xt(1) .and. xt(nt + 1) <= xs(ns + 1), &
+    CALL assert(xs(1) < xs(2), "regr13_step_av xs bad order")
+    CALL assert(xt(1) < xt(2), "regr13_step_av xt bad order")
+
+    CALL assert(xs(1) <= xt(1) .and. xt(nt + 1) <= xs(ns + 1), &
          "regr13_step_av extrapolation")
 
@@ -237,8 +237,8 @@
 
     ! Quick check on sort order:
-    call assert(xs(1) < xs(2), "regr14_step_av xs bad order")
-    call assert(xt(1) < xt(2), "regr14_step_av xt bad order")
-
-    call assert(xs(1) <= xt(1) .and. xt(nt + 1) <= xs(ns + 1), &
+    CALL assert(xs(1) < xs(2), "regr14_step_av xs bad order")
+    CALL assert(xt(1) < xt(2), "regr14_step_av xt bad order")
+
+    CALL assert(xs(1) <= xt(1) .and. xt(nt + 1) <= xs(ns + 1), &
          "regr14_step_av extrapolation")
 
Index: LMDZ6/branches/Amaury_dev/libf/misc/regr_lint_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/misc/regr_lint_m.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/misc/regr_lint_m.F90	(revision 5101)
@@ -49,5 +49,5 @@
 !-------------------------------------------------------------------------------
   CALL check_size(ix,SHAPE(vs),SHAPE(vt),SIZE(xs),SIZE(xt),ns,nt)
-  is = -1 ! go immediately to bisection on first call to "hunt"
+  is = -1 ! go immediately to bisection on first CALL to "hunt"
   DO it=1,SIZE(xt)
     CALL hunt(xs,xt(it),is); isb=MIN(MAX(is,1),ns-1)
@@ -78,5 +78,5 @@
 !-------------------------------------------------------------------------------
   CALL check_size(ix,SHAPE(vs),SHAPE(vt),SIZE(xs),SIZE(xt),ns,nt)
-  is = -1 ! go immediately to bisection on first call to "hunt"
+  is = -1 ! go immediately to bisection on first CALL to "hunt"
   DO it=1,SIZE(xt)
     CALL hunt(xs,xt(it),is); isb=MIN(MAX(is,1),ns-1)
@@ -108,5 +108,5 @@
 !-------------------------------------------------------------------------------
   CALL check_size(ix,SHAPE(vs),SHAPE(vt),SIZE(xs),SIZE(xt),ns,nt)
-  is = -1 ! go immediately to bisection on first call to "hunt"
+  is = -1 ! go immediately to bisection on first CALL to "hunt"
   DO it=1,SIZE(xt)
     CALL hunt(xs,xt(it),is); isb=MIN(MAX(is,1),ns-1)
@@ -139,5 +139,5 @@
 !-------------------------------------------------------------------------------
   CALL check_size(ix,SHAPE(vs),SHAPE(vt),SIZE(xs),SIZE(xt),ns,nt)
-  is = -1 ! go immediately to bisection on first call to "hunt"
+  is = -1 ! go immediately to bisection on first CALL to "hunt"
   DO it=1,SIZE(xt)
     CALL hunt(xs,xt(it),is); isb=MIN(MAX(is,1),ns-1)
@@ -171,5 +171,5 @@
 !-------------------------------------------------------------------------------
   CALL check_size(ix,SHAPE(vs),SHAPE(vt),SIZE(xs),SIZE(xt),ns,nt)
-  is = -1 ! go immediately to bisection on first call to "hunt"
+  is = -1 ! go immediately to bisection on first CALL to "hunt"
   DO it=1,SIZE(xt)
     CALL hunt(xs,xt(it),is); isb=MIN(MAX(is,1),ns-1)
Index: LMDZ6/branches/Amaury_dev/libf/misc/vampir.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/misc/vampir.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/misc/vampir.F90	(revision 5101)
@@ -22,11 +22,11 @@
     integer :: ierr
     
-    call VTSYMDEF(VTcaldyn,"caldyn","caldyn",ierr)
-    call VTSYMDEF(VTintegre,"integre","integre",ierr)
-    call VTSYMDEF(VTadvection,"advection","advection",ierr)
-    call VTSYMDEF(VTdissipation,"dissipation","dissipation",ierr)
-    call VTSYMDEF(VThallo,"hallo","hallo",ierr)
-    call VTSYMDEF(VTphysiq,"physiq","physiq",ierr)
-    call VTSYMDEF(VTinca,"inca","inca",ierr)
+    CALL VTSYMDEF(VTcaldyn,"caldyn","caldyn",ierr)
+    CALL VTSYMDEF(VTintegre,"integre","integre",ierr)
+    CALL VTSYMDEF(VTadvection,"advection","advection",ierr)
+    CALL VTSYMDEF(VTdissipation,"dissipation","dissipation",ierr)
+    CALL VTSYMDEF(VThallo,"hallo","hallo",ierr)
+    CALL VTSYMDEF(VTphysiq,"physiq","physiq",ierr)
+    CALL VTSYMDEF(VTinca,"inca","inca",ierr)
 #endif
 
@@ -56,5 +56,5 @@
     integer :: ierr
     
-    call VTBEGIN(number,ierr)
+    CALL VTBEGIN(number,ierr)
 #endif 
 #ifdef USE_MPE
@@ -73,5 +73,5 @@
     integer :: ierr
    
-    call VTEND(number,ierr)
+    CALL VTEND(number,ierr)
 #endif    
 
Index: LMDZ6/branches/Amaury_dev/libf/misc/write_field.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/misc/write_field.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/misc/write_field.F90	(revision 5101)
@@ -46,5 +46,5 @@
       
       Dim=shape(Field)
-      call WriteField_gen(name,Field,Dim(1),Dim(2),Dim(3))  
+      CALL WriteField_gen(name,Field,Dim(1),Dim(2),Dim(3))
   
     end subroutine WriteField3d
@@ -57,5 +57,5 @@
       
       Dim=shape(Field)
-      call WriteField_gen(name,Field,Dim(1),Dim(2),1)  
+      CALL WriteField_gen(name,Field,Dim(1),Dim(2),1)
   
     end subroutine WriteField2d
@@ -68,5 +68,5 @@
       
       Dim=shape(Field)
-      call WriteField_gen(name,Field,Dim(1),1,1)  
+      CALL WriteField_gen(name,Field,Dim(1),1,1)
   
     end subroutine WriteField1d
@@ -86,5 +86,5 @@
       Index=GetFieldIndex(name)
       if (Index==-1) then
-        call CreateNewField(name,dimx,dimy,dimz)
+        CALL CreateNewField(name,dimx,dimy,dimz)
 	Index=GetFieldIndex(name)
       else
Index: LMDZ6/branches/Amaury_dev/libf/misc/wxios.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/misc/wxios.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/misc/wxios.F90	(revision 5101)
@@ -95,5 +95,5 @@
 
     SUBROUTINE wxios_init(xios_ctx_name, locom, outcom, type_ocean)
-        USE print_control_mod, ONLY : prt_level, lunout
+        USE print_control_mod, ONLY: prt_level, lunout
         IMPLICIT NONE
 
@@ -137,6 +137,6 @@
 
     SUBROUTINE wxios_context_init()
-        USE print_control_mod, ONLY : prt_level, lunout
-        USE mod_phys_lmdz_mpi_data, ONLY : COMM_LMDZ_PHY
+        USE print_control_mod, ONLY: prt_level, lunout
+        USE mod_phys_lmdz_mpi_data, ONLY: COMM_LMDZ_PHY
         IMPLICIT NONE
 
@@ -155,5 +155,5 @@
         IF (prt_level >= 10) THEN
           WRITE(lunout,*) "wxios_context_init: Current context is ",trim(g_ctx_name)
-          WRITE(lunout,*) "     now call xios_solve_inheritance()"
+          WRITE(lunout,*) "     now CALL xios_solve_inheritance()"
         ENDIF
         !Une première analyse des héritages:
@@ -168,5 +168,5 @@
       ! routine create by Anne Cozic (2023)
       ! This routine will create field associated to group defined without description of fields in field.xml file
-      ! This routine need to be call before "xios_sole_inheritance" after an !$OMP MASTER directive 
+      ! This routine need to be CALL before "xios_sole_inheritance" after an !$OMP MASTER directive
       
       USE infotrac_phy, ONLY: nbtr, nqtot, nqo, type_trac, tracers, niso, ntiso
@@ -291,5 +291,5 @@
 
     SUBROUTINE wxios_set_cal(pasdetemps, calendrier, annee, mois, jour, heure, ini_an, ini_mois, ini_jour, ini_heure)
-        USE print_control_mod, ONLY : prt_level, lunout
+        USE print_control_mod, ONLY: prt_level, lunout
         IMPLICIT NONE
 
@@ -364,5 +364,5 @@
                                      is_sequential, is_south_pole_dyn
        USE mod_grid_phy_lmdz, only: nbp_lon, nbp_lat, klon_glo         
-       USE print_control_mod, ONLY : prt_level, lunout
+       USE print_control_mod, ONLY: prt_level, lunout
        USE geometry_mod
 
@@ -446,9 +446,9 @@
 
     SUBROUTINE wxios_domain_param_unstructured(dom_id)
-        USE geometry_mod, ONLY : longitude, latitude, boundslon, boundslat,ind_cell_glo
-        USE mod_grid_phy_lmdz, ONLY : nvertex, klon_glo
+        USE geometry_mod, ONLY: longitude, latitude, boundslon, boundslat,ind_cell_glo
+        USE mod_grid_phy_lmdz, ONLY: nvertex, klon_glo
         USE mod_phys_lmdz_para 
-        USE nrtype, ONLY : PI
-        USE ioipsl_getin_p_mod, ONLY : getin_p
+        USE nrtype, ONLY: PI
+        USE ioipsl_getin_p_mod, ONLY: getin_p
         IMPLICIT NONE
         CHARACTER(len=*),INTENT(IN) :: dom_id ! domain identifier
@@ -501,5 +501,5 @@
     SUBROUTINE wxios_add_vaxis(axis_id, axis_size, axis_value,     &
                                positif, bnds)
-        USE print_control_mod, ONLY : prt_level, lunout
+        USE print_control_mod, ONLY: prt_level, lunout
         IMPLICIT NONE
 
@@ -558,5 +558,5 @@
     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     SUBROUTINE wxios_add_file(fname, ffreq, flvl)
-        USE print_control_mod, ONLY : prt_level, lunout
+        USE print_control_mod, ONLY: prt_level, lunout
         IMPLICIT NONE
 
@@ -642,5 +642,5 @@
     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     SUBROUTINE wxios_add_field_to_file(fieldname, fdim, fid, fname, fieldlongname, fieldunit, field_level, op, nam_axvert)
-        USE print_control_mod, ONLY : prt_level, lunout
+        USE print_control_mod, ONLY: prt_level, lunout
         IMPLICIT NONE
 
Index: LMDZ6/branches/Amaury_dev/libf/misc/xercnt.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/misc/xercnt.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/misc/xercnt.F	(revision 5101)
@@ -16,5 +16,5 @@
 C        Just after each message is recorded, but before it is
 C        processed any further (i.e., before it is printed or
-C        a decision to abort is made), a call is made to XERCNT.
+C        a decision to abort is made), a CALL is made to XERCNT.
 C        If the user has provided his own version of XERCNT, he
 C        can then override the value of KONTROL used in processing
@@ -32,8 +32,8 @@
 C        SUBROU - the subroutine that XERMSG is being called from
 C        MESSG  - the first 20 characters of the error message.
-C        NERR   - same as in the call to XERMSG.
-C        LEVEL  - same as in the call to XERMSG.
+C        NERR   - same as in the CALL to XERMSG.
+C        LEVEL  - same as in the CALL to XERMSG.
 C        KONTRL - the current value of the control flag as set
-C                 by a call to XSETF.
+C                 by a CALL to XSETF.
 C
 C      --Output--
Index: LMDZ6/branches/Amaury_dev/libf/misc/xermsg.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/misc/xermsg.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/misc/xermsg.F	(revision 5101)
@@ -135,5 +135,5 @@
 C    Each of the arguments to XERMSG is input; none will be modified by
 C    XERMSG.  A routine may make multiple calls to XERMSG with warning
-C    level messages; however, after a call to XERMSG with a recoverable
+C    level messages; however, after a CALL to XERMSG with a recoverable
 C    error, the routine should return to the user.  Do not try to call
 C    XERMSG with a second recoverable error after the first recoverable
@@ -145,6 +145,6 @@
 C    This is considered harmless for error numbers associated with
 C    warning messages but must not be done for error numbers of serious
-C    errors.  After a call to XERMSG with a recoverable error, the user
-C    must be given a chance to call NUMXER or XERCLR to retrieve or
+C    errors.  After a CALL to XERMSG with a recoverable error, the user
+C    must be given a chance to CALL NUMXER or XERCLR to retrieve or
 C    clear the error number.
 C***REFERENCES  R. E. Jones and D. K. Kahaner, XERROR, the SLATEC
Index: LMDZ6/branches/Amaury_dev/libf/misc/xgetua.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/misc/xgetua.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/misc/xgetua.F	(revision 5101)
@@ -15,6 +15,6 @@
 C        XGETUA may be called to determine the unit number or numbers
 C        to which error messages are being sent.
-C        These unit numbers may have been set by a call to XSETUN,
-C        or a call to XSETUA, or may be a default value.
+C        These unit numbers may have been set by a CALL to XSETUN,
+C        or a CALL to XSETUA, or may be a default value.
 C
 C     Description of Parameters
Index: LMDZ6/branches/Amaury_dev/libf/phy_common/abort_physic.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phy_common/abort_physic.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phy_common/abort_physic.F90	(revision 5101)
@@ -26,8 +26,8 @@
 #ifdef CPP_IOIPSL
 !$OMP MASTER
-      call histclo
-      call restclo
+      CALL histclo
+      CALL restclo
       if (mpi_rank .eq. 0) then
-         call getin_dump
+         CALL getin_dump
       endif
 !$OMP END MASTER
@@ -40,5 +40,5 @@
         if (using_mpi) then
           !$OMP CRITICAL (MPI_ABORT_PHYSIC)
-          call MPI_ABORT(COMM_LMDZ_PHY, 0, ierror_mpi)
+          CALL MPI_ABORT(COMM_LMDZ_PHY, 0, ierror_mpi)
           !$OMP END CRITICAL (MPI_ABORT_PHYSIC)
         else
@@ -49,5 +49,5 @@
         if (using_mpi) then
           !$OMP CRITICAL (MPI_ABORT_PHYSIC)
-          call MPI_ABORT(COMM_LMDZ_PHY, 1, ierror_mpi)
+          CALL MPI_ABORT(COMM_LMDZ_PHY, 1, ierror_mpi)
           !$OMP END CRITICAL (MPI_ABORT_PHYSIC)
         else
Index: LMDZ6/branches/Amaury_dev/libf/phy_common/geometry_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phy_common/geometry_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phy_common/geometry_mod.F90	(revision 5101)
@@ -39,5 +39,5 @@
                            cell_area_,ind_cell_glo_,dx_,dy_)
   USE mod_grid_phy_lmdz, ONLY: nvertex
-  USE nrtype, ONLY : PI
+  USE nrtype, ONLY: PI
   IMPLICIT NONE
     INTEGER,INTENT(IN) :: klon ! number of columns for this MPI/OpenMP domain
Index: LMDZ6/branches/Amaury_dev/libf/phy_common/init_print_control_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phy_common/init_print_control_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phy_common/init_print_control_mod.F90	(revision 5101)
@@ -7,6 +7,6 @@
 
   SUBROUTINE init_print_control
-  USE print_control_mod, ONLY : set_print_control
-  USE ioipsl_getin_p_mod, ONLY : getin_p
+  USE print_control_mod, ONLY: set_print_control
+  USE ioipsl_getin_p_mod, ONLY: getin_p
   USE mod_phys_lmdz_para, ONLY: is_omp_root, is_master
   IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phy_common/ioipsl_getin_p_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phy_common/ioipsl_getin_p_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phy_common/ioipsl_getin_p_mod.F90	(revision 5101)
@@ -10,7 +10,7 @@
 USE ioipsl_getincom, ONLY: getin
 #endif
-USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
-USE mod_phys_lmdz_omp_data, ONLY :  is_omp_root
-USE mod_phys_lmdz_transfert_para, ONLY : bcast
+USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
+USE mod_phys_lmdz_omp_data, ONLY:  is_omp_root
+USE mod_phys_lmdz_transfert_para, ONLY: bcast
 !-
 IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phy_common/mod_phys_lmdz_mpi_transfert.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phy_common/mod_phys_lmdz_mpi_transfert.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phy_common/mod_phys_lmdz_mpi_transfert.F90	(revision 5101)
@@ -78,5 +78,5 @@
   
   SUBROUTINE bcast_mpi_i(var)
-  USE mod_phys_lmdz_mpi_data, ONLY : is_mpi_root
+  USE mod_phys_lmdz_mpi_data, ONLY: is_mpi_root
   IMPLICIT NONE
     INTEGER,INTENT(INOUT) :: Var
@@ -126,5 +126,5 @@
 
   SUBROUTINE bcast_mpi_r(var)
-  USE mod_phys_lmdz_mpi_data, ONLY : is_mpi_root
+  USE mod_phys_lmdz_mpi_data, ONLY: is_mpi_root
   IMPLICIT NONE
     REAL,INTENT(INOUT) :: Var
@@ -172,5 +172,5 @@
 
   SUBROUTINE bcast_mpi_l(var)
-  USE mod_phys_lmdz_mpi_data, ONLY : is_mpi_root
+  USE mod_phys_lmdz_mpi_data, ONLY: is_mpi_root
   IMPLICIT NONE
     LOGICAL,INTENT(INOUT) :: Var
@@ -220,5 +220,5 @@
 
   SUBROUTINE scatter_mpi_i(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -231,5 +231,5 @@
 
   SUBROUTINE scatter_mpi_i1(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -242,5 +242,5 @@
   
   SUBROUTINE scatter_mpi_i2(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -253,5 +253,5 @@
 
   SUBROUTINE scatter_mpi_i3(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -265,5 +265,5 @@
 
   SUBROUTINE scatter_mpi_r(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -276,5 +276,5 @@
 
   SUBROUTINE scatter_mpi_r1(VarIn, VarOut)
-  USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+  USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
   IMPLICIT NONE
   
@@ -287,5 +287,5 @@
   
   SUBROUTINE scatter_mpi_r2(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -298,5 +298,5 @@
 
   SUBROUTINE scatter_mpi_r3(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -310,5 +310,5 @@
 
   SUBROUTINE scatter_mpi_l(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -321,5 +321,5 @@
 
   SUBROUTINE scatter_mpi_l1(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -332,5 +332,5 @@
   
   SUBROUTINE scatter_mpi_l2(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -343,5 +343,5 @@
 
   SUBROUTINE scatter_mpi_l3(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -360,5 +360,5 @@
 
   SUBROUTINE gather_mpi_i(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -374,5 +374,5 @@
 
   SUBROUTINE gather_mpi_i1(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -387,5 +387,5 @@
   
   SUBROUTINE gather_mpi_i2(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -400,5 +400,5 @@
 
   SUBROUTINE gather_mpi_i3(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -413,5 +413,5 @@
 
   SUBROUTINE gather_mpi_r(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -426,5 +426,5 @@
 
   SUBROUTINE gather_mpi_r1(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -439,5 +439,5 @@
   
   SUBROUTINE gather_mpi_r2(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -452,5 +452,5 @@
 
   SUBROUTINE gather_mpi_r3(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -465,5 +465,5 @@
 
   SUBROUTINE gather_mpi_l(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -478,5 +478,5 @@
 
   SUBROUTINE gather_mpi_l1(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -491,5 +491,5 @@
   
   SUBROUTINE gather_mpi_l2(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -504,5 +504,5 @@
 
   SUBROUTINE gather_mpi_l3(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -873,5 +873,5 @@
 
   SUBROUTINE reduce_sum_mpi_i(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -888,5 +888,5 @@
 
   SUBROUTINE reduce_sum_mpi_i1(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -899,5 +899,5 @@
 
   SUBROUTINE reduce_sum_mpi_i2(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -910,5 +910,5 @@
 
   SUBROUTINE reduce_sum_mpi_i3(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -921,5 +921,5 @@
 
   SUBROUTINE reduce_sum_mpi_i4(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -933,5 +933,5 @@
   
   SUBROUTINE reduce_sum_mpi_r(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -948,5 +948,5 @@
 
   SUBROUTINE reduce_sum_mpi_r1(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -959,5 +959,5 @@
 
   SUBROUTINE reduce_sum_mpi_r2(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -970,5 +970,5 @@
 
   SUBROUTINE reduce_sum_mpi_r3(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -981,5 +981,5 @@
 
   SUBROUTINE reduce_sum_mpi_r4(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -997,5 +997,5 @@
 
   SUBROUTINE reduce_min_mpi_i(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -1012,5 +1012,5 @@
 
   SUBROUTINE reduce_min_mpi_i1(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -1023,5 +1023,5 @@
 
   SUBROUTINE reduce_min_mpi_i2(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -1034,5 +1034,5 @@
 
   SUBROUTINE reduce_min_mpi_i3(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -1045,5 +1045,5 @@
 
   SUBROUTINE reduce_min_mpi_i4(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -1057,5 +1057,5 @@
   
   SUBROUTINE reduce_min_mpi_r(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -1072,5 +1072,5 @@
 
   SUBROUTINE reduce_min_mpi_r1(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -1083,5 +1083,5 @@
 
   SUBROUTINE reduce_min_mpi_r2(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -1094,5 +1094,5 @@
 
   SUBROUTINE reduce_min_mpi_r3(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
@@ -1105,5 +1105,5 @@
 
   SUBROUTINE reduce_min_mpi_r4(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     IMPLICIT NONE
   
Index: LMDZ6/branches/Amaury_dev/libf/phy_common/mod_phys_lmdz_omp_data.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phy_common/mod_phys_lmdz_omp_data.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phy_common/mod_phys_lmdz_omp_data.F90	(revision 5101)
@@ -25,5 +25,5 @@
   SUBROUTINE Init_phys_lmdz_omp_data(klon_mpi)
     USE dimphy 
-    USE mod_phys_lmdz_mpi_data, ONLY : is_north_pole_dyn, is_south_pole_dyn
+    USE mod_phys_lmdz_mpi_data, ONLY: is_north_pole_dyn, is_south_pole_dyn
     IMPLICIT NONE
     INTEGER, INTENT(in) :: klon_mpi
Index: LMDZ6/branches/Amaury_dev/libf/phy_common/mod_phys_lmdz_omp_transfert.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phy_common/mod_phys_lmdz_omp_transfert.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phy_common/mod_phys_lmdz_omp_transfert.F90	(revision 5101)
@@ -934,5 +934,5 @@
   SUBROUTINE scatter_omp_igen(VarIn,VarOut,dimsize,Buff)
     USE mod_phys_lmdz_omp_data
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi 
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
 
@@ -965,5 +965,5 @@
   SUBROUTINE scatter_omp_rgen(VarIn,VarOut,dimsize,Buff)
   USE mod_phys_lmdz_omp_data
-  USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi 
+  USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
   IMPLICIT NONE
 
@@ -996,5 +996,5 @@
   SUBROUTINE scatter_omp_lgen(VarIn,VarOut,dimsize,Buff)
   USE mod_phys_lmdz_omp_data
-  USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi 
+  USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
   IMPLICIT NONE
 
@@ -1030,5 +1030,5 @@
   SUBROUTINE gather_omp_igen(VarIn,VarOut,dimsize,Buff)
   USE mod_phys_lmdz_omp_data
-  USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi 
+  USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
   IMPLICIT NONE
 
@@ -1062,5 +1062,5 @@
   SUBROUTINE gather_omp_rgen(VarIn,VarOut,dimsize)
   USE mod_phys_lmdz_omp_data
-  USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi 
+  USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
   IMPLICIT NONE
 
@@ -1089,5 +1089,5 @@
   SUBROUTINE gather_omp_lgen(VarIn,VarOut,dimsize,Buff)
   USE mod_phys_lmdz_omp_data
-  USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi 
+  USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
   IMPLICIT NONE
 
Index: LMDZ6/branches/Amaury_dev/libf/phy_common/mod_phys_lmdz_transfert_para.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phy_common/mod_phys_lmdz_transfert_para.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phy_common/mod_phys_lmdz_transfert_para.F90	(revision 5101)
@@ -256,5 +256,5 @@
 
   SUBROUTINE scatter_i(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -274,5 +274,5 @@
 
   SUBROUTINE scatter_i1(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -291,5 +291,5 @@
 
   SUBROUTINE scatter_i2(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -308,5 +308,5 @@
 
   SUBROUTINE scatter_i3(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -325,5 +325,5 @@
 
   SUBROUTINE scatter_r(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -343,5 +343,5 @@
 
   SUBROUTINE scatter_r1(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -360,5 +360,5 @@
 
   SUBROUTINE scatter_r2(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -377,5 +377,5 @@
 
   SUBROUTINE scatter_r3(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -395,5 +395,5 @@
 
   SUBROUTINE scatter_l(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -413,5 +413,5 @@
 
   SUBROUTINE scatter_l1(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -430,5 +430,5 @@
 
   SUBROUTINE scatter_l2(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -447,5 +447,5 @@
 
   SUBROUTINE scatter_l3(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -471,5 +471,5 @@
 
   SUBROUTINE gather_i(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -488,5 +488,5 @@
 
   SUBROUTINE gather_i1(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -505,5 +505,5 @@
 
   SUBROUTINE gather_i2(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -522,5 +522,5 @@
 
   SUBROUTINE gather_i3(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -541,5 +541,5 @@
 
   SUBROUTINE gather_r(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -558,5 +558,5 @@
 
   SUBROUTINE gather_r1(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -575,5 +575,5 @@
 
   SUBROUTINE gather_r2(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -592,5 +592,5 @@
 
   SUBROUTINE gather_r3(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -611,5 +611,5 @@
 
   SUBROUTINE gather_l(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -628,5 +628,5 @@
 
   SUBROUTINE gather_l1(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -645,5 +645,5 @@
 
   SUBROUTINE gather_l2(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -662,5 +662,5 @@
 
   SUBROUTINE gather_l3(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -686,5 +686,5 @@
 
   SUBROUTINE scatter2D_i(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -703,5 +703,5 @@
 
   SUBROUTINE scatter2D_i1(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -720,5 +720,5 @@
 
   SUBROUTINE scatter2D_i2(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -737,5 +737,5 @@
 
   SUBROUTINE scatter2D_i3(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -756,5 +756,5 @@
 
   SUBROUTINE scatter2D_r(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -773,5 +773,5 @@
 
   SUBROUTINE scatter2D_r1(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -790,5 +790,5 @@
 
   SUBROUTINE scatter2D_r2(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -807,5 +807,5 @@
 
   SUBROUTINE scatter2D_r3(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -827,5 +827,5 @@
 
   SUBROUTINE scatter2D_l(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -844,5 +844,5 @@
 
   SUBROUTINE scatter2D_l1(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -861,5 +861,5 @@
 
   SUBROUTINE scatter2D_l2(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -878,5 +878,5 @@
 
   SUBROUTINE scatter2D_l3(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -901,5 +901,5 @@
 
   SUBROUTINE gather2D_i(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -918,5 +918,5 @@
 
   SUBROUTINE gather2D_i1(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -935,5 +935,5 @@
   
   SUBROUTINE gather2D_i2(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -952,5 +952,5 @@
 
   SUBROUTINE gather2D_i3(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -971,5 +971,5 @@
 
   SUBROUTINE gather2D_r(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -988,5 +988,5 @@
 
   SUBROUTINE gather2D_r1(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -1005,5 +1005,5 @@
   
   SUBROUTINE gather2D_r2(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -1022,5 +1022,5 @@
 
   SUBROUTINE gather2D_r3(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -1041,5 +1041,5 @@
 
   SUBROUTINE gather2D_l(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -1058,5 +1058,5 @@
 
   SUBROUTINE gather2D_l1(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -1075,5 +1075,5 @@
   
   SUBROUTINE gather2D_l2(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
@@ -1092,5 +1092,5 @@
 
   SUBROUTINE gather2D_l3(VarIn, VarOut)
-    USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
+    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi
     IMPLICIT NONE
   
Index: LMDZ6/branches/Amaury_dev/libf/phy_common/physics_distribution_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phy_common/physics_distribution_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phy_common/physics_distribution_mod.F90	(revision 5101)
@@ -12,8 +12,8 @@
   USE mod_phys_lmdz_para, ONLY: init_phys_lmdz_para, klon_omp
   USE mod_grid_phy_lmdz, ONLY: init_grid_phy_lmdz
-  USE dimphy, ONLY : Init_dimphy
-  USE infotrac_phy, ONLY : type_trac
+  USE dimphy, ONLY: Init_dimphy
+  USE infotrac_phy, ONLY: type_trac
 #ifdef REPROBUS
-  USE CHEM_REP, ONLY : Init_chem_rep_phys
+  USE CHEM_REP, ONLY: Init_chem_rep_phys
 #endif
   USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA
@@ -49,8 +49,8 @@
 !  USE mod_phys_lmdz_para, ONLY: Init_phys_lmdz_para!, klon_omp
 !  USE mod_grid_phy_lmdz, ONLY: Init_grid_phy_lmdz!, nbp_lev
-!  USE dimphy, ONLY : Init_dimphy
-!  USE infotrac_phy, ONLY : type_trac
+!  USE dimphy, ONLY: Init_dimphy
+!  USE infotrac_phy, ONLY: type_trac
 !#ifdef REPROBUS
-!  USE CHEM_REP, ONLY : Init_chem_rep_phys
+!  USE CHEM_REP, ONLY: Init_chem_rep_phys
 !#endif
 
Index: LMDZ6/branches/Amaury_dev/libf/phy_common/print_control_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phy_common/print_control_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phy_common/print_control_mod.F90	(revision 5101)
@@ -5,6 +5,6 @@
   INTEGER,SAVE :: prt_level ! debug output level
   LOGICAL,SAVE :: debug ! flag to specify if in "debug mode"
-  LOGICAL,SAVE :: alert_first_call = .TRUE. ! for printing alerts on first call to routine only           
-  LOGICAL,SAVE :: call_alert ! (combination of is_master and alert_first_call for easier use     
+  LOGICAL,SAVE :: alert_first_CALL = .TRUE. ! for printing alerts on first CALL to routine only
+  LOGICAL,SAVE :: call_alert ! (combination of is_master and alert_first_CALL for easier use
 !$OMP THREADPRIVATE(lunout,prt_level,debug, alert_first_call, call_alert)
 
Index: LMDZ6/branches/Amaury_dev/libf/phydev/iophy.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phydev/iophy.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phydev/iophy.F90	(revision 5101)
@@ -103,5 +103,5 @@
     
 #ifndef CPP_IOIPSL_NO_OUTPUT
-    call flio_dom_set(mpi_size,mpi_rank,ddid,dsg,dsl,dpf,dpl,dhs,dhe, &
+    CALL flio_dom_set(mpi_size,mpi_rank,ddid,dsg,dsl,dpf,dpl,dhs,dhe, &
                       'APPLE',phys_domain_id)
 #endif
@@ -157,8 +157,8 @@
 !$OMP MASTER    
     if (is_sequential) then
-      call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
+      CALL histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
                    1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day)
     else
-      call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
+      CALL histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
                    1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day,phys_domain_id)
     endif
Index: LMDZ6/branches/Amaury_dev/libf/phydev/phyetat0.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phydev/phyetat0.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phydev/phyetat0.F90	(revision 5101)
@@ -7,7 +7,7 @@
 
   USE dimphy, only: klon
-  USE iostart, ONLY : open_startphy,get_field,close_startphy
-  USE iophy, ONLY : init_iophy_new
-  USE geometry_mod, ONLY : longitude_deg, latitude_deg
+  USE iostart, ONLY: open_startphy,get_field,close_startphy
+  USE iophy, ONLY: init_iophy_new
+  USE geometry_mod, ONLY: longitude_deg, latitude_deg
 
   IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phydev/phyredem.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phydev/phyredem.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phydev/phyredem.F90	(revision 5101)
@@ -4,5 +4,5 @@
 SUBROUTINE phyredem (fichnom)
 
-  USE geometry_mod, ONLY : longitude_deg, latitude_deg
+  USE geometry_mod, ONLY: longitude_deg, latitude_deg
   USE iostart, ONLY: open_restartphy, close_restartphy, enddef_restartphy, put_field, put_var
 
Index: LMDZ6/branches/Amaury_dev/libf/phydev/phys_state_var_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phydev/phys_state_var_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phydev/phys_state_var_mod.F90	(revision 5101)
@@ -7,5 +7,5 @@
 !======================================================================
 
-!USE dimphy, only : klon
+!USE dimphy, ONLY: klon
  
 
@@ -17,5 +17,5 @@
 !======================================================================
   SUBROUTINE phys_state_var_init()
-!  use dimphy, only : klon
+!  use dimphy, ONLY: klon
 
 !  if (.not.allocated(rlat)) then
@@ -29,5 +29,5 @@
 !======================================================================
   SUBROUTINE phys_state_var_end
-!  use dimphy, only : klon
+!  use dimphy, ONLY: klon
 
 !  deallocate(rlat,rlon)
Index: LMDZ6/branches/Amaury_dev/libf/phydev/physiq_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phydev/physiq_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phydev/physiq_mod.F90	(revision 5101)
@@ -13,12 +13,12 @@
               d_u, d_v, d_t, d_qx, d_ps)
 
-      USE dimphy, only : klon,klev
-      USE infotrac_phy, only : nqtot
-      USE geometry_mod, only : latitude
-      USE comcstphy, only : rg
-      USE iophy, only : histbeg_phy,histwrite_phy
-      USE ioipsl, only : getin,histvert,histdef,histend,ymds2ju
-      USE mod_phys_lmdz_para, only : jj_nb
-      USE phys_state_var_mod, only : phys_state_var_init
+      USE dimphy, ONLY: klon,klev
+      USE infotrac_phy, ONLY: nqtot
+      USE geometry_mod, ONLY: latitude
+      USE comcstphy, ONLY: rg
+      USE iophy, ONLY: histbeg_phy,histwrite_phy
+      USE ioipsl, ONLY: getin,histvert,histdef,histend,ymds2ju
+      USE mod_phys_lmdz_para, ONLY: jj_nb
+      USE phys_state_var_mod, ONLY: phys_state_var_init
       USE mod_grid_phy_lmdz, ONLY: nbp_lon,nbp_lat
 
@@ -33,6 +33,6 @@
       integer,intent(in) :: nlon ! number of atmospheric colums
       integer,intent(in) :: nlev ! number of vertical levels (should be =klev)
-      logical,intent(in) :: debut ! signals first call to physics
-      logical,intent(in) :: lafin ! signals last call to physics
+      logical,intent(in) :: debut ! signals first CALL to physics
+      logical,intent(in) :: lafin ! signals last CALL to physics
       real,intent(in) :: pdtphys ! physics time step (s)
       real,intent(in) :: paprs(klon,klev+1) ! interlayer pressure (Pa)
@@ -75,8 +75,8 @@
 
 ! initializations
-if (debut) then ! Things to do only for the first call to physics 
+if (debut) then ! Things to do only for the first CALL to physics
 ! load initial conditions for physics (including the grid)
-  call phys_state_var_init() ! some initializations, required before calling phyetat0
-  call phyetat0("startphy.nc")
+  CALL phys_state_var_init() ! some initializations, required before calling phyetat0
+  CALL phyetat0("startphy.nc")
 
 ! Initialize outputs:
@@ -84,6 +84,6 @@
 !$OMP MASTER
   iwrite_phys_omp=1 !default: output every physics timestep
-  ! NB: getin() is not threadsafe; only one thread should call it.
-  call getin("iwrite_phys",iwrite_phys_omp)
+  ! NB: getin() is not threadsafe; only one thread should CALL it.
+  CALL getin("iwrite_phys",iwrite_phys_omp)
 !$OMP END MASTER
 !$OMP BARRIER
@@ -93,9 +93,9 @@
   ! compute zjulian for annee0=1979 and month=1 dayref=1 and hour=0.0
   !CALL ymds2ju(annee0, month, dayref, hour, zjulian)
-  call ymds2ju(1979, 1, 1, 0.0, zjulian)
+  CALL ymds2ju(1979, 1, 1, 0.0, zjulian)
   dtime=pdtphys
 #ifndef CPP_IOIPSL_NO_OUTPUT
   ! Initialize IOIPSL output file
-  call histbeg_phy("histins.nc",itau0,zjulian,dtime,nhori,nid_hist)
+  CALL histbeg_phy("histins.nc",itau0,zjulian,dtime,nhori,nid_hist)
 #endif
 
@@ -105,21 +105,21 @@
 ! IOIPSL
   ! define vertical coordinate
-  call histvert(nid_hist,"presnivs","Vertical levels","Pa",klev, &
+  CALL histvert(nid_hist,"presnivs","Vertical levels","Pa",klev, &
                 presnivs,zvertid,'down')
   ! define variables which will be written in "histins.nc" file
-  call histdef(nid_hist,'temperature','Atmospheric temperature','K', &
+  CALL histdef(nid_hist,'temperature','Atmospheric temperature','K', &
                nbp_lon,jj_nb,nhori,klev,1,klev,zvertid,32, &
                'inst(X)',t_ops,t_wrt)
-  call histdef(nid_hist,'u','Eastward Zonal Wind','m/s', &
+  CALL histdef(nid_hist,'u','Eastward Zonal Wind','m/s', &
                nbp_lon,jj_nb,nhori,klev,1,klev,zvertid,32, &
                'inst(X)',t_ops,t_wrt)
-  call histdef(nid_hist,'v','Northward Meridional Wind','m/s', &
+  CALL histdef(nid_hist,'v','Northward Meridional Wind','m/s', &
                nbp_lon,jj_nb,nhori,klev,1,klev,zvertid,32, &
                'inst(X)',t_ops,t_wrt)
-  call histdef(nid_hist,'ps','Surface Pressure','Pa', &
+  CALL histdef(nid_hist,'ps','Surface Pressure','Pa', &
                nbp_lon,jj_nb,nhori,1,1,1,zvertid,32, &
                'inst(X)',t_ops,t_wrt)
   ! end definition sequence
-  call histend(nid_hist)
+  CALL histend(nid_hist)
 #endif
 
@@ -166,8 +166,8 @@
 #ifndef CPP_IOIPSL_NO_OUTPUT 
 if (modulo(itau,iwrite_phys)==0) then
-  call histwrite_phy(nid_hist,.false.,"temperature",itau,t)
-  call histwrite_phy(nid_hist,.false.,"u",itau,u)
-  call histwrite_phy(nid_hist,.false.,"v",itau,v)
-  call histwrite_phy(nid_hist,.false.,"ps",itau,paprs(:,1))
+  CALL histwrite_phy(nid_hist,.false.,"temperature",itau,t)
+  CALL histwrite_phy(nid_hist,.false.,"u",itau,u)
+  CALL histwrite_phy(nid_hist,.false.,"v",itau,v)
+  CALL histwrite_phy(nid_hist,.false.,"ps",itau,paprs(:,1))
 endif
 #endif
@@ -192,5 +192,5 @@
 ! if lastcall, then it is time to write "restartphy.nc" file
 if (lafin) then
-  call phyredem("restartphy.nc")
+  CALL phyredem("restartphy.nc")
 endif
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/coarsemission.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/coarsemission.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/coarsemission.F	(revision 5101)
@@ -28,6 +28,6 @@
       USE indice_sol_mod
       USE infotrac
-      USE dustemission_mod,  ONLY : dustemission 
-!      USE phytracr_spl_mod, ONLY : nbreg_dust, nbreg_ind, nbreg_bb
+      USE dustemission_mod,  ONLY: dustemission
+!      USE phytracr_spl_mod, ONLY: nbreg_dust, nbreg_ind, nbreg_bb
       IMPLICIT NONE
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/condsurfc.f90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/condsurfc.f90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/condsurfc.f90	(revision 5101)
@@ -4,5 +4,5 @@
         lmt_omnat)
   USE dimphy
-  USE netcdf, ONLY : nf90_close, nf90_noerr, nf90_inq_varid, nf90_open, nf90_nowrite, nf90_get_var
+  USE netcdf, ONLY: nf90_close, nf90_noerr, nf90_inq_varid, nf90_open, nf90_nowrite, nf90_get_var
   IMPLICIT none
 
@@ -38,5 +38,5 @@
     write(6, *)' Pb d''ouverture du fichier limitbc.nc'
     write(6, *)' ierr = ', ierr
-    call exit(1)
+    CALL exit(1)
   endif
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/condsurfc_new.f90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/condsurfc_new.f90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/condsurfc_new.f90	(revision 5101)
@@ -6,5 +6,5 @@
   USE mod_phys_lmdz_para
   USE dimphy
-  USE netcdf, ONLY : nf90_get_var, nf90_close, nf90_noerr, nf90_inq_varid, nf90_open, nf90_nowrite
+  USE netcdf, ONLY: nf90_get_var, nf90_close, nf90_noerr, nf90_inq_varid, nf90_open, nf90_nowrite
   IMPLICIT none
 
@@ -61,5 +61,5 @@
       write(6, *)' Pb d''ouverture du fichier limitbc.nc'
       write(6, *)' ierr = ', ierr
-      call exit(1)
+      CALL exit(1)
     endif
 
@@ -192,16 +192,16 @@
   !$OMP END MASTER
   !$OMP BARRIER
-  call scatter(lmt_bcff_glo, lmt_bcff)
-  call scatter(lmt_bcnff_glo, lmt_bcnff)
-  call scatter(lmt_bcbbl_glo, lmt_bcbbl)
-  call scatter(lmt_bcbbh_glo, lmt_bcbbh)
-  call scatter(lmt_bcba_glo, lmt_bcba)
-  call scatter(lmt_omff_glo, lmt_omff)
-  call scatter(lmt_omnff_glo, lmt_omnff)
-  call scatter(lmt_ombbl_glo, lmt_ombbl)
-  call scatter(lmt_ombbh_glo, lmt_ombbh)
-  call scatter(lmt_omba_glo, lmt_omba)
-  call scatter(lmt_terp_glo, lmt_terp)
-  call scatter(lmt_omnat_glo, lmt_omnat)
+  CALL scatter(lmt_bcff_glo, lmt_bcff)
+  CALL scatter(lmt_bcnff_glo, lmt_bcnff)
+  CALL scatter(lmt_bcbbl_glo, lmt_bcbbl)
+  CALL scatter(lmt_bcbbh_glo, lmt_bcbbh)
+  CALL scatter(lmt_bcba_glo, lmt_bcba)
+  CALL scatter(lmt_omff_glo, lmt_omff)
+  CALL scatter(lmt_omnff_glo, lmt_omnff)
+  CALL scatter(lmt_ombbl_glo, lmt_ombbl)
+  CALL scatter(lmt_ombbh_glo, lmt_ombbh)
+  CALL scatter(lmt_omba_glo, lmt_omba)
+  CALL scatter(lmt_terp_glo, lmt_terp)
+  CALL scatter(lmt_omnat_glo, lmt_omnat)
 
   RETURN
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/condsurfs.f90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/condsurfs.f90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/condsurfs.f90	(revision 5101)
@@ -4,5 +4,5 @@
         lmt_dmsbio, lmt_h2sbio, lmt_dms, lmt_dmsconc)
   USE dimphy
-  USE netcdf, ONLY : nf90_close, nf90_noerr, nf90_inq_varid, nf90_open, &
+  USE netcdf, ONLY: nf90_close, nf90_noerr, nf90_inq_varid, nf90_open, &
           nf90_nowrite, nf90_get_var
   IMPLICIT none
@@ -39,5 +39,5 @@
     write(6, *)' Pb d''ouverture du fichier limitsoufre.nc'
     write(6, *)' ierr = ', ierr
-    call exit(1)
+    CALL exit(1)
   endif
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/condsurfs_new.f90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/condsurfs_new.f90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/condsurfs_new.f90	(revision 5101)
@@ -9,5 +9,5 @@
   USE mod_phys_lmdz_para
   USE dimphy
-  USE netcdf, ONLY : nf90_get_var, nf90_inq_varid, nf90_close, nf90_noerr, nf90_open, nf90_nowrite
+  USE netcdf, ONLY: nf90_get_var, nf90_inq_varid, nf90_close, nf90_noerr, nf90_open, nf90_nowrite
   IMPLICIT none
 
@@ -64,5 +64,5 @@
       write(6, *)' Pb d''ouverture du fichier sulphur_emissions_antro'
       write(6, *)' ierr = ', ierr
-      call exit(1)
+      CALL exit(1)
     endif
 
@@ -133,5 +133,5 @@
       write(6, *)' Pb d''ouverture du fichier sulphur_emissions_nat'
       write(6, *)' ierr = ', ierr
-      call exit(1)
+      CALL exit(1)
     endif
 
@@ -188,5 +188,5 @@
       write(6, *)' Pb d''ouverture du fichier sulphur_emissions_volc'
       write(6, *)' ierr = ', ierr
-      call exit(1)
+      CALL exit(1)
     endif
 
@@ -243,18 +243,18 @@
   !$OMP END MASTER
   !$OMP BARRIER
-  call scatter(lmt_so2b_glo, lmt_so2b)
-  call scatter(lmt_so2h_glo, lmt_so2h)
-  call scatter(lmt_so2bb_h_glo, lmt_so2bb_h)
-  call scatter(lmt_so2bb_l_glo, lmt_so2bb_l)
-  call scatter(lmt_so2ba_glo, lmt_so2ba)
-  call scatter(lmt_so2nff_glo, lmt_so2nff)
-  call scatter(lmt_dmsbio_glo, lmt_dmsbio)
-  call scatter(lmt_h2sbio_glo, lmt_h2sbio)
-  call scatter(lmt_dmsconc_glo, lmt_dmsconc)
-  call scatter(lmt_dms_glo, lmt_dms)
-  call scatter(lmt_so2volc_cont_glo, lmt_so2volc_cont)
-  call scatter(lmt_altvolc_cont_glo, lmt_altvolc_cont)
-  call scatter(lmt_so2volc_expl_glo, lmt_so2volc_expl)
-  call scatter(lmt_altvolc_expl_glo, lmt_altvolc_expl)
+  CALL scatter(lmt_so2b_glo, lmt_so2b)
+  CALL scatter(lmt_so2h_glo, lmt_so2h)
+  CALL scatter(lmt_so2bb_h_glo, lmt_so2bb_h)
+  CALL scatter(lmt_so2bb_l_glo, lmt_so2bb_l)
+  CALL scatter(lmt_so2ba_glo, lmt_so2ba)
+  CALL scatter(lmt_so2nff_glo, lmt_so2nff)
+  CALL scatter(lmt_dmsbio_glo, lmt_dmsbio)
+  CALL scatter(lmt_h2sbio_glo, lmt_h2sbio)
+  CALL scatter(lmt_dmsconc_glo, lmt_dmsconc)
+  CALL scatter(lmt_dms_glo, lmt_dms)
+  CALL scatter(lmt_so2volc_cont_glo, lmt_so2volc_cont)
+  CALL scatter(lmt_altvolc_cont_glo, lmt_altvolc_cont)
+  CALL scatter(lmt_so2volc_expl_glo, lmt_so2volc_expl)
+  CALL scatter(lmt_altvolc_expl_glo, lmt_altvolc_expl)
 
   RETURN
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/dustemission_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/dustemission_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/dustemission_mod.F90	(revision 5101)
@@ -223,5 +223,5 @@
 
   IF( debutphy ) THEN  
-!       call gather(maskdust,maskdust_glo)
+!       CALL gather(maskdust,maskdust_glo)
 !     !$OMP MASTER
 !     IF (is_mpi_root .AND. is_omp_root) THEN
@@ -349,5 +349,5 @@
 
   if (sizedustmin>sizeacclow .or. sizedustmax<sizescohigh) then 
-   call abort_gcm('adaptdustemission', 'Dust range problem',1)
+   CALL abort_gcm('adaptdustemission', 'Dust range problem',1)
   endif
   print *,'FINE DUST BIN: tuning EMISSION factor= ',tuningfactorfine
@@ -393,6 +393,6 @@
 !  allocate(itvmean_glo(klon_glo,nbins))
 !  ALLOCATE(emisbinlocalmean2_glo(klon_glo,nbins))
-!  call gather(itv2,itv2_glo)
-!  call gather(itvmean,itvmean_glo)
+!  CALL gather(itv2,itv2_glo)
+!  CALL gather(itvmean,itvmean_glo)
 !!$OMP MASTER
 !  IF (is_mpi_root .AND. is_omp_root) THEN
@@ -486,5 +486,5 @@
    enddo
    counter1=0
-!   call gather(emisbinlocalmean2,emisbinlocalmean2_glo)
+!   CALL gather(emisbinlocalmean2,emisbinlocalmean2_glo)
 !!$OMP MASTER
 !   IF (is_mpi_root .AND. is_omp_root) THEN
@@ -747,5 +747,5 @@
 !$OMP BARRIER
 !print *,'JEOK10',mpi_rank,omp_rank
-  call bcast(solspe)
+  CALL bcast(solspe)
 ! Calcul de la distribution en taille des particules de Dust
 ! Elle depend du nombre de classe des particules nclass.
@@ -951,5 +951,5 @@
 ! DO nb=1,nbinsHR
 !     vdHR(nb)=vdout(nb)
-!!  WRITE(18,*),binsHR(nb),vdHR(nb)
+!!  WRITE(18,*) binsHR(nb),vdHR(nb)
 !  END DO
 
@@ -1083,5 +1083,5 @@
       DO k=1,ndistb
         DO nb=1,nbins
-            write(15001,*),k,nb,massfrac(k,nb)
+            write(15001,*) k,nb,massfrac(k,nb)
         ENDDO
       ENDDO
@@ -1384,7 +1384,7 @@
 !      print*,'ustarsalt = ',ustarsalt,'dsmin=',dsmin,'dsmax=',dsmax
 ! dichotomy
-         call def_dichotomy(sizeclass,nclass,1,ncl,dsmin,ideb)
+         CALL def_dichotomy(sizeclass,nclass,1,ncl,dsmin,ideb)
    !      print*,'ideb = ',ideb
-         call def_dichotomy(sizeclass,nclass,ideb,ncl,dsmax,ifin)
+         CALL def_dichotomy(sizeclass,nclass,ideb,ncl,dsmax,ifin)
    !      print*,'ifin = ',ifin
 ! readaptation of large sizes particles
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/finemission.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/finemission.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/finemission.F	(revision 5101)
@@ -14,5 +14,5 @@
       USE indice_sol_mod
       USE infotrac
-!      USE phytracr_spl_mod, ONLY : nbreg_dust, nbreg_ind, nbreg_bb
+!      USE phytracr_spl_mod, ONLY: nbreg_dust, nbreg_ind, nbreg_bb
       IMPLICIT NONE
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/lsc_scav_orig.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/lsc_scav_orig.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/lsc_scav_orig.F90	(revision 5101)
@@ -9,5 +9,5 @@
   USE mod_phys_lmdz_para
   USE traclmdz_mod
-  USE infotrac,ONLY : nbtr
+  USE infotrac,ONLY: nbtr
   USE iophy
   USE lmdz_yomcst
@@ -97,5 +97,5 @@
 
 !  inscav_fisrt=.true.
-!  call getin('inscav_fisrt',inscav_fisrt)
+!  CALL getin('inscav_fisrt',inscav_fisrt)
 !  if(inscav_fisrt) then 
 !   print*,'beta from fisrtilp.F90, beta = (z_cond - z_oliq)/z_cond, inscav_fisrt=',inscav_fisrt
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/lsc_scav_spl.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/lsc_scav_spl.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/lsc_scav_spl.F90	(revision 5101)
@@ -11,5 +11,5 @@
   USE mod_phys_lmdz_para
   USE traclmdz_mod
-  USE infotrac,ONLY : nbtr
+  USE infotrac,ONLY: nbtr
   USE iophy
   USE lmdz_yomcst
@@ -107,5 +107,5 @@
 
 !  inscav_fisrt=.true.
-!  call getin('inscav_fisrt',inscav_fisrt)
+!  CALL getin('inscav_fisrt',inscav_fisrt)
 !  if(inscav_fisrt) then 
 !   print*,'beta from fisrtilp.F90, beta = (z_cond - z_oliq)/z_cond, inscav_fisrt=',inscav_fisrt
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/neutral.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/neutral.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/neutral.F	(revision 5101)
@@ -52,5 +52,5 @@
 		f1 = (1. + phi_inv) / 2.
 		f2 = (1. + phi_inv_sq)/2.
-c following to avoid numerical overruns. recall tan(90deg)=infinity
+c following to avoid numerical overruns. reCALL tan(90deg)=infinity
 		dum1 = min (1.e24, phi_inv)
 		f3 = atan(dum1)
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/phys_output_write_spl_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/phys_output_write_spl_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/phys_output_write_spl_mod.F90	(revision 5101)
@@ -10,5 +10,5 @@
   USE time_phylmdz_mod, ONLY: day_step_phy, start_time, itau_phy
 
-  USE phytracr_spl_mod, ONLY : ok_chimeredust, id_prec, id_fine, id_coss, &
+  USE phytracr_spl_mod, ONLY: ok_chimeredust, id_prec, id_fine, id_coss, &
        id_codu, id_scdu , &
        d_tr_cl, d_tr_th, d_tr_cv, d_tr_lessi_impa, &
@@ -68,7 +68,7 @@
        flux_sparam_sscoa,u10m_ss,v10m_ss
 
-  USE dustemission_mod, ONLY : m1dflux, m2dflux, m3dflux 
-
-!  USE phytrac_mod, ONLY : d_tr_cl, d_tr_th, d_tr_cv, d_tr_lessi_impa, &
+  USE dustemission_mod, ONLY: m1dflux, m2dflux, m3dflux
+
+!  USE phytrac_mod, ONLY: d_tr_cl, d_tr_th, d_tr_cv, d_tr_lessi_impa, &
 !       d_tr_lessi_nucl, d_tr_insc, d_tr_bcscav, d_tr_evapls, d_tr_ls,  &
 !       d_tr_trsp, d_tr_sscav, d_tr_sat, d_tr_uscav
@@ -394,5 +394,5 @@
     USE lmdz_xios, ONLY: xios_update_calendar, using_xios
     USE wxios, ONLY: wxios_closedef, missing_val_xios => missing_val
-    USE phys_cal_mod, ONLY : mth_len
+    USE phys_cal_mod, ONLY: mth_len
     USE lmdz_yomcst
 
@@ -466,5 +466,5 @@
          IF (vars_defined) THEN
             IF (prt_level >= 10) THEN
-               write(lunout,*)"phys_output_write: call xios_update_calendar, itau_w=",itau_w
+               write(lunout,*)"phys_output_write: CALL xios_update_calendar, itau_w=",itau_w
             ENDIF
 !           CALL xios_update_calendar(itau_w)
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/phytracr_spl_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/phytracr_spl_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/phytracr_spl_mod.F90	(revision 5101)
@@ -424,10 +424,10 @@
   SUBROUTINE phytracr_spl_out_init()
     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-    !AS : This subroutine centralises the ALLOCATE needed for the 1st call of
+    !AS : This subroutine centralises the ALLOCATE needed for the 1st CALL of
     !     phys_output_write_spl in physiq
 
     USE dimphy
-    USE infotrac_phy, ONLY : nbtr
-    USE dustemission_mod, ONLY : dustemis_out_init
+    USE infotrac_phy, ONLY: nbtr
+    USE dustemission_mod, ONLY: dustemis_out_init
 
     ! pour les variables m[1-3]dflux
@@ -699,8 +699,8 @@
       fileregionsdimsbb = 'regions_bb_meta'
       fileregionsdimswstar = 'regions_pwstarwake_meta'
-      call  readregionsdims2_spl(nbreg_ind, fileregionsdimsind)
-      call  readregionsdims2_spl(nbreg_dust, fileregionsdimsdust)
-      call  readregionsdims2_spl(nbreg_bb, fileregionsdimsbb)
-      call  readregionsdims2_spl(nbreg_wstardust, fileregionsdimswstar)
+      CALL  readregionsdims2_spl(nbreg_ind, fileregionsdimsind)
+      CALL  readregionsdims2_spl(nbreg_dust, fileregionsdimsdust)
+      CALL  readregionsdims2_spl(nbreg_bb, fileregionsdimsbb)
+      CALL  readregionsdims2_spl(nbreg_wstardust, fileregionsdimswstar)
     ENDIF ! ASSIM
     ! fin debranchage
@@ -792,6 +792,6 @@
 
     USE mod_phys_lmdz_transfert_para
-    USE lmdz_thermcell_dq, ONLY : thermcell_dq
-    USE phys_cal_mod, only : jD_1jan, year_len, mth_len, days_elapsed, jh_1jan, year_cur, &
+    USE lmdz_thermcell_dq, ONLY: thermcell_dq
+    USE phys_cal_mod, ONLY: jD_1jan, year_len, mth_len, days_elapsed, jh_1jan, year_cur, &
             mth_cur, phys_cal_update
 
@@ -806,5 +806,5 @@
     ! Remarques en vrac:
     ! ------------------
-    ! 1/ le call phytrac se fait avec nqmax-2 donc nous avons bien
+    ! 1/ le CALL phytrac se fait avec nqmax-2 donc nous avons bien
     ! les vrais traceurs (nbtr) dans phytrac (pas la vapeur ni eau liquide)
     !! AS : nqmax-2 devrait etre nqmax-3 apres introducton de H2Oi ;
@@ -1231,5 +1231,5 @@
          itr = itr+1
          write(str2,'(i2.2)') itrr
-         call iophys_ecrit('TRA'//str2,klev,'SOURCE','',tr_seri(:,:,itr))
+         CALL iophys_ecrit('TRA'//str2,klev,'SOURCE','',tr_seri(:,:,itr))
       enddo
 #endif
@@ -1297,5 +1297,5 @@
     !AS: La ligne suivante fait planter a l'execution : lmt_so2ff_l pas initialise
     !  print *,'lmt_so2ff_l AVANT' , MINVAL(lmt_so2ff_l), MAXVAL(lmt_so2ff_l)
-    call read_newemissions(ijulday, jH_cur, edgar, flag_dms, debutphy, & !I
+    CALL read_newemissions(ijulday, jH_cur, edgar, flag_dms, debutphy, & !I
             pdtphys, lafin, nbjour, pctsrf, &       !I
             t_seri, rlat, rlon, &                         !I
@@ -1396,12 +1396,12 @@
       if (ok_chimeredust) then
         if (.not.(id_scdu>0 .and. id_codu>0 .and. id_fine>0)) then
-          call abort_gcm('phytracr_mod', 'pb in ok_chimdust 0', 1)
+          CALL abort_gcm('phytracr_mod', 'pb in ok_chimdust 0', 1)
         endif
       else
         if (id_scdu>0) then
-          call abort_gcm('phytracr_mod', 'pb in ok_chimdust 1 SCDU', 1)
+          CALL abort_gcm('phytracr_mod', 'pb in ok_chimdust 1 SCDU', 1)
         endif
         if ((id_codu <= 0) .or. (id_fine<=0)) then
-          call abort_gcm('phytracr_mod', 'pb in ok_chimdust 1', 1)
+          CALL abort_gcm('phytracr_mod', 'pb in ok_chimdust 1', 1)
         endif
       endif
@@ -1660,5 +1660,5 @@
       !Config
       iflag_lscav_omp = 4
-      call getin('iflag_lscav', iflag_lscav_omp)
+      CALL getin('iflag_lscav', iflag_lscav_omp)
       iflag_lscav = iflag_lscav_omp
       ! initialiation for time computation
@@ -1826,11 +1826,11 @@
         c_FullName1 = 'regions_dustacc'
         !c_FullName1='regions_dust'
-        call readregions_spl(iregion_dust, c_FullName1)
+        CALL readregions_spl(iregion_dust, c_FullName1)
         c_FullName1 = 'regions_ind'
-        call readregions_spl(iregion_ind, c_FullName1)
+        CALL readregions_spl(iregion_ind, c_FullName1)
         c_FullName1 = 'regions_bb'
-        call readregions_spl(iregion_bb, c_FullName1)
+        CALL readregions_spl(iregion_bb, c_FullName1)
         c_FullName1 = 'regions_pwstarwake'
-        call readregions_spl(iregion_wstardust, c_FullName1)
+        CALL readregions_spl(iregion_wstardust, c_FullName1)
 
         !$OMP MASTER
@@ -1944,5 +1944,5 @@
         aux_var2(i) = pctsrf(i, is_oce)
       enddo
-      call gather(aux_var2, auxklon_glo)
+      CALL gather(aux_var2, auxklon_glo)
       !$OMP MASTER
       IF (is_mpi_root .AND. is_omp_root) THEN
@@ -1957,5 +1957,5 @@
         aux_var2(i) = pctsrf(i, is_sic)
       enddo
-      call gather(aux_var2, auxklon_glo)
+      CALL gather(aux_var2, auxklon_glo)
       !$OMP MASTER
       IF (is_mpi_root .AND. is_omp_root) THEN
@@ -1970,5 +1970,5 @@
         aux_var2(i) = pctsrf(i, is_ter)
       enddo
-      call gather(aux_var2, auxklon_glo)
+      CALL gather(aux_var2, auxklon_glo)
       !$OMP MASTER
       IF (is_mpi_root .AND. is_omp_root) THEN
@@ -1983,5 +1983,5 @@
         aux_var2(i) = pctsrf(i, is_lic)
       enddo
-      call gather(aux_var2, auxklon_glo)
+      CALL gather(aux_var2, auxklon_glo)
       !$OMP MASTER
       IF (is_mpi_root .AND. is_omp_root) THEN
@@ -2068,10 +2068,10 @@
       do itr=1,nbtr
          write(str2,'(i2.2)') itr
-         call iophys_ecrit('sav'//str2,1,'SOURCE','',source_tr(:,itr))
-         call iophys_ecrit('fav'//str2,1,'SOURCE','',source_tr(:,itr))
+         CALL iophys_ecrit('sav'//str2,1,'SOURCE','',source_tr(:,itr))
+         CALL iophys_ecrit('fav'//str2,1,'SOURCE','',source_tr(:,itr))
       enddo
       do itr=1,nbtr
          write(str2,'(i2.2)') itr
-         call iophys_ecrit('TRB'//str2,klev,'SOURCE','',tr_seri(:,:,itr))
+         CALL iophys_ecrit('TRB'//str2,klev,'SOURCE','',tr_seri(:,:,itr))
       enddo
 #endif
@@ -2101,6 +2101,6 @@
       do itr=1,nbtr
          write(str2,'(i2.2)') itr
-         call iophys_ecrit('sap'//str2,1,'SOURCE','',source_tr(:,itr))
-         call iophys_ecrit('fap'//str2,1,'SOURCE','',source_tr(:,itr))
+         CALL iophys_ecrit('sap'//str2,1,'SOURCE','',source_tr(:,itr))
+         CALL iophys_ecrit('fap'//str2,1,'SOURCE','',source_tr(:,itr))
       enddo
 #endif
@@ -2124,17 +2124,17 @@
 #ifdef IOPHYS_DUST
       print *,'INPUT TO PRECUREMISSION'
-         call iophys_ecrit('ftsol',4,'ftsol','',ftsol)
-         call iophys_ecrit('u10m_ec',1,'u10m_ec','',u10m_ec)
-         call iophys_ecrit('v10m_ec',1,'v10m_ec','',v10m_ec)
-         call iophys_ecrit('pctsrf',4,'pctsrf','',pctsrf)
-         call iophys_ecrit('u_seri',klev,'u_seri','',u_seri)
-         call iophys_ecrit('v_seri',klev,'v_seri','',v_seri)
-         call iophys_ecrit('paprs',klev,'paprs','',paprs)
-         call iophys_ecrit('pplay',klev,'pplay','',pplay)
-         call iophys_ecrit('cdragh',1,'cdragh','',cdragh)
-         call iophys_ecrit('cdragm',1,'cdragm','',cdragm)
-         call iophys_ecrit('t_seri',klev,'t_seri','',t_seri)
-         call iophys_ecrit('q_seri',klev,'q_seri','',q_seri)
-         call iophys_ecrit('tsol',1,'tsol','',tsol)
+         CALL iophys_ecrit('ftsol',4,'ftsol','',ftsol)
+         CALL iophys_ecrit('u10m_ec',1,'u10m_ec','',u10m_ec)
+         CALL iophys_ecrit('v10m_ec',1,'v10m_ec','',v10m_ec)
+         CALL iophys_ecrit('pctsrf',4,'pctsrf','',pctsrf)
+         CALL iophys_ecrit('u_seri',klev,'u_seri','',u_seri)
+         CALL iophys_ecrit('v_seri',klev,'v_seri','',v_seri)
+         CALL iophys_ecrit('paprs',klev,'paprs','',paprs)
+         CALL iophys_ecrit('pplay',klev,'pplay','',pplay)
+         CALL iophys_ecrit('cdragh',1,'cdragh','',cdragh)
+         CALL iophys_ecrit('cdragm',1,'cdragm','',cdragm)
+         CALL iophys_ecrit('t_seri',klev,'t_seri','',t_seri)
+         CALL iophys_ecrit('q_seri',klev,'q_seri','',q_seri)
+         CALL iophys_ecrit('tsol',1,'tsol','',tsol)
          print*,'fracso2emis,frach2sofso2,bateau',fracso2emis,frach2sofso2,bateau
          print*,'kminbc,kmaxbc,pdtphys',kminbc,kmaxbc,pdtphys
@@ -2142,22 +2142,22 @@
          print*,'iregion_ind,iregion_bb,nbreg_ind, nbreg_bb',iregion_ind,iregion_bb,nbreg_ind, nbreg_bb
          print*,'id_prec,id_fine',id_prec,id_fine
-         call iophys_ecrit('zdz',klev,'zdz','',zdz)
-         call iophys_ecrit('zalt',klev,'zalt','',zalt)
-         call iophys_ecrit('lmt_so2ff_l',1,'lmt_so2ff_l','',lmt_so2ff_l)
-         call iophys_ecrit('lmt_so2ff_h',1,'lmt_so2ff_h','',lmt_so2ff_h)
-         call iophys_ecrit('lmt_so2nff',1,'lmt_so2nff','',lmt_so2nff)
-         call iophys_ecrit('lmt_so2ba',1,'lmt_so2ba','',lmt_so2ba)
-         call iophys_ecrit('lmt_so2bb_l',1,'lmt_so2bb_l','',lmt_so2bb_l)
-         call iophys_ecrit('lmt_so2bb_h',1,'lmt_so2bb_h','',lmt_so2bb_h)
-         call iophys_ecrit('lmt_so2volc_cont',1,'lmt_so2volc_cont','',lmt_so2volc_cont)
-         call iophys_ecrit('lmt_altvolc_cont',1,'lmt_altvolc_cont','',lmt_altvolc_cont)
-         call iophys_ecrit('lmt_so2volc_expl',1,'lmt_so2volc_expl','',lmt_so2volc_expl)
-         call iophys_ecrit('lmt_altvolc_expl',1,'lmt_altvolc_expl','',lmt_altvolc_expl)
-         call iophys_ecrit('lmt_dmsbio',1,'lmt_dmsbio','',lmt_dmsbio)
-         call iophys_ecrit('lmt_h2sbio',1,'lmt_h2sbio','',lmt_h2sbio)
-         call iophys_ecrit('lmt_dmsconc',1,'lmt_dmsconc','',lmt_dmsconc)
-         call iophys_ecrit('lmt_dms',1,'lmt_dms','',lmt_dms)
-         call iophys_ecrit('flux_sparam_ind',1,'flux_sparam_ind','',flux_sparam_ind)
-         call iophys_ecrit('flux_sparam_bb',1,'flux_sparam_bb','',flux_sparam_bb)
+         CALL iophys_ecrit('zdz',klev,'zdz','',zdz)
+         CALL iophys_ecrit('zalt',klev,'zalt','',zalt)
+         CALL iophys_ecrit('lmt_so2ff_l',1,'lmt_so2ff_l','',lmt_so2ff_l)
+         CALL iophys_ecrit('lmt_so2ff_h',1,'lmt_so2ff_h','',lmt_so2ff_h)
+         CALL iophys_ecrit('lmt_so2nff',1,'lmt_so2nff','',lmt_so2nff)
+         CALL iophys_ecrit('lmt_so2ba',1,'lmt_so2ba','',lmt_so2ba)
+         CALL iophys_ecrit('lmt_so2bb_l',1,'lmt_so2bb_l','',lmt_so2bb_l)
+         CALL iophys_ecrit('lmt_so2bb_h',1,'lmt_so2bb_h','',lmt_so2bb_h)
+         CALL iophys_ecrit('lmt_so2volc_cont',1,'lmt_so2volc_cont','',lmt_so2volc_cont)
+         CALL iophys_ecrit('lmt_altvolc_cont',1,'lmt_altvolc_cont','',lmt_altvolc_cont)
+         CALL iophys_ecrit('lmt_so2volc_expl',1,'lmt_so2volc_expl','',lmt_so2volc_expl)
+         CALL iophys_ecrit('lmt_altvolc_expl',1,'lmt_altvolc_expl','',lmt_altvolc_expl)
+         CALL iophys_ecrit('lmt_dmsbio',1,'lmt_dmsbio','',lmt_dmsbio)
+         CALL iophys_ecrit('lmt_h2sbio',1,'lmt_h2sbio','',lmt_h2sbio)
+         CALL iophys_ecrit('lmt_dmsconc',1,'lmt_dmsconc','',lmt_dmsconc)
+         CALL iophys_ecrit('lmt_dms',1,'lmt_dms','',lmt_dms)
+         CALL iophys_ecrit('flux_sparam_ind',1,'flux_sparam_ind','',flux_sparam_ind)
+         CALL iophys_ecrit('flux_sparam_bb',1,'flux_sparam_bb','',flux_sparam_bb)
 #endif
 
@@ -2198,6 +2198,6 @@
       do itr=1,nbtr
          write(str2,'(i2.2)') itr
-         call iophys_ecrit('tpr'//str2,1,'SOURCE','',source_tr(:,itr))
-         call iophys_ecrit('fpr'//str2,1,'SOURCE','',flux_tr(:,itr))
+         CALL iophys_ecrit('tpr'//str2,1,'SOURCE','',source_tr(:,itr))
+         CALL iophys_ecrit('fpr'//str2,1,'SOURCE','',flux_tr(:,itr))
       enddo
 #endif
@@ -2242,6 +2242,6 @@
       do itr=1,nbtr
          write(str2,'(i2.2)') itr
-         call iophys_ecrit('t'//str2,1,'SOURCE','',source_tr(:,itr))
-         call iophys_ecrit('f'//str2,1,'SOURCE','',flux_tr(:,itr))
+         CALL iophys_ecrit('t'//str2,1,'SOURCE','',source_tr(:,itr))
+         CALL iophys_ecrit('f'//str2,1,'SOURCE','',flux_tr(:,itr))
       enddo
 #endif
@@ -2298,5 +2298,5 @@
       do itr=1,nbtr
          write(str2,'(i2.2)') itr
-         call iophys_ecrit('TRC'//str2,klev,'SOURCE','',tr_seri(:,:,itr))
+         CALL iophys_ecrit('TRC'//str2,klev,'SOURCE','',tr_seri(:,:,itr))
       enddo
 #endif
@@ -2338,5 +2338,5 @@
       do itr=1,nbtr
          write(str2,'(i2.2)') itr
-         call iophys_ecrit('TRD'//str2,klev,'SOURCE','',tr_seri(:,:,itr))
+         CALL iophys_ecrit('TRD'//str2,klev,'SOURCE','',tr_seri(:,:,itr))
       enddo
 #endif
@@ -2406,11 +2406,11 @@
 #ifdef IOPHYS_DUST
       print*,'iflag_conv=',iflag_conv
-      call iophys_ecrit('coefh',klev,'coefh','',coefh)
-      call iophys_ecrit('yu1',1,'yu1','',yu1)
-      call iophys_ecrit('yv1',1,'yv1','',yv1)
-      call iophys_ecrit('delp',klev,'delp','',delp)
+      CALL iophys_ecrit('coefh',klev,'coefh','',coefh)
+      CALL iophys_ecrit('yu1',1,'yu1','',yu1)
+      CALL iophys_ecrit('yv1',1,'yv1','',yv1)
+      CALL iophys_ecrit('delp',klev,'delp','',delp)
       do itr=1,nbtr
          write(str2,'(i2.2)') itr
-         call iophys_ecrit('TRE'//str2,klev,'SOURCE','',tr_seri(:,:,itr))
+         CALL iophys_ecrit('TRE'//str2,klev,'SOURCE','',tr_seri(:,:,itr))
       enddo
 #endif
@@ -2604,5 +2604,5 @@
       do itr=1,nbtr
          write(str2,'(i2.2)') itr
-         call iophys_ecrit('TRF'//str2,klev,'SOURCE','',tr_seri(:,:,itr))
+         CALL iophys_ecrit('TRF'//str2,klev,'SOURCE','',tr_seri(:,:,itr))
       enddo
 #endif
@@ -2691,5 +2691,5 @@
       do itr=1,nbtr
          write(str2,'(i2.2)') itr
-         call iophys_ecrit('TRG'//str2,klev,'SOURCE','',tr_seri(:,:,itr))
+         CALL iophys_ecrit('TRG'//str2,klev,'SOURCE','',tr_seri(:,:,itr))
       enddo
 #endif
@@ -2856,5 +2856,5 @@
       do itr=1,nbtr
          write(str2,'(i2.2)') itr
-         call iophys_ecrit('TRH'//str2,klev,'SOURCE','',tr_seri(:,:,itr))
+         CALL iophys_ecrit('TRH'//str2,klev,'SOURCE','',tr_seri(:,:,itr))
       enddo
 #endif
@@ -3033,27 +3033,27 @@
 
 #ifdef IOPHYS_DUST
-      call iophys_ecrit('da',klev,'da','',da)
-      call iophys_ecrit('phi',klev,'phi','',phi)
-      call iophys_ecrit('phi2',klev,'phi2','',phi2)
-      call iophys_ecrit('d1a',klev,'d1a','',d1a)
-      call iophys_ecrit('dam',klev,'dam','',dam)
-      call iophys_ecrit('mp',klev,'mp','',mp)
-      call iophys_ecrit('ep',klev,'ep','',ep)
-      call iophys_ecrit('sigd',klev,'sigd','',sigd)
-      call iophys_ecrit('sij',klev,'sij','',sij)
-      call iophys_ecrit('wght_cvfd',klev,'wght_cvfd','',wght_cvfd)
-      call iophys_ecrit('clw',klev,'clw','',clw)
-      call iophys_ecrit('elij',klev,'elij','',elij)
-      call iophys_ecrit('epmlmMm',klev,'epmlmMm','',epmlmMm)
-      call iophys_ecrit('eplaMm',klev,'eplaMm','',eplaMm)
-      call iophys_ecrit('pmflxr',klev,'pmflxr','',pmflxr)
-      call iophys_ecrit('pmflxs',klev,'pmflxs','',pmflxs)
-      call iophys_ecrit('evapls',klev,'evapls','',evapls)
-      call iophys_ecrit('wdtrainA',klev,'wdtrainA','',wdtrainA)
-      call iophys_ecrit('wdtrainM',klev,'wdtrainM','',wdtrainM)
+      CALL iophys_ecrit('da',klev,'da','',da)
+      CALL iophys_ecrit('phi',klev,'phi','',phi)
+      CALL iophys_ecrit('phi2',klev,'phi2','',phi2)
+      CALL iophys_ecrit('d1a',klev,'d1a','',d1a)
+      CALL iophys_ecrit('dam',klev,'dam','',dam)
+      CALL iophys_ecrit('mp',klev,'mp','',mp)
+      CALL iophys_ecrit('ep',klev,'ep','',ep)
+      CALL iophys_ecrit('sigd',klev,'sigd','',sigd)
+      CALL iophys_ecrit('sij',klev,'sij','',sij)
+      CALL iophys_ecrit('wght_cvfd',klev,'wght_cvfd','',wght_cvfd)
+      CALL iophys_ecrit('clw',klev,'clw','',clw)
+      CALL iophys_ecrit('elij',klev,'elij','',elij)
+      CALL iophys_ecrit('epmlmMm',klev,'epmlmMm','',epmlmMm)
+      CALL iophys_ecrit('eplaMm',klev,'eplaMm','',eplaMm)
+      CALL iophys_ecrit('pmflxr',klev,'pmflxr','',pmflxr)
+      CALL iophys_ecrit('pmflxs',klev,'pmflxs','',pmflxs)
+      CALL iophys_ecrit('evapls',klev,'evapls','',evapls)
+      CALL iophys_ecrit('wdtrainA',klev,'wdtrainA','',wdtrainA)
+      CALL iophys_ecrit('wdtrainM',klev,'wdtrainM','',wdtrainM)
 
       do itr=1,nbtr
          write(str2,'(i2.2)') itr
-         call iophys_ecrit('TRI'//str2,klev,'SOURCE','',tr_seri(:,:,itr))
+         CALL iophys_ecrit('TRI'//str2,klev,'SOURCE','',tr_seri(:,:,itr))
       enddo
 #endif
@@ -3176,5 +3176,5 @@
       do itr=1,nbtr
          write(str2,'(i2.2)') itr
-         call iophys_ecrit('TRJ'//str2,klev,'SOURCE','',tr_seri(:,:,itr))
+         CALL iophys_ecrit('TRJ'//str2,klev,'SOURCE','',tr_seri(:,:,itr))
       enddo
 #endif
@@ -3442,5 +3442,5 @@
       do itr=1,nbtr
          write(str2,'(i2.2)') itr
-         call iophys_ecrit('TRK'//str2,klev,'SOURCE','',tr_seri(:,:,itr))
+         CALL iophys_ecrit('TRK'//str2,klev,'SOURCE','',tr_seri(:,:,itr))
       enddo
 #endif
@@ -4384,32 +4384,32 @@
     IF (test_sca == 0) THEN
       ! READ file!!
-      call read_scalenc(filescaleparams, paramname_ind, &
+      CALL read_scalenc(filescaleparams, paramname_ind, &
               nbreg_ind, step_sca, &
               scale_param_ind)
-      call read_scalenc(filescaleparams, paramname_bb, &
+      CALL read_scalenc(filescaleparams, paramname_bb, &
               nbreg_bb, step_sca, &
               scale_param_bb)
-      call read_scalenc(filescaleparams, paramname_ff, &
+      CALL read_scalenc(filescaleparams, paramname_ff, &
               nbreg_ff, step_sca, &
               scale_param_ff)
-      call read_scalenc(filescaleparams, paramname_dustacc, &
+      CALL read_scalenc(filescaleparams, paramname_dustacc, &
               nbreg_dustacc, step_sca, &
               scale_param_dustacc)
-      call read_scalenc(filescaleparams, paramname_dustcoa, &
+      CALL read_scalenc(filescaleparams, paramname_dustcoa, &
               nbreg_dustcoa, step_sca, &
               scale_param_dustcoa)
-      call read_scalenc(filescaleparams, paramname_dustsco, &
+      CALL read_scalenc(filescaleparams, paramname_dustsco, &
               nbreg_dustsco, step_sca, &
               scale_param_dustsco)
-      call read_scalenc(filescaleparams, paramname_wstarBL, &
+      CALL read_scalenc(filescaleparams, paramname_wstarBL, &
               nbreg_wstardustBL, step_sca, &
               param_wstarBLperregion)
-      call read_scalenc(filescaleparams, paramname_wstarWAKE, &
+      CALL read_scalenc(filescaleparams, paramname_wstarWAKE, &
               nbreg_wstardustWAKE, step_sca, &
               param_wstarWAKEperregion)
-      call read_scalenc(filescaleparams, paramname_ssacc, &
+      CALL read_scalenc(filescaleparams, paramname_ssacc, &
               nbreg_ssacc, step_sca, &
               scale_param_ssacc_tmp)
-      call read_scalenc(filescaleparams, paramname_sscoa, &
+      CALL read_scalenc(filescaleparams, paramname_sscoa, &
               nbreg_sscoa, step_sca, &
               scale_param_sscoa_tmp)
@@ -4435,5 +4435,5 @@
     USE mod_grid_phy_lmdz
     USE mod_phys_lmdz_para
-    USE netcdf, ONLY : nf90_open, nf90_close, nf90_inq_varid, nf90_nowrite, nf90_noerr, nf90_get_var
+    USE netcdf, ONLY: nf90_open, nf90_close, nf90_inq_varid, nf90_nowrite, nf90_noerr, nf90_get_var
     IMPLICIT NONE
 
@@ -4466,5 +4466,5 @@
             print *, 'error ierr= ', ierr
             CALL exit(1)
-            call abort_gcm('read_scalenc', 'error reading variable', 1)
+            CALL abort_gcm('read_scalenc', 'error reading variable', 1)
           ENDIF
 
@@ -4483,5 +4483,5 @@
     !$OMP BARRIER
     !      CALL scatter(var local _glo,var local) o algo asi
-    call bcast(scale_param)
+    CALL bcast(scale_param)
   END SUBROUTINE read_scalenc
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/precuremission.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/precuremission.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/precuremission.F	(revision 5101)
@@ -19,5 +19,5 @@
       USE indice_sol_mod
       USE infotrac
-!      USE phytracr_spl_mod, ONLY : nbreg_dust, nbreg_ind, nbreg_bb
+!      USE phytracr_spl_mod, ONLY: nbreg_dust, nbreg_ind, nbreg_bb
       IMPLICIT NONE
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/read_dust.f90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/read_dust.f90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/read_dust.f90	(revision 5101)
@@ -3,5 +3,5 @@
   USE mod_grid_phy_lmdz
   USE mod_phys_lmdz_para
-  USE netcdf, ONLY : nf90_get_var, nf90_nowrite, nf90_open, nf90_inq_varid
+  USE netcdf, ONLY: nf90_get_var, nf90_nowrite, nf90_open, nf90_inq_varid
   IMPLICIT NONE
 
@@ -44,6 +44,6 @@
     status = nf90_get_var(ncid1, varid1, dust_nc_glo, start, count)
 
-    ! call correctbid(iim,jjp1,dust_nc)
-    call correctbid(nbp_lon, nbp_lat, dust_nc_glo)
+    ! CALL correctbid(iim,jjp1,dust_nc)
+    CALL correctbid(nbp_lon, nbp_lat, dust_nc_glo)
 
     !--upside down + physical grid
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/read_newemissions.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/read_newemissions.F	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/read_newemissions.F	(revision 5101)
@@ -181,7 +181,7 @@
 !$OMP END MASTER
 !$OMP BARRIER
-       call scatter(wth_glo,wth)
-       call scatter(cly_glo,cly)
-       call scatter(zprecipinsoil_glo,zprecipinsoil)
+       CALL scatter(wth_glo,wth)
+       CALL scatter(cly_glo,cly)
+       CALL scatter(zprecipinsoil_glo,zprecipinsoil)
 
 !JE20140908<<        GOTO 1000
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/read_surface.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/read_surface.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/read_surface.F90	(revision 5101)
@@ -106,5 +106,5 @@
           status=nf90_get_var(ncid,varid,tmp_dyn_glo,start,count)
 
-!      call dump2d(iip1,jjp1,tmp_dyn,'tmp_dyn   ')
+!      CALL dump2d(iip1,jjp1,tmp_dyn,'tmp_dyn   ')
        DO j=1, nbp_lat
           DO ig=1, nbp_lon+1
@@ -114,21 +114,21 @@
 
        
-!JE20140522!          call gr_dyn_fi_p(1, iip1, jjp1, klon, tmp_dyn_invers, tmp_fi)
+!JE20140522!          CALL gr_dyn_fi_p(1, iip1, jjp1, klon, tmp_dyn_invers, tmp_fi)
 
 !JE20140526<<
-!              call gr_dyn_fi(1, iip1, jjp1, klon, tmp_dyn_invers, tmp_fi)
+!              CALL gr_dyn_fi(1, iip1, jjp1, klon, tmp_dyn_invers, tmp_fi)
            if (isinversed) then
-                        call gr_dyn_fi(1, nbp_lon+1, nbp_lat, klon_glo, &
+                        CALL gr_dyn_fi(1, nbp_lon+1, nbp_lat, klon_glo, &
    tmp_dyn_invers_glo, tmp_fi_glo)
-!              call gr_dyn_fi(1, iip1, jjp1, klon, tmp_dyn_invers, tmp_fi)
-!              call gr_dyn_fi_p(1, iip1, jjp1, klon, tmp_dyn_invers, tmp_fi)
+!              CALL gr_dyn_fi(1, iip1, jjp1, klon, tmp_dyn_invers, tmp_fi)
+!              CALL gr_dyn_fi_p(1, iip1, jjp1, klon, tmp_dyn_invers, tmp_fi)
            else      
-                        call gr_dyn_fi(1, nbp_lon+1, nbp_lat, klon_glo, &
+                        CALL gr_dyn_fi(1, nbp_lon+1, nbp_lat, klon_glo, &
      tmp_dyn_glo, tmp_fi_glo)
-!              call gr_dyn_fi(1, iip1, jjp1, klon, tmp_dyn, tmp_fi)
-!              call gr_dyn_fi_p(1, iip1, jjp1, klon, tmp_dyn, tmp_fi)
+!              CALL gr_dyn_fi(1, iip1, jjp1, klon, tmp_dyn, tmp_fi)
+!              CALL gr_dyn_fi_p(1, iip1, jjp1, klon, tmp_dyn, tmp_fi)
            endif
 !JE20140526>>
-!      call dump2d(iim,jjm-1,tmp_fi(2),'tmp_fi   ')
+!      CALL dump2d(iim,jjm-1,tmp_fi(2),'tmp_fi   ')
 
           DO j=1,klon_glo
@@ -145,5 +145,5 @@
 !$OMP END MASTER
 !$OMP BARRIER
-      call scatter(surfa_glo,surfa)
+      CALL scatter(surfa_glo,surfa)
 
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/read_vent.f90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/read_vent.f90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/read_vent.f90	(revision 5101)
@@ -3,5 +3,5 @@
   USE mod_grid_phy_lmdz
   USE mod_phys_lmdz_para
-  USE netcdf, ONLY : nf90_get_var, nf90_open, nf90_inq_varid, nf90_nowrite
+  USE netcdf, ONLY: nf90_get_var, nf90_open, nf90_inq_varid, nf90_nowrite
   IMPLICIT NONE
   INCLUDE "dimensions.h"
@@ -57,8 +57,8 @@
 
     !  print *,status
-    ! call correctbid(iim,jjp1,u10m_nc)
-    ! call correctbid(iim,jjp1,v10m_nc)
-    call correctbid(nbp_lon, nbp_lat, u10m_nc_glo)
-    call correctbid(nbp_lon, nbp_lat, v10m_nc_glo)
+    ! CALL correctbid(iim,jjp1,u10m_nc)
+    ! CALL correctbid(iim,jjp1,v10m_nc)
+    CALL correctbid(nbp_lon, nbp_lat, u10m_nc_glo)
+    CALL correctbid(nbp_lon, nbp_lat, v10m_nc_glo)
 
     ! print *,'afterbidcor u10m_nc', u10m_nc(1,jjp1)
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/splaeropt_5wv_rrtm.f90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/splaeropt_5wv_rrtm.f90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/splaeropt_5wv_rrtm.f90	(revision 5101)
@@ -8,6 +8,6 @@
   USE DIMPHY
   USE aero_mod
-  USE infotrac_phy, ONLY : nqtot, nbtr, tracers
-  USE phys_local_var_mod, ONLY : od550aer, od865aer, ec550aer, od550lt1aer
+  USE infotrac_phy, ONLY: nqtot, nbtr, tracers
+  USE phys_local_var_mod, ONLY: od550aer, od865aer, ec550aer, od550lt1aer
 
   ! Olivier Boucher Jan 2017
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/splaeropt_6bands_rrtm.f90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/splaeropt_6bands_rrtm.f90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/splaeropt_6bands_rrtm.f90	(revision 5101)
@@ -8,6 +8,6 @@
   USE dimphy
   USE aero_mod
-  USE infotrac_phy, ONLY : nqtot, nbtr, tracers
-  USE phys_local_var_mod, ONLY : abs550aer
+  USE infotrac_phy, ONLY: nqtot, nbtr, tracers
+  USE phys_local_var_mod, ONLY: abs550aer
 
   ! Olivier Boucher Jan 2017
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/splaeropt_lw_rrtm.f90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/splaeropt_lw_rrtm.f90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/splaeropt_lw_rrtm.f90	(revision 5101)
@@ -10,7 +10,7 @@
   USE dimphy
   USE aero_mod
-  USE infotrac_phy, ONLY : nqtot, nbtr, tracers
-  USE phys_state_var_mod, ONLY : tau_aero_lw_rrtm
-  USE lmdz_yoerad, ONLY : NLW
+  USE infotrac_phy, ONLY: nqtot, nbtr, tracers
+  USE phys_state_var_mod, ONLY: tau_aero_lw_rrtm
+  USE lmdz_yoerad, ONLY: NLW
 
   IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/splaerosol_optic_rrtm.f90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/splaerosol_optic_rrtm.f90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/splaerosol_optic_rrtm.f90	(revision 5101)
@@ -12,6 +12,6 @@
   USE dimphy
   USE aero_mod
-  USE infotrac_phy, ONLY : nbtr, nqtot, tracers
-  USE lmdz_yomcst, ONLY : RD, RG
+  USE infotrac_phy, ONLY: nbtr, nqtot, tracers
+  USE lmdz_yomcst, ONLY: RD, RG
 
   IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/bulk_flux_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/bulk_flux_m.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/bulk_flux_m.F90	(revision 5101)
@@ -108,9 +108,9 @@
     if (Jwarm) then
        if (rain_effect) then
-          call Near_Surface(al, t_subskin, s_subskin, ds_ns, dt_ns, &
+          CALL Near_Surface(al, t_subskin, s_subskin, ds_ns, dt_ns, &
                tau_with_min, taur, hlb, rhoa, xlv, dtime, t_ocean_1, s1, rain, &
                q_pwp = fxp * rns - (hf + hlb + rnl + rf))
        else
-          call Near_Surface(al, t_subskin, s_subskin, ds_ns, dt_ns, &
+          CALL Near_Surface(al, t_subskin, s_subskin, ds_ns, dt_ns, &
                tau_with_min, taur, hlb, rhoa, xlv, dtime, t_ocean_1, s1, &
                rain = null_array, q_pwp = fxp * rns - (hf + hlb + rnl))
@@ -132,9 +132,9 @@
                * (1. - exp(- tkt / 8e-4))) ! equation 16 Ohlmann
           if (rain_effect) then
-             call Microlayer(dter, dser, tkt, tks, hlb, tau_with_min, &
+             CALL Microlayer(dter, dser, tkt, tks, hlb, tau_with_min, &
                   s_subskin, al, xlv, taur, rf, rain, &
                   qcol = rnl + hf + hlb - dels)
           else
-             call Microlayer(dter, dser, tkt, tks, hlb, tau_with_min, &
+             CALL Microlayer(dter, dser, tkt, tks, hlb, tau_with_min, &
                   s_subskin, al, xlv, taur, rf = null_array, &
                   rain = null_array, qcol = rnl + hf + hlb - dels)
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/config_ocean_skin_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/config_ocean_skin_m.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/config_ocean_skin_m.F90	(revision 5101)
@@ -42,10 +42,10 @@
 
 #ifdef IN_LMDZ
-    call getin_p("activate_ocean_skin", activate_ocean_skin)
-    call assert(activate_ocean_skin >= 0 .and. activate_ocean_skin <= 2, &
+    CALL getin_p("activate_ocean_skin", activate_ocean_skin)
+    CALL assert(activate_ocean_skin >= 0 .and. activate_ocean_skin <= 2, &
          "config_ocean_skin bad value of activate_ocean_skin")
     if (activate_ocean_skin >= 1) then
-       call getin_p("flag_ocean_skin", flag_ocean_skin)
-       call getin_p("depth_1", depth_1)
+       CALL getin_p("flag_ocean_skin", flag_ocean_skin)
+       CALL getin_p("depth_1", depth_1)
     end if
 #else
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/aer_sedimnt.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/aer_sedimnt.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/aer_sedimnt.F90	(revision 5101)
@@ -19,5 +19,5 @@
   USE phys_local_var_mod, ONLY: mdw, budg_sed_part, DENSO4, DENSO4B, f_r_wet, f_r_wetB, vsed_aer
   USE strataer_local_var_mod, ONLY: flag_new_strat_compo
-  USE dimphy, ONLY : klon,klev
+  USE dimphy, ONLY: klon,klev
   USE infotrac_phy
   USE aerophys
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/coagulate.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/coagulate.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/coagulate.F90	(revision 5101)
@@ -23,5 +23,5 @@
   !     -----------------------------------------------------------------------
 
-  USE dimphy, ONLY : klon,klev
+  USE dimphy, ONLY: klon,klev
   USE aerophys
   USE infotrac_phy
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/cond_evap_tstep_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/cond_evap_tstep_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/cond_evap_tstep_mod.F90	(revision 5101)
@@ -28,7 +28,7 @@
       USE aerophys
       USE infotrac_phy
-      USE lmdz_yomcst, ONLY : RPI
-      USE sulfate_aer_mod, ONLY : wph2so4, surftension, solh2so4, rpmvh2so4
-      USE strataer_local_var_mod, ONLY : ALPH2SO4, RRSI
+      USE lmdz_yomcst, ONLY: RPI
+      USE sulfate_aer_mod, ONLY: wph2so4, surftension, solh2so4, rpmvh2so4
+      USE strataer_local_var_mod, ONLY: ALPH2SO4, RRSI
       
       IMPLICIT NONE
@@ -177,6 +177,6 @@
       USE aerophys
       USE infotrac_phy
-      USE lmdz_yomcst, ONLY : RPI
-      USE strataer_local_var_mod, ONLY : ALPH2SO4, RRSI
+      USE lmdz_yomcst, ONLY: RPI
+      USE strataer_local_var_mod, ONLY: ALPH2SO4, RRSI
 
       IMPLICIT NONE
@@ -290,6 +290,6 @@
       USE aerophys
       USE infotrac_phy
-      USE lmdz_yomcst, ONLY : RPI
-      USE strataer_local_var_mod, ONLY : RRSI,Vbin
+      USE lmdz_yomcst, ONLY: RPI
+      USE strataer_local_var_mod, ONLY: RRSI,Vbin
       
       IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/interp_sulf_input.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/interp_sulf_input.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/interp_sulf_input.F90	(revision 5101)
@@ -9,8 +9,8 @@
 
   USE mod_grid_phy_lmdz
-  USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
-  USE mod_phys_lmdz_omp_data, ONLY :  is_omp_root
-  USE phys_local_var_mod, ONLY : budg_3D_backgr_ocs, budg_3D_backgr_so2
-  USE phys_local_var_mod, ONLY : OCS_lifetime, SO2_lifetime, H2SO4_lifetime, O3_clim
+  USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
+  USE mod_phys_lmdz_omp_data, ONLY:  is_omp_root
+  USE phys_local_var_mod, ONLY: budg_3D_backgr_ocs, budg_3D_backgr_so2
+  USE phys_local_var_mod, ONLY: OCS_lifetime, SO2_lifetime, H2SO4_lifetime, O3_clim
   USE mod_phys_lmdz_para 
   USE dimphy
@@ -19,5 +19,5 @@
   USE aerophys
   USE lmdz_yomcst
-  USE strataer_local_var_mod, ONLY : flag_newclim_file,flag_verbose_strataer
+  USE strataer_local_var_mod, ONLY: flag_newclim_file,flag_verbose_strataer
 
   IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/micphy_tstep.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/micphy_tstep.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/micphy_tstep.F90	(revision 5101)
@@ -4,14 +4,14 @@
 SUBROUTINE micphy_tstep(pdtphys,tr_seri,t_seri,pplay,paprs,rh,is_strato)
 
-  USE geometry_mod, ONLY : latitude_deg !NL- latitude corr. to local domain
-  USE dimphy, ONLY : klon,klev
+  USE geometry_mod, ONLY: latitude_deg !NL- latitude corr. to local domain
+  USE dimphy, ONLY: klon,klev
   USE aerophys
-  USE infotrac_phy, ONLY : nbtr_bin, nbtr_sulgas, nbtr, id_H2SO4_strat
+  USE infotrac_phy, ONLY: nbtr_bin, nbtr_sulgas, nbtr, id_H2SO4_strat
   USE phys_local_var_mod, ONLY: mdw, budg_3D_nucl, budg_3D_cond_evap, budg_h2so4_to_part, R2SO4, DENSO4, &
        f_r_wet, R2SO4B, DENSO4B, f_r_wetB
   USE nucleation_tstep_mod
   USE cond_evap_tstep_mod
-  USE sulfate_aer_mod, ONLY : STRAACT
-  USE lmdz_yomcst, ONLY : RPI, RD, RG
+  USE sulfate_aer_mod, ONLY: STRAACT
+  USE lmdz_yomcst, ONLY: RPI, RD, RG
   USE print_control_mod, ONLY: lunout
   USE strataer_local_var_mod ! contains also RRSI and Vbin
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/miecalc_aer.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/miecalc_aer.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/miecalc_aer.F90	(revision 5101)
@@ -18,10 +18,10 @@
   USE aerophys, ONLY: dens_aer_dry, dens_aer_ref, V_rat
   USE aero_mod
-  USE infotrac_phy, ONLY : nbtr, nbtr_bin, nbtr_sulgas, id_SO2_strat
+  USE infotrac_phy, ONLY: nbtr, nbtr_bin, nbtr_sulgas, id_SO2_strat
   USE dimphy
-  USE lmdz_yomcst  , ONLY : RG, RPI
+  USE lmdz_yomcst  , ONLY: RG, RPI
   USE mod_phys_lmdz_para, only: gather, scatter, bcast
-  USE mod_grid_phy_lmdz, ONLY : klon_glo
-  USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+  USE mod_grid_phy_lmdz, ONLY: klon_glo
+  USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
   USE print_control_mod, ONLY: prt_level, lunout
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/nucleation_tstep_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/nucleation_tstep_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/nucleation_tstep_mod.F90	(revision 5101)
@@ -10,5 +10,5 @@
   USE aerophys
   USE infotrac_phy
-  USE strataer_local_var_mod, ONLY : flag_new_nucl
+  USE strataer_local_var_mod, ONLY: flag_new_nucl
   USE lmdz_yomcst
   
@@ -39,5 +39,5 @@
   REAL ipr     ! Ion pair production rate (cm-3 s-1) NOT IN USE
 
-  ! call nucleation routine
+  ! CALL nucleation routine
   IF (.NOT.flag_new_nucl) THEN
     ! Use older routine from Hanna Vehkamäki (FMI)
@@ -73,5 +73,5 @@
   USE aerophys
   USE infotrac_phy
-  USE strataer_local_var_mod, ONLY : Vbin
+  USE strataer_local_var_mod, ONLY: Vbin
   
   IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/ocs_to_so2.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/ocs_to_so2.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/ocs_to_so2.F90	(revision 5101)
@@ -4,10 +4,10 @@
 SUBROUTINE ocs_to_so2(pdtphys,tr_seri,t_seri,pplay,paprs,is_strato)
 
-  USE dimphy, ONLY : klon,klev
+  USE dimphy, ONLY: klon,klev
   USE aerophys
   USE infotrac_phy
-  USE lmdz_yomcst, ONLY : RG
-  USE phys_local_var_mod, ONLY : OCS_lifetime, budg_3D_ocs_to_so2, budg_ocs_to_so2
-  USE strataer_local_var_mod, ONLY : flag_min_rreduce
+  USE lmdz_yomcst, ONLY: RG
+  USE phys_local_var_mod, ONLY: OCS_lifetime, budg_3D_ocs_to_so2, budg_ocs_to_so2
+  USE strataer_local_var_mod, ONLY: flag_min_rreduce
 
   IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/so2_to_h2so4.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/so2_to_h2so4.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/so2_to_h2so4.F90	(revision 5101)
@@ -4,11 +4,11 @@
 SUBROUTINE SO2_TO_H2SO4(pdtphys,tr_seri,t_seri,pplay,paprs,is_strato)
 
-  USE dimphy, ONLY : klon,klev
+  USE dimphy, ONLY: klon,klev
   USE aerophys
   USE infotrac_phy
-  USE lmdz_yomcst, ONLY : RG, RD
+  USE lmdz_yomcst, ONLY: RG, RD
   ! lifetime (sec) et O3_clim (VMR)
-  USE phys_local_var_mod, ONLY : SO2_lifetime, H2SO4_lifetime, O3_clim, budg_3D_so2_to_h2so4, budg_so2_to_h2so4
-  USE strataer_local_var_mod, ONLY : flag_OH_reduced, flag_H2SO4_photolysis, flag_min_rreduce
+  USE phys_local_var_mod, ONLY: SO2_lifetime, H2SO4_lifetime, O3_clim, budg_3D_so2_to_h2so4, budg_so2_to_h2so4
+  USE strataer_local_var_mod, ONLY: flag_OH_reduced, flag_H2SO4_photolysis, flag_min_rreduce
   
   IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/stratH2O_methox.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/stratH2O_methox.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/stratH2O_methox.F90	(revision 5101)
@@ -11,14 +11,14 @@
 
   USE mod_grid_phy_lmdz
-  USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
-  USE mod_phys_lmdz_omp_data, ONLY :  is_omp_root
+  USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
+  USE mod_phys_lmdz_omp_data, ONLY:  is_omp_root
 
   USE mod_phys_lmdz_para 
   USE dimphy
-  USE phys_cal_mod, ONLY : mth_cur
+  USE phys_cal_mod, ONLY: mth_cur
   USE infotrac_phy
   USE aerophys
   USE lmdz_yomcst
-  USE strataer_local_var_mod, ONLY : flag_newclim_file
+  USE strataer_local_var_mod, ONLY: flag_newclim_file
   
   IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/strataer_emiss_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/strataer_emiss_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/strataer_emiss_mod.F90	(revision 5101)
@@ -7,7 +7,7 @@
 
     USE strataer_local_var_mod
-    USE ioipsl_getin_p_mod, ONLY : getin_p
-    USE print_control_mod, ONLY : lunout
-    USE mod_phys_lmdz_para, ONLY : is_master
+    USE ioipsl_getin_p_mod, ONLY: getin_p
+    USE print_control_mod, ONLY: lunout
+    USE mod_phys_lmdz_para, ONLY: is_master
 
     ! Local variables
@@ -217,5 +217,5 @@
     USE dimphy, ONLY: klon
     USE mod_grid_phy_lmdz, ONLY: nbp_lat, nbp_lon
-    USE print_control_mod, ONLY : lunout
+    USE print_control_mod, ONLY: lunout
     USE strataer_local_var_mod
     USE lmdz_yomcst, ONLY: RPI
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/strataer_nuc_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/strataer_nuc_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/strataer_nuc_mod.F90	(revision 5101)
@@ -10,7 +10,7 @@
   SUBROUTINE strataer_nuc_init()
     
-    USE ioipsl_getin_p_mod, ONLY : getin_p
-    USE print_control_mod, ONLY : lunout
-    USE mod_phys_lmdz_para, ONLY : is_master
+    USE ioipsl_getin_p_mod, ONLY: getin_p
+    USE print_control_mod, ONLY: lunout
+    USE mod_phys_lmdz_para, ONLY: is_master
     USE strataer_local_var_mod, ONLY: ALPH2SO4,flag_nuc_rate_box,nuclat_min,nuclat_max, &
          nucpres_min,nucpres_max
@@ -50,6 +50,6 @@
     
     USE infotrac_phy, ONLY: nbtr, nbtr_sulgas, id_H2SO4_strat
-    USE ioipsl, ONLY : getin
-    USE print_control_mod, ONLY : lunout
+    USE ioipsl, ONLY: getin
+    USE print_control_mod, ONLY: lunout
     
     ! Output variables
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/stratdistrib.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/stratdistrib.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/stratdistrib.F90	(revision 5101)
@@ -4,7 +4,7 @@
 SUBROUTINE STRATDISTRIB(altLMDz,altemiss,sigma_alt,f_lay_emiss)
 
-  USE dimphy, ONLY : klon,klev
+  USE dimphy, ONLY: klon,klev
   USE strataer_local_var_mod
-  USE lmdz_yomcst, only : RPI
+  USE lmdz_yomcst, ONLY: RPI
 
   IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/stratemit.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/stratemit.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/stratemit.F90	(revision 5101)
@@ -6,13 +6,13 @@
                     stretchlong,ispeci,id_species_total) 
 
-  USE dimphy, ONLY : klon,klev
+  USE dimphy, ONLY: klon,klev
   USE strataer_local_var_mod
   USE phys_cal_mod
   USE phys_local_var_mod, ONLY: d_q_emiss
-  USE lmdz_yomcst, only : RD, RPI, RG
-  USE geometry_mod, ONLY : cell_area, boundslat
+  USE lmdz_yomcst, ONLY: RD, RPI, RG
+  USE geometry_mod, ONLY: cell_area, boundslat
   USE aerophys
   USE infotrac_phy
-  USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+  USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
   USE mod_grid_phy_lmdz, ONLY: nbp_lon
  
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/sulfate_aer_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/sulfate_aer_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/sulfate_aer_mod.F90	(revision 5101)
@@ -25,6 +25,6 @@
 !        assuming 'curved surface' composition (depends on aerosol size)
     
-      USE dimphy, ONLY : klon,klev ! nb of longitude and altitude bands
-      USE infotrac_phy, ONLY : nbtr_bin
+      USE dimphy, ONLY: klon,klev ! nb of longitude and altitude bands
+      USE infotrac_phy, ONLY: nbtr_bin
       USE aerophys
       USE phys_local_var_mod, ONLY: R2SO4, R2SO4B, DENSO4, DENSO4B, f_r_wet, f_r_wetB
@@ -164,5 +164,5 @@
 !   R2SO4: aerosol H2SO4 weight fraction (percent)
  
-    USE dimphy, ONLY : klon,klev
+    USE dimphy, ONLY: klon,klev
     USE aerophys
     USE phys_local_var_mod, ONLY: R2SO4
@@ -550,5 +550,5 @@
 !   ACTSO4: H2SO4 activity (percent)
  
-    USE dimphy, ONLY : klon,klev
+    USE dimphy, ONLY: klon,klev
     USE phys_local_var_mod, ONLY: R2SO4
 
@@ -635,5 +635,5 @@
 !   DENSO4: aerosol mass density (gr/cm3 = aerosol mass/aerosol volume)
 
-    USE dimphy, ONLY : klon,klev
+    USE dimphy, ONLY: klon,klev
     USE phys_local_var_mod, ONLY: R2SO4, DENSO4
 
@@ -986,5 +986,5 @@
 !        mfh2so4 = Mh2so4*sulfmolal / (1000.+Mh2so4*sulfmolal) 
 !        wph2so4 (% mass fraction)= 100.*Mh2so4*sulfmolal / (1000.+Mh2so4*sulfmolal) 
-!        recall activity of i = a_i = P_i/P_pure_i and 
+!        reCALL activity of i = a_i = P_i/P_pure_i and
 !          activity coefficient of i = gamma_i = a_i/X_i (X_i: mole fraction of i)
 !        so  P_i = gamma_i*X_i*P_pure_i
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/traccoag_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/traccoag_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/traccoag_mod.F90	(revision 5101)
@@ -15,11 +15,11 @@
     
     USE dimphy
-    USE infotrac_phy, ONLY : nbtr_bin, nbtr_sulgas, nbtr, id_SO2_strat
+    USE infotrac_phy, ONLY: nbtr_bin, nbtr_sulgas, nbtr, id_SO2_strat
     USE aerophys
-    USE geometry_mod, ONLY : cell_area, boundslat
+    USE geometry_mod, ONLY: cell_area, boundslat
     USE mod_grid_phy_lmdz
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
     USE mod_phys_lmdz_para, only: gather, scatter
-    USE phys_cal_mod, ONLY : year_len, year_cur, mth_cur, day_cur, hour
+    USE phys_cal_mod, ONLY: year_len, year_cur, mth_cur, day_cur, hour
     USE sulfate_aer_mod
     USE phys_local_var_mod, ONLY: stratomask
@@ -325,8 +325,8 @@
     CALL micphy_tstep(pdtphys,tr_seri,t_seri,pplay,paprs,rh,is_strato)
 
-!--call coagulation routine 
+!--CALL coagulation routine
     CALL coagulate(pdtphys,mdw,tr_seri,t_seri,pplay,dens_aer,is_strato)
 
-!--call sedimentation routine
+!--CALL sedimentation routine
     CALL aer_sedimnt(pdtphys, t_seri, pplay, paprs, tr_seri, dens_aer)
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/acama_gwd_rando_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/acama_gwd_rando_m.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/acama_gwd_rando_m.F90	(revision 5101)
@@ -23,6 +23,6 @@
     use dimphy, only: klon, klev
     use assert_m, only: assert
-    USE ioipsl_getin_p_mod, ONLY : getin_p
-    USE vertical_layers_mod, ONLY : presnivs
+    USE ioipsl_getin_p_mod, ONLY: getin_p
+    USE vertical_layers_mod, ONLY: presnivs
 
     include "YOMCST.h"
@@ -120,5 +120,5 @@
     REAL, DIMENSION(klev+1) ::HREF
     LOGICAL, SAVE :: gwd_reproductibilite_mpiomp=.true.
-    LOGICAL, SAVE :: firstcall = .TRUE.
+    LOGICAL, SAVE :: firstCALL = .TRUE.
   !$OMP THREADPRIVATE(firstcall,gwd_reproductibilite_mpiomp)
 
@@ -199,10 +199,10 @@
 
 !  ONLINE
-    call assert(klon == (/size(pp, 1), size(tt, 1), size(uu, 1), &
+    CALL assert(klon == (/size(pp, 1), size(tt, 1), size(uu, 1), &
          size(vv, 1), size(rot,1), size(zustr), size(zvstr), size(d_u, 1), &
          size(d_v, 1), &
         size(east_gwstress,1), size(west_gwstress,1) /), &
         "ACAMA_GWD_RANDO klon")
-    call assert(klev == (/size(pp, 2), size(tt, 2), size(uu, 2), &
+    CALL assert(klev == (/size(pp, 2), size(tt, 2), size(uu, 2), &
          size(vv, 2), size(d_u, 2), size(d_v, 2), &
          size(east_gwstress,2), size(west_gwstress,2) /), &
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/add_phys_tend_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/add_phys_tend_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/add_phys_tend_mod.F90	(revision 5101)
@@ -100,5 +100,5 @@
 
 USE dimphy, ONLY: klon, klev
-USE phys_state_var_mod, ONLY : phys_tstep
+USE phys_state_var_mod, ONLY: phys_tstep
 USE phys_local_var_mod, ONLY: u_seri, v_seri, ql_seri, qs_seri, qbs_seri, q_seri, t_seri
 USE phys_state_var_mod, ONLY: ftsol
@@ -106,5 +106,5 @@
 USE print_control_mod, ONLY: prt_level
 USE cmp_seri_mod
-USE phys_output_var_mod, ONLY : d_qw_col, d_ql_col, d_qs_col, d_qbs_col, d_qt_col, d_ek_col, d_h_dair_col &
+USE phys_output_var_mod, ONLY: d_qw_col, d_ql_col, d_qs_col, d_qbs_col, d_qt_col, d_ek_col, d_h_dair_col &
              , d_h_qw_col, d_h_ql_col, d_h_qs_col, d_h_qbs_col, d_h_col
 IMPLICIT none
@@ -192,5 +192,5 @@
      IF (flag_inhib_tend > 0) THEN
         ! print some diagnostics if xxx_seri have changed
-        call cmp_seri(flag_inhib_tend,text)
+        CALL cmp_seri(flag_inhib_tend,text)
      ENDIF
      RETURN ! on n ajoute pas les tendance
@@ -292,5 +292,5 @@
              write(*,'(i3,2f14.4,2e14.2)') k,t_seri(i,k),zdt(i,k),q_seri(i,k),zdq(i,k)
           ENDDO
-          call print_debug_phys(i,debug_level,text)
+          CALL print_debug_phys(i,debug_level,text)
         ENDIF
      ENDDO
@@ -394,5 +394,5 @@
              write(*,'(i3,2f14.4,2e14.2)') k,t_seri(i,k),zdt(i,k),q_seri(i,k),zdq(i,k)
           ENDDO
-          call print_debug_phys(i,debug_level,text)
+          CALL print_debug_phys(i,debug_level,text)
          ENDIF
       ENDDO
@@ -412,5 +412,5 @@
             write(*,'(i3,2f14.4,2e14.2)') k,t_seri(i,k),zdt(i,k),q_seri(i,k),zdq(i,k)
           ENDDO
-          call print_debug_phys(i,debug_level,text)
+          CALL print_debug_phys(i,debug_level,text)
          ENDIF
       ENDDO
@@ -501,9 +501,9 @@
 !======================================================================
 
-USE phys_state_var_mod, ONLY : phys_tstep, ftsol
+USE phys_state_var_mod, ONLY: phys_tstep, ftsol
 USE geometry_mod, ONLY: longitude_deg, latitude_deg
 USE print_control_mod, ONLY: prt_level
 USE cmp_seri_mod
-USE phys_output_var_mod, ONLY : d_qw_col, d_ql_col, d_qs_col, d_qbs_col, d_qt_col, d_ek_col, d_h_dair_col &
+USE phys_output_var_mod, ONLY: d_qw_col, d_ql_col, d_qs_col, d_qbs_col, d_qt_col, d_ek_col, d_h_dair_col &
              , d_h_qw_col, d_h_ql_col, d_h_qs_col, d_h_qbs_col, d_h_col
 IMPLICIT none
@@ -725,15 +725,15 @@
 
 USE dimphy, ONLY: klon, klev
-USE phys_state_var_mod, ONLY : phys_tstep
-USE phys_state_var_mod, ONLY : topsw, toplw, solsw, sollw, rain_con, snow_con, bs_fall
+USE phys_state_var_mod, ONLY: phys_tstep
+USE phys_state_var_mod, ONLY: topsw, toplw, solsw, sollw, rain_con, snow_con, bs_fall
 USE geometry_mod, ONLY: longitude_deg, latitude_deg
 USE print_control_mod, ONLY: prt_level
 USE cmp_seri_mod
-USE phys_output_var_mod, ONLY : d_qw_col, d_ql_col, d_qs_col, d_qbs_col, d_qt_col, d_ek_col, d_h_dair_col &
+USE phys_output_var_mod, ONLY: d_qw_col, d_ql_col, d_qs_col, d_qbs_col, d_qt_col, d_ek_col, d_h_dair_col &
              , d_h_qw_col, d_h_ql_col, d_h_qs_col, d_h_qbs_col, d_h_col
 USE phys_local_var_mod, ONLY: evap, sens
 USE phys_local_var_mod, ONLY: u_seri, v_seri, ql_seri, qs_seri, qbs_seri, q_seri, t_seri &
     , rain_lsc, snow_lsc
-USE climb_hq_mod, ONLY : d_h_col_vdf, f_h_bnd
+USE climb_hq_mod, ONLY: d_h_col_vdf, f_h_bnd
 IMPLICIT none
 INCLUDE "YOMCST.h"
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/add_wake_tend.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/add_wake_tend.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/add_wake_tend.F90	(revision 5101)
@@ -32,5 +32,5 @@
      IF (prt_level >= 5) then
         write (*,*) "In add_wake_tend, after ",text
-        call flush
+        CALL flush
      end if
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/alpale.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/alpale.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/alpale.F90	(revision 5101)
@@ -16,5 +16,5 @@
 
   USE dimphy
-  USE ioipsl_getin_p_mod, ONLY : getin_p
+  USE ioipsl_getin_p_mod, ONLY: getin_p
   USE print_control_mod, ONLY: mydebug=>debug , lunout, prt_level
   USE phys_local_var_mod, ONLY: zw2       ! Variables internes non sauvegardees de la physique
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/alpale_th.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/alpale_th.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/alpale_th.F90	(revision 5101)
@@ -18,5 +18,5 @@
 
   USE dimphy
-  USE ioipsl_getin_p_mod, ONLY : getin_p
+  USE ioipsl_getin_p_mod, ONLY: getin_p
   USE print_control_mod, ONLY: mydebug=>debug , lunout, prt_level
 
@@ -101,5 +101,5 @@
 !!   Control of the multiplication of no-trigger probabilities between calls 
 !! to the convection scheme. If multiply_proba_notrig is .false., then
-!! proba_notrig is set to 1 at each call to alpale_th, so that only the last call 
+!! proba_notrig is set to 1 at each CALL to alpale_th, so that only the last CALL
 !! plays a role in the triggering of convection. If it is .true., then propa_notrig 
 !! is saved between calls to convection and is reset to 1 only after calling the 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/alpale_wk.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/alpale_wk.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/alpale_wk.F90	(revision 5101)
@@ -12,5 +12,5 @@
 
   USE dimphy, ONLY: klon
-  USE ioipsl_getin_p_mod, ONLY : getin_p
+  USE ioipsl_getin_p_mod, ONLY: getin_p
   USE print_control_mod, ONLY: mydebug=>debug , lunout, prt_level
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/calbeta_clim.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/calbeta_clim.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/calbeta_clim.F90	(revision 5101)
@@ -9,5 +9,5 @@
   !======================================================================
 
-  !USE phys_local_var_mod, ONLY : ideal_beta !pour faire la variable dans le
+  !USE phys_local_var_mod, ONLY: ideal_beta !pour faire la variable dans le
   ! physiq.f pour des sorties directes de beta
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/calcul_fluxs_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/calcul_fluxs_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/calcul_fluxs_mod.F90	(revision 5101)
@@ -16,5 +16,5 @@
  
     
-    USE dimphy, ONLY : klon
+    USE dimphy, ONLY: klon
     USE indice_sol_mod
     use sens_heat_rain_m, only: sens_heat_rain
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/calltherm.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/calltherm.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/calltherm.F90	(revision 5101)
@@ -238,5 +238,5 @@
 #ifdef ISOVERIF
       if (iso_eau.gt.0) then
-       call iso_verif_egalite_vect2D( &
+       CALL iso_verif_egalite_vect2D( &
              xt_seri,q_seri, &
              'calltherm 174',ntiso,klon,klev)
@@ -408,5 +408,5 @@
 !      write(*,*) 'd_xt_the(iso_hdo,i,k),d_q_the(i,k)=', &
 !     &   d_xt_the(iso_hdo,i,k),d_q_the(i,k)
-      call iso_verif_aberrant_enc_vect2D( &
+      CALL iso_verif_aberrant_enc_vect2D( &
           xt_seri,q_seri, &
           'calltherm 353, apres ajout d_xt_the',ntiso,klon,klev)
@@ -450,5 +450,5 @@
 #ifdef ISOVERIF
       if (iso_HDO.gt.0) then
-      call iso_verif_aberrant_enc_vect2D( &
+      CALL iso_verif_aberrant_enc_vect2D( &
           xt_seri,q_seri, &
           'calltherm 393, apres bidouille q<0',ntiso,klon,klev)
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/calwake.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/calwake.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/calwake.F90	(revision 5101)
@@ -29,5 +29,5 @@
   USE indice_sol_mod, ONLY: is_oce
   USE print_control_mod, ONLY: mydebug=>debug , lunout, prt_level
-  USE lmdz_wake, ONLY : wake
+  USE lmdz_wake, ONLY: wake
   IMPLICIT NONE
   ! ======================================================================
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/carbon_cycle_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/carbon_cycle_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/carbon_cycle_mod.F90	(revision 5101)
@@ -219,5 +219,5 @@
   SUBROUTINE carbon_cycle_init()
     ! This subroutine is called from tracco2i_init, which is called from phytrac_init only at first timestep.
-    ! - Allocate variables. These variables must be allocated before first call to phys_output_write in physiq.
+    ! - Allocate variables. These variables must be allocated before first CALL to phys_output_write in physiq.
 
     USE dimphy
@@ -275,5 +275,5 @@
 
 !    USE control_mod, ONLY: planet_type
-    USE phys_cal_mod, ONLY : mth_cur
+    USE phys_cal_mod, ONLY: mth_cur
     USE mod_synchro_omp
     USE mod_phys_lmdz_para, ONLY: is_mpi_root, is_omp_root
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cdrag_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cdrag_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cdrag_mod.F90	(revision 5101)
@@ -27,6 +27,6 @@
   USE indice_sol_mod
   USE print_control_mod, ONLY: lunout, prt_level
-  USE ioipsl_getin_p_mod, ONLY : getin_p
-  USE lmdz_atke_turbulence_ini, ONLY : smmin, ric, cinf, cepsilon, pr_slope, pr_asym, pr_neut
+  USE ioipsl_getin_p_mod, ONLY: getin_p
+  USE lmdz_atke_turbulence_ini, ONLY: smmin, ric, cinf, cepsilon, pr_slope, pr_asym, pr_neut
 
   IMPLICIT NONE
@@ -173,5 +173,5 @@
 
 
-  LOGICAL, SAVE :: firstcall = .TRUE.
+  LOGICAL, SAVE :: firstCALL = .TRUE.
   !$OMP THREADPRIVATE(firstcall)
   INTEGER, SAVE :: iflag_corr_sta
@@ -263,5 +263,5 @@
    CALL getin_p('ok_cdrag_iter',ok_cdrag_iter)
 
-   firstcall = .FALSE.
+   firstCALL = .FALSE.
  ENDIF
 
@@ -305,5 +305,5 @@
             mixte = .true.
          ENDIF
-         call clc_core_cp ( sqrt(zdu2),t1(i)-tsurf(i),q1(i)-qsurf(i),t1(i),q1(i),&
+         CALL clc_core_cp ( sqrt(zdu2),t1(i)-tsurf(i),q1(i)-qsurf(i),t1(i),q1(i),&
              zgeop1(i)/RG, zgeop1(i)/RG,  zgeop1(i)/RG,&
              psol(i),nit_bulk,mixte,&
@@ -323,6 +323,6 @@
            PSSS = 0.0
          ENDIF
-         call ini_csts
-         call ecumev6_flux( z_0m,t1(i),tsurf(i),&
+         CALL ini_csts
+         CALL ecumev6_flux( z_0m,t1(i),tsurf(i),&
              q1(i),qsurf(i),sqrt(zdu2),zgeop1(i)/RG,PSSS,zgeop1(i)/RG,&
              psol(i),pat1(i), OPRECIP, OPWEBB,&
@@ -342,5 +342,5 @@
          LPRECIP = .false.
          LPWG    = .false.
-         call ini_csts
+         CALL ini_csts
          block
            real, dimension(1) :: z0m_1d, z_0h_1d, sqrt_zdu2_1d, zgeop1_rg_1d  ! convert scalar to 1D for call
@@ -349,5 +349,5 @@
            sqrt_zdu2_1d = sqrt(zdu2)
            zgeop1_rg_1d=zgeop1(i)/RG
-           call coare30_flux_cnrm(z0m_1d,t1(i),tsurf(i), q1(i),  &
+           CALL coare30_flux_cnrm(z0m_1d,t1(i),tsurf(i), q1(i),  &
                sqrt_zdu2_1d,zgeop1_rg_1d,zgeop1_rg_1d,psol(i),qsurf(i),PQSAT, &
                PSFTH,PFSTQ,PUSTAR,PCD,PCDN,PCH,PCE,PRI, &
@@ -367,5 +367,5 @@
          ENDIF
          write(*,*) "debug size",size(coeffs)
-         call coare_cp(sqrt(zdu2),t1(i)-tsurf(i),q1(i)-qsurf(i),&
+         CALL coare_cp(sqrt(zdu2),t1(i)-tsurf(i),q1(i)-qsurf(i),&
                t1(i),q1(i),&
                zgeop1(i)/RG,zgeop1(i)/RG,zgeop1(i)/RG,&
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/change_srf_frac_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/change_srf_frac_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/change_srf_frac_mod.F90	(revision 5101)
@@ -23,9 +23,9 @@
 
     USE dimphy 
-    USE surface_data, ONLY : type_ocean,version_ocean
+    USE surface_data, ONLY: type_ocean,version_ocean
     USE limit_read_mod
-    USE pbl_surface_mod, ONLY : pbl_surface_newfrac
-    USE cpl_mod, ONLY : cpl_receive_frac
-    USE ocean_slab_mod, ONLY : fsic, ocean_slab_frac
+    USE pbl_surface_mod, ONLY: pbl_surface_newfrac
+    USE cpl_mod, ONLY: cpl_receive_frac
+    USE ocean_slab_mod, ONLY: fsic, ocean_slab_frac
     USE indice_sol_mod
     USE print_control_mod, ONLY: lunout
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cltracrn.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cltracrn.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cltracrn.F90	(revision 5101)
@@ -8,5 +8,5 @@
   
   USE dimphy
-  USE traclmdz_mod, ONLY : id_rn, id_pb
+  USE traclmdz_mod, ONLY: id_rn, id_pb
   USE indice_sol_mod
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/coare30_flux_cnrm_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/coare30_flux_cnrm_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/coare30_flux_cnrm_mod.F90	(revision 5101)
@@ -70,5 +70,5 @@
 
 
-!USE MODD_SEAFLUX_n, ONLY : SEAFLUX_t
+!USE MODD_SEAFLUX_n, ONLY: SEAFLUX_t
 
 !----------Rajout Olive ---------
@@ -79,11 +79,11 @@
 !--------------------------------
 
-USE MODD_CSTS,       ONLY : XKARMAN, XG, XSTEFAN, XRD, XRV, XPI, &
+USE MODD_CSTS,       ONLY: XKARMAN, XG, XSTEFAN, XRD, XRV, XPI, &
                             XLVTT, XCL, XCPD, XCPV, XRHOLW, XTT, &
                             XP00
 
-!USE MODD_SURF_ATM,   ONLY : XVZ0CM
-
-!USE MODD_SURF_PAR,   ONLY : XUNDEF, XSURF_EPSILON
+!USE MODD_SURF_ATM,   ONLY: XVZ0CM
+
+!USE MODD_SURF_PAR,   ONLY: XUNDEF, XSURF_EPSILON
 !USE MODD_WATER_PAR
 
@@ -98,6 +98,6 @@
 
 
-!USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
-!USE PARKIND1  ,ONLY : JPRB
+!USE YOMHOOK   ,ONLY: LHOOK,   DR_HOOK
+!USE PARKIND1  ,ONLY: JPRB
 
 IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/coare_cp_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/coare_cp_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/coare_cp_mod.F90	(revision 5101)
@@ -61,5 +61,5 @@
   !taylor and yelland  zo=1200 h*(L/h)**4.5 jwave=2
 
-  USE MODD_CSTS,       ONLY : XKARMAN, XG, XSTEFAN, XRD, XRV, XPI, &
+  USE MODD_CSTS,       ONLY: XKARMAN, XG, XSTEFAN, XRD, XRV, XPI, &
                             XLVTT, XCL, XCPD, XCPV, XRHOLW, XTT, &
                             XP00
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/concvl.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/concvl.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/concvl.F90	(revision 5101)
@@ -529,5 +529,5 @@
 ! c     e      , t1,q1,ql,qs,u,v,paprs,pplay
 ! c     s      , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec)
-! c         call diagphy(paire,ztit,ip_ebil
+! c         CALL diagphy(paire,ztit,ip_ebil
 ! c     e      , zero_v, zero_v, zero_v, zero_v, zero_v
 ! c     e      , zero_v, rain, zero_v, ztsol
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/conemav.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/conemav.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/conemav.F90	(revision 5101)
@@ -119,5 +119,5 @@
     rflag(i) = iflag(i)
   END DO
-  ! call dump2d(iim,jjm-1,rflag(2:klon-1),'FLAG CONVECTION   ')
+  ! CALL dump2d(iim,jjm-1,rflag(2:klon-1),'FLAG CONVECTION   ')
   ! if (klon.eq.1) then
   ! print*,'IFLAG ',iflag
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/conf_phys_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/conf_phys_m.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/conf_phys_m.F90	(revision 5101)
@@ -26,13 +26,13 @@
     USE surface_data
     USE phys_cal_mod
-    USE carbon_cycle_mod, ONLY : carbon_cycle_tr, carbon_cycle_cpl, carbon_cycle_rad, level_coupling_esm
-    USE carbon_cycle_mod, ONLY : read_fco2_ocean_cor, var_fco2_ocean_cor
-    USE carbon_cycle_mod, ONLY : read_fco2_land_cor, var_fco2_land_cor
-    USE chemistry_cycle_mod, ONLY : dms_cycle_cpl, n2o_cycle_cpl
-    USE mod_grid_phy_lmdz, ONLY : klon_glo
-    USE print_control_mod, ONLY : lunout
-    use config_ocean_skin_m, only : config_ocean_skin
-    USE phys_state_var_mod, ONLY : phys_tstep
-    USE infotrac_phy, ONLY : type_trac
+    USE carbon_cycle_mod, ONLY: carbon_cycle_tr, carbon_cycle_cpl, carbon_cycle_rad, level_coupling_esm
+    USE carbon_cycle_mod, ONLY: read_fco2_ocean_cor, var_fco2_ocean_cor
+    USE carbon_cycle_mod, ONLY: read_fco2_land_cor, var_fco2_land_cor
+    USE chemistry_cycle_mod, ONLY: dms_cycle_cpl, n2o_cycle_cpl
+    USE mod_grid_phy_lmdz, ONLY: klon_glo
+    USE print_control_mod, ONLY: lunout
+    use config_ocean_skin_m, ONLY: config_ocean_skin
+    USE phys_state_var_mod, ONLY: phys_tstep
+    USE infotrac_phy, ONLY: type_trac
     USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_STRATAER
 
@@ -1464,5 +1464,5 @@
 
     iflag_pbl_split_omp = 0
-    call getin('iflag_pbl_split', iflag_pbl_split_omp)
+    CALL getin('iflag_pbl_split', iflag_pbl_split_omp)
 
     !Config Key  = iflag_order2_sollw
@@ -2835,5 +2835,5 @@
 
     !$OMP END MASTER
-    call config_ocean_skin
+    CALL config_ocean_skin
 
   END SUBROUTINE conf_phys
@@ -2846,5 +2846,5 @@
 
   USE IOIPSL
-  USE print_control_mod, ONLY : lunout
+  USE print_control_mod, ONLY: lunout
   IMPLICIT NONE
   ! Configuration de l'interace atm/surf
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/conflx.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/conflx.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/conflx.F90	(revision 5101)
@@ -539,5 +539,5 @@
     END DO
 
-    icall = 0
+    iCALL = 0
     CALL flxadjtq(paph(1,k), ptenh(1,k), pqsenh(1,k), llflag, icall)
 
@@ -660,5 +660,5 @@
     END DO
 
-    icall = 1
+    iCALL = 1
     CALL flxadjtq(paph(1,k), ptu(1,k), pqu(1,k), llflag, icall)
 
@@ -903,5 +903,5 @@
     ! ----------------------------------------------------------------------
 
-    icall = 1
+    iCALL = 1
     CALL flxadjtq(paph(1,k), ptu(1,k), pqu(1,k), llflag, icall)
 
@@ -1359,5 +1359,5 @@
     IF (is==0) GO TO 290
 
-    icall = 2
+    iCALL = 2
     CALL flxadjtq(paph(1,k), ztenwb(1,k), zqenwb(1,k), llo2, icall)
 
@@ -1485,5 +1485,5 @@
     END DO
 
-    icall = 2
+    iCALL = 2
     CALL flxadjtq(paph(1,k), ptd(1,k), pqd(1,k), llo2, icall)
 
@@ -1512,5 +1512,5 @@
   ! Objet: ajustement entre T et Q
   ! ======================================================================
-  ! NOTE: INPUT PARAMETER kcall DEFINES CALCULATION AS
+  ! NOTE: INPUT PARAMETER kCALL DEFINES CALCULATION AS
   ! kcall=0    ENV. T AND QS IN*CUINI*
   ! kcall=1  CONDENSATION IN UPDRAFTS  (E.G. CUBASE, CUASC)
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/convect1.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/convect1.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/convect1.F90	(revision 5101)
@@ -33,5 +33,5 @@
   ! LIBRARIES OF RESIDENCE: /a/ops/lib/libfcst159.a
 
-  ! USAGE: call convect1(len,nd,noff,minorig,
+  ! USAGE: CALL convect1(len,nd,noff,minorig,
   ! &                   t,q,qs,u,v,
   ! &                   p,ph,iflag,ft,
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/convect2.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/convect2.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/convect2.F90	(revision 5101)
@@ -36,5 +36,5 @@
   ! LIBRARIES OF RESIDENCE: /a/ops/lib/libfcst159.a
 
-  ! USAGE: call convect2(ncum,idcum,len,nd,nl,minorig,
+  ! USAGE: CALL convect2(ncum,idcum,len,nd,nl,minorig,
   ! &                 nk1,icb1,
   ! &                 t1,q1,qs1,u1,v1,gz1,tv1,tp1,tvp1,clw1,h1,
@@ -656,5 +656,5 @@
   ! K Emanuel fix
 
-  ! call zilch(byp,ncum)
+  ! CALL zilch(byp,ncum)
   ! do 530 k=minorig+1,nl-1
   ! do 520 i=1,ncum
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/convect3.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/convect3.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/convect3.F90	(revision 5101)
@@ -1343,58 +1343,58 @@
 
   ! @$$cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
-  ! @$$         call writeg1d(1,klev,ma,'ma  ','ma  ')
-  ! @$$          call writeg1d(1,klev,upwd,'upwd  ','upwd  ')
-  ! @$$          call writeg1d(1,klev,dnwd,'dnwd  ','dnwd  ')
-  ! @$$          call writeg1d(1,klev,dnwd0,'dnwd0  ','dnwd0  ')
-  ! @$$          call writeg1d(1,klev,tvp,'tvp  ','tvp  ')
-  ! @$$          call writeg1d(1,klev,tra(1:klev,3),'tra3  ','tra3  ')
-  ! @$$          call writeg1d(1,klev,tra(1:klev,4),'tra4  ','tra4  ')
-  ! @$$          call writeg1d(1,klev,tra(1:klev,5),'tra5  ','tra5  ')
-  ! @$$          call writeg1d(1,klev,tra(1:klev,6),'tra6  ','tra6  ')
-  ! @$$          call writeg1d(1,klev,tra(1:klev,7),'tra7  ','tra7  ')
-  ! @$$          call writeg1d(1,klev,tra(1:klev,8),'tra8  ','tra8  ')
-  ! @$$          call writeg1d(1,klev,tra(1:klev,9),'tra9  ','tra9  ')
-  ! @$$          call writeg1d(1,klev,tra(1:klev,10),'tra10','tra10')
-  ! @$$          call writeg1d(1,klev,tra(1:klev,11),'tra11','tra11')
-  ! @$$          call writeg1d(1,klev,tra(1:klev,12),'tra12','tra12')
-  ! @$$          call writeg1d(1,klev,tra(1:klev,13),'tra13','tra13')
-  ! @$$          call writeg1d(1,klev,tra(1:klev,14),'tra14','tra14')
-  ! @$$          call writeg1d(1,klev,tra(1:klev,15),'tra15','tra15')
-  ! @$$          call writeg1d(1,klev,tra(1:klev,16),'tra16','tra16')
-  ! @$$          call writeg1d(1,klev,tra(1:klev,17),'tra17','tra17')
-  ! @$$          call writeg1d(1,klev,tra(1:klev,18),'tra18','tra18')
-  ! @$$          call writeg1d(1,klev,tra(1:klev,19),'tra19','tra19')
-  ! @$$          call writeg1d(1,klev,tra(1:klev,20),'tra20','tra20 ')
-  ! @$$          call writeg1d(1,klev,trap(1:klev,1),'trp1','trp1')
-  ! @$$          call writeg1d(1,klev,trap(1:klev,2),'trp2','trp2')
-  ! @$$          call writeg1d(1,klev,trap(1:klev,3),'trp3','trp3')
-  ! @$$          call writeg1d(1,klev,trap(1:klev,4),'trp4','trp4')
-  ! @$$          call writeg1d(1,klev,trap(1:klev,5),'trp5','trp5')
-  ! @$$          call writeg1d(1,klev,trap(1:klev,10),'trp10','trp10')
-  ! @$$          call writeg1d(1,klev,trap(1:klev,12),'trp12','trp12')
-  ! @$$          call writeg1d(1,klev,trap(1:klev,15),'trp15','trp15')
-  ! @$$          call writeg1d(1,klev,trap(1:klev,20),'trp20','trp20')
-  ! @$$          call writeg1d(1,klev,ftra(1:klev,1),'ftr1  ','ftr1  ')
-  ! @$$          call writeg1d(1,klev,ftra(1:klev,2),'ftr2  ','ftr2  ')
-  ! @$$          call writeg1d(1,klev,ftra(1:klev,3),'ftr3  ','ftr3  ')
-  ! @$$          call writeg1d(1,klev,ftra(1:klev,4),'ftr4  ','ftr4  ')
-  ! @$$          call writeg1d(1,klev,ftra(1:klev,5),'ftr5  ','ftr5  ')
-  ! @$$          call writeg1d(1,klev,ftra(1:klev,6),'ftr6  ','ftr6  ')
-  ! @$$          call writeg1d(1,klev,ftra(1:klev,7),'ftr7  ','ftr7  ')
-  ! @$$          call writeg1d(1,klev,ftra(1:klev,8),'ftr8  ','ftr8  ')
-  ! @$$          call writeg1d(1,klev,ftra(1:klev,9),'ftr9  ','ftr9  ')
-  ! @$$          call writeg1d(1,klev,ftra(1:klev,10),'ftr10','ftr10')
-  ! @$$          call writeg1d(1,klev,ftra(1:klev,11),'ftr11','ftr11')
-  ! @$$          call writeg1d(1,klev,ftra(1:klev,12),'ftr12','ftr12')
-  ! @$$          call writeg1d(1,klev,ftra(1:klev,13),'ftr13','ftr13')
-  ! @$$          call writeg1d(1,klev,ftra(1:klev,14),'ftr14','ftr14')
-  ! @$$          call writeg1d(1,klev,ftra(1:klev,15),'ftr15','ftr15')
-  ! @$$          call writeg1d(1,klev,ftra(1:klev,16),'ftr16','ftr16')
-  ! @$$          call writeg1d(1,klev,ftra(1:klev,17),'ftr17','ftr17')
-  ! @$$          call writeg1d(1,klev,ftra(1:klev,18),'ftr18','ftr18')
-  ! @$$          call writeg1d(1,klev,ftra(1:klev,19),'ftr19','ftr19')
-  ! @$$          call writeg1d(1,klev,ftra(1:klev,20),'ftr20','ftr20 ')
-  ! @$$          call writeg1d(1,klev,mp,'mp  ','mp ')
-  ! @$$          call writeg1d(1,klev,Mke,'Mke  ','Mke ')
+  ! @$$         CALL writeg1d(1,klev,ma,'ma  ','ma  ')
+  ! @$$          CALL writeg1d(1,klev,upwd,'upwd  ','upwd  ')
+  ! @$$          CALL writeg1d(1,klev,dnwd,'dnwd  ','dnwd  ')
+  ! @$$          CALL writeg1d(1,klev,dnwd0,'dnwd0  ','dnwd0  ')
+  ! @$$          CALL writeg1d(1,klev,tvp,'tvp  ','tvp  ')
+  ! @$$          CALL writeg1d(1,klev,tra(1:klev,3),'tra3  ','tra3  ')
+  ! @$$          CALL writeg1d(1,klev,tra(1:klev,4),'tra4  ','tra4  ')
+  ! @$$          CALL writeg1d(1,klev,tra(1:klev,5),'tra5  ','tra5  ')
+  ! @$$          CALL writeg1d(1,klev,tra(1:klev,6),'tra6  ','tra6  ')
+  ! @$$          CALL writeg1d(1,klev,tra(1:klev,7),'tra7  ','tra7  ')
+  ! @$$          CALL writeg1d(1,klev,tra(1:klev,8),'tra8  ','tra8  ')
+  ! @$$          CALL writeg1d(1,klev,tra(1:klev,9),'tra9  ','tra9  ')
+  ! @$$          CALL writeg1d(1,klev,tra(1:klev,10),'tra10','tra10')
+  ! @$$          CALL writeg1d(1,klev,tra(1:klev,11),'tra11','tra11')
+  ! @$$          CALL writeg1d(1,klev,tra(1:klev,12),'tra12','tra12')
+  ! @$$          CALL writeg1d(1,klev,tra(1:klev,13),'tra13','tra13')
+  ! @$$          CALL writeg1d(1,klev,tra(1:klev,14),'tra14','tra14')
+  ! @$$          CALL writeg1d(1,klev,tra(1:klev,15),'tra15','tra15')
+  ! @$$          CALL writeg1d(1,klev,tra(1:klev,16),'tra16','tra16')
+  ! @$$          CALL writeg1d(1,klev,tra(1:klev,17),'tra17','tra17')
+  ! @$$          CALL writeg1d(1,klev,tra(1:klev,18),'tra18','tra18')
+  ! @$$          CALL writeg1d(1,klev,tra(1:klev,19),'tra19','tra19')
+  ! @$$          CALL writeg1d(1,klev,tra(1:klev,20),'tra20','tra20 ')
+  ! @$$          CALL writeg1d(1,klev,trap(1:klev,1),'trp1','trp1')
+  ! @$$          CALL writeg1d(1,klev,trap(1:klev,2),'trp2','trp2')
+  ! @$$          CALL writeg1d(1,klev,trap(1:klev,3),'trp3','trp3')
+  ! @$$          CALL writeg1d(1,klev,trap(1:klev,4),'trp4','trp4')
+  ! @$$          CALL writeg1d(1,klev,trap(1:klev,5),'trp5','trp5')
+  ! @$$          CALL writeg1d(1,klev,trap(1:klev,10),'trp10','trp10')
+  ! @$$          CALL writeg1d(1,klev,trap(1:klev,12),'trp12','trp12')
+  ! @$$          CALL writeg1d(1,klev,trap(1:klev,15),'trp15','trp15')
+  ! @$$          CALL writeg1d(1,klev,trap(1:klev,20),'trp20','trp20')
+  ! @$$          CALL writeg1d(1,klev,ftra(1:klev,1),'ftr1  ','ftr1  ')
+  ! @$$          CALL writeg1d(1,klev,ftra(1:klev,2),'ftr2  ','ftr2  ')
+  ! @$$          CALL writeg1d(1,klev,ftra(1:klev,3),'ftr3  ','ftr3  ')
+  ! @$$          CALL writeg1d(1,klev,ftra(1:klev,4),'ftr4  ','ftr4  ')
+  ! @$$          CALL writeg1d(1,klev,ftra(1:klev,5),'ftr5  ','ftr5  ')
+  ! @$$          CALL writeg1d(1,klev,ftra(1:klev,6),'ftr6  ','ftr6  ')
+  ! @$$          CALL writeg1d(1,klev,ftra(1:klev,7),'ftr7  ','ftr7  ')
+  ! @$$          CALL writeg1d(1,klev,ftra(1:klev,8),'ftr8  ','ftr8  ')
+  ! @$$          CALL writeg1d(1,klev,ftra(1:klev,9),'ftr9  ','ftr9  ')
+  ! @$$          CALL writeg1d(1,klev,ftra(1:klev,10),'ftr10','ftr10')
+  ! @$$          CALL writeg1d(1,klev,ftra(1:klev,11),'ftr11','ftr11')
+  ! @$$          CALL writeg1d(1,klev,ftra(1:klev,12),'ftr12','ftr12')
+  ! @$$          CALL writeg1d(1,klev,ftra(1:klev,13),'ftr13','ftr13')
+  ! @$$          CALL writeg1d(1,klev,ftra(1:klev,14),'ftr14','ftr14')
+  ! @$$          CALL writeg1d(1,klev,ftra(1:klev,15),'ftr15','ftr15')
+  ! @$$          CALL writeg1d(1,klev,ftra(1:klev,16),'ftr16','ftr16')
+  ! @$$          CALL writeg1d(1,klev,ftra(1:klev,17),'ftr17','ftr17')
+  ! @$$          CALL writeg1d(1,klev,ftra(1:klev,18),'ftr18','ftr18')
+  ! @$$          CALL writeg1d(1,klev,ftra(1:klev,19),'ftr19','ftr19')
+  ! @$$          CALL writeg1d(1,klev,ftra(1:klev,20),'ftr20','ftr20 ')
+  ! @$$          CALL writeg1d(1,klev,mp,'mp  ','mp ')
+  ! @$$          CALL writeg1d(1,klev,Mke,'Mke  ','Mke ')
 
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cpl_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cpl_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cpl_mod.F90	(revision 5101)
@@ -15,5 +15,5 @@
 ! Use statements
 !*************************************************************************************
-  USE dimphy, ONLY : klon
+  USE dimphy, ONLY: klon
   USE mod_phys_lmdz_para
   USE ioipsl
@@ -133,11 +133,11 @@
 
   SUBROUTINE cpl_init(dtime, rlon, rlat)
-    USE carbon_cycle_mod, ONLY : carbon_cycle_cpl, fco2_ocn_day
+    USE carbon_cycle_mod, ONLY: carbon_cycle_cpl, fco2_ocn_day
     USE surface_data
     USE indice_sol_mod
-    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat, grid1dTo2d_glo, klon_glo, grid_type, unstructured, regular_lonlat
+    USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, grid1dTo2d_glo, klon_glo, grid_type, unstructured, regular_lonlat
     USE time_phylmdz_mod, ONLY: annee_ref, day_ini, itau_phy, itaufin_phy
     USE print_control_mod, ONLY: lunout
-    USE geometry_mod, ONLY : longitude_deg, latitude_deg, ind_cell_glo, cell_area
+    USE geometry_mod, ONLY: longitude_deg, latitude_deg, ind_cell_glo, cell_area
     USE ioipsl_getin_p_mod, ONLY: getin_p
     use config_ocean_skin_m, only: activate_ocean_skin
@@ -407,9 +407,9 @@
 ! are stored in this module.
     USE surface_data
-    USE geometry_mod, ONLY : longitude_deg, latitude_deg
-    USE carbon_cycle_mod, ONLY : carbon_cycle_cpl
+    USE geometry_mod, ONLY: longitude_deg, latitude_deg
+    USE carbon_cycle_mod, ONLY: carbon_cycle_cpl
     USE indice_sol_mod
     USE time_phylmdz_mod, ONLY: start_time, itau_phy
-    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
+    USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat
     use config_ocean_skin_m, only: activate_ocean_skin
 
@@ -537,5 +537,5 @@
 ! The temperature is transformed into 1D array with valid points from index 1 to knon.
 
-    USE carbon_cycle_mod, ONLY : carbon_cycle_cpl, fco2_ocn_day
+    USE carbon_cycle_mod, ONLY: carbon_cycle_cpl, fco2_ocn_day
     USE indice_sol_mod
     use config_ocean_skin_m, only: activate_ocean_skin
@@ -659,7 +659,7 @@
     ! fractions do not change between coupling time-steps.
 
-    USE carbon_cycle_mod, ONLY : carbon_cycle_cpl, co2_send
+    USE carbon_cycle_mod, ONLY: carbon_cycle_cpl, co2_send
     USE indice_sol_mod
-    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
+    USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat
     use config_ocean_skin_m, only: activate_ocean_skin
 
@@ -919,7 +919,7 @@
 ! the coupler.
 
-    USE carbon_cycle_mod, ONLY : carbon_cycle_cpl
+    USE carbon_cycle_mod, ONLY: carbon_cycle_cpl
     USE indice_sol_mod
-    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
+    USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat
 
 ! Input arguments
@@ -1117,5 +1117,5 @@
 ! (it is done in cpl_send_seaice_fields).
 
-    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
+    USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat
 
 ! Input arguments
@@ -1173,5 +1173,5 @@
 ! will be done in cpl_send_seaice_fields.
 
-    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
+    USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat
 
 ! Input varibales
@@ -1227,7 +1227,7 @@
 
     USE surface_data
-    USE carbon_cycle_mod, ONLY : carbon_cycle_cpl
+    USE carbon_cycle_mod, ONLY: carbon_cycle_cpl
     USE indice_sol_mod
-    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
+    USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat
     USE time_phylmdz_mod, ONLY: start_time, itau_phy
     USE config_ocean_skin_m, only: activate_ocean_skin
@@ -1554,5 +1554,5 @@
 !   champ_out    champ sur la grille 'gatherd'
 
-    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
+    USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat
 
 ! Input
@@ -1601,5 +1601,5 @@
 !   champ_out    champ sur la grille 2D
 
-    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
+    USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat
     
 ! Input arguments
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/create_etat0_limit_unstruct_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/create_etat0_limit_unstruct_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/create_etat0_limit_unstruct_mod.F90	(revision 5101)
@@ -14,7 +14,7 @@
   USE mod_phys_lmdz_para, ONLY: is_omp_master
   USE mod_grid_phy_lmdz, ONLY: grid_type, unstructured
-  USE ioipsl, ONLY : ioget_year_len
+  USE ioipsl, ONLY: ioget_year_len
   USE ioipsl_getin_p_mod, ONLY: getin_p
-  USE time_phylmdz_mod, ONLY : annee_ref
+  USE time_phylmdz_mod, ONLY: annee_ref
   USE create_etat0_unstruct_mod, ONLY: init_create_etat0_unstruct
   IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/create_limit_unstruct_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/create_limit_unstruct_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/create_limit_unstruct_mod.F90	(revision 5101)
@@ -11,6 +11,6 @@
   USE dimphy
   USE lmdz_xios
-  USE ioipsl,             ONLY : ioget_year_len
-  USE time_phylmdz_mod, ONLY : annee_ref
+  USE ioipsl,             ONLY: ioget_year_len
+  USE time_phylmdz_mod, ONLY: annee_ref
   USE indice_sol_mod
   USE phys_state_var_mod
@@ -181,7 +181,7 @@
   USE pchfe_95_m, only: pchfe_95
   USE arth_m, only: arth
-  USE dimphy, ONLY : klon
-  USE ioipsl,             ONLY : ioget_year_len
-  USE time_phylmdz_mod, ONLY : annee_ref
+  USE dimphy, ONLY: klon
+  USE ioipsl,             ONLY: ioget_year_len
+  USE time_phylmdz_mod, ONLY: annee_ref
   USE mod_phys_lmdz_para
   IMPLICIT NONE
@@ -231,5 +231,5 @@
 
   !-------------------------------------------------------------------------------
-    USE ioipsl, ONLY : ioget_calendar,ioconf_calendar,lock_calendar,ioget_year_len
+    USE ioipsl, ONLY: ioget_calendar,ioconf_calendar,lock_calendar,ioget_year_len
     IMPLICIT NONE
   !-------------------------------------------------------------------------------
@@ -264,5 +264,5 @@
 
   !-------------------------------------------------------------------------------
-    USE ioipsl, ONLY : ioget_calendar,ioconf_calendar,lock_calendar,ioget_mon_len
+    USE ioipsl, ONLY: ioget_calendar,ioconf_calendar,lock_calendar,ioget_mon_len
     IMPLICIT NONE
   !-------------------------------------------------------------------------------
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/ctstar.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/ctstar.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/ctstar.F90	(revision 5101)
@@ -61,14 +61,14 @@
 
 !USE PARKIND1 
-!<http://intra.cnrm.meteo.fr/eac/ARPCLI5.2/doci/code/arpcli5.2/xrd/module/parkind1.F90.php#parkind1>  ,ONLY : JPIM     ,JPRB
+!<http://intra.cnrm.meteo.fr/eac/ARPCLI5.2/doci/code/arpcli5.2/xrd/module/parkind1.F90.php#parkind1>  ,ONLY: JPIM     ,JPRB
 !USE YOMHOOK 
-!<http://intra.cnrm.meteo.fr/eac/ARPCLI5.2/doci/code/arpcli5.2/xrd/module/yomhook.F90.php#yomhook>   ,ONLY : LHOOK,   DR_HOOK
+!<http://intra.cnrm.meteo.fr/eac/ARPCLI5.2/doci/code/arpcli5.2/xrd/module/yomhook.F90.php#yomhook>   ,ONLY: LHOOK,   DR_HOOK
 
-!USE YOMCST, ONLY : RG, RD 
-!<http://intra.cnrm.meteo.fr/eac/ARPCLI5.2/doci/code/arpcli5.2/arp/module/yomcst.F90.php#yomcst>   , ONLY :  RG
+!USE YOMCST, ONLY: RG, RD
+!<http://intra.cnrm.meteo.fr/eac/ARPCLI5.2/doci/code/arpcli5.2/arp/module/yomcst.F90.php#yomcst>   , ONLY:  RG
 
 !<http://intra.cnrm.meteo.fr/eac/ARPCLI5.2/doci/code/arpcli5.2/xrd/support/rg.F.php#rg>       ,RD
 !USE YOMSTA 
-!<http://intra.cnrm.meteo.fr/eac/ARPCLI5.2/doci/code/arpcli5.2/arp/module/yomsta.F90.php#yomsta>   , ONLY : RDTDZ1
+!<http://intra.cnrm.meteo.fr/eac/ARPCLI5.2/doci/code/arpcli5.2/arp/module/yomsta.F90.php#yomsta>   , ONLY: RDTDZ1
 
 IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cv30_routines.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cv30_routines.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cv30_routines.F90	(revision 5101)
@@ -1129,5 +1129,5 @@
   ! K Emanuel fix
 
-  ! call zilch(byp,ncum)
+  ! CALL zilch(byp,ncum)
   ! do 530 k=minorig+1,nl-1
   ! do 520 i=1,ncum
@@ -1156,5 +1156,5 @@
   ! J Teixeira fix
 
-  ! ori      call zilch(byp,ncum)
+  ! ori      CALL zilch(byp,ncum)
   ! ori      do 515 i=1,ncum
   ! ori        lcape(i)=.true.
@@ -1624,7 +1624,7 @@
   ! =====================================================================
 
-  ! ym      call zilch(asum,ncum*nd)
-  ! ym      call zilch(bsum,ncum*nd)
-  ! ym      call zilch(csum,ncum*nd)
+  ! ym      CALL zilch(asum,ncum*nd)
+  ! ym      CALL zilch(bsum,ncum*nd)
+  ! ym      CALL zilch(csum,ncum*nd)
   CALL zilch(asum, nloc*nd)
   CALL zilch(csum, nloc*nd)
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cv3_routines.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cv3_routines.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cv3_routines.F90	(revision 5101)
@@ -7,5 +7,5 @@
 SUBROUTINE cv3_param(nd, k_upper, delt)
 
-  USE ioipsl_getin_p_mod, ONLY : getin_p
+  USE ioipsl_getin_p_mod, ONLY: getin_p
   use mod_phys_lmdz_para
   IMPLICIT NONE
@@ -309,5 +309,5 @@
                     cpnk, hnk, nk, icb, icbmax, iflag, gznk, plcl)
 
-  USE mod_phys_lmdz_transfert_para, ONLY : bcast
+  USE mod_phys_lmdz_transfert_para, ONLY: bcast
   USE add_phys_tend_mod, ONLY: fl_cor_ebil
   USE print_control_mod, ONLY: prt_level
@@ -382,5 +382,5 @@
     PRINT *, ' ok_new_feed: ', ok_new_feed
 !$OMP END MASTER
-    call bcast(ok_new_feed)
+    CALL bcast(ok_new_feed)
     first = .FALSE.   
   END IF
@@ -579,5 +579,5 @@
 ! print*,'icb dans cv3_feed '
 ! write(*,'(64i2)') icb(2:len-1)
-! call dump2d(64,43,'plcl dans cv3_feed ',plcl(2:len-1))
+! CALL dump2d(64,43,'plcl dans cv3_feed ',plcl(2:len-1))
 
   DO i = 1, len
@@ -1912,5 +1912,5 @@
 !    K Emanuel fix
 
-!    call zilch(byp,ncum)
+!    CALL zilch(byp,ncum)
 !    do 530 k=minorig+1,nl-1
 !     do 520 i=1,ncum
@@ -1939,5 +1939,5 @@
 ! J Teixeira fix
 
-! ori      call zilch(byp,ncum)
+! ori      CALL zilch(byp,ncum)
 ! ori      do 515 i=1,ncum
 ! ori        lcape(i)=.true.
@@ -3450,5 +3450,5 @@
 
     USE print_control_mod, ONLY: lunout, prt_level
-    USE add_phys_tend_mod, only : fl_cor_ebil
+    USE add_phys_tend_mod, ONLY: fl_cor_ebil
 
   IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cv_driver.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cv_driver.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cv_driver.F90	(revision 5101)
@@ -565,5 +565,5 @@
 
       ! epmax_cape
-      call cv30_epmax_fn_cape(nloc,ncum,nd &
+      CALL cv30_epmax_fn_cape(nloc,ncum,nd &
                 ,cape,ep,hp,icb,inb,clw,nk,t,h,lv &
                 ,epmax_diag)
@@ -682,5 +682,5 @@
 SUBROUTINE cv_flag(iflag_ice_thermo)
 
-  USE ioipsl_getin_p_mod, ONLY : getin_p
+  USE ioipsl_getin_p_mod, ONLY: getin_p
 
   IMPLICIT NONE
@@ -708,5 +708,5 @@
   ! calculee en une seule iteration.
   icvflag_Tpa=0  
-  call getin_p('icvflag_Tpa', icvflag_Tpa)
+  CALL getin_p('icvflag_Tpa', icvflag_Tpa)
 
   RETURN
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cv_routines.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cv_routines.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cv_routines.F90	(revision 5101)
@@ -686,5 +686,5 @@
   ! K Emanuel fix
 
-  ! call zilch(byp,ncum)
+  ! CALL zilch(byp,ncum)
   ! do 530 k=minorig+1,nl-1
   ! do 520 i=1,ncum
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cva_driver.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cva_driver.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cva_driver.F90	(revision 5101)
@@ -814,5 +814,5 @@
 ! write(*,'(64i1)') iflag1(2:len-1)
 
-! call dump2d(iim,jjm-1,sig1(2)
+! CALL dump2d(iim,jjm-1,sig1(2)
   END IF
 
@@ -942,5 +942,5 @@
         if (prt_level >= 9) &
              PRINT *, 'cva_driver -> cv3_epmax_cape'
-    call cv3_epmax_fn_cape(nloc,ncum,nd &
+    CALL cv3_epmax_fn_cape(nloc,ncum,nd &
                 , ep,hp,icb,inb,clw,nk,t,h,hnk,lv,lf,frac_s &
                 , pbase, p, ph, tv, buoy, sig, w0,iflag &
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cvltr.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cvltr.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cvltr.F90	(revision 5101)
@@ -12,5 +12,5 @@
   USE IOIPSL 
   USE dimphy
-  USE infotrac_phy, ONLY : nbtr
+  USE infotrac_phy, ONLY: nbtr
   IMPLICIT NONE 
 !=====================================================================
@@ -125,7 +125,7 @@
 
 !$OMP MASTER
-  call getin('ccntrAA_coef',ccntrAA_coef)
-  call getin('ccntrENV_coef',ccntrENV_coef)
-  call getin('coefcoli',coefcoli)
+  CALL getin('ccntrAA_coef',ccntrAA_coef)
+  CALL getin('ccntrENV_coef',ccntrENV_coef)
+  CALL getin('coefcoli',coefcoli)
 !$OMP END MASTER
 !$OMP BARRIER
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cvltr_noscav.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cvltr_noscav.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cvltr_noscav.F90	(revision 5101)
@@ -4,5 +4,5 @@
 SUBROUTINE cvltr_noscav(it,pdtime,da, phi, mp,wght_cvfd,paprs,pplay,x,upd,dnd,dx)
   USE dimphy
-  USE infotrac_phy, ONLY : nbtr
+  USE infotrac_phy, ONLY: nbtr
   IMPLICIT NONE 
 !=====================================================================
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cvltr_scav.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cvltr_scav.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cvltr_scav.F90	(revision 5101)
@@ -13,5 +13,5 @@
   USE IOIPSL 
   USE dimphy
-  USE infotrac_phy, ONLY : nbtr
+  USE infotrac_phy, ONLY: nbtr
   IMPLICIT NONE 
   !=====================================================================
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cvltr_spl.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cvltr_spl.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cvltr_spl.F90	(revision 5101)
@@ -13,5 +13,5 @@
   USE IOIPSL 
   USE dimphy
-  USE infotrac_phy, ONLY : nbtr
+  USE infotrac_phy, ONLY: nbtr
   IMPLICIT NONE 
 !=====================================================================
@@ -152,7 +152,7 @@
 
 !!$OMP MASTER
-!  call getin('ccntrAA_coef',ccntrAA_coef)
-!  call getin('ccntrENV_coef',ccntrENV_coef)
-!  call getin('coefcoli',coefcoli)
+!  CALL getin('ccntrAA_coef',ccntrAA_coef)
+!  CALL getin('ccntrENV_coef',ccntrENV_coef)
+!  CALL getin('coefcoli',coefcoli)
 !!$OMP END MASTER
 !!$OMP BARRIER
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cvltrorig.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cvltrorig.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cvltrorig.F90	(revision 5101)
@@ -4,5 +4,5 @@
 SUBROUTINE cvltrorig(it,pdtime,da, phi, mp,paprs,pplay,x,upd,dnd,dx)
   USE dimphy
-  USE infotrac_phy, ONLY : nbtr
+  USE infotrac_phy, ONLY: nbtr
   IMPLICIT NONE 
 !=====================================================================
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1DUTILS.h
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1DUTILS.h	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1DUTILS.h	(revision 5101)
@@ -1007,13 +1007,13 @@
  
       write(*,*) 'in abort_gcm'
-      call histclo
-!     call histclo(2)
-!     call histclo(3)
-!     call histclo(4)
-!     call histclo(5)
+      CALL histclo
+!     CALL histclo(2)
+!     CALL histclo(3)
+!     CALL histclo(4)
+!     CALL histclo(5)
       write(*,*) 'out of histclo'
       write(*,*) 'Stopping in ', modname
       write(*,*) 'Reason = ',message
-      call getin_dump
+      CALL getin_dump
 
       if (ierr .eq. 0) then
@@ -1271,5 +1271,5 @@
 !! This subroutine specifies the surface temperature to be used in 1D simulations
 
-!      USE dimphy, ONLY : klon
+!      USE dimphy, ONLY: klon
 
 !      INTEGER, INTENT(IN)                  :: knon     ! nomber of points on compressed grid
@@ -1485,5 +1485,5 @@
 !      endif
 
-!       call writefield_phy('d_t_va',d_t_va,llm)
+!       CALL writefield_phy('d_t_va',d_t_va,llm)
 
           return
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1D_read_forc_cases.h
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1D_read_forc_cases.h	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1D_read_forc_cases.h	(revision 5101)
@@ -14,6 +14,6 @@
       if (forcing_SCM) then
 
-         write(*,*),'avant call read_SCM'
-         call read_SCM_cas
+         write(*,*),'avant CALL read_SCM'
+         CALL read_SCM_cas
          write(*,*) 'Forcing read' 
 	 print*,'PS ps_cas',ps_cas
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1Dconv.h
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1Dconv.h	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1Dconv.h	(revision 5101)
@@ -187,5 +187,5 @@
           open(99,FILE=file_fordat,FORM='UNFORMATTED',                        &
      &             ACCESS='DIRECT',RECL=8)
-          call rdgrads(99,icompt,nblvlm,z,ht_mes,hq_mes,hw_mes                &
+          CALL rdgrads(99,icompt,nblvlm,z,ht_mes,hq_mes,hw_mes                &
      &                  ,hu_mes,hv_mes,hthturb_mes,hqturb_mes                 &
      &                  ,ts_fcg,ts_subr,imp_fcg,Turb_fcg)
@@ -333,5 +333,5 @@
       aaa=spaces(aaa,1)
          print*,'aaa',aaa
-      call getsch(aaa,' ',' ',5,atemps,nch)
+      CALL getsch(aaa,' ',' ',5,atemps,nch)
          print*,'atemps est',atemps
         atemps=atemps(1:nch-2)
@@ -340,5 +340,5 @@
         dt=imn*60
          print*,'le pas de temps dt',dt
-      call getsch(aaa,' ',' ',2,apasmax,nch)
+      CALL getsch(aaa,' ',' ',2,apasmax,nch)
         apasmax=apasmax(1:nch)
         read(apasmax,*) ipa
@@ -365,5 +365,5 @@
           IF (Turb_fcg) icomp1 = icomp1 + nblvlm*2
           icompt = icomp1*(in-1)
-          call rdgrads(99,icompt,nblvlm,z,ht_mes,hq_mes,hw_mes              &
+          CALL rdgrads(99,icompt,nblvlm,z,ht_mes,hq_mes,hw_mes              &
      &                   ,hu_mes,hv_mes,hthturb_mes,hqturb_mes              &
      &                   ,ts_fcg,ts_subr,imp_fcg,Turb_fcg)
@@ -518,5 +518,5 @@
 !---------------------------------------------------------------------
 ! pression au milieu des couches du gcm dans la physiq
-! (SB: remplace le call conv_lipress_gcm(playgcm) )
+! (SB: remplace le CALL conv_lipress_gcm(playgcm) )
 !---------------------------------------------------------------------
 
@@ -532,5 +532,5 @@
 !----------------------------------------------------------------------
 
-      call mesolupbis(file_forctl)
+      CALL mesolupbis(file_forctl)
 
       print*,'la valeur de nblvlm est:',nblvlm
@@ -542,5 +542,5 @@
 !----------------------------------------------------------------------
 
-      call corresbis(psolgcm)
+      CALL corresbis(psolgcm)
 
 !---------------------------------------------------------
@@ -603,5 +603,5 @@
  2000  format (a80)
        aaa=spaces(aaa,1)
-       call getsch(aaa,' ',' ',2,anblvl,nch)
+       CALL getsch(aaa,' ',' ',2,anblvl,nch)
          read(anblvl,*) nblvlm
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/old_lmdz1d.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/old_lmdz1d.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/old_lmdz1d.F90	(revision 5101)
@@ -5,5 +5,5 @@
 
    USE ioipsl, only: ju2ymds, ymds2ju, ioconf_calendar,getin
-   USE phys_state_var_mod, ONLY : phys_state_var_init, phys_state_var_end, &
+   USE phys_state_var_mod, ONLY: phys_state_var_init, phys_state_var_end, &
        clwcon, detr_therm, &
        qsol, fevap, z0m, z0h, agesno, &
@@ -23,8 +23,8 @@
   
    USE dimphy
-   USE surface_data, only : type_ocean,ok_veget
-   USE pbl_surface_mod, only : ftsoil, pbl_surface_init, &
+   USE surface_data, ONLY: type_ocean,ok_veget
+   USE pbl_surface_mod, ONLY: ftsoil, pbl_surface_init, &
                                  pbl_surface_final
-   USE fonte_neige_mod, only : fonte_neige_init, fonte_neige_final 
+   USE fonte_neige_mod, ONLY: fonte_neige_init, fonte_neige_final
 
    USE infotrac ! new
@@ -43,5 +43,5 @@
    USE temps_mod, ONLY: annee_ref, calend, day_end, day_ini, day_ref, &
                         itau_dyn, itau_phy, start_time, year_len
-   USE phys_cal_mod, ONLY : year_len_phys_cal_mod => year_len
+   USE phys_cal_mod, ONLY: year_len_phys_cal_mod => year_len
    USE mod_1D_cases_read, ONLY: interp_case_time ! used in included old_1D_read_forc_cases.h
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/replay1d.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/replay1d.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/replay1d.F90	(revision 5101)
@@ -4,5 +4,5 @@
 USE inigeomphy_mod, ONLY: inigeomphy
 USE comvert_mod, ONLY: presnivs
-USE comvert_mod, only :  preff, pa
+USE comvert_mod, ONLY:  preff, pa
 USE ioipsl, only: getin
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/scm.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/scm.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/scm.F90	(revision 5101)
@@ -2,5 +2,5 @@
 
    USE ioipsl, only: ju2ymds, ymds2ju, ioconf_calendar,getin
-   USE phys_state_var_mod, ONLY : phys_state_var_init, phys_state_var_end, &
+   USE phys_state_var_mod, ONLY: phys_state_var_init, phys_state_var_end, &
        clwcon, detr_therm, &
        qsol, fevap, z0m, z0h, agesno, &
@@ -20,8 +20,8 @@
   
    USE dimphy
-   USE surface_data, only : type_ocean,ok_veget
-   USE pbl_surface_mod, only : ftsoil, pbl_surface_init, &
+   USE surface_data, ONLY: type_ocean,ok_veget
+   USE pbl_surface_mod, ONLY: ftsoil, pbl_surface_init, &
                                  pbl_surface_final
-   USE fonte_neige_mod, only : fonte_neige_init, fonte_neige_final 
+   USE fonte_neige_mod, ONLY: fonte_neige_init, fonte_neige_final
 
    USE infotrac ! new
@@ -40,5 +40,5 @@
    USE temps_mod, ONLY: annee_ref, calend, day_end, day_ini, day_ref, &
                         itau_dyn, itau_phy, start_time, year_len
-   USE phys_cal_mod, ONLY : year_len_phys_cal_mod => year_len 
+   USE phys_cal_mod, ONLY: year_len_phys_cal_mod => year_len
 
       implicit none
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/ecumev6_flux.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/ecumev6_flux.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/ecumev6_flux.F90	(revision 5101)
@@ -86,11 +86,11 @@
 USE dimphy
 USE indice_sol_mod
-USE MODD_CSTS,             ONLY : XPI, XDAY, XKARMAN, XG, XP00, XSTEFAN, XRD, XRV,   &
+USE MODD_CSTS,             ONLY: XPI, XDAY, XKARMAN, XG, XP00, XSTEFAN, XRD, XRV,   &
                                   XCPD, XCPV, XCL, XTT, XLVTT
 
 
-!USE MODD_SURF_PAR,         ONLY : XUNDEF
-!USE MODD_SURF_ATM,         ONLY : XVCHRNK, XVZ0CM
-!USE MODD_REPROD_OPER,      ONLY : CCHARNOCK
+!USE MODD_SURF_PAR,         ONLY: XUNDEF
+!USE MODD_SURF_ATM,         ONLY: XVCHRNK, XVZ0CM
+!USE MODD_REPROD_OPER,      ONLY: CCHARNOCK
 
 !USE MODE_THERMOS
@@ -98,6 +98,6 @@
 !USE MODI_SURFACE_RI
 
-!USE YOMHOOK,   ONLY : LHOOK,   DR_HOOK
-!USE PARKIND1,  ONLY : JPRB
+!USE YOMHOOK,   ONLY: LHOOK,   DR_HOOK
+!USE PARKIND1,  ONLY: JPRB
 
 !USE MODI_ABOR1_SFX
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/ener_conserv.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/ener_conserv.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/ener_conserv.F90	(revision 5101)
@@ -20,12 +20,12 @@
 
 ! From module
-USE phys_local_var_mod, ONLY : d_u_vdf,d_v_vdf,d_t_vdf,d_u_ajs,d_v_ajs,d_t_ajs, &
+USE phys_local_var_mod, ONLY: d_u_vdf,d_v_vdf,d_t_vdf,d_u_ajs,d_v_ajs,d_t_ajs, &
                                d_u_con,d_v_con,d_t_con,d_t_diss
-USE phys_local_var_mod, ONLY : d_t_eva,d_t_lsc,d_q_eva,d_q_lsc
-USE phys_local_var_mod, ONLY : d_u_oro,d_v_oro,d_u_lif,d_v_lif
-USE phys_local_var_mod, ONLY : du_gwd_hines,dv_gwd_hines,dv_gwd_front,dv_gwd_rando
-USE phys_state_var_mod, ONLY : du_gwd_front,du_gwd_rando
-USE phys_output_var_mod, ONLY : bils_ec,bils_ech,bils_tke,bils_kinetic,bils_enthalp,bils_latent,bils_diss
-USE add_phys_tend_mod, ONLY : fl_cor_ebil 
+USE phys_local_var_mod, ONLY: d_t_eva,d_t_lsc,d_q_eva,d_q_lsc
+USE phys_local_var_mod, ONLY: d_u_oro,d_v_oro,d_u_lif,d_v_lif
+USE phys_local_var_mod, ONLY: du_gwd_hines,dv_gwd_hines,dv_gwd_front,dv_gwd_rando
+USE phys_state_var_mod, ONLY: du_gwd_front,du_gwd_rando
+USE phys_output_var_mod, ONLY: bils_ec,bils_ech,bils_tke,bils_kinetic,bils_enthalp,bils_latent,bils_diss
+USE add_phys_tend_mod, ONLY: fl_cor_ebil
 USE infotrac_phy, ONLY: nqtot
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/flott_gwd_rando_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/flott_gwd_rando_m.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/flott_gwd_rando_m.F90	(revision 5101)
@@ -21,6 +21,6 @@
       use dimphy, only: klon, klev
       use assert_m, only: assert
-      USE ioipsl_getin_p_mod, ONLY : getin_p
-      USE vertical_layers_mod, ONLY : presnivs
+      USE ioipsl_getin_p_mod, ONLY: getin_p
+      USE vertical_layers_mod, ONLY: presnivs
       CHARACTER (LEN=20) :: modname='flott_gwd_rando'
       CHARACTER (LEN=80) :: abort_message
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/fonte_neige_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/fonte_neige_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/fonte_neige_mod.F90	(revision 5101)
@@ -8,5 +8,5 @@
 
 !****************************************************************************************
-  USE dimphy, ONLY : klon
+  USE dimphy, ONLY: klon
   USE indice_sol_mod
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/freinage.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/freinage.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/freinage.F90	(revision 5101)
@@ -8,5 +8,5 @@
     use dimphy, only: klon, klev
 !    USE control, ONLY: nvm
-!    USE indice_sol_mod, only : nvm_orch
+!    USE indice_sol_mod, ONLY: nvm_orch
 
     IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/grid_index.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/grid_index.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/grid_index.F90	(revision 5101)
@@ -5,5 +5,5 @@
 ! Please do not put this function in a m*odule not to complexify the replay script
 !--------------------------------------------------------------------------------
-USE dimphy, only : klon
+USE dimphy, ONLY: klon
 USE geometry_mod, ONLY: latitude_deg, longitude_deg
 implicit none
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/grid_noro_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/grid_noro_m.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/grid_noro_m.F90	(revision 5101)
@@ -436,5 +436,5 @@
 !===============================================================================
   USE netcdf, ONLY: nf90_open,  nf90_inq_dimid, nf90_inquire_dimension,        &
-        nf90_noerr, nf90_close, NF90_INQ_VARID, nf90_get_var, NF90_STRERROR,   &
+        nf90_noerr, nf90_close, nf90_inq_varid, nf90_get_var, nf90_strerror,   &
         nf90_nowrite
   IMPLICIT NONE 
@@ -498,5 +498,5 @@
   CHARACTER(LEN=*), INTENT(IN)    :: var
   REAL,             INTENT(INOUT) :: fld(:,:)
-  CALL ncerr(NF90_INQ_VARID(fid,var,vid),var)
+  CALL ncerr(nf90_inq_varid(fid,var,vid),var)
   CALL ncerr(nf90_get_var(fid,vid,fld(1:imar,:)),var)
   fld(imar+1,:)=fld(1,:)
@@ -511,5 +511,5 @@
   CALL ncerr(nf90_inq_dimid(fid,dimd,did))
   CALL ncerr(nf90_inquire_dimension(fid,did,len=n)); ALLOCATE(tmp(n))
-  CALL ncerr(NF90_INQ_VARID(fid,dimd,did))
+  CALL ncerr(nf90_inq_varid(fid,dimd,did))
   CALL ncerr(nf90_get_var(fid,did,tmp))
   IF(MAXVAL(tmp)>xpi) tmp=tmp*d2r
@@ -529,5 +529,5 @@
     IF(PRESENT(var)) mess=TRIM(mess)//' and variable "'//TRIM(var)//'"'
     WRITE(lunout,*)TRIM(mess)//'.'
-    CALL abort_physic(modname,NF90_STRERROR(ncres),1)
+    CALL abort_physic(modname,nf90_strerror(ncres),1)
   END IF
 END SUBROUTINE ncerr
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/ice_sursat_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/ice_sursat_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/ice_sursat_mod.F90	(revision 5101)
@@ -59,5 +59,5 @@
 
   USE print_control_mod, ONLY: lunout
-  USE ioipsl_getin_p_mod, ONLY : getin_p
+  USE ioipsl_getin_p_mod, ONLY: getin_p
 
   IMPLICIT NONE
@@ -91,5 +91,5 @@
   USE mod_grid_phy_lmdz,  ONLY: klon_glo
   USE geometry_mod, ONLY: cell_area
-  USE phys_cal_mod, ONLY : mth_cur
+  USE phys_cal_mod, ONLY: mth_cur
   USE mod_phys_lmdz_mpi_data, ONLY: is_mpi_root
   USE mod_phys_lmdz_omp_data, ONLY: is_omp_root
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/infotrac_phy.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/infotrac_phy.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/infotrac_phy.F90	(revision 5101)
@@ -3,6 +3,6 @@
 MODULE infotrac_phy
 
-  USE       strings_mod, ONLY : msg, fmsg, maxlen, cat, dispTable, int2str, bool2str, strStack, strParse, strIdx
-  USE readTracFiles_mod, ONLY : trac_type, readTracersFiles, tracers, setGeneration, itZonIso, nzone, tran0, isoZone, &
+  USE       strings_mod, ONLY: msg, fmsg, maxlen, cat, dispTable, int2str, bool2str, strStack, strParse, strIdx
+  USE readTracFiles_mod, ONLY: trac_type, readTracersFiles, tracers, setGeneration, itZonIso, nzone, tran0, isoZone, &
           delPhase, niso, getKey, isot_type, processIsotopes, isotope, maxTableWidth, iqIsoPha, nphas, ixIso, isoPhas, &
           addPhase, iH2O, addKey, isoSelect, testTracersFiles, isoKeys, indexUpdate, iqWIsoPha, nbIso, ntiso, isoName, isoCheck
@@ -128,9 +128,9 @@
 
   SUBROUTINE init_infotrac_phy
-    USE ioipsl_getin_p_mod, ONLY : getin_p
+    USE ioipsl_getin_p_mod, ONLY: getin_p
 #ifdef REPROBUS
    USE CHEM_REP, ONLY: Init_chem_rep_trac
 #endif
-    USE lmdz_cppkeys_wrapper, ONLY : CPPKEY_INCA, CPPKEY_STRATAER
+    USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA, CPPKEY_STRATAER
     IMPLICIT NONE
     !==============================================================================================================================
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/ini_csts.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/ini_csts.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/ini_csts.F90	(revision 5101)
@@ -57,6 +57,6 @@
 
 
-!USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
-!USE PARKIND1  ,ONLY : JPRB
+!USE YOMHOOK   ,ONLY: LHOOK,   DR_HOOK
+!USE PARKIND1  ,ONLY: JPRB
 
 !USE MODI_INI_CTURBS
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/inifis_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/inifis_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/inifis_mod.F90	(revision 5101)
@@ -6,5 +6,5 @@
   SUBROUTINE inifis(punjours, prad, pg, pr, pcpp)
   ! Initialize some physical constants and settings
-  USE init_print_control_mod, ONLY : init_print_control
+  USE init_print_control_mod, ONLY: init_print_control
   USE print_control_mod, ONLY: lunout
   IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/init_be.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/init_be.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/init_be.F90	(revision 5101)
@@ -6,5 +6,5 @@
   USE dimphy
   USE indice_sol_mod
-  USE geometry_mod, ONLY : longitude, latitude
+  USE geometry_mod, ONLY: longitude, latitude
     
   IMPLICIT NONE 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/initrrnpb.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/initrrnpb.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/initrrnpb.F90	(revision 5101)
@@ -4,6 +4,6 @@
 SUBROUTINE  initrrnpb(ftsol,pctsrf,masktr,fshtr,hsoltr,tautr,vdeptr,scavtr)
   USE dimphy
-  USE infotrac_phy, ONLY : nbtr
-  USE traclmdz_mod, ONLY : id_rn, id_pb
+  USE infotrac_phy, ONLY: nbtr
+  USE traclmdz_mod, ONLY: id_rn, id_pb
   USE indice_sol_mod
   IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/VAR0SV.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/VAR0SV.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/VAR0SV.F90	(revision 5101)
@@ -1,6 +1,6 @@
 MODULE VAR0SV
 
-USE VAR_SV, only : nsol, nsno 
-USE VARdSV, only : nsot
+USE VAR_SV, ONLY: nsol, nsno
+USE VARdSV, ONLY: nsot
 
 IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/VARtSV.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/VARtSV.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/VARtSV.F90	(revision 5101)
@@ -1,5 +1,5 @@
 MODULE VARtSV
 
-USE VAR_SV, only : nsol, nsno, klonv
+USE VAR_SV, ONLY: nsol, nsno, klonv
 
 IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/VARxSV.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/VARxSV.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/VARxSV.F90	(revision 5101)
@@ -1,5 +1,5 @@
 MODULE VARxSV                      
 
-USE VAR_SV, only : klonv, nsol, nsno, nb_wri
+USE VAR_SV, ONLY: klonv, nsol, nsno, nb_wri
                                                           
 IMPLICIT NONE                                                                                
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/VARySV.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/VARySV.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/VARySV.F90	(revision 5101)
@@ -1,5 +1,5 @@
 MODULE VARySV
 
-USE VAR_SV, only : klonv, nsol, nsno
+USE VAR_SV, ONLY: klonv, nsol, nsno
 
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/surf_inlandsis_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/surf_inlandsis_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/surf_inlandsis_mod.F90	(revision 5101)
@@ -50,5 +50,5 @@
         USE VARtSV
         USE VARphy
-        USE surface_data, only : iflag_tsurf_inlandsis, SnoMod, BloMod, ok_outfor
+        USE surface_data, ONLY: iflag_tsurf_inlandsis, SnoMod, BloMod, ok_outfor
 
         IMPLICIT NONE
@@ -751,5 +751,5 @@
         ! of SISVAT, therefore it's needed here.
 
-        USE mod_phys_lmdz_mpi_data, ONLY : is_mpi_root
+        USE mod_phys_lmdz_mpi_data, ONLY: is_mpi_root
         USE mod_phys_lmdz_para
         USE VAR_SV
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/iophy.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/iophy.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/iophy.F90	(revision 5101)
@@ -166,5 +166,5 @@
                                   mpi_size, mpi_rank 
     USE ioipsl, ONLY: flio_dom_set
-    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
+    USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat
 
     IMPLICIT NONE
@@ -211,5 +211,5 @@
   USE mod_phys_lmdz_para, ONLY: is_sequential, is_using_mpi, is_mpi_root, &
                                 jj_begin, jj_end, jj_nb
-  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
+  USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat
   USE ioipsl, ONLY: histbeg
   USE wxios, ONLY: wxios_add_file, using_xios
@@ -251,5 +251,5 @@
 
   USE mod_phys_lmdz_para, ONLY: jj_begin, jj_end, jj_nb, is_sequential
-  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
+  USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat
   USE ioipsl, ONLY: histbeg
 
@@ -461,6 +461,6 @@
                                    nid_files, nhorim, swaero_diag, dryaod_diag, nfiles, &
                                    ok_4xCO2atm
-    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
-    USE aero_mod, ONLY : naero_tot, name_aero_tau
+    USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat
+    USE aero_mod, ONLY: naero_tot, name_aero_tau
     USE print_control_mod, ONLY: prt_level,lunout
 
@@ -538,5 +538,5 @@
                                    nhorim, zdtime_moy, levmin, levmax, &
                                    nvertm, nfiles
-    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
+    USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat
     USE print_control_mod, ONLY: prt_level,lunout
     IMPLICIT NONE
@@ -590,6 +590,6 @@
                                    ok_4xCO2atm 
     USE print_control_mod, ONLY: prt_level,lunout 
-    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
-    USE aero_mod, ONLY : naero_tot, name_aero_tau
+    USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat
+    USE aero_mod, ONLY: naero_tot, name_aero_tau
     USE wxios, ONLY: wxios_add_field_to_file, using_xios
     USE print_control_mod, ONLY: prt_level,lunout
@@ -706,5 +706,5 @@
                                    levmax, nvertm
     USE print_control_mod, ONLY: prt_level,lunout
-    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
+    USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat
     USE wxios, ONLY: wxios_add_field_to_file, using_xios
     USE print_control_mod, ONLY: prt_level,lunout
@@ -811,5 +811,5 @@
     USE ioipsl, ONLY: histwrite
     USE print_control_mod, ONLY: prt_level,lunout
-    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
+    USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat
 
     IMPLICIT NONE
@@ -876,5 +876,5 @@
                                   is_sequential, klon_mpi_begin, klon_mpi_end, &
                                   jj_nb, klon_mpi, is_master
-    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
+    USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat
     USE ioipsl, ONLY: histwrite
     USE print_control_mod, ONLY: prt_level,lunout
@@ -954,5 +954,5 @@
                                  nid_files, swaerofree_diag, swaero_diag, dryaod_diag, ok_4xCO2atm
   USE print_control_mod, ONLY: prt_level,lunout
-  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat, grid_type, unstructured, regular_lonlat
+  USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, grid_type, unstructured, regular_lonlat
   USE lmdz_xios, ONLY: xios_send_field, xios_field_is_active, using_xios
   USE print_control_mod, ONLY: lunout, prt_level
@@ -1166,5 +1166,5 @@
                                  nfiles, vars_defined, clef_stations, &
                                  nid_files, swaerofree_diag
-  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat, grid_type, regular_lonlat, unstructured
+  USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, grid_type, regular_lonlat, unstructured
   USE lmdz_xios, ONLY: xios_send_field, xios_field_is_active, using_xios
   USE print_control_mod, ONLY: prt_level,lunout
@@ -1362,5 +1362,5 @@
                                 is_sequential, klon_mpi_begin, klon_mpi_end, &
                                 jj_nb, klon_mpi, is_master
-  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat, grid_type, unstructured
+  USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, grid_type, unstructured
   USE lmdz_xios, ONLY: xios_send_field
   USE print_control_mod, ONLY: prt_level,lunout
@@ -1446,5 +1446,5 @@
                                 jj_nb, klon_mpi, is_master
   USE lmdz_xios, ONLY: xios_send_field
-  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat, grid_type, unstructured
+  USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, grid_type, unstructured
   USE print_control_mod, ONLY: prt_level,lunout
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/iophys.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/iophys.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/iophys.F90	(revision 5101)
@@ -77,5 +77,5 @@
 
     USE mod_phys_lmdz_para, ONLY: klon_omp
-    USE dimphy, ONLY : klon
+    USE dimphy, ONLY: klon
     USE mod_grid_phy_lmdz, ONLY: klon_glo
     IMPLICIT NONE
@@ -115,6 +115,6 @@
       USE dimphy, ONLY: klev
       USE mod_grid_phy_lmdz, ONLY: klon_glo
-      USE time_phylmdz_mod, ONLY : annee_ref, day_ref, day_ini
-      USE phys_cal_mod, ONLY : calend
+      USE time_phylmdz_mod, ONLY: annee_ref, day_ref, day_ini
+      USE phys_cal_mod, ONLY: calend
 
       IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/iostart.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/iostart.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/iostart.F90	(revision 5101)
@@ -70,5 +70,5 @@
     
     IF (is_mpi_root .AND. is_omp_root) THEN
-      ierr=NF90_INQ_VARID(nid_start,Field_name,varid)
+      ierr=nf90_inq_varid(nid_start,Field_name,varid)
       IF (ierr==nf90_noerr) THEN
         Inquire_field=.TRUE.
@@ -146,5 +146,5 @@
     IF (is_master) THEN
   
-      ierr=NF90_INQ_VARID(nid_start,Field_name,varid)
+      ierr=nf90_inq_varid(nid_start,Field_name,varid)
       
       IF (ierr==nf90_noerr) THEN
@@ -173,5 +173,5 @@
       IF (.NOT. tmp_found) THEN
         PRINT*, 'phyetat0: Le champ <'//field_name//'> est absent'
-        call abort_physic("", "", 1)
+        CALL abort_physic("", "", 1)
       ENDIF
     ENDIF
@@ -193,10 +193,10 @@
               IF (ierr/=nf90_noerr) THEN
                  PRINT*, 'phyetat0: Lecture echouee aussi en 2D pour <'//field_name//'>'
-                 call abort_physic("", "", 1)
+                 CALL abort_physic("", "", 1)
               ELSE
                  PRINT*, 'phyetat0: La variable <'//field_name//'> lu sur surface seulement'!, selon ancien format, le reste mis a zero'
               END IF
            ELSE
-              call abort_physic("", "", 1)
+              CALL abort_physic("", "", 1)
            ENDIF
          ENDIF
@@ -267,5 +267,5 @@
     IF (is_mpi_root .AND. is_omp_root) THEN
   
-      ierr=NF90_INQ_VARID(nid_start,var_name,varid)
+      ierr=nf90_inq_varid(nid_start,var_name,varid)
       
       IF (ierr==nf90_noerr) THEN
@@ -273,5 +273,5 @@
         IF (ierr/=nf90_noerr) THEN
           PRINT*, 'phyetat0: Lecture echouee pour <'//var_name//'>'
-          call abort_physic("", "", 1)
+          CALL abort_physic("", "", 1)
         ENDIF
         tmp_found=.TRUE.
@@ -293,5 +293,5 @@
       IF (.NOT. tmp_found) THEN
         PRINT*, 'phyetat0: La variable champ <'//var_name//'> est absente'
-        call abort_physic("", "", 1)
+        CALL abort_physic("", "", 1)
       ENDIF
     ENDIF
@@ -425,5 +425,5 @@
       ENDIF
          
-!      ierr = NF90_REDEF (nid_restart)
+!      ierr = nf90_redef (nid_restart)
       ierr = nf90_def_var (nid_restart, field_name, nf90_format,(/ idim /),nvarid)
       IF (LEN_TRIM(title) > 0) ierr = nf90_put_att (nid_restart,nvarid,"title", title)
@@ -453,5 +453,5 @@
        ENDDO
 
-       ierr = NF90_INQ_VARID(nid_restart, field_name, nvarid)
+       ierr = nf90_inq_varid(nid_restart, field_name, nvarid)
        ierr = nf90_put_var(nid_restart,nvarid,RESHAPE(field_glo,(/klon_glo*field_size/)))
       ENDIF
@@ -528,5 +528,5 @@
       IF (var_size/=length) THEN
         PRINT *, "erreur phyredem : probleme de dimension"
-        call abort_physic("", "", 1)
+        CALL abort_physic("", "", 1)
       ENDIF
 
@@ -534,5 +534,5 @@
       IF (pass==1) THEN
         
-!      ierr = NF90_REDEF (nid_restart)
+!      ierr = nf90_redef (nid_restart)
 
         ierr = nf90_def_var (nid_restart, var_name, nf90_format,(/ idim1 /),nvarid)
@@ -542,5 +542,5 @@
     ! second pass : write     
       ELSE IF (pass==2) THEN 
-        ierr = NF90_INQ_VARID(nid_restart, var_name, nvarid)
+        ierr = nf90_inq_varid(nid_restart, var_name, nvarid)
         ierr = nf90_put_var(nid_restart,nvarid,var)
       ENDIF
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/iotd_fin.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/iotd_fin.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/iotd_fin.F90	(revision 5101)
@@ -1,4 +1,4 @@
 SUBROUTINE iotd_fin
-  USE netcdf, ONLY : nf90_close
+  USE netcdf, ONLY: nf90_close
 
   IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/limit_read_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/limit_read_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/limit_read_mod.F90	(revision 5101)
@@ -131,5 +131,5 @@
 ! This subroutine returns the sea surface temperature already read from limit.nc.
 
-    USE dimphy, ONLY : klon
+    USE dimphy, ONLY: klon
 
     INTEGER, INTENT(IN)                  :: knon     ! nomber of points on compressed grid
@@ -164,9 +164,9 @@
     USE mod_grid_phy_lmdz
     USE mod_phys_lmdz_para
-    USE surface_data, ONLY : type_ocean, ok_veget
+    USE surface_data, ONLY: type_ocean, ok_veget
     USE netcdf, ONLY:nf90_get_var,nf90_inq_varid,nf90_close,nf90_inquire_dimension,&
             nf90_inquire,nf90_get_att,nf90_inq_dimid,nf90_nowrite,nf90_noerr,nf90_open
     USE indice_sol_mod
-    USE phys_cal_mod, ONLY : calend, year_len
+    USE phys_cal_mod, ONLY: calend, year_len
     USE print_control_mod, ONLY: lunout, prt_level
     USE lmdz_xios, ONLY: xios_recv_field, using_xios
@@ -239,5 +239,5 @@
 
           !--- WARNING IF CALENDAR IS KNOWN AND DOES NOT MATCH THE ONE OF LMDZ
-          ierr=NF90_INQ_VARID(nid, 'TEMPS', nvarid)
+          ierr=nf90_inq_varid(nid, 'TEMPS', nvarid)
           ierr=nf90_get_att(nid, nvarid, 'calendar', calendar)
           IF(ierr==nf90_noerr.AND.calendar/=calend.AND.prt_level>=1) THEN
@@ -251,5 +251,5 @@
             ierr=nf90_inq_dimid(nid,"time_year",ndimid)
           ELSE
-            ierr=NF90_INQUIRE(nid, UnlimitedDimID=ndimid)
+            ierr=nf90_inquire(nid, UnlimitedDimID=ndimid)
           ENDIF
           ierr=nf90_inquire_dimension(nid, ndimid, len=nn)
@@ -351,5 +351,5 @@
 
 ! Ocean fraction
-             ierr = NF90_INQ_VARID(nid, 'FOCE', nvarid)
+             ierr = nf90_inq_varid(nid, 'FOCE', nvarid)
              IF (ierr /= nf90_noerr) CALL abort_physic(modname, 'Le champ <FOCE> est absent',1)
              
@@ -358,5 +358,5 @@
 
 ! Sea-ice fraction
-             ierr = NF90_INQ_VARID(nid, 'FSIC', nvarid)
+             ierr = nf90_inq_varid(nid, 'FSIC', nvarid)
              IF (ierr /= nf90_noerr) CALL abort_physic(modname,'Le champ <FSIC> est absent',1)
 
@@ -369,5 +369,5 @@
 
 ! Land fraction
-                ierr = NF90_INQ_VARID(nid, 'FTER', nvarid)
+                ierr = nf90_inq_varid(nid, 'FTER', nvarid)
                 IF (ierr /= nf90_noerr) CALL abort_physic(modname,'Le champ <FTER> est absent',1)
                 
@@ -376,5 +376,5 @@
 
 ! Continentale ice fraction
-                ierr = NF90_INQ_VARID(nid, 'FLIC', nvarid)
+                ierr = nf90_inq_varid(nid, 'FLIC', nvarid)
                 IF (ierr /= nf90_noerr) CALL abort_physic(modname,'Le champ <FLIC> est absent',1)
 
@@ -391,5 +391,5 @@
           IF ( type_ocean /= 'couple') THEN
 
-             ierr = NF90_INQ_VARID(nid, 'SST', nvarid)
+             ierr = nf90_inq_varid(nid, 'SST', nvarid)
              IF (ierr /= nf90_noerr) CALL abort_physic(modname,'Le champ <SST> est absent',1)
 
@@ -407,5 +407,5 @@
 
 ! Read albedo
-             ierr = NF90_INQ_VARID(nid, 'ALB', nvarid)
+             ierr = nf90_inq_varid(nid, 'ALB', nvarid)
              IF (ierr /= nf90_noerr) CALL abort_physic(modname,'Le champ <ALB> est absent',1)
 
@@ -414,5 +414,5 @@
 
 ! Read rugosity
-             ierr = NF90_INQ_VARID(nid, 'RUG', nvarid)
+             ierr = nf90_inq_varid(nid, 'RUG', nvarid)
              IF (ierr /= nf90_noerr) CALL abort_physic(modname,'Le champ <RUG> est absent',1)
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/limit_slab.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/limit_slab.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/limit_slab.F90	(revision 5101)
@@ -84,8 +84,8 @@
         ! First read first layer
         ! try first "BILS_OCE01"
-        ierr = NF90_INQ_VARID(nid, 'BILS_OCE01', nvarid)
+        ierr = nf90_inq_varid(nid, 'BILS_OCE01', nvarid)
         IF (ierr /= nf90_noerr) THEN
             ! Else BILS_OCE
-            ierr = NF90_INQ_VARID(nid, 'BILS_OCE', nvarid)
+            ierr = nf90_inq_varid(nid, 'BILS_OCE', nvarid)
             IF (ierr /= nf90_noerr) THEN
               read_bils=.FALSE.
@@ -102,5 +102,5 @@
           DO i=2,nslay
             WRITE(str2,'(i2.2)') i
-            ierr = NF90_INQ_VARID(nid,'BILS_OCE'//str2, nvarid)
+            ierr = nf90_inq_varid(nid,'BILS_OCE'//str2, nvarid)
             IF (ierr==nf90_noerr) THEN
               ierr = nf90_get_var(nid,nvarid,bils_glo(:,i),start,epais)
@@ -113,5 +113,5 @@
 
 ! Read sst_glo for this day
-        ierr = NF90_INQ_VARID(nid, 'SST', nvarid)
+        ierr = nf90_inq_varid(nid, 'SST', nvarid)
         IF (ierr /= nf90_noerr)  THEN
             read_sst=.FALSE.
@@ -127,5 +127,5 @@
 
 ! Read siv_glo for this day
-        ierr = NF90_INQ_VARID(nid, 'SICV', nvarid)
+        ierr = nf90_inq_varid(nid, 'SICV', nvarid)
         IF (ierr /= nf90_noerr)  THEN
             read_siv=.FALSE.
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_atke_exchange_coeff.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_atke_exchange_coeff.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_atke_exchange_coeff.F90	(revision 5101)
@@ -23,7 +23,7 @@
 !=======================================================================
 
-USE lmdz_atke_turbulence_ini, ONLY : iflag_atke, kappa, l0, ric, cinf, rpi, rcpd, atke_ok_virtual, ri0, ri1
-USE lmdz_atke_turbulence_ini, ONLY : cepsilon, pr_slope, pr_asym, pr_neut, ctkes, rg, rd, rv, atke_ok_vdiff
-USE lmdz_atke_turbulence_ini, ONLY : viscom, viscoh, clmix, clmixshear, iflag_atke_lmix, lmin, smmin, cn
+USE lmdz_atke_turbulence_ini, ONLY: iflag_atke, kappa, l0, ric, cinf, rpi, rcpd, atke_ok_virtual, ri0, ri1
+USE lmdz_atke_turbulence_ini, ONLY: cepsilon, pr_slope, pr_asym, pr_neut, ctkes, rg, rd, rv, atke_ok_vdiff
+USE lmdz_atke_turbulence_ini, ONLY: viscom, viscoh, clmix, clmixshear, iflag_atke_lmix, lmin, smmin, cn
 
 !!-------------------------------------------------------------------------------------------------------------
@@ -416,5 +416,5 @@
 ! E Vignon, July 2023
 
-USE lmdz_atke_turbulence_ini, ONLY : rd, cke, viscom
+USE lmdz_atke_turbulence_ini, ONLY: rd, cke, viscom
 
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_atke_turbulence_ini.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_atke_turbulence_ini.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_atke_turbulence_ini.F90	(revision 5101)
@@ -53,5 +53,5 @@
       !!----------------------------------------------------------------------
 
-        USE ioipsl_getin_p_mod, ONLY : getin_p                                                                                                      
+        USE ioipsl_getin_p_mod, ONLY: getin_p
 
       ! input arguments (universal constants for planet)
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_blowing_snow_ini.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_blowing_snow_ini.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_blowing_snow_ini.F90	(revision 5101)
@@ -34,5 +34,5 @@
                                   RVTMP2_in, RTT_in,RD_in,RG_in, RV_in, RPI_in)
 
-         USE ioipsl_getin_p_mod, ONLY : getin_p
+         USE ioipsl_getin_p_mod, ONLY: getin_p
 
          real, intent(in) :: RCPD_in, RLSTT_in, RLVTT_in, RLMLT_in, RPI_in
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_blowing_snow_sublim_sedim.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_blowing_snow_sublim_sedim.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_blowing_snow_sublim_sedim.F90	(revision 5101)
@@ -11,7 +11,7 @@
 
 
-use lmdz_blowing_snow_ini, only : iflag_sublim_bs, iflag_sedim_bs, coef_sub_bs,RTT,RD,RG,fallv_bs
-use lmdz_blowing_snow_ini, only : qbmin, RCPD, RLSTT, RLMLT, RLVTT, RVTMP2, RV, RPI, tbsmelt, taumeltbs0, rhobs, r_bs
-USE lmdz_lscp_tools, only : calc_qsat_ecmwf
+use lmdz_blowing_snow_ini, ONLY: iflag_sublim_bs, iflag_sedim_bs, coef_sub_bs,RTT,RD,RG,fallv_bs
+use lmdz_blowing_snow_ini, ONLY: qbmin, RCPD, RLSTT, RLMLT, RLVTT, RVTMP2, RV, RPI, tbsmelt, taumeltbs0, rhobs, r_bs
+USE lmdz_lscp_tools, ONLY: calc_qsat_ecmwf
 
 implicit none
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_call_atke.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_call_atke.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_call_atke.F90	(revision 5101)
@@ -1,5 +1,5 @@
 module lmdz_call_atke
 
-USE lmdz_atke_exchange_coeff, ONLY :  atke_compute_km_kh
+USE lmdz_atke_exchange_coeff, ONLY:  atke_compute_km_kh
 
 implicit none
@@ -15,5 +15,5 @@
 
 
-USE lmdz_atke_turbulence_ini, ONLY : iflag_num_atke, rg, rd
+USE lmdz_atke_turbulence_ini, ONLY: iflag_num_atke, rg, rd
 USE phys_local_var_mod, ONLY: tke_shear, tke_buoy, tke_trans
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_call_blowing_snow.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_call_blowing_snow.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_call_blowing_snow.F90	(revision 5101)
@@ -6,5 +6,5 @@
                                   dtemp_bs,dq_bs,dqbs_bs,bsfl,precip_bs)
 
-use lmdz_blowing_snow_sublim_sedim, only : blowing_snow_sublim_sedim
+use lmdz_blowing_snow_sublim_sedim, ONLY: blowing_snow_sublim_sedim
 implicit none
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_call_cloud_optics_prop.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_call_cloud_optics_prop.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_call_cloud_optics_prop.F90	(revision 5101)
@@ -18,8 +18,8 @@
   !------------------
 
-  USE lmdz_cloud_optics_prop_ini , ONLY : ok_cdnc
-  USE lmdz_cloud_optics_prop_ini , ONLY : bl95_b0, bl95_b1
-  USE lmdz_cloud_optics_prop_ini , ONLY : iflag_ice_thermo, ok_new_lscp, iflag_t_glace
-  USE lmdz_cloud_optics_prop, ONLY : cloud_optics_prop
+  USE lmdz_cloud_optics_prop_ini , ONLY: ok_cdnc
+  USE lmdz_cloud_optics_prop_ini , ONLY: bl95_b0, bl95_b1
+  USE lmdz_cloud_optics_prop_ini , ONLY: iflag_ice_thermo, ok_new_lscp, iflag_t_glace
+  USE lmdz_cloud_optics_prop, ONLY: cloud_optics_prop
   
   USE icefrac_lsc_mod ! computes ice fraction (JBM 3/14)  
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_cloud_optics_prop.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_cloud_optics_prop.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_cloud_optics_prop.F90	(revision 5101)
@@ -11,21 +11,21 @@
     icefrac_optics, dNovrN, ptconv,rnebcon, ccwcon)
 
-  USE lmdz_cloud_optics_prop_ini , ONLY : flag_aerosol, ok_cdnc
-  USE lmdz_cloud_optics_prop_ini , ONLY : lunout
-  USE lmdz_cloud_optics_prop_ini , ONLY : bl95_b0, bl95_b1
-  USE lmdz_cloud_optics_prop_ini , ONLY : latitude_deg
-  USE lmdz_cloud_optics_prop_ini , ONLY : iflag_t_glace
-  USE lmdz_cloud_optics_prop_ini , ONLY : cdnc_max, cdnc_max_m3
-  USE lmdz_cloud_optics_prop_ini , ONLY : cdnc_min, cdnc_min_m3
-  USE lmdz_cloud_optics_prop_ini , ONLY : thres_tau, thres_neb
-  USE lmdz_cloud_optics_prop_ini , ONLY : prmhc, prlmc
-  USE lmdz_cloud_optics_prop_ini , ONLY : coef_froi, coef_chau
-  USE lmdz_cloud_optics_prop_ini , ONLY : seuil_neb
-  USE lmdz_cloud_optics_prop_ini , ONLY : t_glace_min_old, t_glace_max_old
-  USE lmdz_cloud_optics_prop_ini , ONLY : k_ice0, df
-  USE lmdz_cloud_optics_prop_ini , ONLY : rg, rd, rpi
-  USE lmdz_cloud_optics_prop_ini , ONLY : rad_chau1, rad_chau2, rad_froid, iflag_rei
-  USE lmdz_cloud_optics_prop_ini , ONLY : ok_icefra_lscp, rei_max, rei_min
-  USE lmdz_cloud_optics_prop_ini , ONLY : zepsec, novlp, iflag_ice_thermo, ok_new_lscp
+  USE lmdz_cloud_optics_prop_ini , ONLY: flag_aerosol, ok_cdnc
+  USE lmdz_cloud_optics_prop_ini , ONLY: lunout
+  USE lmdz_cloud_optics_prop_ini , ONLY: bl95_b0, bl95_b1
+  USE lmdz_cloud_optics_prop_ini , ONLY: latitude_deg
+  USE lmdz_cloud_optics_prop_ini , ONLY: iflag_t_glace
+  USE lmdz_cloud_optics_prop_ini , ONLY: cdnc_max, cdnc_max_m3
+  USE lmdz_cloud_optics_prop_ini , ONLY: cdnc_min, cdnc_min_m3
+  USE lmdz_cloud_optics_prop_ini , ONLY: thres_tau, thres_neb
+  USE lmdz_cloud_optics_prop_ini , ONLY: prmhc, prlmc
+  USE lmdz_cloud_optics_prop_ini , ONLY: coef_froi, coef_chau
+  USE lmdz_cloud_optics_prop_ini , ONLY: seuil_neb
+  USE lmdz_cloud_optics_prop_ini , ONLY: t_glace_min_old, t_glace_max_old
+  USE lmdz_cloud_optics_prop_ini , ONLY: k_ice0, df
+  USE lmdz_cloud_optics_prop_ini , ONLY: rg, rd, rpi
+  USE lmdz_cloud_optics_prop_ini , ONLY: rad_chau1, rad_chau2, rad_froid, iflag_rei
+  USE lmdz_cloud_optics_prop_ini , ONLY: ok_icefra_lscp, rei_max, rei_min
+  USE lmdz_cloud_optics_prop_ini , ONLY: zepsec, novlp, iflag_ice_thermo, ok_new_lscp
   
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_cloud_optics_prop_ini.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_cloud_optics_prop_ini.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_cloud_optics_prop_ini.F90	(revision 5101)
@@ -48,5 +48,5 @@
    iflag_ice_thermo_in, ok_new_lscp_in)
 
-    USE ioipsl_getin_p_mod, ONLY : getin_p
+    USE ioipsl_getin_p_mod, ONLY: getin_p
 
     IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_cloudth.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_cloudth.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_cloudth.F90	(revision 5101)
@@ -819,6 +819,6 @@
 !===========================================================================
 
-      use lmdz_cloudth_ini, only : iflag_cloudth_vert,iflag_ratqs
-      use lmdz_cloudth_ini, only : vert_alpha,vert_alpha_th, sigma1s_factor, sigma1s_power , sigma2s_factor , sigma2s_power , cloudth_ratqsmin , iflag_cloudth_vert_noratqs
+      use lmdz_cloudth_ini, ONLY: iflag_cloudth_vert,iflag_ratqs
+      use lmdz_cloudth_ini, ONLY: vert_alpha,vert_alpha_th, sigma1s_factor, sigma1s_power , sigma2s_factor , sigma2s_power , cloudth_ratqsmin , iflag_cloudth_vert_noratqs
 
       IMPLICIT NONE
@@ -2123,5 +2123,5 @@
 !=============================================================================
 
-    use phys_state_var_mod, ONLY : fm_therm, detr_therm, entr_therm
+    use phys_state_var_mod, ONLY: fm_therm, detr_therm, entr_therm
 
     IMPLICIT none
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_cloudth_ini.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_cloudth_ini.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_cloudth_ini.F90	(revision 5101)
@@ -12,5 +12,5 @@
 subroutine cloudth_ini(iflag_cloudth_vert_in,iflag_ratqs_in)
 
-use ioipsl_getin_p_mod, ONLY : getin_p
+use ioipsl_getin_p_mod, ONLY: getin_p
 implicit none
 integer, intent(in) :: iflag_cloudth_vert_in,iflag_ratqs_in
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp.F90	(revision 5101)
@@ -95,22 +95,22 @@
 
 ! USE de modules contenant des fonctions.
-USE lmdz_cloudth, ONLY : cloudth, cloudth_v3, cloudth_v6, cloudth_mpc 
-USE lmdz_lscp_tools, ONLY : calc_qsat_ecmwf, calc_gammasat
-USE lmdz_lscp_tools, ONLY : icefrac_lscp, icefrac_lscp_turb
-USE lmdz_lscp_tools, ONLY : fallice_velocity, distance_to_cloud_top
-USE ice_sursat_mod, ONLY : ice_sursat
-USE lmdz_lscp_poprecip, ONLY : poprecip_precld, poprecip_postcld
+USE lmdz_cloudth, ONLY: cloudth, cloudth_v3, cloudth_v6, cloudth_mpc
+USE lmdz_lscp_tools, ONLY: calc_qsat_ecmwf, calc_gammasat
+USE lmdz_lscp_tools, ONLY: icefrac_lscp, icefrac_lscp_turb
+USE lmdz_lscp_tools, ONLY: fallice_velocity, distance_to_cloud_top
+USE ice_sursat_mod, ONLY: ice_sursat
+USE lmdz_lscp_poprecip, ONLY: poprecip_precld, poprecip_postcld
 
 ! Use du module lmdz_lscp_ini contenant les constantes
-USE lmdz_lscp_ini, ONLY : prt_level, lunout
-USE lmdz_lscp_ini, ONLY : seuil_neb, niter_lscp, iflag_evap_prec, t_coup, DDT0, ztfondue, rain_int_min
-USE lmdz_lscp_ini, ONLY : ok_radocond_snow, a_tr_sca, cld_expo_con, cld_expo_lsc
-USE lmdz_lscp_ini, ONLY : iflag_cloudth_vert, iflag_rain_incloud_vol, iflag_t_glace, t_glace_min 
-USE lmdz_lscp_ini, ONLY : coef_eva, coef_sub,cld_tau_lsc, cld_tau_con, cld_lc_lsc, cld_lc_con
-USE lmdz_lscp_ini, ONLY : iflag_bergeron, iflag_fisrtilp_qsat, iflag_vice, cice_velo, dice_velo
-USE lmdz_lscp_ini, ONLY : iflag_autoconversion, ffallv_con, ffallv_lsc, min_frac_th_cld
-USE lmdz_lscp_ini, ONLY : RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT, RD, RG
-USE lmdz_lscp_ini, ONLY : ok_poprecip
-USE lmdz_lscp_ini, ONLY : iflag_icefrac
+USE lmdz_lscp_ini, ONLY: prt_level, lunout
+USE lmdz_lscp_ini, ONLY: seuil_neb, niter_lscp, iflag_evap_prec, t_coup, DDT0, ztfondue, rain_int_min
+USE lmdz_lscp_ini, ONLY: ok_radocond_snow, a_tr_sca, cld_expo_con, cld_expo_lsc
+USE lmdz_lscp_ini, ONLY: iflag_cloudth_vert, iflag_rain_incloud_vol, iflag_t_glace, t_glace_min
+USE lmdz_lscp_ini, ONLY: coef_eva, coef_sub,cld_tau_lsc, cld_tau_con, cld_lc_lsc, cld_lc_con
+USE lmdz_lscp_ini, ONLY: iflag_bergeron, iflag_fisrtilp_qsat, iflag_vice, cice_velo, dice_velo
+USE lmdz_lscp_ini, ONLY: iflag_autoconversion, ffallv_con, ffallv_lsc, min_frac_th_cld
+USE lmdz_lscp_ini, ONLY: RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT, RD, RG
+USE lmdz_lscp_ini, ONLY: ok_poprecip
+USE lmdz_lscp_ini, ONLY: iflag_icefrac
 IMPLICIT NONE
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp_ini.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp_ini.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp_ini.F90	(revision 5101)
@@ -251,7 +251,7 @@
 
 
-   USE ioipsl_getin_p_mod, ONLY : getin_p
+   USE ioipsl_getin_p_mod, ONLY: getin_p
    USE ice_sursat_mod, ONLY: ice_sursat_init
-   USE lmdz_cloudth_ini, ONLY : cloudth_ini
+   USE lmdz_cloudth_ini, ONLY: cloudth_ini
 
    REAL, INTENT(IN)      :: dtime
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp_old.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp_old.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp_old.F90	(revision 5101)
@@ -14,10 +14,10 @@
 
   USE icefrac_lsc_mod ! compute ice fraction (JBM 3/14)
-  USE lmdz_cloudth, only : cloudth, cloudth_v3, cloudth_v6
+  USE lmdz_cloudth, ONLY: cloudth, cloudth_v3, cloudth_v6
 
   USE lmdz_lscp_ini, ONLY: prt_level, lunout
-  USE lmdz_lscp_ini, ONLY : fl_cor_ebil 
+  USE lmdz_lscp_ini, ONLY: fl_cor_ebil
   USE lmdz_lscp_ini, ONLY: iflag_t_glace,t_glace_min, t_glace_max, exposant_glace
-  USE lmdz_lscp_ini, ONLY : seuil_neb, rain_int_min, iflag_evap_prec, iflag_oldbug_fisrtilp,a_tr_sca
+  USE lmdz_lscp_ini, ONLY: seuil_neb, rain_int_min, iflag_evap_prec, iflag_oldbug_fisrtilp,a_tr_sca
   USE lmdz_lscp_ini, ONLY: iflag_cloudth_vert, iflag_rain_incloud_vol 
   USE lmdz_lscp_ini, ONLY: coef_eva, ffallv_lsc, ffallv_con
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp_poprecip.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp_poprecip.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp_poprecip.F90	(revision 5101)
@@ -22,9 +22,9 @@
            )
 
-USE lmdz_lscp_ini, ONLY : prt_level, lunout
-USE lmdz_lscp_ini, ONLY : coef_eva, coef_sub, expo_eva, expo_sub, thresh_precip_frac
-USE lmdz_lscp_ini, ONLY : RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT, RD, RG
-USE lmdz_lscp_ini, ONLY : ok_corr_vap_evasub
-USE lmdz_lscp_tools, ONLY : calc_qsat_ecmwf
+USE lmdz_lscp_ini, ONLY: prt_level, lunout
+USE lmdz_lscp_ini, ONLY: coef_eva, coef_sub, expo_eva, expo_sub, thresh_precip_frac
+USE lmdz_lscp_ini, ONLY: RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT, RD, RG
+USE lmdz_lscp_ini, ONLY: ok_corr_vap_evasub
+USE lmdz_lscp_tools, ONLY: calc_qsat_ecmwf
 
 IMPLICIT NONE
@@ -280,9 +280,9 @@
            dqsauto, dqsagg, dqsrim, dqsmelt, dqsfreez)
 
-USE lmdz_lscp_ini, ONLY : prt_level, lunout
-USE lmdz_lscp_ini, ONLY : RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT, RD, RG, RPI
-USE lmdz_lscp_tools, ONLY : calc_qsat_ecmwf
-
-USE lmdz_lscp_ini, ONLY : cld_lc_con, cld_tau_con, cld_expo_con, seuil_neb,    &
+USE lmdz_lscp_ini, ONLY: prt_level, lunout
+USE lmdz_lscp_ini, ONLY: RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT, RD, RG, RPI
+USE lmdz_lscp_tools, ONLY: calc_qsat_ecmwf
+
+USE lmdz_lscp_ini, ONLY: cld_lc_con, cld_tau_con, cld_expo_con, seuil_neb,    &
                           cld_lc_lsc, cld_tau_lsc, cld_expo_lsc, rain_int_min, & 
                           thresh_precip_frac, gamma_col, gamma_agg, gamma_rim, &
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp_tools.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp_tools.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp_tools.F90	(revision 5101)
@@ -114,5 +114,5 @@
     USE print_control_mod, ONLY: lunout, prt_level
     USE lmdz_lscp_ini, ONLY: t_glace_min, t_glace_max, exposant_glace, iflag_t_glace
-    USE lmdz_lscp_ini, ONLY : RTT, dist_liq, temp_nowater
+    USE lmdz_lscp_ini, ONLY: RTT, dist_liq, temp_nowater
 
     IMPLICIT NONE
@@ -247,9 +247,9 @@
 
 
-   USE lmdz_lscp_ini, ONLY : prt_level, lunout
-   USE lmdz_lscp_ini, ONLY : RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT, RD, RG, RV, RPI
-   USE lmdz_lscp_ini, ONLY : seuil_neb, temp_nowater
-   USE lmdz_lscp_ini, ONLY : tau_mixenv, lmix_mpc, naero5, gamma_snwretro, gamma_taud, capa_crystal
-   USE lmdz_lscp_ini, ONLY : eps
+   USE lmdz_lscp_ini, ONLY: prt_level, lunout
+   USE lmdz_lscp_ini, ONLY: RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT, RD, RG, RV, RPI
+   USE lmdz_lscp_ini, ONLY: seuil_neb, temp_nowater
+   USE lmdz_lscp_ini, ONLY: tau_mixenv, lmix_mpc, naero5, gamma_snwretro, gamma_taud, capa_crystal
+   USE lmdz_lscp_ini, ONLY: eps
 
    IMPLICIT NONE
@@ -651,5 +651,5 @@
 !++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
-   USE lmdz_lscp_ini, ONLY : rd,rg,tresh_cl
+   USE lmdz_lscp_ini, ONLY: rd,rg,tresh_cl
 
    IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_ratqs_ini.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_ratqs_ini.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_ratqs_ini.F90	(revision 5101)
@@ -25,5 +25,5 @@
 SUBROUTINE ratqs_ini(klon,klev,iflag_thermals,lunout_in,nbsrf_in,is_lic_in,is_ter_in,RG_in,RV_in,RD_in,RCPD_in,RLSTT_in,RLVTT_in,RTT_in)
 
-   USE ioipsl_getin_p_mod, ONLY : getin_p
+   USE ioipsl_getin_p_mod, ONLY: getin_p
 
 integer, intent(in) :: klon,klev,iflag_thermals,lunout_in
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_ratqs_multi.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_ratqs_multi.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_ratqs_multi.F90	(revision 5101)
@@ -30,8 +30,8 @@
            ratqs_inter_)
 
-USE lmdz_ratqs_ini, ONLY : a_ratqs_cv,tau_var,fac_tau,tau_cumul,a_ratqs_wake, dqimpl
-USE lmdz_ratqs_ini, ONLY : RG
-USE lmdz_ratqs_ini, ONLY : povariance, var_conv
-USE lmdz_thermcell_dq,  ONLY : thermcell_dq
+USE lmdz_ratqs_ini, ONLY: a_ratqs_cv,tau_var,fac_tau,tau_cumul,a_ratqs_wake, dqimpl
+USE lmdz_ratqs_ini, ONLY: RG
+USE lmdz_ratqs_ini, ONLY: povariance, var_conv
+USE lmdz_thermcell_dq,  ONLY: thermcell_dq
 
 implicit none
@@ -214,5 +214,5 @@
 ! Etienne Vignon, November 2021: effect of subgrid orography on ratqs
 
-USE lmdz_ratqs_ini, ONLY : RG,RV,RD,RLSTT,RLVTT,RTT,nbsrf,is_lic,is_ter
+USE lmdz_ratqs_ini, ONLY: RG,RV,RD,RLSTT,RLVTT,RTT,nbsrf,is_lic,is_ter
 
 IMPLICIT NONE
@@ -296,5 +296,5 @@
 USE lmdz_lscp_tools, ONLY: CALC_QSAT_ECMWF
 
-USE lmdz_ratqs_ini, ONLY : RG,RD,RTT,nbsrf
+USE lmdz_ratqs_ini, ONLY: RG,RD,RTT,nbsrf
 
 IMPLICIT NONE
@@ -377,5 +377,5 @@
 ! model. J. Atmos. Sci. 73, 279???291. https://doi.org/10.1175/JAS-D-15-0021.
 
-USE lmdz_ratqs_ini, ONLY : RG,RV,RD,RCPD,RLSTT,RLVTT,RTT
+USE lmdz_ratqs_ini, ONLY: RG,RV,RD,RCPD,RLSTT,RLVTT,RTT
 
 IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_alp.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_alp.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_alp.F90	(revision 5101)
@@ -20,5 +20,5 @@
 
       USE indice_sol_mod
-      USE lmdz_thermcell_main, ONLY : thermcell_tke_transport
+      USE lmdz_thermcell_main, ONLY: thermcell_tke_transport
       IMPLICIT NONE
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_down.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_down.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_down.F90	(revision 5101)
@@ -226,5 +226,5 @@
 
 
-   USE lmdz_thermcell_ini, ONLY : prt_level,RLvCp,RKAPPA,RETV,fact_thermals_down
+   USE lmdz_thermcell_ini, ONLY: prt_level,RLvCp,RKAPPA,RETV,fact_thermals_down
    IMPLICIT NONE
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_env.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_env.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_env.F90	(revision 5101)
@@ -11,6 +11,6 @@
 
 
-   USE lmdz_thermcell_ini, ONLY : prt_level,RLvCp,RKAPPA,RETV
-   USE lmdz_thermcell_qsat, ONLY : thermcell_qsat
+   USE lmdz_thermcell_ini, ONLY: prt_level,RLvCp,RKAPPA,RETV
+   USE lmdz_thermcell_qsat, ONLY: thermcell_qsat
    IMPLICIT NONE
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_flux2.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_flux2.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_flux2.F90	(revision 5101)
@@ -16,5 +16,5 @@
 !---------------------------------------------------------------------------
 
-      USE lmdz_thermcell_ini, ONLY : prt_level,iflag_thermals_optflux
+      USE lmdz_thermcell_ini, ONLY: prt_level,iflag_thermals_optflux
       IMPLICIT NONE
       
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_ini.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_ini.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_ini.F90	(revision 5101)
@@ -50,5 +50,5 @@
       RG_in,RD_in,RCPD_in,RKAPPA_in,RLVTT_in,RETV_in)
 
-   USE ioipsl_getin_p_mod, ONLY : getin_p
+   USE ioipsl_getin_p_mod, ONLY: getin_p
 
 integer, intent(in) :: iflag_thermals,prt_level_in,lunout_in
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_main.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_main.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_main.F90	(revision 5101)
@@ -42,12 +42,12 @@
 
 ! USE necessaires pour les lignes importees de thermcell_env
-   USE lmdz_thermcell_ini, ONLY : RLvCp,RKAPPA,RETV
-   USE lmdz_thermcell_qsat, ONLY : thermcell_qsat
+   USE lmdz_thermcell_ini, ONLY: RLvCp,RKAPPA,RETV
+   USE lmdz_thermcell_qsat, ONLY: thermcell_qsat
 
 
 #ifdef ISO
-  USE infotrac_phy, ONLY : ntiso
+  USE infotrac_phy, ONLY: ntiso
 #ifdef ISOVERIF
-  USE isotopes_mod, ONLY : iso_eau,iso_HDO
+  USE isotopes_mod, ONLY: iso_eau,iso_HDO
   USE isotopes_verif_mod, ONLY: iso_verif_egalite, &
         iso_verif_aberrant_encadre
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_old.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_old.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_old.F90	(revision 5101)
@@ -8,6 +8,6 @@
   USE dimphy
   USE write_field_phy
-  USE lmdz_thermcell_dv2, ONLY : thermcell_dv2
-  USE lmdz_thermcell_dq, ONLY : thermcell_dq
+  USE lmdz_thermcell_dv2, ONLY: thermcell_dv2
+  USE lmdz_thermcell_dq, ONLY: thermcell_dq
   IMPLICIT NONE
 
@@ -1012,5 +1012,5 @@
         ! si sature: ql est surestime, d'ou la sous-relax
         dt = 0.5*rlvcp*qlbef
-        ! write(18,*),'DT0=',DT
+        ! write(18,*) 'DT0=',DT
         ! on pourra enchainer 2 ou 3 calculs sans Do while
         DO WHILE (abs(dt)>ddt0)
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_plume.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_plume.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_plume.F90	(revision 5101)
@@ -29,6 +29,6 @@
        USE lmdz_thermcell_ini, ONLY: detr_min, entr_min, detr_q_coef, detr_q_power
        USE lmdz_thermcell_ini, ONLY: mix0, thermals_flag_alim
-       USE lmdz_thermcell_alim, ONLY : thermcell_alim
-       USE lmdz_thermcell_qsat, ONLY : thermcell_qsat
+       USE lmdz_thermcell_alim, ONLY: thermcell_alim
+       USE lmdz_thermcell_qsat, ONLY: thermcell_qsat
 
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_plume_6A.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_plume_6A.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_plume_6A.F90	(revision 5101)
@@ -19,6 +19,6 @@
        USE lmdz_thermcell_ini, ONLY: detr_min, entr_min, detr_q_coef, detr_q_power
        USE lmdz_thermcell_ini, ONLY: mix0, thermals_flag_alim
-       USE lmdz_thermcell_alim, ONLY : thermcell_alim
-       USE lmdz_thermcell_qsat, ONLY : thermcell_qsat
+       USE lmdz_thermcell_alim, ONLY: thermcell_alim
+       USE lmdz_thermcell_qsat, ONLY: thermcell_qsat
 
 
@@ -724,5 +724,5 @@
 
       USE lmdz_thermcell_ini, ONLY: prt_level,fact_thermals_ed_dz,iflag_thermals_ed,RLvCP,RETV,RG
-       USE lmdz_thermcell_qsat, ONLY : thermcell_qsat
+       USE lmdz_thermcell_qsat, ONLY: thermcell_qsat
       IMPLICIT NONE
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_wake.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_wake.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_wake.F90	(revision 5101)
@@ -27,13 +27,13 @@
 
 
-  USE lmdz_wake_ini , ONLY : wake_ini
-  USE lmdz_wake_ini , ONLY : prt_level,epsim1,RG,RD
-  USE lmdz_wake_ini , ONLY : stark, wdens_ref, coefgw, alpk, wk_pupper
-  USE lmdz_wake_ini , ONLY : crep_upper, crep_sol, tau_cv, rzero, aa0, flag_wk_check_trgl
-  USE lmdz_wake_ini , ONLY : ok_bug_gfl
-  USE lmdz_wake_ini , ONLY : iflag_wk_act, iflag_wk_check_trgl, iflag_wk_pop_dyn, wdensinit, wdensthreshold
-  USE lmdz_wake_ini , ONLY : sigmad, hwmin, wapecut, cstart, sigmaw_max, dens_rate, epsilon_loc
-  USE lmdz_wake_ini , ONLY : iflag_wk_profile
-  USE lmdz_wake_ini , ONLY : smallestreal,wk_nsub
+  USE lmdz_wake_ini , ONLY: wake_ini
+  USE lmdz_wake_ini , ONLY: prt_level,epsim1,RG,RD
+  USE lmdz_wake_ini , ONLY: stark, wdens_ref, coefgw, alpk, wk_pupper
+  USE lmdz_wake_ini , ONLY: crep_upper, crep_sol, tau_cv, rzero, aa0, flag_wk_check_trgl
+  USE lmdz_wake_ini , ONLY: ok_bug_gfl
+  USE lmdz_wake_ini , ONLY: iflag_wk_act, iflag_wk_check_trgl, iflag_wk_pop_dyn, wdensinit, wdensthreshold
+  USE lmdz_wake_ini , ONLY: sigmad, hwmin, wapecut, cstart, sigmaw_max, dens_rate, epsilon_loc
+  USE lmdz_wake_ini , ONLY: iflag_wk_profile
+  USE lmdz_wake_ini , ONLY: smallestreal,wk_nsub
 
 
@@ -2414,9 +2414,9 @@
                     ktop, wk_adv, h_zzz, ptop1, ktop1)
 
-USE lmdz_wake_ini , ONLY : wk_pupper
-USE lmdz_wake_ini , ONLY : RG
-USE lmdz_wake_ini , ONLY : hwmin
-USE lmdz_wake_ini , ONLY : iflag_wk_new_ptop, wk_delta_t_min, wk_frac_int_delta_t
-USE lmdz_wake_ini , ONLY : wk_int_delta_t_min
+USE lmdz_wake_ini , ONLY: wk_pupper
+USE lmdz_wake_ini , ONLY: RG
+USE lmdz_wake_ini , ONLY: hwmin
+USE lmdz_wake_ini , ONLY: iflag_wk_new_ptop, wk_delta_t_min, wk_frac_int_delta_t
+USE lmdz_wake_ini , ONLY: wk_int_delta_t_min
 
 IMPLICIT NONE
@@ -2817,11 +2817,11 @@
                 
 
-  USE lmdz_wake_ini , ONLY : wake_ini
-  USE lmdz_wake_ini , ONLY : prt_level,RG
-  USE lmdz_wake_ini , ONLY : stark, wdens_ref
-  USE lmdz_wake_ini , ONLY : tau_cv, rzero, aa0
-!!  USE lmdz_wake_ini , ONLY : iflag_wk_pop_dyn, wdensmin
-  USE lmdz_wake_ini , ONLY : iflag_wk_pop_dyn
-  USE lmdz_wake_ini , ONLY : sigmad, cstart, sigmaw_max
+  USE lmdz_wake_ini , ONLY: wake_ini
+  USE lmdz_wake_ini , ONLY: prt_level,RG
+  USE lmdz_wake_ini , ONLY: stark, wdens_ref
+  USE lmdz_wake_ini , ONLY: tau_cv, rzero, aa0
+!!  USE lmdz_wake_ini , ONLY: iflag_wk_pop_dyn, wdensmin
+  USE lmdz_wake_ini , ONLY: iflag_wk_pop_dyn
+  USE lmdz_wake_ini , ONLY: sigmad, cstart, sigmaw_max
   
 IMPLICIT NONE
@@ -2981,11 +2981,11 @@
                                              
 
-  USE lmdz_wake_ini , ONLY : wake_ini
-  USE lmdz_wake_ini , ONLY : prt_level,RG
-  USE lmdz_wake_ini , ONLY : stark, wdens_ref
-  USE lmdz_wake_ini , ONLY : tau_cv, rzero, aa0
-!!  USE lmdz_wake_ini , ONLY : iflag_wk_pop_dyn, wdensmin
-  USE lmdz_wake_ini , ONLY : iflag_wk_pop_dyn
-  USE lmdz_wake_ini , ONLY : sigmad, cstart, sigmaw_max
+  USE lmdz_wake_ini , ONLY: wake_ini
+  USE lmdz_wake_ini , ONLY: prt_level,RG
+  USE lmdz_wake_ini , ONLY: stark, wdens_ref
+  USE lmdz_wake_ini , ONLY: tau_cv, rzero, aa0
+!!  USE lmdz_wake_ini , ONLY: iflag_wk_pop_dyn, wdensmin
+  USE lmdz_wake_ini , ONLY: iflag_wk_pop_dyn
+  USE lmdz_wake_ini , ONLY: sigmad, cstart, sigmaw_max
   
 IMPLICIT NONE
@@ -3132,12 +3132,12 @@
                                              
 
-  USE lmdz_wake_ini , ONLY : wake_ini
-  USE lmdz_wake_ini , ONLY : prt_level,RG
-  USE lmdz_wake_ini , ONLY : stark, wdens_ref
-  USE lmdz_wake_ini , ONLY : tau_cv, rzero, aa0
-!!  USE lmdz_wake_ini , ONLY : iflag_wk_pop_dyn, wdensmin
-  USE lmdz_wake_ini , ONLY : iflag_wk_pop_dyn
-  USE lmdz_wake_ini , ONLY : sigmad, cstart, sigmaw_max
-  USE lmdz_wake_ini , ONLY : smallestreal
+  USE lmdz_wake_ini , ONLY: wake_ini
+  USE lmdz_wake_ini , ONLY: prt_level,RG
+  USE lmdz_wake_ini , ONLY: stark, wdens_ref
+  USE lmdz_wake_ini , ONLY: tau_cv, rzero, aa0
+!!  USE lmdz_wake_ini , ONLY: iflag_wk_pop_dyn, wdensmin
+  USE lmdz_wake_ini , ONLY: iflag_wk_pop_dyn
+  USE lmdz_wake_ini , ONLY: sigmad, cstart, sigmaw_max
+  USE lmdz_wake_ini , ONLY: smallestreal
   
 IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_wake_ini.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_wake_ini.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_wake_ini.F90	(revision 5101)
@@ -102,5 +102,5 @@
   ! -------------------------------------------------------------------------
 
-  USE ioipsl_getin_p_mod, ONLY : getin_p
+  USE ioipsl_getin_p_mod, ONLY: getin_p
   real eps
   integer, intent(in) :: prt_lev
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lsc_scav.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lsc_scav.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lsc_scav.F90	(revision 5101)
@@ -10,5 +10,5 @@
   USE mod_phys_lmdz_para
   USE traclmdz_mod
-  USE infotrac_phy,ONLY : nbtr
+  USE infotrac_phy,ONLY: nbtr
   USE iophy
   IMPLICIT NONE 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/macv2sp.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/macv2sp.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/macv2sp.F90	(revision 5101)
@@ -14,9 +14,9 @@
 
   USE mo_simple_plumes, ONLY: sp_aop_profile
-  USE phys_cal_mod, ONLY : year_cur, day_cur, year_len
+  USE phys_cal_mod, ONLY: year_cur, day_cur, year_len
   USE dimphy
   USE aero_mod
   USE phys_local_var_mod, ONLY: t_seri, od443aer, od550aer, od865aer, ec550aer, dryod550aer, od550lt1aer, dNovrN
-  !!USE YOMCST, ONLY : RD, RG
+  !!USE YOMCST, ONLY: RD, RG
 
   IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/methox.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/methox.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/methox.F90	(revision 5101)
@@ -59,5 +59,5 @@
 !     ------------------------------------------------------------------
 
-USE YOEMETH   , ONLY : RALPHA1 ,RALPHA2  ,RQLIM   ,&
+USE YOEMETH   , ONLY: RALPHA1 ,RALPHA2  ,RQLIM   ,&
    RPBOTOX,  RPBOTPH ,RPTOPOX  ,RPTOPPH ,&
    RALPHA3,  RLOGPPH
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/nuage.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/nuage.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/nuage.F90	(revision 5101)
@@ -7,5 +7,5 @@
   USE lmdz_lscp_tools, only: icefrac_lscp
   USE icefrac_lsc_mod ! computes ice fraction (JBM 3/14)
-  USE lmdz_lscp_ini, only : iflag_t_glace
+  USE lmdz_lscp_ini, ONLY: iflag_t_glace
   USE phys_local_var_mod, ONLY: ptconv
   IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/oasis.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/oasis.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/oasis.F90	(revision 5101)
@@ -112,8 +112,8 @@
 
     USE IOIPSL
-    USE surface_data, ONLY : version_ocean
-    USE carbon_cycle_mod, ONLY : carbon_cycle_cpl
-    USE wxios, ONLY : wxios_context_init 
-    USE chemistry_cycle_mod, ONLY : dms_cycle_cpl, n2o_cycle_cpl
+    USE surface_data, ONLY: version_ocean
+    USE carbon_cycle_mod, ONLY: carbon_cycle_cpl
+    USE wxios, ONLY: wxios_context_init
+    USE chemistry_cycle_mod, ONLY: dms_cycle_cpl, n2o_cycle_cpl
     USE lmdz_xios  
     USE print_control_mod, ONLY: lunout
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/ocean_albedo.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/ocean_albedo.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/ocean_albedo.F90	(revision 5101)
@@ -44,5 +44,5 @@
 USE ocean_albedo_para
 USE dimphy
-USE phys_state_var_mod, ONLY : chl_con
+USE phys_state_var_mod, ONLY: chl_con
 
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/ocean_cpl_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/ocean_cpl_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/ocean_cpl_mod.F90	(revision 5101)
@@ -23,5 +23,5 @@
 ! Allocate fields for this module and initailize the module mod_cpl
 
-    USE dimphy,           ONLY : klon
+    USE dimphy,           ONLY: klon
     USE cpl_mod
 
@@ -61,9 +61,9 @@
 ! surface is done and finally it sends some fields to the coupler.
 
-    USE dimphy,           ONLY : klon
+    USE dimphy,           ONLY: klon
     USE calcul_fluxs_mod
     USE indice_sol_mod
-    USE phys_output_var_mod, ONLY : sens_prec_liq_o, sens_prec_sol_o, lat_prec_liq_o, lat_prec_sol_o
-    USE cpl_mod, ONLY : gath2cpl, cpl_receive_ocean_fields, &
+    USE phys_output_var_mod, ONLY: sens_prec_liq_o, sens_prec_sol_o, lat_prec_liq_o, lat_prec_sol_o
+    USE cpl_mod, ONLY: gath2cpl, cpl_receive_ocean_fields, &
          cpl_send_ocean_fields
     use config_ocean_skin_m, only: activate_ocean_skin
@@ -252,9 +252,9 @@
 ! some fields to the coupler.
 
-    USE dimphy,           ONLY : klon
+    USE dimphy,           ONLY: klon
     USE cpl_mod
     USE calcul_fluxs_mod
     USE indice_sol_mod
-    USE phys_output_var_mod, ONLY : sens_prec_liq_o, sens_prec_sol_o, lat_prec_liq_o, lat_prec_sol_o
+    USE phys_output_var_mod, ONLY: sens_prec_liq_o, sens_prec_sol_o, lat_prec_liq_o, lat_prec_sol_o
 
     INCLUDE "YOMCST.h"
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/ocean_forced_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/ocean_forced_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/ocean_forced_mod.F90	(revision 5101)
@@ -39,5 +39,5 @@
     USE mod_grid_phy_lmdz
     USE indice_sol_mod
-    USE phys_output_var_mod, ONLY : sens_prec_liq_o, sens_prec_sol_o, lat_prec_liq_o, lat_prec_sol_o
+    USE phys_output_var_mod, ONLY: sens_prec_liq_o, sens_prec_sol_o, lat_prec_liq_o, lat_prec_sol_o
     use config_ocean_skin_m, only: activate_ocean_skin
 #ifdef ISO
@@ -262,9 +262,9 @@
     USE geometry_mod, ONLY: longitude,latitude
     USE calcul_fluxs_mod
-    USE surface_data,     ONLY : calice, calsno
+    USE surface_data,     ONLY: calice, calsno
     USE limit_read_mod
-    USE fonte_neige_mod,  ONLY : fonte_neige
+    USE fonte_neige_mod,  ONLY: fonte_neige
     USE indice_sol_mod
-    USE phys_output_var_mod, ONLY : sens_prec_liq_o, sens_prec_sol_o, lat_prec_liq_o, lat_prec_sol_o
+    USE phys_output_var_mod, ONLY: sens_prec_liq_o, sens_prec_sol_o, lat_prec_liq_o, lat_prec_sol_o
 #ifdef ISO
     USE infotrac_phy, ONLY: niso, ntiso
@@ -511,5 +511,5 @@
 ! This subroutine specifies the surface temperature to be used in 1D simulations
 
-!      USE dimphy, ONLY : klon
+!      USE dimphy, ONLY: klon
 
 !      INTEGER, INTENT(IN)                  :: knon     ! nomber of points on compressed grid
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/ocean_slab_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/ocean_slab_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/ocean_slab_mod.F90	(revision 5101)
@@ -128,7 +128,7 @@
   !, seaice_rst etc
 
-    USE ioipsl_getin_p_mod, ONLY : getin_p
-    USE mod_phys_lmdz_transfert_para, ONLY : gather
-    USE slab_heat_transp_mod, ONLY : ini_slab_transp
+    USE ioipsl_getin_p_mod, ONLY: getin_p
+    USE mod_phys_lmdz_transfert_para, ONLY: gather
+    USE slab_heat_transp_mod, ONLY: ini_slab_transp
 
     ! Input variables
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/open_climoz_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/open_climoz_m.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/open_climoz_m.F90	(revision 5101)
@@ -54,5 +54,5 @@
     nlev = SIZE(press_in_cen)
     CALL nf95_inq_varid(ncID, "time", varID)
-    CALL NF95_GW_VAR(ncid, varid, time_in)
+    CALL nf95_gw_var(ncid, varid, time_in)
     ntim = SIZE(time_in)
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/output_physiqex_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/output_physiqex_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/output_physiqex_mod.F90	(revision 5101)
@@ -7,13 +7,13 @@
 SUBROUTINE output_physiqex(debut,zjulian,pdtphys,presnivs,paprs,u,v,t,qx,cf,zqr,zqs,zqg,ptke,theta)
 
-      USE dimphy, only : klon,klev
-      USE iophy, only : histbeg_phy,histwrite_phy
-      USE ioipsl, only : histvert,histdef,histend,histsync
-      USE mod_phys_lmdz_para, only : jj_nb
-      USE ioipsl_getin_p_mod, ONLY : getin_p
+      USE dimphy, ONLY: klon,klev
+      USE iophy, ONLY: histbeg_phy,histwrite_phy
+      USE ioipsl, ONLY: histvert,histdef,histend,histsync
+      USE mod_phys_lmdz_para, ONLY: jj_nb
+      USE ioipsl_getin_p_mod, ONLY: getin_p
       USE mod_grid_phy_lmdz, ONLY: nbp_lon,nbp_lat
-      USE iophy, ONLY : init_iophy_new
+      USE iophy, ONLY: init_iophy_new
       USE geometry_mod, ONLY: latitude_deg, longitude_deg
-      USE infotrac_phy, only : nqtot
+      USE infotrac_phy, ONLY: nqtot
 
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/paramlmdz_phy_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/paramlmdz_phy_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/paramlmdz_phy_mod.F90	(revision 5101)
@@ -151,5 +151,5 @@
 
 #ifdef CPP_RRTM
-    USE YOESW, ONLY : RSUN
+    USE YOESW, ONLY: RSUN
 #endif
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/pbl_surface_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/pbl_surface_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/pbl_surface_mod.F90	(revision 5101)
@@ -11,24 +11,24 @@
 
   USE dimphy
-  USE mod_phys_lmdz_para,  ONLY : mpi_size
-  USE mod_grid_phy_lmdz,   ONLY : klon_glo
+  USE mod_phys_lmdz_para,  ONLY: mpi_size
+  USE mod_grid_phy_lmdz,   ONLY: klon_glo
   USE ioipsl
-  USE surface_data,        ONLY : type_ocean, ok_veget, landice_opt
-  USE surf_land_mod,       ONLY : surf_land
-  USE surf_landice_mod,    ONLY : surf_landice
-  USE surf_ocean_mod,      ONLY : surf_ocean
-  USE surf_seaice_mod,     ONLY : surf_seaice
-  USE cpl_mod,             ONLY : gath2cpl
-  USE climb_hq_mod,        ONLY : climb_hq_down, climb_hq_up
-  USE climb_qbs_mod,       ONLY : climb_qbs_down, climb_qbs_up
-  USE climb_wind_mod,      ONLY : climb_wind_down, climb_wind_up
-  USE coef_diff_turb_mod,  ONLY : coef_diff_turb
-  USE lmdz_call_atke,      ONLY : call_atke
-  USE ioipsl_getin_p_mod,  ONLY : getin_p
+  USE surface_data,        ONLY: type_ocean, ok_veget, landice_opt
+  USE surf_land_mod,       ONLY: surf_land
+  USE surf_landice_mod,    ONLY: surf_landice
+  USE surf_ocean_mod,      ONLY: surf_ocean
+  USE surf_seaice_mod,     ONLY: surf_seaice
+  USE cpl_mod,             ONLY: gath2cpl
+  USE climb_hq_mod,        ONLY: climb_hq_down, climb_hq_up
+  USE climb_qbs_mod,       ONLY: climb_qbs_down, climb_qbs_up
+  USE climb_wind_mod,      ONLY: climb_wind_down, climb_wind_up
+  USE coef_diff_turb_mod,  ONLY: coef_diff_turb
+  USE lmdz_call_atke,      ONLY: call_atke
+  USE ioipsl_getin_p_mod,  ONLY: getin_p
   USE cdrag_mod
   USE stdlevvar_mod
-  USE wx_pbl_var_mod,      ONLY : wx_pbl_init, wx_pbl_final, &
+  USE wx_pbl_var_mod,      ONLY: wx_pbl_init, wx_pbl_final, &
                                   wx_pbl_prelim_0, wx_pbl_prelim_beta
-  USE wx_pbl_mod,          ONLY : wx_pbl0_merge, wx_pbl_split, wx_pbl_dts_merge, &
+  USE wx_pbl_mod,          ONLY: wx_pbl0_merge, wx_pbl_split, wx_pbl_dts_merge, &
                                   wx_pbl_check, wx_pbl_dts_check, wx_evappot
   use config_ocean_skin_m, only: activate_ocean_skin
@@ -84,5 +84,5 @@
     USE indice_sol_mod
     USE print_control_mod, ONLY: lunout
-    USE ioipsl_getin_p_mod, ONLY : getin_p
+    USE ioipsl_getin_p_mod, ONLY: getin_p
     IMPLICIT NONE
 
@@ -391,11 +391,11 @@
 ! treedrg--output-R- tree drag (m)               
 
-    USE carbon_cycle_mod,   ONLY : carbon_cycle_cpl, carbon_cycle_tr, level_coupling_esm 
-    USE carbon_cycle_mod,   ONLY : co2_send, nbcf_out, fields_out, yfields_out, cfname_out
+    USE carbon_cycle_mod,   ONLY: carbon_cycle_cpl, carbon_cycle_tr, level_coupling_esm
+    USE carbon_cycle_mod,   ONLY: co2_send, nbcf_out, fields_out, yfields_out, cfname_out
     use hbtm_mod, only: hbtm
     USE indice_sol_mod
-    USE time_phylmdz_mod,   ONLY : day_ini,annee_ref,itau_phy
-    USE mod_grid_phy_lmdz,  ONLY : nbp_lon, nbp_lat, grid1dto2d_glo
-    USE print_control_mod,  ONLY : prt_level,lunout
+    USE time_phylmdz_mod,   ONLY: day_ini,annee_ref,itau_phy
+    USE mod_grid_phy_lmdz,  ONLY: nbp_lon, nbp_lat, grid1dto2d_glo
+    USE print_control_mod,  ONLY: prt_level,lunout
 #ifdef ISO
   USE isotopes_mod, ONLY: Rdefault,iso_eau
@@ -407,9 +407,9 @@
 #endif
 #endif
-    USE ioipsl_getin_p_mod, ONLY : getin_p
+    USE ioipsl_getin_p_mod, ONLY: getin_p
     use phys_state_var_mod, only: ds_ns, dt_ns, delta_sst, delta_sal, dter, &
          dser, dt_ds, zsig, zmea
     use phys_output_var_mod, only: tkt, tks, taur, sss
-    use lmdz_blowing_snow_ini, only : zeta_bs
+    use lmdz_blowing_snow_ini, ONLY: zeta_bs
     USE wxios, ONLY: missing_val_xios => missing_val, using_xios
     USE netcdf, only: missing_val_netcdf => nf90_fill_real
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/phyaqua_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/phyaqua_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/phyaqua_mod.F90	(revision 5101)
@@ -23,5 +23,5 @@
 
     USE dimphy, ONLY: klon
-    USE geometry_mod, ONLY : latitude
+    USE geometry_mod, ONLY: latitude
     USE surface_data, ONLY: type_ocean, ok_veget
     USE pbl_surface_mod, ONLY: pbl_surface_init
@@ -36,5 +36,5 @@
     USE mod_phys_lmdz_transfert_para, ONLY: bcast
     USE mod_grid_phy_lmdz
-    USE ioipsl_getin_p_mod, ONLY : getin_p
+    USE ioipsl_getin_p_mod, ONLY: getin_p
     USE phys_cal_mod , ONLY: calend, year_len_phy => year_len 
     IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/phyetat0_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/phyetat0_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/phyetat0_mod.F90	(revision 5101)
@@ -11,11 +11,11 @@
 
   USE dimphy, only: klon, zmasq, klev
-  USE iophy, ONLY : init_iophy_new
-  USE ocean_cpl_mod,    ONLY : ocean_cpl_init
-  USE fonte_neige_mod,  ONLY : fonte_neige_init
-  USE pbl_surface_mod,  ONLY : pbl_surface_init
-  USE surface_data,     ONLY : type_ocean, version_ocean
-  USE phyetat0_get_mod, ONLY : phyetat0_get, phyetat0_srf
-  USE phys_state_var_mod, ONLY : ancien_ok, clwcon, detr_therm, phys_tstep, &
+  USE iophy, ONLY: init_iophy_new
+  USE ocean_cpl_mod,    ONLY: ocean_cpl_init
+  USE fonte_neige_mod,  ONLY: fonte_neige_init
+  USE pbl_surface_mod,  ONLY: pbl_surface_init
+  USE surface_data,     ONLY: type_ocean, version_ocean
+  USE phyetat0_get_mod, ONLY: phyetat0_get, phyetat0_srf
+  USE phys_state_var_mod, ONLY: ancien_ok, clwcon, detr_therm, phys_tstep, &
        qsol, fevap, z0m, z0h, agesno, &
        du_gwd_rando, du_gwd_front, entr_therm, f0, fm_therm, &
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/phyredem.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/phyredem.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/phyredem.F90	(revision 5101)
@@ -10,6 +10,6 @@
 !-------------------------------------------------------------------------------
   USE dimphy, ONLY: klon, klev
-  USE fonte_neige_mod,  ONLY : fonte_neige_final
-  USE pbl_surface_mod,  ONLY : pbl_surface_final
+  USE fonte_neige_mod,  ONLY: fonte_neige_final
+  USE pbl_surface_mod,  ONLY: pbl_surface_final
   USE phys_state_var_mod, ONLY: radpas, zmasq, pctsrf,                       &
                                 ftsol, beta_aridity, delta_tsurf, falb_dir,  &
@@ -32,12 +32,12 @@
                                 delta_sst, ratqs_inter_, dter, dser, dt_ds
 
-  USE geometry_mod, ONLY : longitude_deg, latitude_deg
+  USE geometry_mod, ONLY: longitude_deg, latitude_deg
   USE iostart, ONLY: open_restartphy, close_restartphy, enddef_restartphy, put_field, put_var
-  USE traclmdz_mod, ONLY : traclmdz_to_restart
+  USE traclmdz_mod, ONLY: traclmdz_to_restart
   USE infotrac_phy, ONLY: type_trac, nqtot, tracers, nbtr
-  USE carbon_cycle_mod, ONLY : carbon_cycle_cpl, co2_send, carbon_cycle_rad, RCO2_glo
+  USE carbon_cycle_mod, ONLY: carbon_cycle_cpl, co2_send, carbon_cycle_rad, RCO2_glo
   USE indice_sol_mod, ONLY: nbsrf, is_oce, is_sic, is_ter, is_lic, epsfra
   USE surface_data, ONLY: type_ocean, version_ocean
-  USE ocean_slab_mod, ONLY : nslay, tslab, seaice, tice, fsic
+  USE ocean_slab_mod, ONLY: nslay, tslab, seaice, tice, fsic
   USE time_phylmdz_mod, ONLY: annee_ref, day_end, itau_phy, pdtphys
   use config_ocean_skin_m, only: activate_ocean_skin  
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/phys_local_var_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/phys_local_var_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/phys_local_var_mod.F90	(revision 5101)
@@ -3,5 +3,5 @@
 
 MODULE phys_local_var_mod
-  USE lmdz_cppkeys_wrapper, ONLY : CPPKEY_STRATAER
+  USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_STRATAER
   ! Variables locales pour effectuer les appels en serie
   !======================================================================
@@ -815,7 +815,7 @@
   SUBROUTINE phys_local_var_init
     USE dimphy
-    USE infotrac_phy, ONLY : nbtr, nqtot
-#ifdef ISO
-USE infotrac_phy, ONLY : ntraciso=>ntiso,niso
+    USE infotrac_phy, ONLY: nbtr, nqtot
+#ifdef ISO
+USE infotrac_phy, ONLY: ntraciso=>ntiso,niso
 #endif
     USE aero_mod
@@ -823,5 +823,5 @@
     USE phys_output_var_mod
     USE phys_state_var_mod
-    USE infotrac_phy, ONLY : nbtr_bin
+    USE infotrac_phy, ONLY: nbtr_bin
 
     IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/phys_output_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/phys_output_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/phys_output_mod.F90	(revision 5101)
@@ -4,5 +4,5 @@
   USE indice_sol_mod
   USE phys_output_var_mod
-  USE phys_output_write_mod, ONLY : phys_output_write
+  USE phys_output_write_mod, ONLY: phys_output_write
   REAL, DIMENSION(nfiles),SAVE :: ecrit_files
 
@@ -37,8 +37,8 @@
     USE strings_mod,  ONLY: maxlen
     USE ioipsl
-    USE phys_cal_mod, only : hour, calend
+    USE phys_cal_mod, ONLY: hour, calend
     USE mod_phys_lmdz_para
     !Martin
-    USE surface_data, ONLY : landice_opt
+    USE surface_data, ONLY: landice_opt
     USE phys_output_ctrlout_mod
     USE mod_grid_phy_lmdz, only: klon_glo,nbp_lon,nbp_lat
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/phys_output_write_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/phys_output_write_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/phys_output_write_mod.F90	(revision 5101)
@@ -4,5 +4,5 @@
 MODULE phys_output_write_mod
 
-  USE phytrac_mod, ONLY : d_tr_cl, d_tr_th, d_tr_cv, d_tr_lessi_impa, &
+  USE phytrac_mod, ONLY: d_tr_cl, d_tr_th, d_tr_cv, d_tr_lessi_impa, &
        d_tr_lessi_nucl, d_tr_insc, d_tr_bcscav, d_tr_evapls, d_tr_ls,  &
        d_tr_trsp, d_tr_sscav, d_tr_sat, d_tr_uscav, flux_tr_dry
@@ -28,7 +28,7 @@
     USE strings_mod,  ONLY: maxlen
     USE mod_phys_lmdz_para, ONLY: is_north_pole_phy,is_south_pole_phy
-    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
+    USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat
     USE time_phylmdz_mod, ONLY: day_step_phy, start_time, itau_phy
-    USE vertical_layers_mod, ONLY : ap, bp, aps, bps
+    USE vertical_layers_mod, ONLY: ap, bp, aps, bps
     USE phystokenc_mod, ONLY: offline
     USE phys_output_ctrlout_mod, ONLY: o_phis, o_aire, is_ter, is_lic, is_oce, &
@@ -458,8 +458,8 @@
     USE lmdz_xios
     USE wxios, ONLY: wxios_closedef, missing_val_xios=>missing_val, wxios_set_context
-    USE phys_cal_mod, ONLY : mth_len
+    USE phys_cal_mod, ONLY: mth_len
 
 #ifdef CPP_RRTM
-    USE YOESW, ONLY : RSUN
+    USE YOESW, ONLY: RSUN
 #endif
     USE tracinca_mod, ONLY: config_inca
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/phys_state_var_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/phys_state_var_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/phys_state_var_mod.F90	(revision 5101)
@@ -535,7 +535,7 @@
 USE dimphy
 USE aero_mod
-USE infotrac_phy, ONLY : nbtr
+USE infotrac_phy, ONLY: nbtr
 #ifdef ISO
-USE infotrac_phy, ONLY : ntraciso=>ntiso,niso
+USE infotrac_phy, ONLY: ntraciso=>ntiso,niso
 #endif
 USE indice_sol_mod
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/physiq_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/physiq_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/physiq_mod.F90	(revision 5101)
@@ -19,96 +19,96 @@
     ! PLEASE try to follow this rule
 
-    USE ACAMA_GWD_rando_m, only : ACAMA_GWD_rando
+    USE ACAMA_GWD_rando_m, ONLY: ACAMA_GWD_rando
     USE aero_mod
-    USE add_phys_tend_mod, only : add_pbl_tend, add_phys_tend, diag_phys_tend, prt_enerbil, &
+    USE add_phys_tend_mod, ONLY: add_pbl_tend, add_phys_tend, diag_phys_tend, prt_enerbil, &
             fl_ebil, fl_cor_ebil
-    USE assert_m, only : assert
+    USE assert_m, ONLY: assert
     USE change_srf_frac_mod
-    USE conf_phys_m, only : conf_phys
-    USE carbon_cycle_mod, ONLY : infocfields_init, RCO2_glo, carbon_cycle_rad
+    USE conf_phys_m, ONLY: conf_phys
+    USE carbon_cycle_mod, ONLY: infocfields_init, RCO2_glo, carbon_cycle_rad
     USE CFMIP_point_locations   ! IM stations CFMIP
     USE cmp_seri_mod
     USE dimphy
     USE etat0_limit_unstruct_mod
-    USE FLOTT_GWD_rando_m, only : FLOTT_GWD_rando
-    USE fonte_neige_mod, ONLY : fonte_neige_get_vars
-    USE geometry_mod, ONLY : cell_area, latitude_deg, longitude_deg
-    USE ioipsl, only : histbeg, histvert, histdef, histend, histsync, &
+    USE FLOTT_GWD_rando_m, ONLY: FLOTT_GWD_rando
+    USE fonte_neige_mod, ONLY: fonte_neige_get_vars
+    USE geometry_mod, ONLY: cell_area, latitude_deg, longitude_deg
+    USE ioipsl, ONLY: histbeg, histvert, histdef, histend, histsync, &
             histwrite, ju2ymds, ymds2ju, getin
-    USE ioipsl_getin_p_mod, ONLY : getin_p
+    USE ioipsl_getin_p_mod, ONLY: getin_p
     USE indice_sol_mod
-    USE infotrac_phy, ONLY : nqtot, nbtr, nqo, tracers, type_trac
-    USE readTracFiles_mod, ONLY : addPhase
-    USE strings_mod, ONLY : strIdx
+    USE infotrac_phy, ONLY: nqtot, nbtr, nqo, tracers, type_trac
+    USE readTracFiles_mod, ONLY: addPhase
+    USE strings_mod, ONLY: strIdx
     USE iophy
-    USE limit_read_mod, ONLY : init_limit_read
-    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat, nbp_lev, klon_glo, grid1dTo2d_glo, grid_type, unstructured
-    USE mod_phys_lmdz_mpi_data, only : is_mpi_root
+    USE limit_read_mod, ONLY: init_limit_read
+    USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, nbp_lev, klon_glo, grid1dTo2d_glo, grid_type, unstructured
+    USE mod_phys_lmdz_mpi_data, ONLY: is_mpi_root
     USE mod_phys_lmdz_para
-    USE netcdf95, only : nf95_close
-    USE netcdf, only : nf90_fill_real     ! IM for NMC files
-    USE open_climoz_m, only : open_climoz ! ozone climatology from a file
-    USE ozonecm_m, only : ozonecm ! ozone of J.-F. Royer
-    USE pbl_surface_mod, ONLY : pbl_surface
-    USE phyaqua_mod, only : zenang_an
-    USE phyetat0_mod, only : phyetat0
-    USE phystokenc_mod, ONLY : offline, phystokenc
-    USE phys_cal_mod, only : year_len, mth_len, days_elapsed, jh_1jan, &
+    USE netcdf95, ONLY: nf95_close
+    USE netcdf, ONLY: nf90_fill_real     ! IM for NMC files
+    USE open_climoz_m, ONLY: open_climoz ! ozone climatology from a file
+    USE ozonecm_m, ONLY: ozonecm ! ozone of J.-F. Royer
+    USE pbl_surface_mod, ONLY: pbl_surface
+    USE phyaqua_mod, ONLY: zenang_an
+    USE phyetat0_mod, ONLY: phyetat0
+    USE phystokenc_mod, ONLY: offline, phystokenc
+    USE phys_cal_mod, ONLY: year_len, mth_len, days_elapsed, jh_1jan, &
             year_cur, mth_cur, jD_cur, jH_cur, jD_ref, day_cur, hour, calend
-    !!  USE phys_local_var_mod, ONLY : a long list of variables
+    !!  USE phys_local_var_mod, ONLY: a long list of variables
     !!              ==> see below, after "CPP Keys" section
     USE phys_state_var_mod ! Variables sauvegardees de la physique
     USE phys_output_mod
     USE phys_output_ctrlout_mod
-    USE print_control_mod, ONLY : mydebug => debug, lunout, prt_level, &
+    USE print_control_mod, ONLY: mydebug => debug, lunout, prt_level, &
             alert_first_call, call_alert, prt_alerte
-    USE readaerosol_mod, ONLY : init_aero_fromfile
-    USE readaerosolstrato_m, ONLY : init_readaerosolstrato
-    USE radlwsw_m, only : radlwsw
-    USE regr_horiz_time_climoz_m, ONLY : regr_horiz_time_climoz
-    USE regr_pr_time_av_m, only : regr_pr_time_av
-    USE surface_data, ONLY : type_ocean, ok_veget
-    USE time_phylmdz_mod, only : current_time, itau_phy, pdtphys, raz_date, update_time
-    USE tracinca_mod, ONLY : config_inca
-    USE tropopause_m, ONLY : dyn_tropopause
-    USE ice_sursat_mod, ONLY : flight_init, airplane
+    USE readaerosol_mod, ONLY: init_aero_fromfile
+    USE readaerosolstrato_m, ONLY: init_readaerosolstrato
+    USE radlwsw_m, ONLY: radlwsw
+    USE regr_horiz_time_climoz_m, ONLY: regr_horiz_time_climoz
+    USE regr_pr_time_av_m, ONLY: regr_pr_time_av
+    USE surface_data, ONLY: type_ocean, ok_veget
+    USE time_phylmdz_mod, ONLY: current_time, itau_phy, pdtphys, raz_date, update_time
+    USE tracinca_mod, ONLY: config_inca
+    USE tropopause_m, ONLY: dyn_tropopause
+    USE ice_sursat_mod, ONLY: flight_init, airplane
     USE vampir
     USE write_field_phy
-    USE wxios, ONLY : g_ctx, wxios_set_context
-    USE lmdz_lscp, ONLY : lscp
-    USE lmdz_call_cloud_optics_prop, ONLY : call_cloud_optics_prop
-    USE lmdz_lscp_old, ONLY : fisrtilp
-    USE lmdz_call_blowing_snow, ONLY : call_blowing_snow_sublim_sedim
-    USE lmdz_wake_ini, ONLY : wake_ini
-    USE yamada_ini_mod, ONLY : yamada_ini
-    USE lmdz_atke_turbulence_ini, ONLY : atke_ini
-    USE lmdz_thermcell_ini, ONLY : thermcell_ini, iflag_thermals_tenv
-    USE lmdz_thermcell_dtke, ONLY : thermcell_dtke
-    USE lmdz_blowing_snow_ini, ONLY : blowing_snow_ini, qbst_bs
-    USE lmdz_lscp_ini, ONLY : lscp_ini
-    USE lmdz_ratqs_main, ONLY : ratqs_main
-    USE lmdz_ratqs_ini, ONLY : ratqs_ini
-    USE lmdz_cloud_optics_prop_ini, ONLY : cloud_optics_prop_ini
-    USE phys_output_var_mod, ONLY : cloudth_sth, cloudth_senv, cloudth_sigmath, cloudth_sigmaenv
-    USE phys_output_var_mod, ONLY : cloud_cover_sw, cloud_cover_sw_s2
-
-    USE geometry_mod, ONLY : longitude, latitude, boundslon, boundslat, ind_cell_glo
-    USE time_phylmdz_mod, ONLY : ndays
-    USE infotrac_phy, ONLY : nqCO2
-
-    USE time_phylmdz_mod, ONLY : annee_ref, day_ini, day_ref, start_time
-    USE vertical_layers_mod, ONLY : aps, bps, ap, bp
-
-    USE lmdz_xios, ONLY : xios_update_calendar, xios_context_finalize, xios_get_field_attr, &
+    USE wxios, ONLY: g_ctx, wxios_set_context
+    USE lmdz_lscp, ONLY: lscp
+    USE lmdz_call_cloud_optics_prop, ONLY: call_cloud_optics_prop
+    USE lmdz_lscp_old, ONLY: fisrtilp
+    USE lmdz_call_blowing_snow, ONLY: call_blowing_snow_sublim_sedim
+    USE lmdz_wake_ini, ONLY: wake_ini
+    USE yamada_ini_mod, ONLY: yamada_ini
+    USE lmdz_atke_turbulence_ini, ONLY: atke_ini
+    USE lmdz_thermcell_ini, ONLY: thermcell_ini, iflag_thermals_tenv
+    USE lmdz_thermcell_dtke, ONLY: thermcell_dtke
+    USE lmdz_blowing_snow_ini, ONLY: blowing_snow_ini, qbst_bs
+    USE lmdz_lscp_ini, ONLY: lscp_ini
+    USE lmdz_ratqs_main, ONLY: ratqs_main
+    USE lmdz_ratqs_ini, ONLY: ratqs_ini
+    USE lmdz_cloud_optics_prop_ini, ONLY: cloud_optics_prop_ini
+    USE phys_output_var_mod, ONLY: cloudth_sth, cloudth_senv, cloudth_sigmath, cloudth_sigmaenv
+    USE phys_output_var_mod, ONLY: cloud_cover_sw, cloud_cover_sw_s2
+
+    USE geometry_mod, ONLY: longitude, latitude, boundslon, boundslat, ind_cell_glo
+    USE time_phylmdz_mod, ONLY: ndays
+    USE infotrac_phy, ONLY: nqCO2
+
+    USE time_phylmdz_mod, ONLY: annee_ref, day_ini, day_ref, start_time
+    USE vertical_layers_mod, ONLY: aps, bps, ap, bp
+
+    USE lmdz_xios, ONLY: xios_update_calendar, xios_context_finalize, xios_get_field_attr, &
             xios_field_is_active, xios_context, xios_set_current_context
-    USE wxios, ONLY : missing_val, using_xios
+    USE wxios, ONLY: missing_val, using_xios
     USE paramLMDZ_phy_mod
 
-    USE phytracr_spl_mod, ONLY : phytracr_spl, phytracr_spl_out_init
+    USE phytracr_spl_mod, ONLY: phytracr_spl, phytracr_spl_out_init
     USE phys_output_write_spl_mod
-    USE phytrac_mod, ONLY : phytrac_init, phytrac
+    USE phytrac_mod, ONLY: phytrac_init, phytrac
     USE phys_output_write_mod
 
-    USE lmdz_cppkeys_wrapper, ONLY : CPPKEY_DUST
+    USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DUST
 
     !!!!!!!!!!!!!!!!!! "USE" section for CPP keys !!!!!!!!!!!!!!!!!!!!!!!!
@@ -123,18 +123,18 @@
 
 #ifdef CPP_RRTM
-    USE YOERAD, ONLY : NRADLP
+    USE YOERAD, ONLY: NRADLP
 #endif
 
-    USE phys_local_var_mod, ONLY : d_q_emiss
+    USE phys_local_var_mod, ONLY: d_q_emiss
     USE strataer_local_var_mod
-    USE strataer_nuc_mod, ONLY : strataer_nuc_init
-    USE strataer_emiss_mod, ONLY : strataer_emiss_init
-    USE lmdz_cppkeys_wrapper, ONLY : CPPKEY_STRATAER
+    USE strataer_nuc_mod, ONLY: strataer_nuc_init
+    USE strataer_emiss_mod, ONLY: strataer_emiss_init
+    USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_STRATAER
 
 
     !!!!!!!!!!!!!!!!!!  END "USE" for CPP keys !!!!!!!!!!!!!!!!!!!!!!
 
-    USE physiqex_mod, ONLY : physiqex
-    USE phys_local_var_mod, ONLY : phys_local_var_init, phys_local_var_end, &
+    USE physiqex_mod, ONLY: physiqex
+    USE phys_local_var_mod, ONLY: phys_local_var_init, phys_local_var_end, &
             ! [Variables internes non sauvegardees de la physique]
             ! Variables locales pour effectuer les appels en serie
@@ -345,9 +345,9 @@
             zxfluxt, zxfluxq
 
-    USE phys_local_var_mod, ONLY : zfice, dNovrN, ptconv
-    USE phys_output_var_mod, ONLY : scdnc, cldncl, reffclwtop, lcc, reffclws, &
+    USE phys_local_var_mod, ONLY: zfice, dNovrN, ptconv
+    USE phys_output_var_mod, ONLY: scdnc, cldncl, reffclwtop, lcc, reffclws, &
             reffclwc, cldnvi, lcc3d, lcc3dcon, lcc3dstra, icc3dcon, icc3dstra
-    USE output_physiqex_mod, ONLY : output_physiqex
-    USE lmdz_cppkeys_wrapper, ONLY : CPPKEY_INCA
+    USE output_physiqex_mod, ONLY: output_physiqex
+    USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA
 
     IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/physiqex_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/physiqex_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/physiqex_mod.F90	(revision 5101)
@@ -13,10 +13,10 @@
               d_u, d_v, d_t, d_qx, d_ps)
 
-      USE dimphy, only : klon,klev
-      USE infotrac_phy, only : nqtot
-      USE geometry_mod, only : latitude
-!      USE comcstphy, only : rg
-      USE ioipsl, only : ymds2ju
-      USE phys_state_var_mod, only : phys_state_var_init
+      USE dimphy, ONLY: klon,klev
+      USE infotrac_phy, ONLY: nqtot
+      USE geometry_mod, ONLY: latitude
+!      USE comcstphy, ONLY: rg
+      USE ioipsl, ONLY: ymds2ju
+      USE phys_state_var_mod, ONLY: phys_state_var_init
       USE phyetat0_mod, only: phyetat0
       USE output_physiqex_mod, ONLY: output_physiqex
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/phystokenc_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/phystokenc_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/phystokenc_mod.F90	(revision 5101)
@@ -34,5 +34,5 @@
   USE ioipsl
   USE dimphy
-  USE infotrac_phy, ONLY : nqtot
+  USE infotrac_phy, ONLY: nqtot
   USE iophy
   USE indice_sol_mod
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/phytrac_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/phytrac_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/phytrac_mod.F90	(revision 5101)
@@ -55,6 +55,6 @@
 
     USE dimphy
-    USE infotrac_phy, ONLY : nbtr, type_trac
-    USE tracco2i_mod, ONLY : tracco2i_init
+    USE infotrac_phy, ONLY: nbtr, type_trac
+    USE tracco2i_mod, ONLY: tracco2i_init
 
     IMPLICIT NONE
@@ -120,8 +120,8 @@
 
     USE ioipsl
-    USE phys_cal_mod, only : hour
+    USE phys_cal_mod, ONLY: hour
     USE dimphy
-    USE infotrac_phy, ONLY : nbtr, nqCO2, type_trac, conv_flg, pbl_flg
-    USE strings_mod, ONLY : int2str
+    USE infotrac_phy, ONLY: nbtr, nqCO2, type_trac, conv_flg, pbl_flg
+    USE strings_mod, ONLY: int2str
     USE mod_grid_phy_lmdz
     USE mod_phys_lmdz_para
@@ -131,21 +131,21 @@
     USE tracreprobus_mod
     USE indice_sol_mod
-    USE mod_phys_lmdz_mpi_data, ONLY : is_mpi_root
-    USE print_control_mod, ONLY : lunout
-    USE aero_mod, ONLY : naero_grp
-    USE lmdz_thermcell_dq, ONLY : thermcell_dq
+    USE mod_phys_lmdz_mpi_data, ONLY: is_mpi_root
+    USE print_control_mod, ONLY: lunout
+    USE aero_mod, ONLY: naero_grp
+    USE lmdz_thermcell_dq, ONLY: thermcell_dq
 
     USE tracco2i_mod
 
     USE traccoag_mod
-    USE phys_local_var_mod, ONLY : mdw
-    USE phys_local_var_mod, ONLY : budg_dep_dry_ocs, budg_dep_wet_ocs
-    USE phys_local_var_mod, ONLY : budg_dep_dry_so2, budg_dep_wet_so2
-    USE phys_local_var_mod, ONLY : budg_dep_dry_h2so4, budg_dep_wet_h2so4
-    USE phys_local_var_mod, ONLY : budg_dep_dry_part, budg_dep_wet_part
-    USE infotrac_phy, ONLY : nbtr_sulgas, id_OCS_strat, id_SO2_strat, id_H2SO4_strat
-    USE strataer_nuc_mod, ONLY : tracstrataer_init
+    USE phys_local_var_mod, ONLY: mdw
+    USE phys_local_var_mod, ONLY: budg_dep_dry_ocs, budg_dep_wet_ocs
+    USE phys_local_var_mod, ONLY: budg_dep_dry_so2, budg_dep_wet_so2
+    USE phys_local_var_mod, ONLY: budg_dep_dry_h2so4, budg_dep_wet_h2so4
+    USE phys_local_var_mod, ONLY: budg_dep_dry_part, budg_dep_wet_part
+    USE infotrac_phy, ONLY: nbtr_sulgas, id_OCS_strat, id_SO2_strat, id_H2SO4_strat
+    USE strataer_nuc_mod, ONLY: tracstrataer_init
     USE aerophys
-    USE lmdz_cppkeys_wrapper, ONLY : CPPKEY_STRATAER
+    USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_STRATAER
     USE lmdz_yomcst
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/pppmer.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/pppmer.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/pppmer.F90	(revision 5101)
@@ -53,14 +53,14 @@
 
 ! USE PARKIND1 
-!<http://intra.cnrm.meteo.fr/eac/ARPCLI5.2/doci/code/arpcli5.2/xrd/module/parkind1.F90.php#parkind1>  ,ONLY : JPIM     ,JPRB
+!<http://intra.cnrm.meteo.fr/eac/ARPCLI5.2/doci/code/arpcli5.2/xrd/module/parkind1.F90.php#parkind1>  ,ONLY: JPIM     ,JPRB
 ! USE YOMHOOK 
-!<http://intra.cnrm.meteo.fr/eac/ARPCLI5.2/doci/code/arpcli5.2/xrd/module/yomhook.F90.php#yomhook>   ,ONLY : LHOOK,   DR_HOOK
+!<http://intra.cnrm.meteo.fr/eac/ARPCLI5.2/doci/code/arpcli5.2/xrd/module/yomhook.F90.php#yomhook>   ,ONLY: LHOOK,   DR_HOOK
 
-!USE YOMCST, ONLY : RG, RD
-!<http://intra.cnrm.meteo.fr/eac/ARPCLI5.2/doci/code/arpcli5.2/arp/module/yomcst.F90.php#yomcst>   , ONLY : RG
+!USE YOMCST, ONLY: RG, RD
+!<http://intra.cnrm.meteo.fr/eac/ARPCLI5.2/doci/code/arpcli5.2/arp/module/yomcst.F90.php#yomcst>   , ONLY: RG
 
 !<http://intra.cnrm.meteo.fr/eac/ARPCLI5.2/doci/code/arpcli5.2/xrd/support/rg.F.php#rg>       ,RD
 ! USE YOMSTA 
-!<http://intra.cnrm.meteo.fr/eac/ARPCLI5.2/doci/code/arpcli5.2/arp/module/yomsta.F90.php#yomsta>   , ONLY : RDTDZ1
+!<http://intra.cnrm.meteo.fr/eac/ARPCLI5.2/doci/code/arpcli5.2/arp/module/yomsta.F90.php#yomsta>   , ONLY: RDTDZ1
 
   IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/qsat_seawater2.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/qsat_seawater2.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/qsat_seawater2.F90	(revision 5101)
@@ -49,5 +49,5 @@
 !              ------------
 
-USE MODD_CSTS, ONLY : XRD, XRV
+USE MODD_CSTS, ONLY: XRD, XRV
 USE dimphy
 USE indice_sol_mod
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/radio_decay.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/radio_decay.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/radio_decay.F90	(revision 5101)
@@ -7,6 +7,6 @@
 
   USE dimphy
-  USE infotrac_phy, ONLY : nbtr
-  USE traclmdz_mod, ONLY : id_rn, id_pb
+  USE infotrac_phy, ONLY: nbtr
+  USE traclmdz_mod, ONLY: id_rn, id_pb
   IMPLICIT NONE
 !-----------------------------------------------------------------------
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/radlwsw_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/radlwsw_m.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/radlwsw_m.F90	(revision 5101)
@@ -49,10 +49,10 @@
     ! Modules necessaires
     USE DIMPHY
-    USE assert_m, ONLY : assert
-    USE infotrac_phy, ONLY : type_trac
+    USE assert_m, ONLY: assert
+    USE infotrac_phy, ONLY: type_trac
     USE write_field_phy
 
 #ifdef REPROBUS
-    USE CHEM_REP, ONLY : solaireTIME, ok_SUNTIME, ndimozon
+    USE CHEM_REP, ONLY: solaireTIME, ok_SUNTIME, ndimozon
 #endif
 
@@ -60,8 +60,8 @@
     !    modules necessaires au rayonnement 
     !    -----------------------------------------
-    USE YOERAD   , ONLY : NLW, LRRTM    ,LCCNL    ,LCCNO ,&
+    USE YOERAD   , ONLY: NLW, LRRTM    ,LCCNL    ,LCCNO ,&
          NRADIP   , NRADLP , NICEOPT, NLIQOPT ,RCCNLND  , RCCNSEA
-    USE YOELW    , ONLY : NSIL     ,NTRA     ,NUA      ,TSTAND   ,XP
-    USE YOESW    , ONLY : RYFWCA   ,RYFWCB   ,RYFWCC   ,RYFWCD,&   
+    USE YOELW    , ONLY: NSIL     ,NTRA     ,NUA      ,TSTAND   ,XP
+    USE YOESW    , ONLY: RYFWCA   ,RYFWCB   ,RYFWCC   ,RYFWCD,&
          RYFWCE   ,RYFWCF   ,REBCUA   ,REBCUB   ,REBCUC,&   
          REBCUD   ,REBCUE   ,REBCUF   ,REBCUI   ,REBCUJ,&  
@@ -71,7 +71,7 @@
          RFLDD1   ,RFLDD2   ,RFLDD3   ,RFUETA   ,RASWCA,& 
          RASWCB   ,RASWCC   ,RASWCD   ,RASWCE   ,RASWCF
-    USE YOERDU   , ONLY : NUAER  ,NTRAER ,REPLOG ,REPSC  ,REPSCW ,DIFF
-    USE YOERRTWN , ONLY : DELWAVE   ,TOTPLNK      
-    USE YOMPHY3  , ONLY : RII0
+    USE YOERDU   , ONLY: NUAER  ,NTRAER ,REPLOG ,REPSC  ,REPSCW ,DIFF
+    USE YOERRTWN , ONLY: DELWAVE   ,TOTPLNK
+    USE YOMPHY3  , ONLY: RII0
 #endif
     USE aero_mod
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/read_map2D.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/read_map2D.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/read_map2D.F90	(revision 5101)
@@ -33,5 +33,5 @@
      IF (ierr /= nf90_noerr) CALL write_err_mess('Problem in opening file')
 
-     ierr = NF90_INQ_VARID(nid, trim(varname), nvarid)
+     ierr = nf90_inq_varid(nid, trim(varname), nvarid)
      IF (ierr /= nf90_noerr) CALL write_err_mess('The variable is absent in file')
      
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/readaerosol_interp.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/readaerosol_interp.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/readaerosol_interp.F90	(revision 5101)
@@ -14,8 +14,8 @@
 
   USE ioipsl
-  USE dimphy, ONLY : klev,klon
-  USE mod_phys_lmdz_para, ONLY : mpi_rank  
+  USE dimphy, ONLY: klev,klon
+  USE mod_phys_lmdz_para, ONLY: mpi_rank
   USE readaerosol_mod
-  USE aero_mod, ONLY : naero_spc, name_aero
+  USE aero_mod, ONLY: naero_spc, name_aero
   USE write_field_phy
   USE phys_cal_mod
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/readaerosol_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/readaerosol_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/readaerosol_mod.F90	(revision 5101)
@@ -271,5 +271,5 @@
                                  grid2Dto1D_glo, grid_type, unstructured
     USE mod_phys_lmdz_para
-    USE iophy, ONLY : io_lon, io_lat
+    USE iophy, ONLY: io_lon, io_lat
     USE print_control_mod, ONLY: lunout
     USE lmdz_xios
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/readaerosolstrato.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/readaerosolstrato.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/readaerosolstrato.F90	(revision 5101)
@@ -5,9 +5,9 @@
     use netcdf, only: nf90_get_var, nf90_noerr, nf90_nowrite
 
-    USE phys_cal_mod, ONLY : mth_cur
+    USE phys_cal_mod, ONLY: mth_cur
     USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, klon_glo, &
                                  grid2dto1d_glo, grid_type, unstructured
-    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
-    USE mod_phys_lmdz_omp_data, ONLY :  is_omp_root
+    USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
+    USE mod_phys_lmdz_omp_data, ONLY:  is_omp_root
     USE mod_phys_lmdz_para 
     USE phys_state_var_mod
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/readaerosolstrato_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/readaerosolstrato_m.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/readaerosolstrato_m.F90	(revision 5101)
@@ -29,5 +29,5 @@
   USE mod_phys_lmdz_para
   USE lmdz_xios
-!  USE YOERAD, ONLY : NLW
+!  USE YOERAD, ONLY: NLW
   IMPLICIT NONE
   REAL, allocatable:: latitude(:)
@@ -72,5 +72,5 @@
   USE mod_phys_lmdz_para
   USE lmdz_xios
-!  USE YOERAD, ONLY : NLW
+!  USE YOERAD, ONLY: NLW
   IMPLICIT NONE
   REAL, allocatable:: latitude(:)
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/reevap.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/reevap.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/reevap.F90	(revision 5101)
@@ -3,5 +3,5 @@
 
     ! flag to include modifications to ensure energy conservation (if flag >0)
-    USE add_phys_tend_mod, only : fl_cor_ebil 
+    USE add_phys_tend_mod, ONLY: fl_cor_ebil
     
     IMPLICIT none
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/regr_horiz_time_climoz_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/regr_horiz_time_climoz_m.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/regr_horiz_time_climoz_m.F90	(revision 5101)
@@ -1,14 +1,14 @@
 MODULE regr_horiz_time_climoz_m
 
-  USE interpolation, ONLY : locate
-  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat, grid_type, unstructured
-  USE nrtype, ONLY : pi
-  USE netcdf, ONLY : nf90_clobber, nf90_float, nf90_open, &
+  USE interpolation, ONLY: locate
+  USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, grid_type, unstructured
+  USE nrtype, ONLY: pi
+  USE netcdf, ONLY: nf90_clobber, nf90_float, nf90_open, &
           nf90_nowrite, nf90_noerr, nf90_get_att, nf90_global
-  USE netcdf95, ONLY : nf95_def_dim, nf95_inq_dimid, nf95_inquire_dimension, &
-          nf95_def_var, nf95_inq_varid, NF95_INQUIRE_VARIABLE, &
-          NF95_OPEN, NF95_CREATE, NF95_GET_ATT, NF95_GW_VAR, nf95_get_var, &
-          NF95_CLOSE, NF95_ENDDEF, NF95_PUT_ATT, NF95_PUT_VAR, NF95_COPY_ATT
-  USE print_control_mod, ONLY : lunout
+  USE netcdf95, ONLY: nf95_def_dim, nf95_inq_dimid, nf95_inquire_dimension, &
+          nf95_def_var, nf95_inq_varid, nf95_inquire_variable, &
+          nf95_open, nf95_create, nf95_get_att, nf95_gw_var, nf95_get_var, &
+          nf95_close, nf95_enddef, nf95_put_att, nf95_put_var, nf95_copy_att
+  USE print_control_mod, ONLY: lunout
   USE dimphy
   IMPLICIT NONE
@@ -57,17 +57,17 @@
     !     Attribute "missing_value" or "_FillValue" must be present in input file.
     !-------------------------------------------------------------------------------
-    USE assert_m, ONLY : assert
-    USE cal_tools_m, ONLY : year_len, mid_month
+    USE assert_m, ONLY: assert
+    USE cal_tools_m, ONLY: year_len, mid_month
     !!  USE control_mod,        ONLY: anneeref
-    USE time_phylmdz_mod, ONLY : annee_ref
-    USE ioipsl, ONLY : ioget_year_len, ioget_calendar
-    USE regr_conserv_m, ONLY : regr_conserv
-    USE regr_lint_m, ONLY : regr_lint
-    USE regular_lonlat_mod, ONLY : boundslon_reg, boundslat_reg, south, west, east
-    USE slopes_m, ONLY : slopes
+    USE time_phylmdz_mod, ONLY: annee_ref
+    USE ioipsl, ONLY: ioget_year_len, ioget_calendar
+    USE regr_conserv_m, ONLY: regr_conserv
+    USE regr_lint_m, ONLY: regr_lint
+    USE regular_lonlat_mod, ONLY: boundslon_reg, boundslat_reg, south, west, east
+    USE slopes_m, ONLY: slopes
     USE lmdz_xios
-    USE mod_phys_lmdz_para, ONLY : is_mpi_root, is_master, is_omp_master, gather, gather_mpi, bcast_mpi, klon_mpi
-    USE geometry_mod, ONLY : latitude_deg, ind_cell_glo
-    USE mod_grid_phy_lmdz, ONLY : klon_glo
+    USE mod_phys_lmdz_para, ONLY: is_mpi_root, is_master, is_omp_master, gather, gather_mpi, bcast_mpi, klon_mpi
+    USE geometry_mod, ONLY: latitude_deg, ind_cell_glo
+    USE mod_grid_phy_lmdz, ONLY: klon_glo
 
     !-------------------------------------------------------------------------------
@@ -164,5 +164,5 @@
         CALL assert(read_climoz == 1 .OR. read_climoz == 2, "regr_lat_time_climoz")
 
-        CALL  NF95_OPEN("climoz.nc", nf90_nowrite, fID_in)
+        CALL  nf95_open("climoz.nc", nf90_nowrite, fID_in)
         lprev = nf90_open("climoz_m.nc", nf90_nowrite, fID_in_m)==nf90_noerr
         lnext = nf90_open("climoz_p.nc", nf90_nowrite, fID_in_p)==nf90_noerr
@@ -171,5 +171,5 @@
         !    Few inversions because "regr_conserv" and gcm need ascending vectors.
         CALL nf95_inq_varid(fID_in, vars_in(1), varid)
-        CALL NF95_INQUIRE_VARIABLE(fID_in, varid, dimids = dIDs, ndims = ndims)
+        CALL nf95_inquire_variable(fID_in, varid, dimids = dIDs, ndims = ndims)
         l3D = ndims==4; l2D = ndims==3
         IF(l3D) WRITE(lunout, *)"Input files contain full 3D ozone fields."
@@ -181,16 +181,16 @@
           SELECT CASE(ii)
           CASE(1)                                         !--- LONGITUDE
-            CALL NF95_GW_VAR(fID_in, varid, lon_in)
+            CALL nf95_gw_var(fID_in, varid, lon_in)
             ldec_lon = lon_in(1)>lon_in(dln); IF(ldec_lon) lon_in = lon_in(dln:1:-1)
             nlon_in = dln; lon_in = lon_in * deg2rad
           CASE(2)                                         !--- LATITUDE
-            CALL NF95_GW_VAR(fID_in, varid, lat_in)
+            CALL nf95_gw_var(fID_in, varid, lat_in)
             ldec_lat = lat_in(1)>lat_in(dln); IF(ldec_lat) lat_in = lat_in(dln:1:-1)
             nlat_in = dln; lat_in = lat_in * deg2rad
           CASE(3)                                         !--- PRESSURE LEVELS
-            CALL NF95_GW_VAR(fID_in, varid, lev_in)
+            CALL nf95_gw_var(fID_in, varid, lev_in)
             ldec_lev = lev_in(1)>lev_in(dln); IF(ldec_lev) lev_in = lev_in(dln:1:-1)
             nlev_in = dln
-            CALL NF95_GET_ATT(fID_in, varid, "units", press_unit)
+            CALL nf95_get_att(fID_in, varid, "units", press_unit)
             k = LEN_TRIM(press_unit)
             DO WHILE(ICHAR(press_unit(k:k))==0)
@@ -329,20 +329,20 @@
         DO iv = 1, read_climoz
           CALL nf95_inq_varid(fID_in, vars_in(1), vID_in(iv))
-          IF(l3D) call NF95_GET_VAR(fID_in, vID_in(iv), o3_in3(1:nlon_in, :, :, 1:12, iv))
-          IF(l2D) call NF95_GET_VAR(fID_in, vID_in(iv), o3_in2(:, :, 1:12, iv))
+          IF(l3D) call nf95_get_var(fID_in, vID_in(iv), o3_in3(1:nlon_in, :, :, 1:12, iv))
+          IF(l2D) call nf95_get_var(fID_in, vID_in(iv), o3_in2(:, :, 1:12, iv))
           IF(lprev) THEN; sta(ndims) = 12
           CALL nf95_inq_varid(fID_in_m, vars_in(1), vID_in(iv))
-          IF(l3D) call NF95_GET_VAR(fID_in_m, vID_in(iv), o3_in3(1:nlon_in, :, :, 0, iv), sta, cnt)
-          IF(l2d) call NF95_GET_VAR(fID_in_m, vID_in(iv), o3_in2(:, :, 0, iv), sta, cnt)
+          IF(l3D) call nf95_get_var(fID_in_m, vID_in(iv), o3_in3(1:nlon_in, :, :, 0, iv), sta, cnt)
+          IF(l2d) call nf95_get_var(fID_in_m, vID_in(iv), o3_in2(:, :, 0, iv), sta, cnt)
           END IF
           IF(lnext) THEN; sta(ndims) = 1
           CALL nf95_inq_varid(fID_in_p, vars_in(1), vID_in(iv))
-          IF(l3D) call NF95_GET_VAR(fID_in_p, vID_in(iv), o3_in3(1:nlon_in, :, :, 13, iv), sta, cnt)
-          IF(l2D) call NF95_GET_VAR(fID_in_p, vID_in(iv), o3_in2(:, :, 13, iv), sta, cnt)
+          IF(l3D) call nf95_get_var(fID_in_p, vID_in(iv), o3_in3(1:nlon_in, :, :, 13, iv), sta, cnt)
+          IF(l2D) call nf95_get_var(fID_in_p, vID_in(iv), o3_in2(:, :, 13, iv), sta, cnt)
           END IF
         END DO
         IF(lprev.OR.lnext) DEALLOCATE(sta, cnt)
-        IF(lprev) CALL NF95_CLOSE(fID_in_m)
-        IF(lnext) CALL NF95_CLOSE(fID_in_p)
+        IF(lprev) CALL nf95_close(fID_in_m)
+        IF(lnext) CALL nf95_close(fID_in_p)
 
         !--- Revert decreasing coordinates vector
@@ -469,7 +469,7 @@
         IF (is_mpi_root) THEN
           !--- Write remaining coordinate variables:
-          CALL NF95_PUT_VAR(fID_ou, levID_ou, lev_in); DEALLOCATE(lev_in)
-          IF(interpt) CALL NF95_PUT_VAR(fID_ou, timID_ou, tmidday)
-          IF(.NOT.interpt) CALL NF95_PUT_VAR(fID_ou, timID_ou, tmidmonth)
+          CALL nf95_put_var(fID_ou, levID_ou, lev_in); DEALLOCATE(lev_in)
+          IF(interpt) CALL nf95_put_var(fID_ou, timID_ou, tmidday)
+          IF(.NOT.interpt) CALL nf95_put_var(fID_ou, timID_ou, tmidmonth)
 
           !--- Write to file (the order of "rlatu" is inverted in the output file):
@@ -482,13 +482,13 @@
 
             DO m = 1, read_climoz
-              CALL NF95_PUT_VAR(fID_ou, vID_ou(m), o3_out(nlat_ou:1:-1, :, :, m))
+              CALL nf95_put_var(fID_ou, vID_ou(m), o3_out(nlat_ou:1:-1, :, :, m))
             END DO
 
           ELSE
             DO m = 1, read_climoz
-              CALL NF95_PUT_VAR(fID_ou, vID_ou(m), o3_out3(:, nlat_ou:1:-1, :, :, m))
+              CALL nf95_put_var(fID_ou, vID_ou(m), o3_out3(:, nlat_ou:1:-1, :, :, m))
             END DO
           ENDIF
-          CALL NF95_CLOSE(fID_ou)
+          CALL nf95_close(fID_ou)
 
         ENDIF
@@ -552,7 +552,7 @@
 
           !--- Write remaining coordinate variables:
-          CALL NF95_PUT_VAR(fID_ou, levID_ou, lev_in); DEALLOCATE(lev_in)
-          IF(interpt) CALL NF95_PUT_VAR(fID_ou, timID_ou, tmidday)
-          IF(.NOT.interpt) CALL NF95_PUT_VAR(fID_ou, timID_ou, tmidmonth)
+          CALL nf95_put_var(fID_ou, levID_ou, lev_in); DEALLOCATE(lev_in)
+          IF(interpt) CALL nf95_put_var(fID_ou, timID_ou, tmidday)
+          IF(.NOT.interpt) CALL nf95_put_var(fID_ou, timID_ou, tmidmonth)
 
           IF (grid_type==unstructured) THEN
@@ -564,14 +564,14 @@
 
             DO m = 1, read_climoz
-              CALL NF95_PUT_VAR(fID_ou, vID_ou(m), o3_out(nlat_ou:1:-1, :, :, m))
+              CALL nf95_put_var(fID_ou, vID_ou(m), o3_out(nlat_ou:1:-1, :, :, m))
             END DO
           ELSE
             !--- Write to file (the order of "rlatu" is inverted in the output file):
             DO m = 1, read_climoz
-              CALL NF95_PUT_VAR(fID_ou, vID_ou(m), o3_out2(nlat_ou:1:-1, :, :, m))
+              CALL nf95_put_var(fID_ou, vID_ou(m), o3_out2(nlat_ou:1:-1, :, :, m))
             END DO
           ENDIF
 
-          CALL NF95_CLOSE(fID_ou)
+          CALL nf95_close(fID_ou)
 
         ENDIF
@@ -581,5 +581,5 @@
       !=============================================================================
 
-      IF (is_mpi_root) CALL NF95_CLOSE(fID_in)
+      IF (is_mpi_root) CALL nf95_close(fID_in)
 
     ENDIF ! is_omp_master
@@ -599,8 +599,8 @@
     !     dimensions and variables, and writes some of the coordinate variables.
     !-------------------------------------------------------------------------------
-    USE regular_lonlat_mod, ONLY : lon_reg, lat_reg
-    USE regular_lonlat_mod, ONLY : lon_reg, lat_reg
-    USE mod_phys_lmdz_para, ONLY : is_mpi_root
-    USE mod_grid_phy_lmdz, ONLY : klon_glo
+    USE regular_lonlat_mod, ONLY: lon_reg, lat_reg
+    USE regular_lonlat_mod, ONLY: lon_reg, lat_reg
+    USE mod_phys_lmdz_para, ONLY: is_mpi_root
+    USE mod_grid_phy_lmdz, ONLY: klon_glo
 
     !-------------------------------------------------------------------------------
@@ -625,5 +625,5 @@
       sub = "prepare_out"
       WRITE(lunout, *)"CALL sequence information: " // TRIM(sub)
-      CALL NF95_CREATE("climoz_LMDZ.nc", nf90_clobber, fID_ou)
+      CALL nf95_create("climoz_LMDZ.nc", nf90_clobber, fID_ou)
 
       !--- Dimensions:
@@ -641,15 +641,15 @@
       CALL nf95_def_var(fID_ou, "time", nf90_float, dtimID, vtimID)
       IF(ndims==4) &
-              CALL NF95_PUT_ATT(fID_ou, vlonID, "units", "degrees_east")
-      CALL NF95_PUT_ATT(fID_ou, vlatID, "units", "degrees_north")
-      CALL NF95_PUT_ATT(fID_ou, vlevID, "units", "millibar")
-      CALL NF95_PUT_ATT(fID_ou, vtimID, "units", "days since 2000-1-1")
+              CALL nf95_put_att(fID_ou, vlonID, "units", "degrees_east")
+      CALL nf95_put_att(fID_ou, vlatID, "units", "degrees_north")
+      CALL nf95_put_att(fID_ou, vlevID, "units", "millibar")
+      CALL nf95_put_att(fID_ou, vtimID, "units", "days since 2000-1-1")
       IF(ndims==4) &
-              CALL NF95_PUT_ATT(fID_ou, vlonID, "standard_name", "longitude")
-      CALL NF95_PUT_ATT(fID_ou, vlatID, "standard_name", "latitude")
-      CALL NF95_PUT_ATT(fID_ou, vlevID, "standard_name", "air_pressure")
-      CALL NF95_PUT_ATT(fID_ou, vtimID, "standard_name", "time")
-      CALL NF95_PUT_ATT(fID_ou, vlevID, "long_name", "air pressure")
-      CALL NF95_PUT_ATT(fID_ou, vtimID, "calendar", cal_ou)
+              CALL nf95_put_att(fID_ou, vlonID, "standard_name", "longitude")
+      CALL nf95_put_att(fID_ou, vlatID, "standard_name", "latitude")
+      CALL nf95_put_att(fID_ou, vlevID, "standard_name", "air_pressure")
+      CALL nf95_put_att(fID_ou, vtimID, "standard_name", "time")
+      CALL nf95_put_att(fID_ou, vlevID, "long_name", "air pressure")
+      CALL nf95_put_att(fID_ou, vtimID, "calendar", cal_ou)
 
       !--- Define the main variables:
@@ -657,10 +657,10 @@
       IF(ndims==4) dIDs = [dlonID, dlatID, dlevID, dtimID]
       CALL nf95_def_var(fID_ou, vars_in(1), nf90_float, dIDs(1:ndims), vID_ou(1))
-      CALL NF95_PUT_ATT(fID_ou, vID_ou(1), "long_name", "ozone mole fraction")
-      CALL NF95_PUT_ATT(fID_ou, vID_ou(1), "standard_name", "mole_fraction_of_ozone&
+      CALL nf95_put_att(fID_ou, vID_ou(1), "long_name", "ozone mole fraction")
+      CALL nf95_put_att(fID_ou, vID_ou(1), "standard_name", "mole_fraction_of_ozone&
               _in_air")
       IF(SIZE(vID_ou) == 2) THEN
         CALL nf95_def_var(fID_ou, vars_in(2), nf90_float, dIDs(1:ndims), vID_ou(2))
-        CALL NF95_PUT_ATT(fID_ou, vID_ou(2), "long_name", "ozone mole fraction in da&
+        CALL nf95_put_att(fID_ou, vID_ou(2), "long_name", "ozone mole fraction in da&
                 ylight")
       END IF
@@ -669,14 +669,14 @@
       ! The following commands, copying attributes, may fail. That is OK.
       ! It should just mean that the attribute is not defined in the input file.
-      CALL NF95_COPY_ATT(fID_in, nf90_global, "Conventions", fID_ou, nf90_global, ncerr)
+      CALL nf95_copy_att(fID_in, nf90_global, "Conventions", fID_ou, nf90_global, ncerr)
       CALL handle_err_copy_att("Conventions")
-      CALL NF95_COPY_ATT(fID_in, nf90_global, "title", fID_ou, nf90_global, ncerr)
+      CALL nf95_copy_att(fID_in, nf90_global, "title", fID_ou, nf90_global, ncerr)
       CALL handle_err_copy_att("title")
-      CALL NF95_COPY_ATT(fID_in, nf90_global, "institution", fID_ou, nf90_global, ncerr)
+      CALL nf95_copy_att(fID_in, nf90_global, "institution", fID_ou, nf90_global, ncerr)
       CALL handle_err_copy_att("institution")
-      CALL NF95_COPY_ATT(fID_in, nf90_global, "source", fID_ou, nf90_global, ncerr)
+      CALL nf95_copy_att(fID_in, nf90_global, "source", fID_ou, nf90_global, ncerr)
       CALL handle_err_copy_att("source")
-      CALL NF95_PUT_ATT (fID_ou, nf90_global, "comment", "Regridded for LMDZ")
-      CALL NF95_ENDDEF(fID_ou)
+      CALL nf95_put_att (fID_ou, nf90_global, "comment", "Regridded for LMDZ")
+      CALL nf95_enddef(fID_ou)
 
       IF (grid_type==unstructured) THEN
@@ -685,9 +685,9 @@
           latitude_glo_(ind_cell_glo_glo(i)) = latitude_glo(i)
         ENDDO
-        CALL NF95_PUT_VAR(fID_ou, vlatID, latitude_glo_)
+        CALL nf95_put_var(fID_ou, vlatID, latitude_glo_)
       ELSE
         !--- Write one of the coordinate variables:
-        IF(ndims==4) CALL NF95_PUT_VAR(fID_ou, vlonID, lon_reg / deg2rad)
-        CALL NF95_PUT_VAR(fID_ou, vlatID, lat_reg(nlat_ou:1:-1) / deg2rad)
+        IF(ndims==4) CALL nf95_put_var(fID_ou, vlonID, lon_reg / deg2rad)
+        CALL nf95_put_var(fID_ou, vlatID, lat_reg(nlat_ou:1:-1) / deg2rad)
         !    (convert from rad to degrees and sort in ascending order)
       ENDIF
@@ -701,5 +701,5 @@
 
       !-------------------------------------------------------------------------------
-      USE netcdf, ONLY : nf90_noerr, NF90_strerror
+      USE netcdf, ONLY: nf90_noerr, nf90_strerror
       !-------------------------------------------------------------------------------
       ! Arguments:
@@ -707,6 +707,6 @@
       !-------------------------------------------------------------------------------
       IF(ncerr /= nf90_noerr) &
-              WRITE(lunout, *)TRIM(sub) // " prepare_out NF95_COPY_ATT " // TRIM(att_name) // &
-                      " -- " // TRIM(NF90_strerror(ncerr))
+              WRITE(lunout, *)TRIM(sub) // " prepare_out nf95_copy_att " // TRIM(att_name) // &
+                      " -- " // TRIM(nf90_strerror(ncerr))
 
     END SUBROUTINE handle_err_copy_att
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/regr_lat_time_coefoz_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/regr_lat_time_coefoz_m.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/regr_lat_time_coefoz_m.F90	(revision 5101)
@@ -40,5 +40,5 @@
     ! when we regrid in pressure).
 
-    use mod_grid_phy_lmdz, ONLY : nbp_lat
+    use mod_grid_phy_lmdz, ONLY: nbp_lat
     use regr_conserv_m, only: regr_conserv
     use regr_lint_m, only: regr_lint
@@ -240,5 +240,5 @@
     ! dimensions and variables, and writes one of the coordinate variables.
 
-    use mod_grid_phy_lmdz, ONLY : nbp_lat
+    use mod_grid_phy_lmdz, ONLY: nbp_lat
     use assert_eq_m, only: assert_eq
 
@@ -247,5 +247,5 @@
     use netcdf, only: nf90_clobber, nf90_float, nf90_copy_att, nf90_global
     use nrtype, only: pi
-    use regular_lonlat_mod, only : lat_reg
+    use regular_lonlat_mod, ONLY: lat_reg
 
     integer, intent(in):: ncid_in, varid_in(:), n_plev
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/regr_pr_time_av_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/regr_pr_time_av_m.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/regr_pr_time_av_m.F90	(revision 5101)
@@ -113,7 +113,7 @@
 !-------------------------------------------------------------------------------
   USE dimphy,         ONLY: klon
-  USE netcdf95,       ONLY: nf95_inq_varid, NF95_INQUIRE_VARIABLE, &
+  USE netcdf95,       ONLY: nf95_inq_varid, nf95_inquire_variable, &
                             nf95_inq_dimid, nf95_inquire_dimension, nf95_get_var
-  USE netcdf,         ONLY: NF90_INQ_VARID, nf90_noerr
+  USE netcdf,         ONLY: nf90_inq_varid, nf90_noerr
   USE assert_m,       ONLY: assert
   USE assert_eq_m,    ONLY: assert_eq
@@ -210,7 +210,7 @@
     !=== CHECK WHICH FIELDS ARE AVAILABLE IN THE INPUT FILE
     IF(lfirst) THEN
-      lPrSfile=lAdjTro.AND.NF90_INQ_VARID(fID,"ps"                     ,vID)==nf90_noerr
-      lPrTfile=lAdjTro.AND.NF90_INQ_VARID(fID,"tropopause_air_pressure",vID)==nf90_noerr
-      lO3Tfile=lAdjTro.AND.NF90_INQ_VARID(fID,"tro3_at_tropopause"     ,vID)==nf90_noerr
+      lPrSfile=lAdjTro.AND.nf90_inq_varid(fID,"ps"                     ,vID)==nf90_noerr
+      lPrTfile=lAdjTro.AND.nf90_inq_varid(fID,"tropopause_air_pressure",vID)==nf90_noerr
+      lO3Tfile=lAdjTro.AND.nf90_inq_varid(fID,"tro3_at_tropopause"     ,vID)==nf90_noerr
       CALL nf95_inq_dimid(fID,"time",vID)
       CALL nf95_inquire_dimension(fID,vID,nclen=ntim_in)
@@ -481,7 +481,7 @@
 !-------------------------------------------------------------------------------
   CALL nf95_inq_varid(fID, TRIM(var), vID)
-  CALL NF95_INQUIRE_VARIABLE(fID, vID, ndims=n_dim)
-  IF(n_dim==2) call NF95_GET_VAR(fID,vID,v(1,:), start=[  1,irec])
-  IF(n_dim==3) call NF95_GET_VAR(fID,vID,v(:,:), start=[1,1,irec])
+  CALL nf95_inquire_variable(fID, vID, ndims=n_dim)
+  IF(n_dim==2) call nf95_get_var(fID,vID,v(1,:), start=[  1,irec])
+  IF(n_dim==3) call nf95_get_var(fID,vID,v(:,:), start=[1,1,irec])
 
   !--- Flip latitudes: ascending in input file, descending in "rlatu".
@@ -512,7 +512,7 @@
   DO i=1,SIZE(nam)
     CALL nf95_inq_varid(fID, TRIM(nam(i)), vID)
-    CALL NF95_INQUIRE_VARIABLE(fID, vID, ndims=n_dim)
-    IF(n_dim==3) call NF95_GET_VAR(fID,vID,v(1,:,:,i), start=[  1,1,irec])
-    IF(n_dim==4) call NF95_GET_VAR(fID,vID,v(:,:,:,i), start=[1,1,1,irec])
+    CALL nf95_inquire_variable(fID, vID, ndims=n_dim)
+    IF(n_dim==3) call nf95_get_var(fID,vID,v(1,:,:,i), start=[  1,1,irec])
+    IF(n_dim==4) call nf95_get_var(fID,vID,v(:,:,:,i), start=[1,1,1,irec])
   END DO
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/slab_heat_transp_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/slab_heat_transp_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/slab_heat_transp_mod.F90	(revision 5101)
@@ -146,5 +146,5 @@
 
 !    USE ioipsl_getin_p_mod, only: getin_p
-    USE IOIPSL, ONLY : getin 
+    USE IOIPSL, ONLY: getin
     IMPLICIT NONE
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/stdlevvar_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/stdlevvar_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/stdlevvar_mod.F90	(revision 5101)
@@ -319,5 +319,5 @@
                            n2mout)
 
-      USE ioipsl_getin_p_mod, ONLY : getin_p
+      USE ioipsl_getin_p_mod, ONLY: getin_p
       IMPLICIT NONE
 !-------------------------------------------------------------------------
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/sumethox.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/sumethox.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/sumethox.F90	(revision 5101)
@@ -45,5 +45,5 @@
 !     ------------------------------------------------------------------
 
-USE YOEMETH   , ONLY : RALPHA1 ,RALPHA2  ,RQLIM   ,&
+USE YOEMETH   , ONLY: RALPHA1 ,RALPHA2  ,RQLIM   ,&
    RPBOTOX,  RPBOTPH ,RPTOPOX  ,RPTOPPH ,&
    RALPHA3,  RLOGPPH
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/surf_land_orchidee_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/surf_land_orchidee_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/surf_land_orchidee_mod.F90	(revision 5101)
@@ -23,11 +23,11 @@
   USE intersurf     ! module in ORCHIDEE
 #endif
-  USE cpl_mod,      ONLY : cpl_send_land_fields, cpl_send_landice_fields
-  USE surface_data, ONLY : type_ocean, landice_opt
-  USE geometry_mod, ONLY : dx, dy, boundslon, boundslat,longitude, latitude, cell_area,  ind_cell_glo
+  USE cpl_mod,      ONLY: cpl_send_land_fields, cpl_send_landice_fields
+  USE surface_data, ONLY: type_ocean, landice_opt
+  USE geometry_mod, ONLY: dx, dy, boundslon, boundslat,longitude, latitude, cell_area,  ind_cell_glo
   USE mod_grid_phy_lmdz
   USE mod_phys_lmdz_para, mpi_root_rank=>mpi_master
-  USE carbon_cycle_mod, ONLY : nbcf_in_orc, nbcf_out, fields_in, yfields_in, yfields_out, cfname_in, cfname_out
-  USE nrtype, ONLY : PI
+  USE carbon_cycle_mod, ONLY: nbcf_in_orc, nbcf_out, fields_in, yfields_in, yfields_out, cfname_in, cfname_out
+  USE nrtype, ONLY: PI
   
   IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/surf_land_orchidee_nofrein_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/surf_land_orchidee_nofrein_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/surf_land_orchidee_nofrein_mod.F90	(revision 5101)
@@ -23,7 +23,7 @@
   USE intersurf     ! module d'ORCHIDEE
 #endif
-  USE cpl_mod,      ONLY : cpl_send_land_fields
-  USE surface_data, ONLY : type_ocean
-  USE geometry_mod, ONLY : dx, dy
+  USE cpl_mod,      ONLY: cpl_send_land_fields
+  USE surface_data, ONLY: type_ocean
+  USE geometry_mod, ONLY: dx, dy
   USE mod_grid_phy_lmdz
   USE mod_phys_lmdz_para, mpi_root_rank=>mpi_master
@@ -53,5 +53,5 @@
     USE mod_surf_para
     USE mod_synchro_omp
-    USE carbon_cycle_mod, ONLY : carbon_cycle_cpl
+    USE carbon_cycle_mod, ONLY: carbon_cycle_cpl
     USE indice_sol_mod
     USE print_control_mod, ONLY: lunout
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/surf_land_orchidee_nolic_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/surf_land_orchidee_nolic_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/surf_land_orchidee_nolic_mod.F90	(revision 5101)
@@ -19,11 +19,11 @@
   USE intersurf     ! module d'ORCHIDEE
 #endif
-  USE cpl_mod,      ONLY : cpl_send_land_fields
-  USE surface_data, ONLY : type_ocean
-  USE geometry_mod, ONLY : dx, dy, boundslon, boundslat,longitude, latitude, cell_area,  ind_cell_glo
+  USE cpl_mod,      ONLY: cpl_send_land_fields
+  USE surface_data, ONLY: type_ocean
+  USE geometry_mod, ONLY: dx, dy, boundslon, boundslat,longitude, latitude, cell_area,  ind_cell_glo
   USE mod_grid_phy_lmdz
   USE mod_phys_lmdz_para, mpi_root_rank=>mpi_master
-  USE carbon_cycle_mod, ONLY : nbcf_in_orc, nbcf_out, fields_in, yfields_in, yfields_out, cfname_in, cfname_out
-  USE nrtype, ONLY : PI
+  USE carbon_cycle_mod, ONLY: nbcf_in_orc, nbcf_out, fields_in, yfields_in, yfields_out, cfname_in, cfname_out
+  USE nrtype, ONLY: PI
   
   IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/surf_land_orchidee_noopenmp_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/surf_land_orchidee_noopenmp_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/surf_land_orchidee_noopenmp_mod.F90	(revision 5101)
@@ -20,7 +20,7 @@
   USE intersurf     ! module d'ORCHIDEE
 #endif
-  USE cpl_mod,      ONLY : cpl_send_land_fields
-  USE surface_data, ONLY : type_ocean
-  USE geometry_mod, ONLY : dx, dy
+  USE cpl_mod,      ONLY: cpl_send_land_fields
+  USE surface_data, ONLY: type_ocean
+  USE geometry_mod, ONLY: dx, dy
   USE mod_grid_phy_lmdz
   USE mod_phys_lmdz_para
@@ -99,5 +99,5 @@
 !   qsurf        air moisture at surface
 
-    USE carbon_cycle_mod, ONLY : carbon_cycle_cpl, fco2_land_inst, fco2_lu_inst
+    USE carbon_cycle_mod, ONLY: carbon_cycle_cpl, fco2_land_inst, fco2_lu_inst
     USE indice_sol_mod
     USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/surf_land_orchidee_nounstruct_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/surf_land_orchidee_nounstruct_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/surf_land_orchidee_nounstruct_mod.F90	(revision 5101)
@@ -19,7 +19,7 @@
   USE intersurf     ! module d'ORCHIDEE
 #endif
-  USE cpl_mod,      ONLY : cpl_send_land_fields
-  USE surface_data, ONLY : type_ocean
-  USE geometry_mod, ONLY : dx, dy
+  USE cpl_mod,      ONLY: cpl_send_land_fields
+  USE surface_data, ONLY: type_ocean
+  USE geometry_mod, ONLY: dx, dy
   USE mod_grid_phy_lmdz
   USE mod_phys_lmdz_para, mpi_root_rank=>mpi_master
@@ -49,5 +49,5 @@
     USE mod_surf_para
     USE mod_synchro_omp
-    USE carbon_cycle_mod, ONLY : carbon_cycle_cpl
+    USE carbon_cycle_mod, ONLY: carbon_cycle_cpl
     USE indice_sol_mod
     USE print_control_mod, ONLY: lunout
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/surf_land_orchidee_noz0h_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/surf_land_orchidee_noz0h_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/surf_land_orchidee_noz0h_mod.F90	(revision 5101)
@@ -22,7 +22,7 @@
   USE intersurf     ! module d'ORCHIDEE
 #endif
-  USE cpl_mod,      ONLY : cpl_send_land_fields
-  USE surface_data, ONLY : type_ocean
-  USE geometry_mod, ONLY : dx, dy
+  USE cpl_mod,      ONLY: cpl_send_land_fields
+  USE surface_data, ONLY: type_ocean
+  USE geometry_mod, ONLY: dx, dy
   USE mod_grid_phy_lmdz
   USE mod_phys_lmdz_para, mpi_root_rank=>mpi_master
@@ -51,5 +51,5 @@
     USE mod_surf_para
     USE mod_synchro_omp
-    USE carbon_cycle_mod, ONLY : carbon_cycle_cpl
+    USE carbon_cycle_mod, ONLY: carbon_cycle_cpl
     USE indice_sol_mod
     USE print_control_mod, ONLY: lunout
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/surf_landice_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/surf_landice_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/surf_landice_mod.F90	(revision 5101)
@@ -31,14 +31,14 @@
 
     USE dimphy
-    USE geometry_mod,     ONLY : longitude,latitude
-    USE surface_data,     ONLY : type_ocean, calice, calsno, landice_opt, iflag_albcalc
-    USE fonte_neige_mod,  ONLY : fonte_neige,run_off_lic,fqcalving_global,ffonte_global,fqfonte_global,runofflic_global
-    USE cpl_mod,          ONLY : cpl_send_landice_fields
+    USE geometry_mod,     ONLY: longitude,latitude
+    USE surface_data,     ONLY: type_ocean, calice, calsno, landice_opt, iflag_albcalc
+    USE fonte_neige_mod,  ONLY: fonte_neige,run_off_lic,fqcalving_global,ffonte_global,fqfonte_global,runofflic_global
+    USE cpl_mod,          ONLY: cpl_send_landice_fields
     USE calcul_fluxs_mod
-    USE phys_local_var_mod, ONLY : zxrhoslic, zxustartlic, zxqsaltlic
-    USE phys_output_var_mod, ONLY : snow_o,zfra_o
+    USE phys_local_var_mod, ONLY: zxrhoslic, zxustartlic, zxqsaltlic
+    USE phys_output_var_mod, ONLY: snow_o,zfra_o
 #ifdef ISO   
-    USE fonte_neige_mod,  ONLY : xtrun_off_lic
-    USE infotrac_phy,     ONLY : ntiso,niso
+    USE fonte_neige_mod,  ONLY: xtrun_off_lic
+    USE infotrac_phy,     ONLY: ntiso,niso
     USE isotopes_routines_mod, ONLY: calcul_iso_surf_lic_vectall
 #ifdef ISOVERIF
@@ -49,9 +49,9 @@
  
 !FC
-    USE ioipsl_getin_p_mod, ONLY : getin_p
-    USE lmdz_blowing_snow_ini, ONLY : c_esalt_bs, zeta_bs, pbst_bs, prt_bs, rhoice_bs, rhohard_bs
-    USE lmdz_blowing_snow_ini, ONLY : rhofresh_bs, tau_eqsalt_bs, tau_dens0_bs, tau_densmin_bs
+    USE ioipsl_getin_p_mod, ONLY: getin_p
+    USE lmdz_blowing_snow_ini, ONLY: c_esalt_bs, zeta_bs, pbst_bs, prt_bs, rhoice_bs, rhohard_bs
+    USE lmdz_blowing_snow_ini, ONLY: rhofresh_bs, tau_eqsalt_bs, tau_dens0_bs, tau_densmin_bs
 #ifdef CPP_INLANDSIS
-    USE surf_inlandsis_mod,  ONLY : surf_inlandsis
+    USE surf_inlandsis_mod,  ONLY: surf_inlandsis
 #endif
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/surf_ocean_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/surf_ocean_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/surf_ocean_mod.F90	(revision 5101)
@@ -32,10 +32,10 @@
     USE dimphy, ONLY: klon, zmasq
     USE surface_data, ONLY     : type_ocean
-    USE ocean_forced_mod, ONLY : ocean_forced_noice
+    USE ocean_forced_mod, ONLY: ocean_forced_noice
     USE ocean_slab_mod, ONLY   : ocean_slab_noice
     USE ocean_cpl_mod, ONLY    : ocean_cpl_noice
-    USE indice_sol_mod, ONLY : nbsrf, is_oce
-#ifdef ISO
-    USE infotrac_phy, ONLY : ntraciso=>ntiso,niso
+    USE indice_sol_mod, ONLY: nbsrf, is_oce
+#ifdef ISO
+    USE infotrac_phy, ONLY: ntraciso=>ntiso,niso
 #ifdef ISOVERIF
     USE isotopes_mod, ONLY: iso_eau,ridicule
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/surf_seaice_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/surf_seaice_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/surf_seaice_mod.F90	(revision 5101)
@@ -30,10 +30,10 @@
   USE dimphy
   USE surface_data
-  USE ocean_forced_mod, ONLY : ocean_forced_ice
+  USE ocean_forced_mod, ONLY: ocean_forced_ice
   USE ocean_cpl_mod, ONLY    : ocean_cpl_ice
   USE ocean_slab_mod, ONLY   : ocean_slab_ice
   USE indice_sol_mod
 #ifdef ISO
-  USE infotrac_phy, ONLY : ntiso,niso
+  USE infotrac_phy, ONLY: ntiso,niso
 #endif
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/sw_aeroAR4.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/sw_aeroAR4.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/sw_aeroAR4.F90	(revision 5101)
@@ -21,7 +21,7 @@
 
   USE dimphy
-  USE phys_output_mod, ONLY : swaero_diag
+  USE phys_output_mod, ONLY: swaero_diag
   USE print_control_mod, ONLY: lunout
-  USE aero_mod, ONLY : naero_grp
+  USE aero_mod, ONLY: naero_grp
   IMPLICIT NONE
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/time_phylmdz_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/time_phylmdz_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/time_phylmdz_mod.F90	(revision 5101)
@@ -36,5 +36,5 @@
   SUBROUTINE init_time(annee_ref_, day_ref_, day_ini_, start_time_, &
                        ndays_, pdtphys_)
-  USE ioipsl_getin_p_mod, ONLY : getin_p
+  USE ioipsl_getin_p_mod, ONLY: getin_p
   USE phys_cal_mod, ONLY: phys_cal_init
   IMPLICIT NONE
@@ -79,5 +79,5 @@
   SUBROUTINE update_time(pdtphys_)
   ! This subroutine updates the module saved variables.
-  USE ioipsl, ONLY : ymds2ju
+  USE ioipsl, ONLY: ymds2ju
   USE phys_cal_mod, ONLY: phys_cal_update
   USE print_control_mod, ONLY: lunout
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/tracco2i_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/tracco2i_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/tracco2i_mod.F90	(revision 5101)
@@ -344,5 +344,5 @@
     USE dimphy
 !    USE infotrac_phy
-    USE geometry_mod, ONLY : cell_area
+    USE geometry_mod, ONLY: cell_area
     USE mod_grid_phy_lmdz
     USE mod_phys_lmdz_mpi_data, ONLY: is_mpi_root
@@ -353,5 +353,5 @@
     USE netcdf, ONLY: nf90_get_var, nf90_noerr, nf90_nowrite
 
-    USE carbon_cycle_mod, ONLY : fco2_ff, fco2_bb, fco2_land, fco2_ocean
+    USE carbon_cycle_mod, ONLY: fco2_ff, fco2_bb, fco2_land, fco2_ocean
 
     IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/tracinca_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/tracinca_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/tracinca_mod.F90	(revision 5101)
@@ -61,5 +61,5 @@
     USE geometry_mod, ONLY: cell_area
     USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat
-    USE aero_mod, ONLY : naero_grp
+    USE aero_mod, ONLY: naero_grp
     USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA
     IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/tracreprobus_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/tracreprobus_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/tracreprobus_mod.F90	(revision 5101)
@@ -13,5 +13,5 @@
     USE infotrac_phy, ONLY: nbtr
 #ifdef REPROBUS 
-    USE CHEM_REP, ONLY : pdt_rep, &  ! pas de temps reprobus
+    USE CHEM_REP, ONLY: pdt_rep, &  ! pas de temps reprobus
          daynum, iter, &             ! jourjulien, iteration chimie
          pdel,&
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/yamada4.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/yamada4.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/yamada4.F90	(revision 5101)
@@ -4,9 +4,9 @@
     cd, tke, eps, km, kn, kq, ustar, iflag_pbl, drgpro)
 
-  USE dimphy, only : klev,klon
+  USE dimphy, ONLY: klev,klon
   USE phys_local_var_mod, only: wprime
-  USE yamada_ini_mod, only : new_yamada4,yamada4_num,hboville
-  USE yamada_ini_mod, only : prt_level, lunout,pbl_lmixmin_alpha,b1,kap,viscom,viscoh
-  USE yamada_ini_mod, only : ric, yun,ydeux,lmixmin,iflag_vdif_q2
+  USE yamada_ini_mod, ONLY: new_yamada4,yamada4_num,hboville
+  USE yamada_ini_mod, ONLY: prt_level, lunout,pbl_lmixmin_alpha,b1,kap,viscom,viscoh
+  USE yamada_ini_mod, ONLY: ric, yun,ydeux,lmixmin,iflag_vdif_q2
   
   IMPLICIT NONE
@@ -712,5 +712,5 @@
 SUBROUTINE vdif_q2(timestep, gravity, rconst, ngrid, plev, temp, kmy, q2)
 
-  USE dimphy, only : klev,klon
+  USE dimphy, ONLY: klev,klon
   IMPLICIT NONE
  
@@ -801,5 +801,5 @@
  SUBROUTINE vdif_q2e(timestep, gravity, rconst, ngrid, plev, temp, kmy, q2)
   
-   USE dimphy, only : klev,klon
+   USE dimphy, ONLY: klev,klon
   IMPLICIT NONE
 
@@ -872,9 +872,9 @@
 
 
-  USE dimphy, only : klev,klon
-  USE yamada_ini_mod, only : l0
+  USE dimphy, ONLY: klev,klon
+  USE yamada_ini_mod, ONLY: l0
   USE phys_state_var_mod, only: zstd, zsig, zmea
   USE phys_local_var_mod, only: l_mixmin, l_mix
-  USE yamada_ini_mod, only : kap, kapb
+  USE yamada_ini_mod, ONLY: kap, kapb
 
  ! zstd: ecart type de la'altitud e sous-maille
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/yamada_c.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/yamada_c.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/yamada_c.F90	(revision 5101)
@@ -7,5 +7,5 @@
       USE dimphy, ONLY: klon, klev
       USE print_control_mod, ONLY: prt_level
-      USE ioipsl_getin_p_mod, ONLY : getin_p
+      USE ioipsl_getin_p_mod, ONLY: getin_p
 
       IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/yamada_ini_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/yamada_ini_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/yamada_ini_mod.F90	(revision 5101)
@@ -27,5 +27,5 @@
 SUBROUTINE yamada_ini(klon,lunout_in,prt_level_in)
 
-   USE ioipsl_getin_p_mod, ONLY : getin_p
+   USE ioipsl_getin_p_mod, ONLY: getin_p
 
 ! local
Index: LMDZ6/branches/Amaury_dev/libf/phylmdiso/add_phys_tend_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmdiso/add_phys_tend_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmdiso/add_phys_tend_mod.F90	(revision 5101)
@@ -141,5 +141,5 @@
 
 USE dimphy, ONLY: klon, klev
-USE phys_state_var_mod, ONLY : phys_tstep
+USE phys_state_var_mod, ONLY: phys_tstep
 USE phys_local_var_mod, ONLY: u_seri, v_seri, ql_seri, qs_seri, qbs_seri, q_seri, t_seri
 #ifdef ISO
@@ -150,5 +150,5 @@
 USE print_control_mod, ONLY: prt_level
 USE cmp_seri_mod
-USE phys_output_var_mod, ONLY : d_qw_col, d_ql_col, d_qs_col, d_qbs_col, d_qt_col, d_ek_col, d_h_dair_col &
+USE phys_output_var_mod, ONLY: d_qw_col, d_ql_col, d_qs_col, d_qbs_col, d_qt_col, d_ek_col, d_h_dair_col &
               , d_h_qw_col, d_h_ql_col, d_h_qs_col, d_h_qbs_col, d_h_col
 
@@ -679,9 +679,9 @@
 !======================================================================
 
-USE phys_state_var_mod, ONLY : phys_tstep, ftsol
+USE phys_state_var_mod, ONLY: phys_tstep, ftsol
 USE geometry_mod, ONLY: longitude_deg, latitude_deg
 USE print_control_mod, ONLY: prt_level
 USE cmp_seri_mod
-USE phys_output_var_mod, ONLY : d_qw_col, d_ql_col, d_qs_col, d_qbs_col, d_qt_col, d_ek_col, d_h_dair_col &
+USE phys_output_var_mod, ONLY: d_qw_col, d_ql_col, d_qs_col, d_qbs_col, d_qt_col, d_ek_col, d_h_dair_col &
               , d_h_qw_col, d_h_ql_col, d_h_qs_col, d_h_qbs_col, d_h_col
 IMPLICIT none
@@ -906,15 +906,15 @@
 
 USE dimphy, ONLY: klon, klev
-USE phys_state_var_mod, ONLY : phys_tstep
-USE phys_state_var_mod, ONLY : topsw, toplw, solsw, sollw, rain_con, snow_con, bs_fall
+USE phys_state_var_mod, ONLY: phys_tstep
+USE phys_state_var_mod, ONLY: topsw, toplw, solsw, sollw, rain_con, snow_con, bs_fall
 USE geometry_mod, ONLY: longitude_deg, latitude_deg
 USE print_control_mod, ONLY: prt_level
 USE cmp_seri_mod
-USE phys_output_var_mod, ONLY : d_qw_col, d_ql_col, d_qs_col, d_qbs_col, d_qt_col, d_ek_col, d_h_dair_col &
+USE phys_output_var_mod, ONLY: d_qw_col, d_ql_col, d_qs_col, d_qbs_col, d_qt_col, d_ek_col, d_h_dair_col &
               , d_h_qw_col, d_h_ql_col, d_h_qs_col, d_h_qbs_col, d_h_col
 USE phys_local_var_mod, ONLY: evap, sens
 USE phys_local_var_mod, ONLY: u_seri, v_seri, ql_seri, qs_seri, qbs_seri, q_seri, t_seri &
       , rain_lsc, snow_lsc
-USE climb_hq_mod, ONLY : d_h_col_vdf, f_h_bnd
+USE climb_hq_mod, ONLY: d_h_col_vdf, f_h_bnd
 IMPLICIT none
 include "YOMCST.h"
Index: LMDZ6/branches/Amaury_dev/libf/phylmdiso/ajsec.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmdiso/ajsec.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmdiso/ajsec.F90	(revision 5101)
@@ -11,5 +11,5 @@
     USE infotrac_phy, ONLY: ntraciso =>ntiso   
 #ifdef ISOVERIF
-  USE isotopes_mod, ONLY : iso_eau,iso_HDO
+  USE isotopes_mod, ONLY: iso_eau,iso_HDO
   USE isotopes_verif_mod, ONLY: iso_verif_egalite, &
         iso_verif_egalite_choix,iso_verif_noNaN,errmax,errmaxrel 
@@ -305,5 +305,5 @@
     USE infotrac_phy, ONLY: ntraciso=>ntiso    
 #ifdef ISOVERIF
-  USE isotopes_mod, ONLY : iso_eau,iso_HDO
+  USE isotopes_mod, ONLY: iso_eau,iso_HDO
   USE isotopes_verif_mod, ONLY: iso_verif_egalite, &
         iso_verif_egalite_choix,iso_verif_noNaN,errmax,errmaxrel
Index: LMDZ6/branches/Amaury_dev/libf/phylmdiso/calwake.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmdiso/calwake.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmdiso/calwake.F90	(revision 5101)
@@ -34,7 +34,7 @@
   USE indice_sol_mod, ONLY: is_oce
   USE print_control_mod, ONLY: mydebug=>debug , lunout, prt_level
-  USE lmdz_wake, ONLY : wake
-#ifdef ISO
-  USE infotrac_phy, ONLY : ntraciso=>ntiso
+  USE lmdz_wake, ONLY: wake
+#ifdef ISO
+  USE infotrac_phy, ONLY: ntraciso=>ntiso
 #ifdef ISOVERIF
   USE isotopes_mod, ONLY: iso_eau
Index: LMDZ6/branches/Amaury_dev/libf/phylmdiso/change_srf_frac_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmdiso/change_srf_frac_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmdiso/change_srf_frac_mod.F90	(revision 5101)
@@ -27,9 +27,9 @@
 
     USE dimphy 
-    USE surface_data, ONLY : type_ocean,version_ocean
+    USE surface_data, ONLY: type_ocean,version_ocean
     USE limit_read_mod
-    USE pbl_surface_mod, ONLY : pbl_surface_newfrac
-    USE cpl_mod, ONLY : cpl_receive_frac
-    USE ocean_slab_mod, ONLY : fsic, ocean_slab_frac
+    USE pbl_surface_mod, ONLY: pbl_surface_newfrac
+    USE cpl_mod, ONLY: cpl_receive_frac
+    USE ocean_slab_mod, ONLY: fsic, ocean_slab_frac
     USE indice_sol_mod
     USE print_control_mod, ONLY: lunout
Index: LMDZ6/branches/Amaury_dev/libf/phylmdiso/cv3_routines.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmdiso/cv3_routines.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmdiso/cv3_routines.F90	(revision 5101)
@@ -7,5 +7,5 @@
 SUBROUTINE cv3_param(nd, k_upper, delt)
 
-  USE ioipsl_getin_p_mod, ONLY : getin_p
+  USE ioipsl_getin_p_mod, ONLY: getin_p
   use mod_phys_lmdz_para
 
@@ -321,5 +321,5 @@
 #endif
 
-  USE mod_phys_lmdz_transfert_para, ONLY : bcast
+  USE mod_phys_lmdz_transfert_para, ONLY: bcast
   USE add_phys_tend_mod, ONLY: fl_cor_ebil
   USE print_control_mod, ONLY: prt_level
@@ -4693,5 +4693,5 @@
 
     USE print_control_mod, ONLY: lunout, prt_level
-    USE add_phys_tend_mod, only : fl_cor_ebil
+    USE add_phys_tend_mod, ONLY: fl_cor_ebil
 
 #ifdef ISO
Index: LMDZ6/branches/Amaury_dev/libf/phylmdiso/cv3a_uncompress.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmdiso/cv3a_uncompress.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmdiso/cv3a_uncompress.F90	(revision 5101)
@@ -54,5 +54,5 @@
 
 #ifdef ISO
-  USE infotrac_phy, ONLY : ntraciso=>ntiso
+  USE infotrac_phy, ONLY: ntraciso=>ntiso
 #endif
   IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmdiso/cv_driver.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmdiso/cv_driver.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmdiso/cv_driver.F90	(revision 5101)
@@ -1229,5 +1229,5 @@
 SUBROUTINE cv_flag(iflag_ice_thermo)
 
-  USE ioipsl_getin_p_mod, ONLY : getin_p
+  USE ioipsl_getin_p_mod, ONLY: getin_p
 
   IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmdiso/isotopes_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmdiso/isotopes_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmdiso/isotopes_mod.F90	(revision 5101)
@@ -433,7 +433,7 @@
 SUBROUTINE getinp_s(nam, val, def, lDisp)
    USE ioipsl_getincom, ONLY: getin
-   USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
-   USE mod_phys_lmdz_omp_data, ONLY :  is_omp_root
-   USE mod_phys_lmdz_transfert_para, ONLY : bcast
+   USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
+   USE mod_phys_lmdz_omp_data, ONLY:  is_omp_root
+   USE mod_phys_lmdz_transfert_para, ONLY: bcast
    CHARACTER(LEN=*),           INTENT(IN)    :: nam
    CHARACTER(LEN=*),           INTENT(INOUT) :: val
@@ -452,7 +452,7 @@
 SUBROUTINE getinp_i(nam, val, def, lDisp)
    USE ioipsl_getincom, ONLY: getin
-   USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
-   USE mod_phys_lmdz_omp_data, ONLY :  is_omp_root
-   USE mod_phys_lmdz_transfert_para, ONLY : bcast
+   USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
+   USE mod_phys_lmdz_omp_data, ONLY:  is_omp_root
+   USE mod_phys_lmdz_transfert_para, ONLY: bcast
    CHARACTER(LEN=*),  INTENT(IN)    :: nam
    INTEGER,           INTENT(INOUT) :: val
@@ -471,7 +471,7 @@
 SUBROUTINE getinp_r(nam, val, def, lDisp)
    USE ioipsl_getincom, ONLY: getin
-   USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
-   USE mod_phys_lmdz_omp_data, ONLY :  is_omp_root
-   USE mod_phys_lmdz_transfert_para, ONLY : bcast
+   USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
+   USE mod_phys_lmdz_omp_data, ONLY:  is_omp_root
+   USE mod_phys_lmdz_transfert_para, ONLY: bcast
    CHARACTER(LEN=*),  INTENT(IN)    :: nam
    REAL,              INTENT(INOUT) :: val
@@ -490,7 +490,7 @@
 SUBROUTINE getinp_l(nam, val, def, lDisp)
    USE ioipsl_getincom, ONLY: getin
-   USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
-   USE mod_phys_lmdz_omp_data, ONLY :  is_omp_root
-   USE mod_phys_lmdz_transfert_para, ONLY : bcast
+   USE mod_phys_lmdz_mpi_data, ONLY:  is_mpi_root
+   USE mod_phys_lmdz_omp_data, ONLY:  is_omp_root
+   USE mod_phys_lmdz_transfert_para, ONLY: bcast
    CHARACTER(LEN=*),  INTENT(IN)    :: nam
    LOGICAL,           INTENT(INOUT) :: val
Index: LMDZ6/branches/Amaury_dev/libf/phylmdiso/isotopes_routines_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmdiso/isotopes_routines_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmdiso/isotopes_routines_mod.F90	(revision 5101)
@@ -15860,5 +15860,5 @@
         xtrain_fall,xtsnow_fall, ql_ancien,xtl_ancien,qs_ancien,xts_ancien, &
         rain_fall,snow_fall,fevap,fxtevap,xtsol,qsol
-      !USE iostart, ONLY : close_startphy, get_field, get_var, open_startphy
+      !USE iostart, ONLY: close_startphy, get_field, get_var, open_startphy
       !USE write_field_phy
       USE indice_sol_mod, only: nbsrf  
Index: LMDZ6/branches/Amaury_dev/libf/phylmdiso/isotopes_verif_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmdiso/isotopes_verif_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmdiso/isotopes_verif_mod.F90	(revision 5101)
@@ -93,5 +93,5 @@
 
         SUBROUTINE iso_verif_init()
-        use ioipsl_getin_p_mod, ONLY : getin_p
+        use ioipsl_getin_p_mod, ONLY: getin_p
         use isotopes_mod, ONLY: iso_O17, iso_O18, iso_HDO
         implicit none
Index: LMDZ6/branches/Amaury_dev/libf/phylmdiso/isotrac_routines_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmdiso/isotrac_routines_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmdiso/isotrac_routines_mod.F90	(revision 5101)
@@ -1373,5 +1373,5 @@
         subroutine initialise_bassins_boites(presnivs)
         USE dimphy, only: klev
-        USE geometry_mod, ONLY : longitude_deg, latitude_deg
+        USE geometry_mod, ONLY: longitude_deg, latitude_deg
         use isotrac_mod, only: bassin_map,option_traceurs,boite_map
 #ifdef ISOVERIF
@@ -2285,5 +2285,5 @@
 
         subroutine isotrac_recolorise_general(xt_seri,t_seri,zx_rh,presnivs)
-        USE geometry_mod, ONLY : latitude_deg
+        USE geometry_mod, ONLY: latitude_deg
         USE dimphy, only: klon,klev
         use isotrac_mod, only: option_traceurs,boite_map
Index: LMDZ6/branches/Amaury_dev/libf/phylmdiso/limit_read_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmdiso/limit_read_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmdiso/limit_read_mod.F90	(revision 5101)
@@ -142,5 +142,5 @@
 ! This subroutine returns the sea surface temperature already read from limit.nc.
 
-    USE dimphy, ONLY : klon
+    USE dimphy, ONLY: klon
 #ifdef ISO
     USE infotrac_phy, ONLY: niso
@@ -273,15 +273,15 @@
     USE mod_grid_phy_lmdz
     USE mod_phys_lmdz_para
-    USE surface_data, ONLY : type_ocean, ok_veget
+    USE surface_data, ONLY: type_ocean, ok_veget
     USE netcdf, ONLY:nf90_noerr,nf90_close,nf90_get_var,nf90_inq_varid,nf90_nowrite,&
             nf90_inq_dimid,nf90_inquire_dimension,nf90_open,nf90_get_att,nf90_inquire
     USE indice_sol_mod
 #ifdef ISO
-    USE isotopes_mod, ONLY : iso_HTO,ok_prod_nucl_tritium
+    USE isotopes_mod, ONLY: iso_HTO,ok_prod_nucl_tritium
 #ifdef ISOVERIF
-    USE isotopes_verif_mod, ONLY : iso_verif_positif_nostop
-#endif
-#endif
-    USE phys_cal_mod, ONLY : calend, year_len
+    USE isotopes_verif_mod, ONLY: iso_verif_positif_nostop
+#endif
+#endif
+    USE phys_cal_mod, ONLY: calend, year_len
     USE print_control_mod, ONLY: lunout, prt_level
     USE lmdz_XIOS, ONLY: xios_recv_field
@@ -357,5 +357,5 @@
 
           !--- WARNING IF CALENDAR IS KNOWN AND DOES NOT MATCH THE ONE OF LMDZ
-          ierr=NF90_INQ_VARID(nid, 'TEMPS', nvarid)
+          ierr=nf90_inq_varid(nid, 'TEMPS', nvarid)
           ierr=nf90_get_att(nid, nvarid, 'calendar', calendar)
           IF(ierr==nf90_noerr.AND.calendar/=calend.AND.prt_level>=1) THEN
@@ -369,5 +369,5 @@
             ierr=nf90_inq_dimid(nid,"time_year",ndimid)
           ELSE
-            ierr=NF90_INQUIRE(nid, UnlimitedDimID=ndimid)
+            ierr=nf90_inquire(nid, UnlimitedDimID=ndimid)
           ENDIF
           ierr=nf90_inquire_dimension(nid, ndimid, len=nn)
@@ -469,5 +469,5 @@
 
 ! Ocean fraction
-             ierr = NF90_INQ_VARID(nid, 'FOCE', nvarid)
+             ierr = nf90_inq_varid(nid, 'FOCE', nvarid)
              IF (ierr /= nf90_noerr) CALL abort_physic(modname, 'Le champ <FOCE> est absent',1)
              
@@ -476,5 +476,5 @@
 
 ! Sea-ice fraction
-             ierr = NF90_INQ_VARID(nid, 'FSIC', nvarid)
+             ierr = nf90_inq_varid(nid, 'FSIC', nvarid)
              IF (ierr /= nf90_noerr) CALL abort_physic(modname,'Le champ <FSIC> est absent',1)
 
@@ -487,5 +487,5 @@
 
 ! Land fraction
-                ierr = NF90_INQ_VARID(nid, 'FTER', nvarid)
+                ierr = nf90_inq_varid(nid, 'FTER', nvarid)
                 IF (ierr /= nf90_noerr) CALL abort_physic(modname,'Le champ <FTER> est absent',1)
                 
@@ -494,5 +494,5 @@
 
 ! Continentale ice fraction
-                ierr = NF90_INQ_VARID(nid, 'FLIC', nvarid)
+                ierr = nf90_inq_varid(nid, 'FLIC', nvarid)
                 IF (ierr /= nf90_noerr) CALL abort_physic(modname,'Le champ <FLIC> est absent',1)
 
@@ -509,5 +509,5 @@
           IF ( type_ocean /= 'couple') THEN
 
-             ierr = NF90_INQ_VARID(nid, 'SST', nvarid)
+             ierr = nf90_inq_varid(nid, 'SST', nvarid)
              IF (ierr /= nf90_noerr) CALL abort_physic(modname,'Le champ <SST> est absent',1)
 
@@ -517,5 +517,5 @@
 #ifdef ISO
              IF ((iso_HTO.gt.0).and.(ok_prod_nucl_tritium)) THEN
-               ierr = NF90_INQ_VARID(nid, 'TUOCE', nvarid)
+               ierr = nf90_inq_varid(nid, 'TUOCE', nvarid)
                IF (ierr /= nf90_noerr) CALL abort_gcm(modname,'Le champ <TUOCE> est absent',1)
 
@@ -545,5 +545,5 @@
 
 ! Read albedo
-             ierr = NF90_INQ_VARID(nid, 'ALB', nvarid)
+             ierr = nf90_inq_varid(nid, 'ALB', nvarid)
              IF (ierr /= nf90_noerr) CALL abort_physic(modname,'Le champ <ALB> est absent',1)
 
@@ -552,5 +552,5 @@
 
 ! Read rugosity
-             ierr = NF90_INQ_VARID(nid, 'RUG', nvarid)
+             ierr = nf90_inq_varid(nid, 'RUG', nvarid)
              IF (ierr /= nf90_noerr) CALL abort_physic(modname,'Le champ <RUG> est absent',1)
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmdiso/lmdz_lscp_old.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmdiso/lmdz_lscp_old.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmdiso/lmdz_lscp_old.F90	(revision 5101)
@@ -21,10 +21,10 @@
   USE icefrac_lsc_mod ! compute ice fraction (JBM 3/14)
   USE print_control_mod, ONLY: prt_level, lunout
-  USE lmdz_cloudth, only : cloudth, cloudth_v3, cloudth_v6
-  USE ioipsl_getin_p_mod, ONLY : getin_p
+  USE lmdz_cloudth, ONLY: cloudth, cloudth_v3, cloudth_v6
+  USE ioipsl_getin_p_mod, ONLY: getin_p
   USE phys_local_var_mod, ONLY: ql_seri,qs_seri
   USE phys_local_var_mod, ONLY: rneblsvol
   ! flag to include modifications to ensure energy conservation (if flag >0)
-  USE add_phys_tend_mod, only : fl_cor_ebil 
+  USE add_phys_tend_mod, ONLY: fl_cor_ebil
   USE lmdz_lscp_ini, ONLY: iflag_t_glace,t_glace_min, t_glace_max, exposant_glace
   USE lmdz_lscp_ini, ONLY: iflag_cloudth_vert, iflag_rain_incloud_vol 
@@ -32,6 +32,6 @@
   USE lmdz_lscp_ini, ONLY: cld_tau_lsc, cld_tau_con, cld_lc_lsc, cld_lc_con
   USE lmdz_lscp_ini, ONLY: reevap_ice, iflag_bergeron, iflag_fisrtilp_qsat, iflag_pdf 
-      use phys_output_var_mod, ONLY : cloudth_sth,cloudth_senv
-      use phys_output_var_mod, ONLY : cloudth_sigmath,cloudth_sigmaenv
+      use phys_output_var_mod, ONLY: cloudth_sth,cloudth_senv
+      use phys_output_var_mod, ONLY: cloudth_sigmath,cloudth_sigmaenv
 
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmdiso/lmdz_wake.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmdiso/lmdz_wake.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmdiso/lmdz_wake.F90	(revision 5101)
@@ -29,10 +29,10 @@
   ! **************************************************************
 
-  USE ioipsl_getin_p_mod, ONLY : getin_p
+  USE ioipsl_getin_p_mod, ONLY: getin_p
   USE dimphy
   use mod_phys_lmdz_para
   USE print_control_mod, ONLY: prt_level
 #ifdef ISO
-  USE infotrac_phy, ONLY : ntraciso=>ntiso
+  USE infotrac_phy, ONLY: ntraciso=>ntiso
 #ifdef ISOVERIF
   USE isotopes_verif_mod
Index: LMDZ6/branches/Amaury_dev/libf/phylmdiso/phyaqua_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmdiso/phyaqua_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmdiso/phyaqua_mod.F90	(revision 5101)
@@ -23,11 +23,11 @@
 
     USE dimphy, ONLY: klon
-    USE geometry_mod, ONLY : latitude
+    USE geometry_mod, ONLY: latitude
     USE surface_data, ONLY: type_ocean, ok_veget
     USE pbl_surface_mod, ONLY: pbl_surface_init
     USE fonte_neige_mod, ONLY: fonte_neige_init
 #ifdef ISO
-  USE fonte_neige_mod,  ONLY : fonte_neige_init_iso
-  USE pbl_surface_mod,  ONLY : pbl_surface_init_iso
+  USE fonte_neige_mod,  ONLY: fonte_neige_init_iso
+  USE pbl_surface_mod,  ONLY: pbl_surface_init_iso
 #endif
     USE phys_state_var_mod
@@ -40,5 +40,5 @@
     USE mod_phys_lmdz_transfert_para, ONLY: bcast
     USE mod_grid_phy_lmdz
-    USE ioipsl_getin_p_mod, ONLY : getin_p
+    USE ioipsl_getin_p_mod, ONLY: getin_p
     USE phys_cal_mod , ONLY: calend, year_len_phy => year_len 
 #ifdef ISO
Index: LMDZ6/branches/Amaury_dev/libf/phylmdiso/phyetat0_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmdiso/phyetat0_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmdiso/phyetat0_mod.F90	(revision 5101)
@@ -11,15 +11,15 @@
 
   USE dimphy, only: klon, zmasq, klev
-  USE iophy, ONLY : init_iophy_new
-  USE ocean_cpl_mod,    ONLY : ocean_cpl_init
-  USE fonte_neige_mod,  ONLY : fonte_neige_init
-  USE pbl_surface_mod,  ONLY : pbl_surface_init
+  USE iophy, ONLY: init_iophy_new
+  USE ocean_cpl_mod,    ONLY: ocean_cpl_init
+  USE fonte_neige_mod,  ONLY: fonte_neige_init
+  USE pbl_surface_mod,  ONLY: pbl_surface_init
 #ifdef ISO
-  USE fonte_neige_mod,  ONLY : fonte_neige_init_iso
-  USE pbl_surface_mod,  ONLY : pbl_surface_init_iso
-#endif
-  USE phyetat0_get_mod, ONLY : phyetat0_get, phyetat0_srf
-  USE surface_data,     ONLY : type_ocean, version_ocean
-  USE phys_state_var_mod, ONLY : ancien_ok, clwcon, detr_therm, phys_tstep, &
+  USE fonte_neige_mod,  ONLY: fonte_neige_init_iso
+  USE pbl_surface_mod,  ONLY: pbl_surface_init_iso
+#endif
+  USE phyetat0_get_mod, ONLY: phyetat0_get, phyetat0_srf
+  USE surface_data,     ONLY: type_ocean, version_ocean
+  USE phys_state_var_mod, ONLY: ancien_ok, clwcon, detr_therm, phys_tstep, &
        qsol, fevap, z0m, z0h, agesno, &
        du_gwd_rando, du_gwd_front, entr_therm, f0, fm_therm, &
Index: LMDZ6/branches/Amaury_dev/libf/phylmdiso/phyredem.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmdiso/phyredem.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmdiso/phyredem.F90	(revision 5101)
@@ -10,6 +10,6 @@
 !-------------------------------------------------------------------------------
   USE dimphy, ONLY: klon, klev
-  USE fonte_neige_mod,  ONLY : fonte_neige_final
-  USE pbl_surface_mod,  ONLY : pbl_surface_final
+  USE fonte_neige_mod,  ONLY: fonte_neige_final
+  USE pbl_surface_mod,  ONLY: pbl_surface_final
   USE phys_state_var_mod, ONLY: radpas, zmasq, pctsrf,                       &
                                 ftsol, beta_aridity, delta_tsurf, falb_dir,  &
@@ -36,7 +36,7 @@
                                 wake_deltaxt                              
 #endif
-  USE geometry_mod, ONLY : longitude_deg, latitude_deg
+  USE geometry_mod, ONLY: longitude_deg, latitude_deg
   USE iostart, ONLY: open_restartphy, close_restartphy, enddef_restartphy, put_field, put_var
-  USE traclmdz_mod, ONLY : traclmdz_to_restart
+  USE traclmdz_mod, ONLY: traclmdz_to_restart
   USE infotrac_phy, ONLY: type_trac, nqtot, tracers, nbtr, niso
 #ifdef ISO
@@ -45,8 +45,8 @@
 #endif
 #endif
-  USE carbon_cycle_mod, ONLY : carbon_cycle_cpl, co2_send, carbon_cycle_rad, RCO2_glo
+  USE carbon_cycle_mod, ONLY: carbon_cycle_cpl, co2_send, carbon_cycle_rad, RCO2_glo
   USE indice_sol_mod, ONLY: nbsrf, is_oce, is_sic, is_ter, is_lic, epsfra
   USE surface_data, ONLY: type_ocean, version_ocean
-  USE ocean_slab_mod, ONLY : nslay, tslab, seaice, tice, fsic
+  USE ocean_slab_mod, ONLY: nslay, tslab, seaice, tice, fsic
   USE time_phylmdz_mod, ONLY: annee_ref, day_end, itau_phy, pdtphys
   use config_ocean_skin_m, only: activate_ocean_skin  
Index: LMDZ6/branches/Amaury_dev/libf/phylmdiso/phys_local_var_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmdiso/phys_local_var_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmdiso/phys_local_var_mod.F90	(revision 5101)
@@ -3,5 +3,5 @@
 
 MODULE phys_local_var_mod
-  USE lmdz_cppkeys_wrapper, ONLY : CPPKEY_STRATAER
+  USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_STRATAER
   ! Variables locales pour effectuer les appels en serie
   !======================================================================
@@ -798,7 +798,7 @@
   SUBROUTINE phys_local_var_init
     USE dimphy
-    USE infotrac_phy, ONLY : nbtr, nqtot
-#ifdef ISO
-USE infotrac_phy, ONLY : ntraciso=>ntiso,niso
+    USE infotrac_phy, ONLY: nbtr, nqtot
+#ifdef ISO
+USE infotrac_phy, ONLY: ntraciso=>ntiso,niso
 #endif
     USE aero_mod
Index: LMDZ6/branches/Amaury_dev/libf/phylmdiso/phys_output_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmdiso/phys_output_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmdiso/phys_output_mod.F90	(revision 5101)
@@ -4,5 +4,5 @@
   USE indice_sol_mod
   USE phys_output_var_mod
-  USE phys_output_write_mod, ONLY : phys_output_write
+  USE phys_output_write_mod, ONLY: phys_output_write
   REAL, DIMENSION(nfiles),SAVE :: ecrit_files
   USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_STRATAER
@@ -38,8 +38,8 @@
     USE strings_mod,  ONLY: maxlen
     USE ioipsl
-    USE phys_cal_mod, only : hour, calend
+    USE phys_cal_mod, ONLY: hour, calend
     USE mod_phys_lmdz_para
     !Martin
-    USE surface_data, ONLY : landice_opt
+    USE surface_data, ONLY: landice_opt
     USE phys_output_ctrlout_mod
     USE mod_grid_phy_lmdz, only: klon_glo,nbp_lon,nbp_lat
Index: LMDZ6/branches/Amaury_dev/libf/phylmdiso/physiq_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmdiso/physiq_mod.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmdiso/physiq_mod.F90	(revision 5101)
@@ -22,10 +22,10 @@
     USE ACAMA_GWD_rando_m, only: ACAMA_GWD_rando
     USE aero_mod
-    USE add_phys_tend_mod, only : add_pbl_tend, add_phys_tend, diag_phys_tend, prt_enerbil, &
+    USE add_phys_tend_mod, ONLY: add_pbl_tend, add_phys_tend, diag_phys_tend, prt_enerbil, &
          fl_ebil, fl_cor_ebil
     USE assert_m, only: assert
     USE change_srf_frac_mod
     USE conf_phys_m, only: conf_phys
-    USE carbon_cycle_mod, ONLY : infocfields_init, RCO2_glo, carbon_cycle_rad
+    USE carbon_cycle_mod, ONLY: infocfields_init, RCO2_glo, carbon_cycle_rad
     USE CFMIP_point_locations   ! IM stations CFMIP
     USE cmp_seri_mod
@@ -37,5 +37,5 @@
     USE ioipsl, only: histbeg, histvert, histdef, histend, histsync, &
          histwrite, ju2ymds, ymds2ju, getin
-    USE ioipsl_getin_p_mod, ONLY : getin_p
+    USE ioipsl_getin_p_mod, ONLY: getin_p
     USE indice_sol_mod
     USE infotrac_phy, ONLY: nqtot, nbtr, nqo, tracers, type_trac,ivap,iliq,isol
@@ -43,5 +43,5 @@
     USE strings_mod,  ONLY: strIdx
     USE iophy
-    USE limit_read_mod, ONLY : init_limit_read
+    USE limit_read_mod, ONLY: init_limit_read
     USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, nbp_lev, klon_glo, grid1dTo2d_glo, grid_type, unstructured
     USE mod_phys_lmdz_mpi_data, only: is_mpi_root
@@ -51,5 +51,5 @@
     USE open_climoz_m, only: open_climoz ! ozone climatology from a file
     USE ozonecm_m, only: ozonecm ! ozone of J.-F. Royer
-    USE pbl_surface_mod, ONLY : pbl_surface
+    USE pbl_surface_mod, ONLY: pbl_surface
     USE phyaqua_mod, only: zenang_an
     USE phyetat0_mod, only: phyetat0
@@ -57,5 +57,5 @@
     USE phys_cal_mod, only: year_len, mth_len, days_elapsed, jh_1jan, &
          year_cur, mth_cur,jD_cur, jH_cur, jD_ref, day_cur, hour, calend
-!!  USE phys_local_var_mod, ONLY : a long list of variables
+!!  USE phys_local_var_mod, ONLY: a long list of variables
 !!              ==> see below, after "CPP Keys" section
     USE phys_state_var_mod ! Variables sauvegardees de la physique
@@ -64,10 +64,10 @@
     USE print_control_mod, ONLY: mydebug=>debug , lunout, prt_level, &
          alert_first_call, call_alert, prt_alerte
-    USE readaerosol_mod, ONLY : init_aero_fromfile
-    USE readaerosolstrato_m, ONLY : init_readaerosolstrato
+    USE readaerosol_mod, ONLY: init_aero_fromfile
+    USE readaerosolstrato_m, ONLY: init_readaerosolstrato
     USE radlwsw_m, only: radlwsw
     USE regr_horiz_time_climoz_m, ONLY: regr_horiz_time_climoz
     USE regr_pr_time_av_m, only: regr_pr_time_av
-    USE surface_data,     ONLY : type_ocean, ok_veget
+    USE surface_data,     ONLY: type_ocean, ok_veget
     USE time_phylmdz_mod, only: current_time, itau_phy, pdtphys, raz_date, update_time
     USE tracinca_mod, ONLY: config_inca
@@ -77,20 +77,20 @@
     USE write_field_phy
     USE wxios, ONLY: g_ctx, wxios_set_context
-    USE lmdz_lscp, ONLY : lscp
-    USE lmdz_call_cloud_optics_prop, ONLY : call_cloud_optics_prop
-    USE lmdz_lscp_old, ONLY : fisrtilp
-    USE lmdz_call_blowing_snow, ONLY : call_blowing_snow_sublim_sedim
-    USE lmdz_wake_ini, ONLY : wake_ini
-    USE yamada_ini_mod, ONLY : yamada_ini
-    USE lmdz_atke_turbulence_ini, ONLY : atke_ini
-    USE lmdz_thermcell_ini, ONLY : thermcell_ini, iflag_thermals_tenv
-    USE lmdz_thermcell_dtke, ONLY : thermcell_dtke
-    USE lmdz_blowing_snow_ini, ONLY : blowing_snow_ini , qbst_bs 
-    USE lmdz_lscp_ini, ONLY : lscp_ini
-    USE lmdz_ratqs_main, ONLY : ratqs_main
-    USE lmdz_ratqs_ini, ONLY : ratqs_ini
-    USE lmdz_cloud_optics_prop_ini, ONLY : cloud_optics_prop_ini
-    USE phys_output_var_mod, ONLY :      cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv
-    USE phys_output_var_mod, ONLY : cloud_cover_sw, cloud_cover_sw_s2
+    USE lmdz_lscp, ONLY: lscp
+    USE lmdz_call_cloud_optics_prop, ONLY: call_cloud_optics_prop
+    USE lmdz_lscp_old, ONLY: fisrtilp
+    USE lmdz_call_blowing_snow, ONLY: call_blowing_snow_sublim_sedim
+    USE lmdz_wake_ini, ONLY: wake_ini
+    USE yamada_ini_mod, ONLY: yamada_ini
+    USE lmdz_atke_turbulence_ini, ONLY: atke_ini
+    USE lmdz_thermcell_ini, ONLY: thermcell_ini, iflag_thermals_tenv
+    USE lmdz_thermcell_dtke, ONLY: thermcell_dtke
+    USE lmdz_blowing_snow_ini, ONLY: blowing_snow_ini , qbst_bs
+    USE lmdz_lscp_ini, ONLY: lscp_ini
+    USE lmdz_ratqs_main, ONLY: ratqs_main
+    USE lmdz_ratqs_ini, ONLY: ratqs_ini
+    USE lmdz_cloud_optics_prop_ini, ONLY: cloud_optics_prop_ini
+    USE phys_output_var_mod, ONLY:      cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv
+    USE phys_output_var_mod, ONLY: cloud_cover_sw, cloud_cover_sw_s2
     USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA
 
@@ -109,5 +109,5 @@
         USE phytracr_spl_mod, ONLY: phytracr_spl, phytracr_spl_out_init
     USE phys_output_write_spl_mod
-    USE phytrac_mod, ONLY : phytrac_init, phytrac
+    USE phytrac_mod, ONLY: phytrac_init, phytrac
     USE phys_output_write_mod
 
@@ -125,6 +125,6 @@
 
 #ifdef CPP_RRTM
-    USE YOERAD, ONLY : NRADLP
-!    USE YOESW, ONLY : RSUN
+    USE YOERAD, ONLY: NRADLP
+!    USE YOESW, ONLY: RSUN
 #endif
 
@@ -175,5 +175,5 @@
 !!!!!!!!!!!!!!!!!!  END "USE" for CPP keys !!!!!!!!!!!!!!!!!!!!!!
 
-USE physiqex_mod, ONLY : physiqex
+USE physiqex_mod, ONLY: physiqex
 USE phys_local_var_mod, ONLY: phys_local_var_init, phys_local_var_end, &
        ! [Variables internes non sauvegardees de la physique]
Index: LMDZ6/branches/Amaury_dev/libf/phylmdiso/reevap.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmdiso/reevap.F90	(revision 5100)
+++ LMDZ6/branches/Amaury_dev/libf/phylmdiso/reevap.F90	(revision 5101)
@@ -3,5 +3,5 @@
 
     ! flag to include modifications to ensure energy conservation (if flag >0)
-    USE add_phys_tend_mod, only : fl_cor_ebil
+    USE add_phys_tend_mod, ONLY: fl_cor_ebil
 #ifdef ISO
     USE infotrac_phy, ONLY: ntiso,nqtot,ivap,iliq,isol,iqWIsoPha
