Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/bl_for_dms.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/bl_for_dms.F	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/bl_for_dms.F	(revision 5103)
@@ -9,5 +9,5 @@
 c Monin-Obukhov (obklen), necessaires pour calculer les flux de DMS
 c par la methode de Nightingale.
-c Cette subroutine est plus que fortement inspiree de la subroutine
+c Cette SUBROUTINE est plus que fortement inspiree de la subroutine
 c 'nonlocal' dans clmain.F .
 c reference :  Holtslag, A.A.M., and B.A. Boville, 1993:
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/coarsemission.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/coarsemission.F	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/coarsemission.F	(revision 5103)
@@ -1,3 +1,3 @@
-c This subroutine calculates the emissions of SEA SALT and DUST, part of
+c This SUBROUTINE calculates the emissions of SEA SALT and DUST, part of
 C which goes to tracer 2 and other part to tracer 3.
       SUBROUTINE coarsemission(pctsrf,pdtphys,
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/deposition.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/deposition.F	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/deposition.F	(revision 5103)
@@ -1,5 +1,5 @@
 c Subroutine that estimates the Deposition velocities and the depostion
 C for the different tracers
-      subroutine deposition(vdep_oce,vdep_sic,vdep_ter,vdep_lic,pctsrf,
+      SUBROUTINE deposition(vdep_oce,vdep_sic,vdep_ter,vdep_lic,pctsrf,
      .                      zrho,zdz,pdtphys,RHcl,masse,t_seri,pplay,
      .                      paprs,lminmax,qmin,qmax,
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/dustemission_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/dustemission_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/dustemission_mod.F90	(revision 5103)
@@ -38,5 +38,5 @@
 !  real   , parameter :: cd=1.*roa/gravity
 ! new values
-!  logical, parameter :: ok_splatuning=.true.
+!  logical, parameter :: ok_splatuning=.TRUE.
 ! Div=3 from S. Alfaro (Sow et al ACPD 2011)
 !JE 20150206
@@ -158,5 +158,5 @@
     USE dimphy
 
-    !AS: moved here from subroutine initdust
+    !AS: moved here from SUBROUTINE initdust
     ALLOCATE( m1dflux(klon) )
     ALLOCATE( m2dflux(klon) )
@@ -345,6 +345,6 @@
 !$OMP THREADPRIVATE(iminacclow,iminacchigh,imincoalow,imincoahigh)
 
-writeaerosoldistrib=.false.
-if (debutphy) then
+writeaerosoldistrib=.FALSE.
+IF (debutphy) then
 
   if (sizedustmin>sizeacclow .or. sizedustmax<sizescohigh) then 
@@ -379,5 +379,5 @@
    endif
   enddo
-if (writeaerosoldistrib) then
+IF (writeaerosoldistrib) then
 !JEdbg<<
   do j=1,klon
@@ -385,6 +385,6 @@
     itvmean(j,i)=(itv(i)+itv(i+1))/2.
     itv2(j,i)=itv(i)
-    !print*, itv(i),itvmean(i),itv(i+1)
-    !print*, sizedust(i)
+    !PRINT*, itv(i),itvmean(i),itv(i+1)
+    !PRINT*, sizedust(i)
   enddo
   itv2(j,nbins+1)=itv(nbins+1)
@@ -415,6 +415,6 @@
   counter1=0
 !JEdbg>>
-endif
-endif
+END IF
+END IF
 
 
@@ -423,12 +423,12 @@
 
 ! estimate and integrate bins into only accumulation and coarse
-do k=1,klon
+DO k=1,klon
   basesumacc(k)=basesumemission*(pctsrf(k,is_ter))*1.e-6 ! from mg/m2/s
   basesumcoa(k)=basesumemission*(pctsrf(k,is_ter))*1.e-6
   basesumsco(k)=basesumemission*(pctsrf(k,is_ter))*1.e-6
-enddo
-
-
-do k=1,klon
+END DO
+
+
+DO k=1,klon
 auxr1=0.0
 auxr2=0.0
@@ -446,5 +446,5 @@
   enddo
   emdustsco(k)=(auxr3 + basesumsco(k))*tuningfactorsco
-enddo
+END DO
 
 
@@ -468,5 +468,5 @@
 
 !JEdbg<<
-if (writeaerosoldistrib) then
+IF (writeaerosoldistrib) then
   do i=1,nbins
     do j=1,klon
@@ -478,5 +478,5 @@
 ! 1440 = 15 days
 ! 480 = 5 days
-if (MOD(counter,1440)== 0) THEN
+IF (MOD(counter,1440)== 0) THEN
    !if (MOD(counter,480).eq. 0) THEN
    do k = 1,klon
@@ -499,7 +499,7 @@
      enddo
    enddo
-endif
+END IF
 counter=counter+1
-endif
+END IF
 !JEdbg>>
 
@@ -700,5 +700,5 @@
 
 ! print *,'JEOK2',mpi_rank,omp_rank
-if ( 1==1 ) then
+IF ( 1==1 ) then
 
 ! print *,'JEOK4',mpi_rank,omp_rank
@@ -717,5 +717,5 @@
 !print *,'JEOK6',mpi_rank,omp_rank
 
-endif
+END IF
 
   !CALL abort_gcm('initdustemission', 'OK1',1)
@@ -741,5 +741,5 @@
 !     WRITE(18,*)i,alfa(i)
   END DO
-!     print*,'solspe(14,10)= ',solspe(14,10)
+!     PRINT*,'solspe(14,10)= ',solspe(14,10)
   CLOSE(10)
 ENDIF
@@ -761,13 +761,13 @@
       enddo
 30   continue
-      print*,'IK5'
+      PRINT*,'IK5'
       ncl=i-1
-      print*,'   soil size classes used   ',ncl,' / ',nclass
-      print*,'   soil size min: ',sizeclass(1),' soil size max: ',sizeclass(ncl)
+      PRINT*,'   soil size classes used   ',ncl,' / ',nclass
+      PRINT*,'   soil size min: ',sizeclass(1),' soil size max: ',sizeclass(ncl)
       if(ncl>nclass)stop
 
 ! Threshold velocity:
-if (.false.) then
-!if (.true.) then
+IF (.FALSE.) then
+!if (.TRUE.) then
 !c 0: Iversen and White 1982
        print *,'Using  Iversen and White 1982 Uth'
@@ -785,6 +785,6 @@
             endif
          enddo
-endif
-if(.true.) then
+END IF
+IF(.TRUE.) then
 ! 1: Shao and Lu 2000
        print *,'Using  Shao and Lu 2000 Uth'
@@ -797,5 +797,5 @@
                uth(i)=sqrt(an*(x1+x2))
             enddo
-endif
+END IF
 
 
@@ -849,16 +849,16 @@
        do i=1,klon
           do k=1,ntyp
-     !     print*,'IKKK ',i,klon,k,ntyp
+     !     PRINT*,'IKKK ',i,klon,k,ntyp
              if (zos(i,k)==0..or.z01(i,k)==0.) then
      !       if (zos(i,k)<=0..or.z01(i,k)<=0.) then
 !              if (zos(i,k)<0..or.z01(i,k)<0.) then
-     !            print*,'INI DUST WARNING zos ou z01<0',zos(i,k),z01(i,k)
+     !            PRINT*,'INI DUST WARNING zos ou z01<0',zos(i,k),z01(i,k)
 !              endif
               feff(i,k)=0.
               feffdbg(i,k)=0.
- !         print*,'IKKK A ',i,klon,k,ntyp
+ !         PRINT*,'IKKK A ',i,klon,k,ntyp
             else
 ! drag partition betzeen the erodable surface and zo1
-     !     print*,'IKKK B0 ',i,klon,k,ntyp,z01(i,k),zos(i,k),xeff,aeff
+     !     PRINT*,'IKKK B0 ',i,klon,k,ntyp,z01(i,k),zos(i,k),xeff,aeff
               aa=log(z01(i,k)/zos(i,k))
               tmp1(i,k)=aa
@@ -866,15 +866,15 @@
               cc=1.-aa/bb
               feffdbg(i,k)=cc
-       !   print*,'IKKK B1 ',i,klon,k,ntyp
+       !   PRINT*,'IKKK B1 ',i,klon,k,ntyp
 ! drag partition between zo1 and zo2
 ! feff: total efficient fraction
               if(D(i,k)==0.)then
                  feff(i,k)=cc
-   !       print*,'IKKK C ',i,klon,k,ntyp
+   !       PRINT*,'IKKK C ',i,klon,k,ntyp
               else
                  dd=log(z02(i,k)/z01(i,k))
                  ee=log(aeff*(D(i,k)/z01(i,k))**0.8)
                  feff(i,k)=(1.-dd/ee)*cc
-   !       print*,'IKKK D ',i,klon,k,ntyp
+   !       PRINT*,'IKKK D ',i,klon,k,ntyp
               endif
               if (feff(i,k)<0.)feff(i,k)=0.
@@ -882,5 +882,5 @@
               if (feff(i,k)>1.)feff(i,k)=1.
               if (feffdbg(i,k)>1.)feffdbg(i,k)=1.
-    !      print*,'IKKK E ',i,klon,k,ntyp
+    !      PRINT*,'IKKK E ',i,klon,k,ntyp
             endif
           enddo
@@ -898,10 +898,10 @@
 
 
-if (1==1) then
+IF (1==1) then
 !  !  CALL writefield_phy("AA",tmp1(1:klon,1:5),5)
 
     CALL writefield_phy("REPART5",feff(1:klon,1:5),5)
     CALL writefield_phy("REPART5dbg",feffdbg(1:klon,1:5),5)
-endif
+END IF
 
 
@@ -919,5 +919,5 @@
 
 
-!  if (.false.) then
+!  if (.FALSE.) then
 !!**************L718
 
@@ -983,5 +983,5 @@
 !     END DO
 ! 50  CONTINUE
-!print*,'IK10'
+!PRINT*,'IK10'
 !! building the optimized distribution
 !  logvdISOGRAD(1)=log(vdHR(1))
@@ -1027,5 +1027,5 @@
 ! 60  CONTINUE
 !  END DO
-!print*,'IK11'
+!PRINT*,'IK11'
 !  binsISOGRAD(nbinsout)=binsHR(nbinsHR)
 !  vdISOGRAD(nbinsout)=vdHR(nbinsHR)
@@ -1242,5 +1242,5 @@
 
                  !IF(n.eq.1.and.nat.eq.99)GOTO 80
-             !      if(n.eq.1) print*,'nat1=',nat,'sol1=',sol(i,n)
+             !      if(n.eq.1) PRINT*,'nat1=',nat,'sol1=',sol(i,n)
                    IF(n==1.and.nat==99)GOTO 80
 
@@ -1270,5 +1270,5 @@
 
                    IF(ustarsalt<umin/ceff)GOTO 80
-!                      print*,'ustarsalt = ',ustarsalt
+!                      PRINT*,'ustarsalt = ',ustarsalt
 !----------------------------------------
                     CALL def_copyncl(kfin)
@@ -1382,10 +1382,10 @@
          dsmin=var3a*(ustarsalt**(-2./3.))
          dsmax=var3b*(ustarsalt**(-2./3.))
-!      print*,'ustarsalt = ',ustarsalt,'dsmin=',dsmin,'dsmax=',dsmax
+!      PRINT*,'ustarsalt = ',ustarsalt,'dsmin=',dsmin,'dsmax=',dsmax
 ! dichotomy
          CALL def_dichotomy(sizeclass,nclass,1,ncl,dsmin,ideb)
-   !      print*,'ideb = ',ideb
+   !      PRINT*,'ideb = ',ideb
          CALL def_dichotomy(sizeclass,nclass,ideb,ncl,dsmax,ifin)
-   !      print*,'ifin = ',ifin
+   !      PRINT*,'ifin = ',ifin
 ! readaptation of large sizes particles
          kfin=0
@@ -1396,5 +1396,5 @@
             srel2(nat,kfin)=srel(nat,i)
          enddo
-  !          print*,'je suis la'
+  !          PRINT*,'je suis la'
          kfin2=kfin
          istep=50
@@ -1406,5 +1406,5 @@
          enddo
          if(kfin>=nclass)then
-            print*,'$$$$ Tables dimension problem:',kfin,'>',nclass
+            PRINT*,'$$$$ Tables dimension problem:',kfin,'>',nclass
          endif
 !---------------        
@@ -1419,5 +1419,5 @@
 !--------------------------------------------------------------------------------------
 
-subroutine def_dichotomy(siz,nclass,i1,i2,ds,iout)
+SUBROUTINE def_dichotomy(siz,nclass,i1,i2,ds,iout)
 !c---------------------------------------------------------------
 !c 'size' is the table to scan
@@ -1450,8 +1450,8 @@
  52   continue
       if(iout==0)then
-        print*,'$$$$ Tables dimension problem: ',iout
+        PRINT*,'$$$$ Tables dimension problem: ',iout
       endif
 
-      end subroutine def_dichotomy
+      END SUBROUTINE  def_dichotomy
 
 !--------------------------------------------------------------------------------------
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/finemission.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/finemission.F	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/finemission.F	(revision 5103)
@@ -1,3 +1,3 @@
-C This subroutine calculates the emissions of BLACK CARBON and ORGANIC
+C This SUBROUTINE calculates the emissions of BLACK CARBON and ORGANIC
 C MATTER
       SUBROUTINE finemission(zdz,pdtphys,zalt,kminbc,kmaxbc,
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/lsc_scav_orig.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/lsc_scav_orig.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/lsc_scav_orig.F90	(revision 5103)
@@ -50,5 +50,5 @@
 
 !  variables locales      
- LOGICAL,SAVE :: debut=.true.
+ LOGICAL,SAVE :: debut=.TRUE.
 !$OMP THREADPRIVATE(debut)
 
@@ -96,10 +96,10 @@
   IF (debut) THEN
 
-!  inscav_fisrt=.true.
+!  inscav_fisrt=.TRUE.
 !  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
+!   PRINT*,'beta from fisrtilp.F90, beta = (z_cond - z_oliq)/z_cond, inscav_fisrt=',inscav_fisrt
 !  else
-!   print*,'beta from Reddy and Bocuher 2004 (original version), inscav_fisrt=',inscav_fisrt
+!   PRINT*,'beta from Reddy and Bocuher 2004 (original version), inscav_fisrt=',inscav_fisrt
 !  endif
 
@@ -128,11 +128,11 @@
 !9999  Continue
 
-!   print*,'alpha_r',alpha_r
-!   print*,'alpha_s',alpha_s
-!   print*,'R_r',R_r
-!   print*,'R_s',R_s
-!   print*,'frac_fine_scav',frac_fine_scav
-!   print*,'frac_coar_scav',frac_coar_scav
-!   print*,'frac_aer ev',frac_aer
+!   PRINT*,'alpha_r',alpha_r
+!   PRINT*,'alpha_s',alpha_s
+!   PRINT*,'R_r',R_r
+!   PRINT*,'R_s',R_s
+!   PRINT*,'frac_fine_scav',frac_fine_scav
+!   PRINT*,'frac_coar_scav',frac_coar_scav
+!   PRINT*,'frac_aer ev',frac_aer
 
 ! JE endcomment
@@ -255,5 +255,5 @@
        his_dh(i)=0.
       endif
-!      print*,  k, 'beta_ev',beta_ev
+!      PRINT*,  k, 'beta_ev',beta_ev
 ! remove tracers from precipitation owing to release by evaporation in his_dh
 !!      dxev=frac_ev*deltaP(i,k)*pdtime * his_dh(i) /(zrho(i,k)*zdz(i,k))
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/lsc_scav_spl.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/lsc_scav_spl.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/lsc_scav_spl.F90	(revision 5103)
@@ -53,5 +53,5 @@
 
 !  variables locales      
- LOGICAL,SAVE :: debut=.true.
+ LOGICAL,SAVE :: debut=.TRUE.
 !$OMP THREADPRIVATE(debut)
 
@@ -106,10 +106,10 @@
   IF (debut) THEN
 
-!  inscav_fisrt=.true.
+!  inscav_fisrt=.TRUE.
 !  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
+!   PRINT*,'beta from fisrtilp.F90, beta = (z_cond - z_oliq)/z_cond, inscav_fisrt=',inscav_fisrt
 !  else
-!   print*,'beta from Reddy and Bocuher 2004 (original version), inscav_fisrt=',inscav_fisrt
+!   PRINT*,'beta from Reddy and Bocuher 2004 (original version), inscav_fisrt=',inscav_fisrt
 !  endif
 
@@ -138,11 +138,11 @@
 !9999  Continue
 
-!   print*,'JE alpha_r',alpha_r
-!   print*,'JE alpha_s',alpha_s
-!   print*,'JE R_r',R_r
-!   print*,'JE R_s',R_s
-!   print*,'frac_fine_scav',frac_fine_scav
-!   print*,'frac_coar_scav',frac_coar_scav
-!   print*,'frac_aer ev',frac_aer
+!   PRINT*,'JE alpha_r',alpha_r
+!   PRINT*,'JE alpha_s',alpha_s
+!   PRINT*,'JE R_r',R_r
+!   PRINT*,'JE R_s',R_s
+!   PRINT*,'frac_fine_scav',frac_fine_scav
+!   PRINT*,'frac_coar_scav',frac_coar_scav
+!   PRINT*,'frac_aer ev',frac_aer
 
 ! JE endcomment
@@ -266,5 +266,5 @@
        his_dh(i)=0.
       endif
-!      print*,  k, 'beta_ev',beta_ev
+!      PRINT*,  k, 'beta_ev',beta_ev
 ! remove tracers from precipitation owing to release by evaporation in his_dh
 !!      dxev=frac_ev*deltaP(i,k)*pdtime * his_dh(i) /(zrho(i,k)*zdz(i,k))
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/minmaxqfi2.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/minmaxqfi2.F	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/minmaxqfi2.F	(revision 5103)
@@ -1,3 +1,3 @@
-      subroutine minmaxqfi2(zq,qmin,qmax,comment)
+      SUBROUTINE minmaxqfi2(zq,qmin,qmax,comment)
 c
       USE dimphy
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/minmaxsource.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/minmaxsource.F	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/minmaxsource.F	(revision 5103)
@@ -1,3 +1,3 @@
-      subroutine minmaxsource(zq,qmin,qmax,comment)
+      SUBROUTINE minmaxsource(zq,qmin,qmax,comment)
 
       USE dimphy
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/neutral.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/neutral.F	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/neutral.F	(revision 5103)
@@ -1,7 +1,7 @@
 c*********************************************************************** 
-	subroutine neutral(u10_mps,ustar_mps,obklen_m,
+	SUBROUTINE neutral(u10_mps,ustar_mps,obklen_m,
      +         u10n_mps	)
 c-----------------------------------------------------------------------	
-c subroutine to compute u10 neutral wind speed
+c SUBROUTINE to compute u10 neutral wind speed
 c inputs
 c	u10_mps - wind speed at 10 m (m/s)
@@ -18,5 +18,5 @@
 c Current Theory, Geernaert and W.J. Plant, editors, Kluwer Academic
 c Publishers, Boston, MA, 1990.
-c subroutine written Feb 2001 by eg chapman
+c SUBROUTINE written Feb 2001 by eg chapman
 c adapted to LMD-ZT by E. Cosme 310801
 c Following Will Shaw (PNL, Seattle) the theory applied for flux
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 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/phys_output_write_spl_mod.F90	(revision 5103)
@@ -89,6 +89,6 @@
        d_t, qx, d_qx, d_tr_dyn, zmasse, flag_aerosol, flag_aerosol_strat, ok_cdnc)
 
-    ! This subroutine does the actual writing of diagnostics that were
-    ! defined and initialised mainly in phytracr_spl_mod.F90 (SPLA tracers, subroutine phytracr_spl_out_init)
+    ! This SUBROUTINE does the actual writing of diagnostics that were
+    ! defined and initialised mainly in phytracr_spl_mod.F90 (SPLA tracers, SUBROUTINE phytracr_spl_out_init)
 
     USE dimphy, ONLY: klon, klev, klevp1
@@ -828,5 +828,4 @@
        !       ENDIF
 
-#ifdef CPP_IOIPSL
   IF (.NOT. using_xios) THEN
     IF (.NOT.ok_all_xml) THEN
@@ -836,5 +835,5 @@
            ll=0
             DO k=1, nlevSTD
-               bb2=clevSTD(k) 
+               bb2=clevSTD(k)
                IF (bb2.EQ."850".OR.bb2.EQ."700".OR. &
                     bb2.EQ."500".OR.bb2.EQ."200".OR. &
@@ -856,5 +855,4 @@
     ENDIF
   ENDIF !.NOT.using_xios
-#endif
 
   IF (using_xios) THEN
@@ -1470,8 +1468,7 @@
        ENDIF
 !!!!!!!!!!!! Sorties niveaux de pression NMC !!!!!!!!!!!!!!!!!!!!
-#ifdef CPP_IOIPSL
 
   IF (.NOT. using_xios) THEN
-    IF (.NOT.ok_all_xml) THEN 
+    IF (.NOT.ok_all_xml) THEN
          ! ATTENTION, LES ANCIENS HISTWRITE ONT ETES CONSERVES EN ATTENDANT MIEUX:
          ! Champs interpolles sur des niveaux de pression
@@ -1541,5 +1538,4 @@
     ENDIF
   ENDIF
-#endif
 
 IF (using_xios) THEN
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/phytracr_spl_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/phytracr_spl_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/phytracr_spl_mod.F90	(revision 5103)
@@ -89,5 +89,5 @@
   !$OMP THREADPRIVATE(tsol)
   INTEGER :: ijulday
-  LOGICAL, parameter :: edgar = .true.
+  LOGICAL, parameter :: edgar = .TRUE.
   INTEGER, parameter :: flag_dms = 4
   INTEGER(kind = 4)  nbjour
@@ -424,5 +424,5 @@
   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
 
@@ -690,5 +690,5 @@
     !AS: IF permettant le debranchage des coefs de Jeronimo Escribano: fichiers *_meta
     ! nbreg_* sont initialisés à 1 dans phytracr_spl, if debutphy,
-    ! avant d'appeler la subroutine presente, phytracr_spl_ini
+    ! avant d'appeler la SUBROUTINE presente, phytracr_spl_ini
     ! (phytracr_spl_ini appele readregionsdims2_spl,
     ! qui lit et fait "bcast" de nbreg_ind,_bb,_dust,_wstardust dans fichiers regions_*_meta)
@@ -750,5 +750,5 @@
     !temporal hardcoded null inicialization of assimilation emmision factors
     !AS: scale_param sont ensuite lus dans modvalues.nc
-    ! par la subroutine read_scalenc, appelee par readscaleparamsnc_spl
+    ! par la SUBROUTINE read_scalenc, appelee par readscaleparamsnc_spl
     scale_param_ssacc = 1.
     scale_param_sscoa = 1.
@@ -1113,6 +1113,6 @@
     CHARACTER*2 str2
     !!AS:      LOGICAL ok_histrac
-    !!!JE2014124      PARAMETER (ok_histrac=.true.)
-    !!      PARAMETER (ok_histrac=.false.)
+    !!!JE2014124      PARAMETER (ok_histrac=.TRUE.)
+    !!      PARAMETER (ok_histrac=.FALSE.)
     INTEGER ndex2d(iim * (jjm + 1)), ndex3d(iim * (jjm + 1) * klev)
     INTEGER nhori1, nhori2, nhori3, nhori4, nhori5, nvert
@@ -1144,10 +1144,10 @@
     LOGICAL convection, lessivage, lminmax, lcheckmass
     DATA convection, lessivage, lminmax, lcheckmass &
-            /.true., .true., .true., .false./
+            /.TRUE., .TRUE., .TRUE., .FALSE./
 
     REAL xconv(nbtr)
 
     LOGICAL anthropo, bateau, edgar
-    DATA anthropo, bateau, edgar/.true., .true., .true./
+    DATA anthropo, bateau, edgar/.TRUE., .TRUE., .TRUE./
 
     !c bc_source
@@ -1357,6 +1357,6 @@
 
     ! computing time
-    !        logitime=.true.
-    logitime = .false.
+    !        logitime=.TRUE.
+    logitime = .FALSE.
     IF (logitime) THEN
       clock_start = 0
@@ -1371,5 +1371,5 @@
 
     ! Definition of tracers index.
-    print*, 'OK ON PASSSE BIEN LA'
+    PRINT*, 'OK ON PASSSE BIEN LA'
     CALL minmaxsource(source_tr, qmin, qmax, 'A1 maxsource init phytracr')
 
@@ -1520,5 +1520,5 @@
     !vdep_lic = (/0.2, 0.17, 1.2, 1.2/)
 
-    iscm3 = .false.
+    iscm3 = .FALSE.
     if (debutphy) then
       !$OMP MASTER
@@ -2023,5 +2023,5 @@
       ENDDO
     ENDDO
-    iscm3 = .true.
+    iscm3 = .TRUE.
 
     !=======================================================================
@@ -2137,9 +2137,9 @@
          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
-         print*,'scale_param_bb,scale_param_ind',scale_param_bb,scale_param_ind
-         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
+         PRINT*,'fracso2emis,frach2sofso2,bateau',fracso2emis,frach2sofso2,bateau
+         PRINT*,'kminbc,kmaxbc,pdtphys',kminbc,kmaxbc,pdtphys
+         PRINT*,'scale_param_bb,scale_param_ind',scale_param_bb,scale_param_ind
+         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)
@@ -2164,5 +2164,5 @@
 
 
-    print*, 'ON PASSE DANS precuremission'
+    PRINT*, 'ON PASSE DANS precuremission'
     CALL precuremission(ftsol, u10m_ec, v10m_ec, pctsrf, &
             u_seri, v_seri, paprs, pplay, cdragh, cdragm, &
@@ -2277,5 +2277,5 @@
       ENDDO
     ENDDO
-    iscm3 = .false.
+    iscm3 = .FALSE.
     !----------------------------
     IF (lminmax) THEN
@@ -2405,5 +2405,5 @@
 
 #ifdef IOPHYS_DUST
-      print*,'iflag_conv=',iflag_conv
+      PRINT*,'iflag_conv=',iflag_conv
       CALL iophys_ecrit('coefh',klev,'coefh','',coefh)
       CALL iophys_ecrit('yu1',1,'yu1','',yu1)
@@ -2554,5 +2554,5 @@
       ENDDO
     ENDDO !--end itr loop
-    iscm3 = .true.
+    iscm3 = .TRUE.
     !--------------------------------------
     print *, ' BEFORE Sediment'
@@ -2629,5 +2629,5 @@
       ENDDO
     ENDDO
-    iscm3 = .false.
+    iscm3 = .FALSE.
 
 
@@ -2715,5 +2715,5 @@
         ENDDO
       ENDDO
-      iscm3 = .true.
+      iscm3 = .TRUE.
       !------------------------------
 
@@ -2748,5 +2748,5 @@
         IF (iflag_conv==2) THEN
           ! Tiedke
-          CALL incloud_scav(.false., qmin, qmax, masse, henry, kk, prfl, &
+          CALL incloud_scav(.FALSE., qmin, qmax, masse, henry, kk, prfl, &
                   psfl, pmflxr, pmflxs, zrho, zdz, t_seri, pdtphys, &
                   his_dhlsc, his_dhcon, tr_seri)
@@ -2755,5 +2755,5 @@
           !        ELSE IF (iflag_conv.GE.3) THEN
 
-          !      CALL incloud_scav_lsc(.false.,qmin,qmax,masse,henry,kk,prfl,
+          !      CALL incloud_scav_lsc(.FALSE.,qmin,qmax,masse,henry,kk,prfl,
           !     .                  psfl,pmflxr,pmflxs,zrho,zdz,t_seri,pdtphys,
           !     .                                     his_dhlsc,his_dhcon,tr_seri)
@@ -2786,5 +2786,5 @@
           ! Tiedke
 
-          CALL blcloud_scav(.false., qmin, qmax, pdtphys, prfl, psfl, &
+          CALL blcloud_scav(.FALSE., qmin, qmax, pdtphys, prfl, psfl, &
                   pmflxr, pmflxs, zdz, alpha_r, alpha_s, masse, &
                   his_dhbclsc, his_dhbccon, tr_seri)
@@ -2796,5 +2796,5 @@
           !        ELSE IF (iflag_conv.GE.3) THEN
 
-          !      CALL blcloud_scav_lsc(.false.,qmin,qmax,pdtphys,prfl,psfl,
+          !      CALL blcloud_scav_lsc(.FALSE.,qmin,qmax,pdtphys,prfl,psfl,
           !     .                  pmflxr,pmflxs,zdz,alpha_r,alpha_s,masse,
           !     .                                  his_dhbclsc,his_dhbccon,tr_seri)
@@ -2836,5 +2836,5 @@
         ENDDO
       ENDDO
-      iscm3 = .false.
+      iscm3 = .FALSE.
 
       IF (logitime) THEN
@@ -2893,5 +2893,5 @@
         ! Tiedke
         CALL trconvect(pplay, t_seri, pdtphys, pmfu, pmfd, pen_u, pde_u, &
-                pen_d, pde_d, paprs, zdz, xconv, qmin, qmax, .false., masse, &
+                pen_d, pde_d, paprs, zdz, xconv, qmin, qmax, .FALSE., masse, &
                 dtrconv, tr_seri)
         DO itr = 1, nbtr
@@ -2996,5 +2996,5 @@
             IF (lcheckmass) THEN
               CALL checkmass(d_tr_cv(:, :, itr), RNAVO, masse(itr), zdz, &
-                      pplay, t_seri, .false., 'd_tr_cv:')
+                      pplay, t_seri, .FALSE., 'd_tr_cv:')
             ENDIF
           ENDIF
@@ -3089,5 +3089,5 @@
         ! choix du lessivage
         IF (iflag_lscav == 3 .OR. iflag_lscav == 4) THEN
-          !IF (.false.) THEN  ! test #DFB (Binta) sans lsc_scav_spl
+          !IF (.FALSE.) THEN  ! test #DFB (Binta) sans lsc_scav_spl
           print *, 'JE iflag_lscav', iflag_lscav
           DO itr = 1, nbtr
@@ -3197,5 +3197,5 @@
       ENDDO
     ENDDO
-    iscm3 = .true.
+    iscm3 = .TRUE.
 
     ! Computing burden in mg/m2
@@ -3463,5 +3463,5 @@
       ENDDO
     ENDDO
-    iscm3 = .false.
+    iscm3 = .FALSE.
 
 
@@ -4197,5 +4197,5 @@
       tia_nophytracr = tia_nophytracr + REAL(ti_nophytracr) / REAL(clock_rate)
       print *, 'Time outside phytracr; Time accum outside phytracr'
-      print*, REAL(ti_nophytracr) / REAL(clock_rate), tia_nophytracr
+      PRINT*, REAL(ti_nophytracr) / REAL(clock_rate), tia_nophytracr
 
       clock_start_outphytracr = clock_end
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/read_newemissions.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/read_newemissions.F	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/read_newemissions.F	(revision 5103)
@@ -1,5 +1,5 @@
 C Routine to read the emissions of the different species
 C
-      subroutine read_newemissions(julien, jH_emi ,edgar, flag_dms,
+      SUBROUTINE read_newemissions(julien, jH_emi ,edgar, flag_dms,
      I                             debutphy, 
      I                             pdtphys,lafinphy, nbjour, pctsrf,
@@ -157,8 +157,8 @@
         test_vent=0
         test_day=0
-        CALL read_vent(.true.,step_vent,nbjour,u10m_ec2,v10m_ec2)
+        CALL read_vent(.TRUE.,step_vent,nbjour,u10m_ec2,v10m_ec2)
         print *,'Read (debut) dust emissions: step_vent,julien,nbjour', 
      .                                   step_vent,julien,nbjour
-        CALL read_dust(.true.,step_vent,nbjour,dust_ec2)
+        CALL read_dust(.TRUE.,step_vent,nbjour,dust_ec2)
 C Threshold velocity map
 !$OMP MASTER
@@ -208,9 +208,9 @@
         step_vent=step_vent+1
         !PRINT *,'step_vent=', step_vent
-        CALL read_vent(.false.,step_vent,nbjour,u10m_ec2,v10m_ec2)
+        CALL read_vent(.FALSE.,step_vent,nbjour,u10m_ec2,v10m_ec2)
         print *,'Reading dust emissions: step_vent, julien, nbjour ', 
      .                                   step_vent, julien, nbjour
         !print *,'test_vent, julien = ',test_vent, julien
-        CALL read_dust(.false.,step_vent,nbjour,dust_ec2)
+        CALL read_dust(.FALSE.,step_vent,nbjour,dust_ec2)
       
       ENDIF !--test_vent
@@ -224,7 +224,7 @@
       tau_2=(jH_vent-jH_init)*24./(vent_resol)
       tau_1=1.-tau_2
-!      print*,'JEdec jHv,JHi,ventres',jH_vent,jH_init,vent_resol
-!      print*,'JEdec tau2,tau1',tau_2,tau_1
-!      print*,'JEdec step_vent',step_vent
+!      PRINT*,'JEdec jHv,JHi,ventres',jH_vent,jH_init,vent_resol
+!      PRINT*,'JEdec tau2,tau1',tau_2,tau_1
+!      PRINT*,'JEdec step_vent',step_vent
       DO i=1, klon
 !      PRINT*,'JE tau_2,tau_2j',tau_2,tau_2j
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/read_surface.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/read_surface.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/read_surface.F90	(revision 5103)
@@ -1,3 +1,3 @@
-       subroutine read_surface(name,surfa)
+       SUBROUTINE read_surface(name,surfa)
 
      
@@ -45,11 +45,11 @@
        IF (is_mpi_root .AND. is_omp_root) THEN
 
-       print*,'Lecture du fichier donnees_lisa.nc' 
+       PRINT*,'Lecture du fichier donnees_lisa.nc'
        ncid=nf90_open('donnees_lisa.nc',nf90_nowrite,rcode)
 
 !JE20140526<<: check if are inversed or not the latitude grid in donnes_lisa
-      outcycle=.false.
+      outcycle=.FALSE.
       latstr='null'
-      isinversed=.false.
+      isinversed=.FALSE.
       do i=1,5
        if (i==1) aux4s='latu'
@@ -60,7 +60,7 @@
        status = nf90_inq_varid (ncid, aux4s, rcode)
 !       print *,'stat,i',status,i,outcycle,aux4s
-!       print *,'ifclause',status.NE. nf90_noerr ,outcycle == .false.
+!       print *,'ifclause',status.NE. nf90_noerr ,outcycle == .FALSE.
        IF ((.not.(status/= nf90_noerr) ).and.( .not. outcycle )) THEN
-         outcycle=.true.
+         outcycle=.TRUE.
          latstr=aux4s
        ENDIF
@@ -73,10 +73,10 @@
           status=nf90_get_var(ncid,varid,lats_glo,startj,endj)
 !      print *,latstr,varid,status,jjp1,rcode
-!      IF (status .NE. nf90_noerr) print*,'NOOOOOOO'
+!      IF (status .NE. nf90_noerr) PRINT*,'NOOOOOOO'
 !      print *,lats
 !stop
 
 ! check if netcdf is latitude inversed or not. 
-      if (lats_glo(1)<lats_glo(2)) isinversed=.true.
+      if (lats_glo(1)<lats_glo(2)) isinversed=.TRUE.
 ! JE20140526>>
 
@@ -85,5 +85,5 @@
           write(str1,'(i1)') i
           varname=trim(name)//str1
-       print*,'lecture variable:',varname
+       PRINT*,'lecture variable:',varname
           varid=nf90_inq_varid(ncid,trim(varname),rcode)
 
@@ -139,5 +139,5 @@
 
        ENDDO ! Fin boucle 1 a 5
-       print*,'Passage Grille Dyn -> Phys'
+       PRINT*,'Passage Grille Dyn -> Phys'
 
 
@@ -149,3 +149,3 @@
 
        return
-       end subroutine read_surface
+       END SUBROUTINE  read_surface
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/read_vent.f90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/read_vent.f90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/read_vent.f90	(revision 5103)
@@ -106,5 +106,5 @@
 
 ! added by JE from the nh SPLA, dyn3d/read_reanalyse.F which is not available any more
-subroutine correctbid(iim, nl, x)
+SUBROUTINE correctbid(iim, nl, x)
   integer :: iim, nl
   real :: x(iim + 1, nl)
@@ -116,5 +116,5 @@
       if(abs(x(i, l))>1.e10) then
         zz = 0.5 * (x(i - 1, l) + x(i + 1, l))
-        ! print*,'correction ',i,l,x(i,l),zz
+        ! PRINT*,'correction ',i,l,x(i,l),zz
         x(i, l) = zz
       endif
@@ -123,5 +123,5 @@
 
   return
-end subroutine correctbid
+END SUBROUTINE  correctbid
 
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/satellite_out_spla.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/satellite_out_spla.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/satellite_out_spla.F90	(revision 5103)
@@ -22,5 +22,5 @@
 
   CALL ju2ymds(jD_cur+jH_cur, year_cur, mth_cur, day_cur, hour)
-!  print*,'JDcur=',jD_cur,'JHcur=',jH_cur,'year_cur' ,year_cur,'mth_cur' ,mth_cur, 'day_cur',day_cur,'hour' ,hour
+!  PRINT*,'JDcur=',jD_cur,'JHcur=',jH_cur,'year_cur' ,year_cur,'mth_cur' ,mth_cur, 'day_cur',day_cur,'hour' ,hour
 
 !  IF ( (year_cur*100.+mth_cur .GE. 199611 ) .AND. (year_cur*100.+mth_cur .LE. 199706)) THEN 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/seasalt.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/seasalt.F	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/seasalt.F	(revision 5103)
@@ -1,3 +1,3 @@
-c       This subroutine estimateis Sea Salt emission fluxes over 
+c       This SUBROUTINE estimateis Sea Salt emission fluxes over
 c       Oceanic surfaces.
 c 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/sediment_mod.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/sediment_mod.F	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/sediment_mod.F	(revision 5103)
@@ -1,3 +1,3 @@
-c----- This subroutine calculates the sedimentation flux of Tracers 
+c----- This SUBROUTINE calculates the sedimentation flux of Tracers
 c
       SUBROUTINE sediment_mod(t_seri,pplay,zrho,paprs,time_step,RHcl,
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/tiedqneg.f90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/tiedqneg.f90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/tiedqneg.f90	(revision 5103)
@@ -16,5 +16,4 @@
 
   INCLUDE "dimensions.h"
-  ! INCLUDE "dimphy.h"
   REAL :: pres_h(klon, klev + 1)
   REAL :: q(klon, klev)
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 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/bulk_flux_m.F90	(revision 5103)
@@ -5,5 +5,5 @@
 contains
 
-  subroutine bulk_flux(tkt, tks, taur, dter, dser, t_int, s_int, ds_ns, dt_ns, &
+  SUBROUTINE bulk_flux(tkt, tks, taur, dter, dser, t_int, s_int, ds_ns, dt_ns, &
        u, t_ocean_1, s1, rain, hf, hlb, rnl, tau, rhoa, xlv, rf, dtime, rns)
 
@@ -151,5 +151,5 @@
     s_int = s_subskin + dser
 
-  end subroutine bulk_flux
+  END SUBROUTINE  bulk_flux
 
 end module bulk_flux_m
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 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/config_ocean_skin_m.F90	(revision 5103)
@@ -27,5 +27,5 @@
 contains
 
-  subroutine config_ocean_skin
+  SUBROUTINE config_ocean_skin
 
 #ifdef IN_LMDZ
@@ -58,19 +58,19 @@
     select case (flag_ocean_skin)
     case (0)
-       jwarm = .false.
-       jcool = .false.
-       rain_effect = .false.
+       jwarm = .FALSE.
+       jcool = .FALSE.
+       rain_effect = .FALSE.
     case (1)
-       jwarm = .false.
-       jcool = .true.
-       rain_effect = .false.
+       jwarm = .FALSE.
+       jcool = .TRUE.
+       rain_effect = .FALSE.
     case (2)
-       jwarm = .true.
-       jcool = .true.
-       rain_effect = .false.
+       jwarm = .TRUE.
+       jcool = .TRUE.
+       rain_effect = .FALSE.
     case (3)
-       jwarm = .true.
-       jcool = .true.
-       rain_effect = .true.
+       jwarm = .TRUE.
+       jcool = .TRUE.
+       rain_effect = .TRUE.
     case default
        print *, "config_ocean_skin: bad value for flag_ocean_skin."
@@ -78,5 +78,5 @@
     end select
 
-  end subroutine config_ocean_skin
+  END SUBROUTINE  config_ocean_skin
 
 end module config_ocean_skin_m
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/const.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/const.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/const.F90	(revision 5103)
@@ -3,5 +3,5 @@
   implicit none
 
-  real, parameter:: beta = 0.756 / 1023.343
+  real, parameter :: beta = 0.756 / 1023.343
   ! Salinity expansion coefficient. Derivative with respect to
   ! practical salinity, not mass fraction of salt. Value at 25 Celsius
@@ -9,17 +9,17 @@
   ! k0829, table A.3.1).
 
-  real, parameter:: cpa = 1004.67
+  real, parameter :: cpa = 1004.67
   ! specific heat of dry air, in J / kg / K (Businger 1982)
 
-  real, parameter:: cpw = 4000. ! specific heat of liquid water, in J / kg / K
-  real, parameter:: grav  = 9.780326772 ! constante de gravitation, m s-2
-  real, parameter::  rhow = 1022. ! density of liquid water, in kg / m3
+  real, parameter :: cpw = 4000. ! specific heat of liquid water, in J / kg / K
+  real, parameter :: grav = 9.780326772 ! constante de gravitation, m s-2
+  real, parameter :: rhow = 1022. ! density of liquid water, in kg / m3
 
-  real, parameter:: rgas = 287.1
+  real, parameter :: rgas = 287.1
   ! specific ideal gas constant for dry air, in J / kg / K
 
-  real, parameter:: von = 0.4 ! von Karman's "constant"
+  real, parameter :: von = 0.4 ! von Karman's "constant"
 
-  real, parameter:: eps_w = 0.62197
+  real, parameter :: eps_w = 0.62197
   ! molecular mass of water over molecular mass of dry air (Gill 1982
   ! k0829, equation 3.1.13)
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/microlayer_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/microlayer_m.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/microlayer_m.F90	(revision 5103)
@@ -5,5 +5,5 @@
 contains
 
-  subroutine Microlayer(dter, dser, tkt, tks, hlb, tau, s_subskin, al, &
+  SUBROUTINE Microlayer(dter, dser, tkt, tks, hlb, tau, s_subskin, al, &
        xlv, taur, rf, rain, qcol)
 
@@ -102,5 +102,5 @@
          / (rhow * mu) ! eq. fresh skin
 
-  end subroutine Microlayer
+  END SUBROUTINE  Microlayer
 
 end module Microlayer_m
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/near_surface_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/near_surface_m.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/Ocean_skin/near_surface_m.F90	(revision 5103)
@@ -8,5 +8,5 @@
 contains
 
-  subroutine near_surface(al, t_subskin, s_subskin, ds_ns, dt_ns, tau, taur, &
+  SUBROUTINE near_surface(al, t_subskin, s_subskin, ds_ns, dt_ns, tau, taur, &
        hlb, rhoa, xlv, dtime, t_ocean_1, s1, rain, q_pwp)
 
@@ -152,5 +152,5 @@
     s_subskin = s_fnd + ds_ns
 
-  end subroutine Near_Surface
+  END SUBROUTINE  Near_Surface
 
 end module Near_Surface_m
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/nucleation_tstep_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/nucleation_tstep_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/nucleation_tstep_mod.F90	(revision 5103)
@@ -135,5 +135,5 @@
 
 
-  !    Fortran 90 subroutine binapara
+  !    Fortran 90 SUBROUTINE binapara
 
   !    Calculates parametrized values of nucleation rate,
@@ -299,5 +299,5 @@
      kinetic_n,kinetic_i)
 
-  !    Fortran 90 subroutine newbinapara
+  !    Fortran 90 SUBROUTINE newbinapara
 
   !    Calculates parametrized values for neutral and ion-induced sulfuric acid-water particle formation rate
@@ -614,5 +614,5 @@
      kinrhotresi=EXP(kinrhotresi) !1/cm3
      
-     IF (kinrhotresi<rhoali) kinetic_i=.true.
+     IF (kinrhotresi<rhoali) kinetic_i=.TRUE.
      
      IF (kinetic_i) THEN    
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/stratH2O_methox.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/stratH2O_methox.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/stratH2O_methox.F90	(revision 5103)
@@ -30,5 +30,5 @@
   LOGICAL, INTENT(IN) :: debutphy   ! flag for first physiq step
 ! Output variables
-! tendency buffer used in add_phys_tend subroutine (in physiq_mod)
+! tendency buffer used in add_phys_tend SUBROUTINE (in physiq_mod)
   REAL, INTENT(INOUT), DIMENSION(klon,klev)  :: dq_ch4mmr
   
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/sulfate_aer_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/sulfate_aer_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/sulfate_aer_mod.F90	(revision 5103)
@@ -72,5 +72,5 @@
 !        include conversion from molec/cm3 to Pa
 !        ph2so4=solh2so4(temp,xa)*(1.38065e-16*temp)/10.
-!        print*,' ph2so4=',ph2so4,temp,R2SO4(ilon,ilev)
+!        PRINT*,' ph2so4=',ph2so4,temp,R2SO4(ilon,ilev)
 !        good match with Martin, et Ayers, not with Gmitro (the famous 0.086)
 
@@ -135,7 +135,7 @@
       (R2SO4B(ilon,ilev,IK)*1.e-2))**third
 
-!             print*,'R,Rwet(m),kelvin,h2so4(%),ro=',RRSI(ik),radwet,fkelvin, &
+!             PRINT*,'R,Rwet(m),kelvin,h2so4(%),ro=',RRSI(ik),radwet,fkelvin, &
 !              &  R2SO4B(ilon,ilev,IK),DENSO4B(ilon,ilev,IK)
-!             print*,' equil.h2so4(molec/cm3), & 
+!             PRINT*,' equil.h2so4(molec/cm3), &
 !              & sigma',solh2so4(temp,xa),surftension(temp,xa)
 
@@ -830,5 +830,5 @@
          psh2o_out=100.*exp(psh2o_out)
       end if
-!      print*,psh2o_out
+!      PRINT*,psh2o_out
       
        return
@@ -993,6 +993,6 @@
 !        h2so4 weight precent
          wph2so4_out = 9800.*sulfmolal/(98.*sulfmolal+1000.)
-!         print*,rh,pph2o,psh2o(T),vpice(T)
-!         print*,T,aw,sulfmolal,wph2so4_out
+!         PRINT*,rh,pph2o,psh2o(T),vpice(T)
+!         PRINT*,T,aw,sulfmolal,wph2so4_out
          wph2so4_out = max(wph2so4_out,15.)
          wph2so4_out = min(wph2so4_out,99.999)
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/acama_gwd_rando_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/acama_gwd_rando_m.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/acama_gwd_rando_m.F90	(revision 5103)
@@ -119,5 +119,5 @@
 
     REAL, DIMENSION(klev+1) ::HREF
-    LOGICAL, SAVE :: gwd_reproductibilite_mpiomp=.true.
+    LOGICAL, SAVE :: gwd_reproductibilite_mpiomp=.TRUE.
     LOGICAL, SAVE :: firstCALL = .TRUE.
   !$OMP THREADPRIVATE(firstcall,gwd_reproductibilite_mpiomp)
@@ -137,5 +137,5 @@
        CALL abort_physic (modname,abort_message,1)
     ENDIF
-    firstcall=.false.
+    firstcall=.FALSE.
 !    CALL iophys_ini(dtime)
   ENDIF
@@ -258,5 +258,5 @@
     ENDDO
     !LAUNCH=22 ; LTROP=33
-!   print*,'LAUNCH=',LAUNCH,'LTROP=',LTROP
+!   PRINT*,'LAUNCH=',LAUNCH,'LTROP=',LTROP
 
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/add_phys_tend_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/add_phys_tend_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/add_phys_tend_mod.F90	(revision 5103)
@@ -40,5 +40,5 @@
   REAL,SAVE :: dtime_frcg
   LOGICAL,SAVE :: turb_fcg_gcssold
-  LOGICAL,SAVE :: firstcall=.true.
+  LOGICAL,SAVE :: firstcall=.TRUE.
 !$OMP THREADPRIVATE(firstcall,turb_fcg_gcssold,dtime_frcg)
   INTEGER abortphy
@@ -63,5 +63,5 @@
     ALLOCATE(hthturb_gcssold(nbp_lev))
     ALLOCATE(hqturb_gcssold(nbp_lev))
-    firstcall=.false.
+    firstcall=.FALSE.
   ENDIF
 
@@ -148,5 +148,5 @@
 
 INTEGER debug_level
-LOGICAL, SAVE :: first=.true.
+LOGICAL, SAVE :: first=.TRUE.
 !$OMP THREADPRIVATE(first)
 
@@ -202,5 +202,5 @@
   IF (first) THEN
      print *,"TestJLD rcpv, rcw, rcs",rcpv, rcw, rcs
-     first=.false.
+     first=.FALSE.
   ENDIF
 
@@ -286,7 +286,7 @@
         i=jadrs(j)
         IF (prt_level>=debug_level) THEN
-          print*,'PLANTAGE POUR LE POINT i lon lat =',&
+          PRINT*,'PLANTAGE POUR LE POINT i lon lat =',&
                  i,longitude_deg(i),latitude_deg(i),text
-          print*,'l    T     dT       Q     dQ    '
+          PRINT*,'l    T     dT       Q     dQ    '
           DO k = 1, klev
              write(*,'(i3,2f14.4,2e14.2)') k,t_seri(i,k),zdt(i,k),q_seri(i,k),zdq(i,k)
@@ -301,11 +301,11 @@
 !=====================================================================================
   IF (jqbad > 0) THEN
-      done(:) = .false.                         !jyg
+      done(:) = .FALSE.                         !jyg
       DO j = 1, jqbad
         i=jqadrs(j)
           if(prt_level>=debug_level) THEN
-           print*,'WARNING  : EAU POUR LE POINT i lon lat =',&
+           PRINT*,'WARNING  : EAU POUR LE POINT i lon lat =',&
                   i,longitude_deg(i),latitude_deg(i),text
-           print*,'l    T     dT       Q     dQ    '
+           PRINT*,'l    T     dT       Q     dQ    '
            DO k = 1, klev
               write(*,'(i3,2f14.4,2e14.2)') k,t_seri(i,k),zdt(i,k),q_seri(i,k),zdq(i,k)
@@ -325,5 +325,5 @@
               ENDDO
               IF (prt_level>=debug_level) THEN
-               print*,' cas q_seri<1.e-15 i k zq_int zqp_int zq_int/zqp_int :', &
+               PRINT*,' cas q_seri<1.e-15 i k zq_int zqp_int zq_int/zqp_int :', &
                                     i, kqadrs(j), zq_int, zqp_int, zq_int/zqp_int
               ENDIF
@@ -333,5 +333,5 @@
                 q_seri(i,k) = zq_new
               ENDDO
-              done(i) = .true.
+              done(i) = .TRUE.
             ENDIF !(.NOT.done(i))
           ELSE 
@@ -342,5 +342,5 @@
                  IF (q_seri(i,k)<1.e-15) THEN
                    IF (prt_level>=debug_level) THEN
-                    print*,' cas q_seri<1.e-15 i k q_seri zq zdq :',i,k,q_seri(i,k),zq,zdq(i,k)
+                    PRINT*,' cas q_seri<1.e-15 i k q_seri zq zdq :',i,k,q_seri(i,k),zq,zdq(i,k)
                    ENDIF
                    q_seri(i,k)=1.e-15
@@ -368,5 +368,5 @@
         jadrs(jbad) = i
 !         if(prt_level.ge.debug_level) THEN
-!         print*,'cas2 i k t_seri zdt',i,k,t_seri(i,k),zdt(i,k)
+!         PRINT*,'cas2 i k t_seri zdt',i,k,t_seri(i,k),zdt(i,k)
 !        endif
         ENDIF
@@ -376,5 +376,5 @@
         kqadrs(jqbad) = k
 !        if(prt_level.ge.debug_level) THEN
-!         print*,'cas2 i k q_seri zdq',i,k,q_seri(i,k),zdq(i,k)
+!         PRINT*,'cas2 i k q_seri zdq',i,k,q_seri(i,k),zdq(i,k)
 !        endif
         ENDIF
@@ -386,9 +386,9 @@
          k=kadrs(j)
          if(prt_level>=debug_level) THEN
-          print*,'PLANTAGE2 POUR LE POINT i itap lon lat txt jbad zdt t',&
+          PRINT*,'PLANTAGE2 POUR LE POINT i itap lon lat txt jbad zdt t',&
                  i,itap,longitude_deg(i),latitude_deg(i),text,jbad, &
           zdt(i,k),t_seri(i,k)-zdt(i,k)
 !!!       if(prt_level.ge.10.and.itap.GE.229.and.i.EQ.3027) THEN 
-          print*,'l    T     dT       Q     dQ    '
+          PRINT*,'l    T     dT       Q     dQ    '
           DO k = 1, klev
              write(*,'(i3,2f14.4,2e14.2)') k,t_seri(i,k),zdt(i,k),q_seri(i,k),zdq(i,k)
@@ -404,9 +404,9 @@
          k=kqadrs(j)
          IF (prt_level>=debug_level) THEN
-          print*,'WARNING  : EAU2 POUR LE POINT i itap lon lat txt jqbad zdq q zdql ql',&
+          PRINT*,'WARNING  : EAU2 POUR LE POINT i itap lon lat txt jqbad zdq q zdql ql',&
                  i,itap,longitude_deg(i),latitude_deg(i),text,jqbad,&
           zdq(i,k), q_seri(i,k)-zdq(i,k), zdql(i,k), ql_seri(i,k)-zdql(i,k)
 !!!       if(prt_level.ge.10.and.itap.GE.229.and.i.EQ.3027) THEN 
-          print*,'l    T     dT       Q     dQ    '
+          PRINT*,'l    T     dT       Q     dQ    '
           DO k = 1, klev
             write(*,'(i3,2f14.4,2e14.2)') k,t_seri(i,k),zdt(i,k),q_seri(i,k),zdq(i,k)
@@ -426,5 +426,5 @@
   CALL hgardfou(t_seri,ftsol,text,abortphy) 
   IF (abortphy==1) THEN
-    print*,'ERROR ABORT hgardfou dans ',text
+    PRINT*,'ERROR ABORT hgardfou dans ',text
 ! JLD pourquoi on ne modifie pas de meme t_seri et q_seri ?
     u_seri(:,:)=u_seri(:,:)-zdu(:,:)
@@ -529,5 +529,5 @@
 
 INTEGER debug_level
-LOGICAL, SAVE :: first=.true.
+LOGICAL, SAVE :: first=.TRUE.
 !$OMP THREADPRIVATE(first)
 
@@ -569,5 +569,5 @@
   IF (first) THEN
      print *,"TestJLD rcpv, rcw, rcs",rcpv, rcw, rcs
-     first=.false.
+     first=.FALSE.
   ENDIF
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/alpale.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/alpale.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/alpale.F90	(revision 5103)
@@ -166,5 +166,5 @@
                 !    ALP(i)=alp_wake(i)+Alp_bl(i)+alp_offset*min(omega(i,6),0.)
                 !             if (alp(i)<0.) then
-                !                print*,'ALP ',alp(i),alp_wake(i) &
+                !                PRINT*,'ALP ',alp(i),alp_wake(i) &
                 !                     ,Alp_bl(i),alp_offset*min(omega(i,6),0.)
                 !             endif
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/alpale_th.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/alpale_th.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/alpale_th.F90	(revision 5103)
@@ -100,7 +100,7 @@
 !!
 !!   Control of the multiplication of no-trigger probabilities between calls 
-!! to the convection scheme. If multiply_proba_notrig is .false., then
+!! 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
-!! plays a role in the triggering of convection. If it is .true., then propa_notrig 
+!! 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 
 !! convection scheme.
@@ -108,6 +108,6 @@
 !! there are 3 calls to alpale_th between calls to the convection scheme, then the 
 !! probability of triggering convection will be 0.1 (= 1.-0.9) if 
-!! multiply_proba_notrig is .false. and 0.271 (= 1.-0.9^3) if multiply_proba_notrig 
-!! is .true.
+!! multiply_proba_notrig is .FALSE. and 0.271 (= 1.-0.9^3) if multiply_proba_notrig
+!! is .TRUE.
 !!
     IF (.NOT.multiply_proba_notrig) THEN
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/calbeta_clim.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/calbeta_clim.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/calbeta_clim.F90	(revision 5103)
@@ -31,5 +31,5 @@
   !calcul des cordonnees
 
-  ! print*,'LATITUDES BETA ',lat_radian
+  ! PRINT*,'LATITUDES BETA ',lat_radian
   time_radian=(time+15.)*2.*pi / year_len
 
@@ -49,5 +49,5 @@
         beta(j)=max(beta(j),0.03)
         beta(j)=min(beta(j),0.22)
-        ! print*,'j,lat,lat_radian,beta',j,lat(j),lat_radian(j),beta(j)
+        ! PRINT*,'j,lat,lat_radian,beta',j,lat(j),lat_radian(j),beta(j)
         !===========
      elseif (lat(j) < 22.) then !lat(j)<22.
@@ -57,5 +57,5 @@
         beta(j)=max(beta(j),1.e-2)
         beta(j)=min(beta(j),0.22)
-        ! print*,'j,lat,lat_radian,beta',j,lat(j),lat_radian(j),beta(j)
+        ! PRINT*,'j,lat,lat_radian,beta',j,lat(j),lat_radian(j),beta(j)
         !===========
      else
@@ -64,8 +64,8 @@
         beta(j)=max(beta(j),1.e-2)
         beta(j)=min(beta(j),0.25)
-        ! print*,'j,lat,lat_radian,beta',j,lat(j),lat_radian(j),beta(j)
+        ! PRINT*,'j,lat,lat_radian,beta',j,lat(j),lat_radian(j),beta(j)
      endif
      !===========
   enddo
 
-end SUBROUTINE calbeta_clim
+END SUBROUTINE  calbeta_clim
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/calcul_STDlev.h
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/calcul_STDlev.h	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/calcul_STDlev.h	(revision 5103)
@@ -14,5 +14,5 @@
 
 !-------------------------------------------------------c
-! positionnement de l'argument logique a .false.        c
+! positionnement de l'argument logique a .FALSE.        c
 ! pour ne pas recalculer deux fois la meme chose !      c
 ! a cet effet un appel a plevel_new a ete deplace       c
@@ -22,16 +22,16 @@
 !-------------------------------------------------------c
 
-        CALL plevel_new(klon,klev,nlevSTD,.true.,pplay,rlevSTD, &
+        CALL plevel_new(klon,klev,nlevSTD,.TRUE.,pplay,rlevSTD, &
                     t_seri,tlevSTD)
-        CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, &
+        CALL plevel_new(klon,klev,nlevSTD,.FALSE.,pplay,rlevSTD, &
                    u_seri,ulevSTD)
-        CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, &
+        CALL plevel_new(klon,klev,nlevSTD,.FALSE.,pplay,rlevSTD, &
                    v_seri,vlevSTD)
 
-        CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, &
+        CALL plevel_new(klon,klev,nlevSTD,.FALSE.,pplay,rlevSTD, &
                    zphi/RG,philevSTD)
-        CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, &
+        CALL plevel_new(klon,klev,nlevSTD,.FALSE.,pplay,rlevSTD, &
                    qx(:,:,ivap),qlevSTD)
-        CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, &
+        CALL plevel_new(klon,klev,nlevSTD,.FALSE.,pplay,rlevSTD, &
                    zx_rh*100.,rhlevSTD)
 
@@ -41,5 +41,5 @@
          ENDDO !i
         ENDDO !l
-        CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, &
+        CALL plevel_new(klon,klev,nlevSTD,.FALSE.,pplay,rlevSTD, &
                    zx_tmp_fi3d,uvSTD)
 
@@ -49,5 +49,5 @@
          ENDDO !i
         ENDDO !l
-        CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, &
+        CALL plevel_new(klon,klev,nlevSTD,.FALSE.,pplay,rlevSTD, &
                    zx_tmp_fi3d,vqSTD)
 
@@ -57,5 +57,5 @@
          ENDDO !i
         ENDDO !l
-        CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, &
+        CALL plevel_new(klon,klev,nlevSTD,.FALSE.,pplay,rlevSTD, &
                    zx_tmp_fi3d,vTSTD)
 
@@ -65,5 +65,5 @@
          ENDDO !i 
         ENDDO !l
-        CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, &
+        CALL plevel_new(klon,klev,nlevSTD,.FALSE.,pplay,rlevSTD, &
                    zx_tmp_fi3d,wqSTD)
 
@@ -73,5 +73,5 @@
          ENDDO !i
         ENDDO !l
-        CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, &
+        CALL plevel_new(klon,klev,nlevSTD,.FALSE.,pplay,rlevSTD, &
                    zx_tmp_fi3d,vphiSTD)
 
@@ -81,5 +81,5 @@
          ENDDO !i
         ENDDO !l
-        CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, &
+        CALL plevel_new(klon,klev,nlevSTD,.FALSE.,pplay,rlevSTD, &
                    zx_tmp_fi3d,wTSTD)
 
@@ -89,5 +89,5 @@
          ENDDO !i
         ENDDO !l
-        CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, &
+        CALL plevel_new(klon,klev,nlevSTD,.FALSE.,pplay,rlevSTD, &
                    zx_tmp_fi3d,u2STD)
 
@@ -97,5 +97,5 @@
          ENDDO !i
         ENDDO !l
-        CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, &
+        CALL plevel_new(klon,klev,nlevSTD,.FALSE.,pplay,rlevSTD, &
                    zx_tmp_fi3d,v2STD)
 
@@ -105,14 +105,14 @@
          ENDDO !i
         ENDDO !l
-        CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, &
+        CALL plevel_new(klon,klev,nlevSTD,.FALSE.,pplay,rlevSTD, &
                    zx_tmp_fi3d,T2STD)
 
       zx_tmp_fi3d(:,:)=wo(:,:,1) * dobson_u * 1e3 / zmasse / rmo3 * rmd
-        CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, &
+        CALL plevel_new(klon,klev,nlevSTD,.FALSE.,pplay,rlevSTD, &
                    zx_tmp_fi3d,O3STD)
 
       if (read_climoz == 2) THEN
       zx_tmp_fi3d(:,:)=wo(:,:,2) * dobson_u * 1e3 / zmasse / rmo3 * rmd
-        CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, &
+        CALL plevel_new(klon,klev,nlevSTD,.FALSE.,pplay,rlevSTD, &
                    zx_tmp_fi3d,O3daySTD)
       endif
@@ -123,5 +123,5 @@
         ENDDO !i
         ENDDO !l
-        CALL plevel_new(klon,klev,nlevSTD,.true.,zx_tmp_fi3d,rlevSTD, &
+        CALL plevel_new(klon,klev,nlevSTD,.TRUE.,zx_tmp_fi3d,rlevSTD, &
                    omega,wlevSTD)
 
@@ -134,25 +134,25 @@
        ENDIF
 
-       CALL plevel(klon,klev,.true.,pplay,50000., &
+       CALL plevel(klon,klev,.TRUE.,pplay,50000., &
                     zphi/RG,geo500)
 
 !IM on interpole a chaque pas de temps le SWup(clr) et SWdn(clr) a 200 hPa
 
-      CALL plevel(klon,klevp1,.true.,paprs,20000., &
+      CALL plevel(klon,klevp1,.TRUE.,paprs,20000., &
            swdn0,SWdn200clr)
-      CALL plevel(klon,klevp1,.false.,paprs,20000., &
+      CALL plevel(klon,klevp1,.FALSE.,paprs,20000., &
            swdn,SWdn200)
-      CALL plevel(klon,klevp1,.false.,paprs,20000., &
+      CALL plevel(klon,klevp1,.FALSE.,paprs,20000., &
            swup0,SWup200clr)
-      CALL plevel(klon,klevp1,.false.,paprs,20000., &
+      CALL plevel(klon,klevp1,.FALSE.,paprs,20000., &
            swup,SWup200)
 
-      CALL plevel(klon,klevp1,.false.,paprs,20000., &
+      CALL plevel(klon,klevp1,.FALSE.,paprs,20000., &
            lwdn0,LWdn200clr)
-      CALL plevel(klon,klevp1,.false.,paprs,20000., &
+      CALL plevel(klon,klevp1,.FALSE.,paprs,20000., &
            lwdn,LWdn200)
-      CALL plevel(klon,klevp1,.false.,paprs,20000., &
+      CALL plevel(klon,klevp1,.FALSE.,paprs,20000., &
            lwup0,LWup200clr)
-      CALL plevel(klon,klevp1,.false.,paprs,20000., &
+      CALL plevel(klon,klevp1,.FALSE.,paprs,20000., &
            lwup,LWup200)
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/calcul_divers.h
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/calcul_divers.h	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/calcul_divers.h	(revision 5103)
@@ -18,5 +18,5 @@
       IF(itap.EQ.1) THEN
          itapm1=0
-!        print*,'initialisation itap=1 itapm1 ',itapm1
+!        PRINT*,'initialisation itap=1 itapm1 ',itapm1
       ENDIF
 
@@ -24,5 +24,5 @@
       IF(itap.EQ.itapm1+1) THEN
          ndayrain_mth(:)=0.
-!        print*,'Initialisation ndayrain_mth ',itap
+!        PRINT*,'Initialisation ndayrain_mth ',itap
       ENDIF
 
@@ -30,5 +30,5 @@
       IF(MOD(itap,NINT(un_jour/phys_tstep)).EQ.1) THEN
         nday_rain(:)=0.
-!       print*,'initialisation mois suivants day_rain itap',itap
+!       PRINT*,'initialisation mois suivants day_rain itap',itap
       ENDIF
 
@@ -52,5 +52,5 @@
       IF(MOD(itap-itapm1,NINT(mth_len*un_jour/phys_tstep)).EQ.0) THEN
         itapm1=itapm1+NINT(mth_len*un_jour/phys_tstep)
-!       print*,'fmois i i1 mjt',itap,itapm1,mth_len,un_jour,phys_tstep
+!       PRINT*,'fmois i i1 mjt',itap,itapm1,mth_len,un_jour,phys_tstep
       ENDIF
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/call_ini_replay.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/call_ini_replay.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/call_ini_replay.F90	(revision 5103)
@@ -1,3 +1,3 @@
-   subroutine call_ini_replay
+   SUBROUTINE call_ini_replay
    stop 'In call_ini_replay : You should run replay_equip.sh before runing replay[13]d'
    return
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/call_param_replay.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/call_param_replay.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/call_param_replay.F90	(revision 5103)
@@ -1,3 +1,3 @@
-   subroutine call_param_replay(ngrid,nlay)
+   SUBROUTINE call_param_replay(ngrid,nlay)
    integer,intent(in) :: ngrid,nlay
    stop 'In call_param_replay : You should run replay_equip.sh before runing replay[13]d'
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/calltherm.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/calltherm.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/calltherm.F90	(revision 5103)
@@ -2,5 +2,5 @@
 ! $Id$
 
-      subroutine calltherm(dtime  &
+      SUBROUTINE calltherm(dtime  &
         ,pplay,paprs,pphi,weak_inversion  &
         ,u_seri_,v_seri_,t_seri_,q_seri_,t_env,q_env,zqsat,debut  &
@@ -148,5 +148,5 @@
 
       integer i,k,isplit
-      logical, save :: first=.true.
+      logical, save :: first=.TRUE.
       logical :: new_thermcell
 
@@ -168,5 +168,5 @@
       if (first) then
         itap=0
-        first=.false.
+        first=.FALSE.
       endif
 
@@ -181,5 +181,5 @@
 !  Modele du thermique
 !  ===================
-!         print*,'thermiques: WARNING on passe t au lieu de t_seri'
+!         PRINT*,'thermiques: WARNING on passe t au lieu de t_seri'
 
 
@@ -199,5 +199,5 @@
          alp_bl(:)=0.
          if (prt_level>=10) then
-          print*,'thermV4 nsplit: ',nsplit_thermals,' weak_inversion'
+          PRINT*,'thermV4 nsplit: ',nsplit_thermals,' weak_inversion'
          endif
 
@@ -224,9 +224,9 @@
                endif
 !               if (logexpr0) &
-!    &             print*,'WARN eau<0 avant therm i=',i,'  k=',k  &
+!    &             PRINT*,'WARN eau<0 avant therm i=',i,'  k=',k  &
 !    &         ,' dq,q',d_q_the(i,k),q_seri(i,k)
             enddo
          enddo
-         if(nbptspb>0) print*,'Number of points with q_seri(i,k)<=0 ',nbptspb
+         if(nbptspb>0) PRINT*,'Number of points with q_seri(i,k)<=0 ',nbptspb
 
 
@@ -330,5 +330,5 @@
 
 ! Attention : les noms sont contre intuitif.
-! flag_bidouille_stratocu est .true. si on ne fait pas de bidouille.
+! flag_bidouille_stratocu est .TRUE. si on ne fait pas de bidouille.
 ! Il aurait mieux valu avoir un nobidouille_stratocu
 ! Et pour simplifier :
@@ -422,5 +422,5 @@
             alp_bl(i)=alp_bl(i)+alp(i)/REAL(nsplit_thermals)
 !            write(23,*)'ALP CALLTHERM',alp_bl(i),alp(i)
-        if(prt_level>=10) print*,'calltherm i alp_bl alp ale_bl ale',i,alp_bl(i),alp(i),ale_bl(i),ale(i)
+        if(prt_level>=10) PRINT*,'calltherm i alp_bl alp ale_bl ale',i,alp_bl(i),alp(i),ale_bl(i),ale(i)
        ENDDO
 
@@ -441,5 +441,5 @@
 #endif
 !                if (prt_level.ge.10) then
-!                  print*,'WARN eau<0 apres therm i=',i,'  k=',k  &
+!                  PRINT*,'WARN eau<0 apres therm i=',i,'  k=',k  &
 !    &         ,' dq,q',d_q_the(i,k),q_seri(i,k),  &
 !    &         'fm=',zfm_therm(i,k),'entr=',entr_therm(i,k)
@@ -457,5 +457,5 @@
 #endif
 
-        IF(nbptspb>0) print*,'Number of points with q_seri(i,k)<=0 ',nbptspb
+        IF(nbptspb>0) PRINT*,'Number of points with q_seri(i,k)<=0 ',nbptspb
 ! tests sur les valeurs de la temperature
         nbptspb=0
@@ -466,5 +466,5 @@
 !              if ((t_seri(i,k).lt.50.) .or.  &
 !    &              (t_seri(i,k).gt.370.)) then
-!                 print*,'WARN temp apres therm i=',i,'  k=',k  &
+!                 PRINT*,'WARN temp apres therm i=',i,'  k=',k  &
 !    &         ,' t_seri',t_seri(i,k)
 !              CALL abort
@@ -472,10 +472,10 @@
             ENDDO
             ENDDO
-        IF(nbptspb>0) print*,'Number of points with q_seri(i,k)<=0 ',nbptspb
+        IF(nbptspb>0) PRINT*,'Number of points with q_seri(i,k)<=0 ',nbptspb
          enddo ! isplit
 
 !***************************************************************
 !     calcul du flux ascencant conservatif
-!            print*,'<<<<calcul flux ascendant conservatif'
+!            PRINT*,'<<<<calcul flux ascendant conservatif'
 
       fmc_therm=0.
@@ -495,5 +495,5 @@
 !****************************************************************
 !     calcul de l'humidite dans l'ascendance
-!      print*,'<<<<calcul de lhumidite dans thermique'
+!      PRINT*,'<<<<calcul de lhumidite dans thermique'
 !CR:on ne le calcule que pour le cas sec
       if (iflag_thermals<=11) then
@@ -514,5 +514,5 @@
 
 !     calcul de l'eau condensee dans l'ascendance
-!             print*,'<<<<calcul de leau condensee dans thermique'
+!             PRINT*,'<<<<calcul de leau condensee dans thermique'
              do i=1,klon
                 do k=1,klev
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/calwake.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/calwake.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/calwake.F90	(revision 5103)
@@ -157,5 +157,5 @@
     sigd0(i) = sigd(i)
   END DO
-  ! print*, 'sigd0,sigd', sigd0, sigd(i)
+  ! PRINT*, 'sigd0,sigd', sigd0, sigd(i)
   DO i = 1, klon
     ph(i, klev+1) = 0.
@@ -320,5 +320,5 @@
       ENDIF
     ENDDO
-    first=.false.
+    first=.FALSE.
   ENDIF  ! (first)
 !>jyg
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/carbon_cycle_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/carbon_cycle_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/carbon_cycle_mod.F90	(revision 5103)
@@ -218,5 +218,5 @@
   
   SUBROUTINE carbon_cycle_init()
-    ! This subroutine is called from tracco2i_init, which is called from phytrac_init only at first timestep.
+    ! 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.
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cdrag_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cdrag_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cdrag_mod.F90	(revision 5103)
@@ -301,7 +301,7 @@
        IF ((choix_bulk > 1 .AND. choix_bulk < 4) .AND. (nsrf == is_oce)) THEN
          IF(choix_bulk == 2) THEN
-           mixte = .false.
+           mixte = .FALSE.
          ELSE
-            mixte = .true.
+            mixte = .TRUE.
          ENDIF
          CALL clc_core_cp ( sqrt(zdu2),t1(i)-tsurf(i),q1(i)-qsurf(i),t1(i),q1(i),&
@@ -317,7 +317,7 @@
 !------------------                 Pour ECUME                 --------------------
        ELSE IF ((choix_bulk == 4) .and. (nsrf == is_oce)) THEN
-         OPRECIP = .false.
-         OPWEBB  = .false.
-         OPERTFLUX = .false.
+         OPRECIP = .FALSE.
+         OPWEBB  = .FALSE.
+         OPERTFLUX = .FALSE.
          IF (nsrf == is_oce) THEN
            PSSS = 0.0
@@ -340,6 +340,6 @@
 !------------------                 Pour COARE CNRM                 --------------------
        ELSE IF ((choix_bulk == 5) .and. (nsrf == is_oce)) THEN
-         LPRECIP = .false.
-         LPWG    = .false.
+         LPRECIP = .FALSE.
+         LPWG    = .FALSE.
          CALL ini_csts
          block
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cfmip_point_locations.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cfmip_point_locations.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cfmip_point_locations.F90	(revision 5103)
@@ -105,5 +105,5 @@
       tabijGCM(ip)=klon_glo
      else 
-      print*,'ip jpt tabijGCM',ip,jpt(ip),tabijGCM(ip)
+      PRINT*,'ip jpt tabijGCM',ip,jpt(ip),tabijGCM(ip)
      endif
 !    PRINT*,'CFMIP ip lon lat tabijGCM',ip,lonGCM(ip),latGCM(ip),tabijGCM(ip)
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/change_srf_frac_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/change_srf_frac_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/change_srf_frac_mod.F90	(revision 5103)
@@ -15,5 +15,5 @@
         alb_dir, alb_dif, tsurf, ustar, u10m, v10m, pbl_tke)
 
-! This subroutine is called from physiq.F at each timestep. 
+! This SUBROUTINE is called from physiq.F at each timestep.
 ! 1- For each type of ocean (force, slab, couple) receive new fractions only if
 !    it's time to modify (is_modified=true). Otherwise nothing is done (is_modified=false).   
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/clc_core_cp.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/clc_core_cp.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/clc_core_cp.F90	(revision 5103)
@@ -230,3 +230,3 @@
 
       RETURN
-      END subroutine clc_core_cp
+      END SUBROUTINE clc_core_cp
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/clouds_gno.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/clouds_gno.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/clouds_gno.F90	(revision 5103)
@@ -167,5 +167,5 @@
               aux(i) = 2.0*delta(i)*(1.-exdel)/(1.+exdel)
               IF (aux(i)<0.) THEN
-                ! print*,'AUX(',i,',',k,')<0',aux(i),delta(i),beta(i)
+                ! PRINT*,'AUX(',i,',',k,')<0',aux(i),delta(i),beta(i)
                 aux(i) = 0.
               END IF
@@ -201,9 +201,9 @@
             zv2 = v2
             IF (zu2>20. .OR. zv2>20.) THEN
-              ! print*,'ATTENTION !!! xx(',i,') =', xx(i)
-              ! print*,'ATTENTION !!! klon,ND,R,RS,QSUB,PTCONV,RATQSC,CLDF',
+              ! PRINT*,'ATTENTION !!! xx(',i,') =', xx(i)
+              ! PRINT*,'ATTENTION !!! klon,ND,R,RS,QSUB,PTCONV,RATQSC,CLDF',
               ! .klon,ND,R(i,k),RS(i,k),QSUB(i,k),PTCONV(i,k),RATQSC(i,k),
               ! .CLDF(i,k)
-              ! print*,'ATTENTION !!! zu2 zv2 =',zu2(i),zv2(i)
+              ! PRINT*,'ATTENTION !!! zu2 zv2 =',zu2(i),zv2(i)
               zu2 = 20.
               zv2 = 20.
@@ -218,11 +218,11 @@
 
           ! if (beta(i).lt.1.e-10) then
-          ! print*,'avant test ',i,k,lconv(i),u(i),v(i),beta(i)
+          ! PRINT*,'avant test ',i,k,lconv(i),u(i),v(i),beta(i)
           ! stop
           ! endif
           IF (abs(fprime)<1.E-11) THEN
-            ! print*,'avant test fprime<.e-11 '
+            ! PRINT*,'avant test fprime<.e-11 '
             ! s        ,i,k,lconv(i),u(i),v(i),beta(i),fprime(i)
-            ! print*,'klon,ND,R,RS,QSUB',
+            ! PRINT*,'klon,ND,R,RS,QSUB',
             ! s        klon,ND,R(i,k),rs(i,k),qsub(i,k)
             fprime = sign(1.E-11, fprime)
@@ -231,6 +231,6 @@
 
           IF (abs(dist/beta(i))<epsilon) THEN
-            ! print*,'v-u **2',(v(i)-u(i))**2
-            ! print*,'exp v-u **2',exp((v(i)-u(i))**2)
+            ! PRINT*,'v-u **2',(v(i)-u(i))**2
+            ! PRINT*,'exp v-u **2',exp((v(i)-u(i))**2)
             ptconv(i, k) = .TRUE.
             lconv(i) = .TRUE.
@@ -242,5 +242,5 @@
             xx(i) = xx(i) - dist/fprime
           END IF
-          ! print*,'apres test ',i,k,lconv(i)
+          ! PRINT*,'apres test ',i,k,lconv(i)
 
         END IF ! lconv
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cmp_seri_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cmp_seri_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cmp_seri_mod.F90	(revision 5103)
@@ -29,5 +29,5 @@
     ! Local :
     !--------
-    logical, save :: first=.true.
+    logical, save :: first=.TRUE.
     !$OMP THREADPRIVATE(first)
 
@@ -41,5 +41,5 @@
        ALLOCATE(q_prev(klon,klev))
        ALLOCATE(t_prev(klon,klev))
-       first=.false.
+       first=.FALSE.
     endif
     ! store current values of x_seri variables
@@ -75,5 +75,5 @@
     logical any_differ
 
-    any_differ = .false.
+    any_differ = .FALSE.
 
     dt_seri(:,:)=t_seri(:,:)-t_prev(:,:)
@@ -81,8 +81,8 @@
        if ( .not. any_differ ) write (*,*) "In cmp_seri, after ",text
        write (*,*) '*** t_seri has changed',minval(dt_seri),maxval(dt_seri)
-       t_differ=.true.
-       any_differ = .true.
+       t_differ=.TRUE.
+       any_differ = .TRUE.
     ELSE
-       t_differ=.false.
+       t_differ=.FALSE.
     END IF
 
@@ -91,8 +91,8 @@
        if ( .not. any_differ ) write (*,*) "In cmp_seri, after ",text
        write (*,*) '*** q_seri has changed',minval(dq_seri),maxval(dq_seri)
-       q_differ=.true.
-       any_differ = .true.
+       q_differ=.TRUE.
+       any_differ = .TRUE.
     ELSE
-       q_differ=.false.
+       q_differ=.FALSE.
     END IF
 
@@ -101,8 +101,8 @@
        if ( .not. any_differ ) write (*,*) "In cmp_seri, after ",text
        write (*,*) '*** ql_seri has changed',minval(dql_seri),maxval(dql_seri)
-       ql_differ=.true.
-       any_differ = .true.
+       ql_differ=.TRUE.
+       any_differ = .TRUE.
     ELSE
-       ql_differ=.false.
+       ql_differ=.FALSE.
     END IF
 
@@ -111,8 +111,8 @@
        if ( .not. any_differ ) write (*,*) "In cmp_seri, after ",text
        write (*,*) '*** qs_seri has changed',minval(dqs_seri),maxval(dqs_seri)
-       qs_differ=.true.
-       any_differ = .true.
+       qs_differ=.TRUE.
+       any_differ = .TRUE.
     ELSE
-       qs_differ=.false.
+       qs_differ=.FALSE.
     END IF
 
@@ -121,8 +121,8 @@
        if ( .not. any_differ ) write (*,*) "In cmp_seri, after ",text
        write (*,*) '*** u_seri has changed',minval(du_seri),maxval(du_seri)
-       u_differ=.true.
-       any_differ = .true.
+       u_differ=.TRUE.
+       any_differ = .TRUE.
     ELSE
-       u_differ=.false.
+       u_differ=.FALSE.
     END IF
 
@@ -131,8 +131,8 @@
        if ( .not. any_differ ) write (*,*) "In cmp_seri, after ",text
        write (*,*) '*** v_seri has changed',minval(dv_seri),maxval(dv_seri)
-       v_differ=.true.
-       any_differ = .true.
+       v_differ=.TRUE.
+       any_differ = .TRUE.
     ELSE
-       v_differ=.false.
+       v_differ=.FALSE.
     END IF
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/coare_cp_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/coare_cp_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/coare_cp_mod.F90	(revision 5103)
@@ -47,5 +47,5 @@
 
 
-subroutine coare_cp(du,dt,dq,&
+SUBROUTINE coare_cp(du,dt,dq,&
      t,q,&
      zu,zt,zq,&
@@ -245,5 +245,5 @@
   rugosh = zot
 
-end subroutine coare_cp
+END SUBROUTINE  coare_cp
 
 end module coare_cp_mod
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/conccm.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/conccm.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/conccm.F90	(revision 5103)
@@ -248,5 +248,5 @@
   REAL dcmr3(klon) ! cmrb convective change (upper lvl)
   REAL flotab(klon) ! hc - hbs (mesure d'instabilite)
-  LOGICAL ldcum(klon) ! .true. si la convection existe
+  LOGICAL ldcum(klon) ! .TRUE. si la convection existe
   LOGICAL etagt0 ! true if eta > 0.0
   REAL dt ! current 2 delta-t (model time step)
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/concvl.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/concvl.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/concvl.F90	(revision 5103)
@@ -338,5 +338,5 @@
 ! do k=1,lalim_conv(i)
 ! em_wght(k)=wght_th(i,k)
-! print*,'em_wght=',em_wght(k),wght_th(i,k)
+! PRINT*,'em_wght=',em_wght(k),wght_th(i,k)
 ! END DO
 ! END DO
@@ -547,5 +547,5 @@
     END DO
   END IF
-! print*, 'concvl->: dd_t,dd_q ',dd_t(1,1),dd_q(1,1)
+! PRINT*, 'concvl->: dd_t,dd_q ',dd_t(1,1),dd_q(1,1)
 
   DO k = 1, klev
@@ -562,23 +562,23 @@
   IF (prt_level>=20) THEN
     DO k = 1, klev
-! print*,'physiq apres_add_con i k it d_u d_v d_t d_q qdl0',igout, &
+! PRINT*,'physiq apres_add_con i k it d_u d_v d_t d_q qdl0',igout, &
 !         k,itap,d_u_con(igout,k) ,d_v_con(igout,k), d_t_con(igout,k), &
 !         d_q_con(igout,k),dql0(igout,k)
-! print*,'phys apres_add_con itap Ma cin ALE ALP wak t q undi t q', &
+! PRINT*,'phys apres_add_con itap Ma cin ALE ALP wak t q undi t q', &
 !         itap,Ma(igout,k),cin(igout),ALE(igout), ALP(igout), &
 !         t_wake(igout,k),q_wake(igout,k),t_undi(igout,k),q_undi(igout,k)
-! print*,'phy apres_add_con itap CON rain snow EMA wk1 wk2 Vpp mip', &
+! PRINT*,'phy apres_add_con itap CON rain snow EMA wk1 wk2 Vpp mip', &
 !         itap,rain_con(igout),snow_con(igout),ema_work1(igout,k), &
 !         ema_work2(igout,k),Vprecip(igout,k), mip(igout,k)
-! print*,'phy apres_add_con itap upwd dnwd dnwd0 cape tvp Tconv ', &
+! PRINT*,'phy apres_add_con itap upwd dnwd dnwd0 cape tvp Tconv ', &
 !         itap,upwd(igout,k),dnwd(igout,k),dnwd0(igout,k),cape(igout), &
 !         tvp(igout,k),Tconv(igout,k)
-! print*,'phy apres_add_con itap dtvpdt dtvdq dplcl dplcldr qcondc', &
+! PRINT*,'phy apres_add_con itap dtvpdt dtvdq dplcl dplcldr qcondc', &
 !         itap,dtvpdt1(igout,k),dtvpdq1(igout,k),dplcldt(igout), &
 !         dplcldr(igout),qcondc(igout,k)
-! print*,'phy apres_add_con itap wd pmflxr Kpmflxr Kp1 Kpmflxs Kp1', &
+! PRINT*,'phy apres_add_con itap wd pmflxr Kpmflxr Kp1 Kpmflxs Kp1', &
 !         itap,wd(igout),pmflxr(igout,k),pmflxr(igout,k+1),pmflxs(igout,k), &
 !         pmflxs(igout,k+1)
-! print*,'phy apres_add_con itap da phi mp ftd fqd lalim wgth', &
+! PRINT*,'phy apres_add_con itap da phi mp ftd fqd lalim wgth', &
 !         itap,da(igout,k),phi(igout,k,k),mp(igout,k),ftd(igout,k), &
 !         fqd(igout,k),lalim_conv(igout),wght_th(igout,k)
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/conema3.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/conema3.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/conema3.F90	(revision 5103)
@@ -199,5 +199,5 @@
   qcond_incld(:, :) = 0.
 
-  ! @$$      print*,'debut conema'
+  ! @$$      PRINT*,'debut conema'
 
   DO i = 1, klon
@@ -215,11 +215,11 @@
         em_tra(l, itra) = tra(i, l, itra)
       END DO
-      ! @$$      print*,'em_t',em_t
-      ! @$$      print*,'em_q',em_q
-      ! @$$      print*,'em_qs',em_qs
-      ! @$$      print*,'em_u',em_u
-      ! @$$      print*,'em_v',em_v
-      ! @$$      print*,'em_tra',em_tra
-      ! @$$      print*,'em_p',em_p
+      ! @$$      PRINT*,'em_t',em_t
+      ! @$$      PRINT*,'em_q',em_q
+      ! @$$      PRINT*,'em_qs',em_qs
+      ! @$$      PRINT*,'em_u',em_u
+      ! @$$      PRINT*,'em_v',em_v
+      ! @$$      PRINT*,'em_tra',em_tra
+      ! @$$      PRINT*,'em_p',em_p
 
 
@@ -229,9 +229,9 @@
       zx_qs = r2es*foeew(zx_t, zdelta)/em_p(l)/100.0
       zx_qs = min(0.5, zx_qs)
-      ! @$$       print*,'zx_qs',zx_qs
+      ! @$$       PRINT*,'zx_qs',zx_qs
       zcor = 1./(1.-retv*zx_qs)
       zx_qs = zx_qs*zcor
       em_qs(l) = zx_qs
-      ! @$$      print*,'em_qs',em_qs
+      ! @$$      PRINT*,'em_qs',em_qs
 
       em_work1(l) = work1(i, l)
@@ -264,9 +264,9 @@
 1793 FORMAT ('w avant convect ', /, 10(1X,E13.5))
 
-    ! @$$      print*,'avant convect'
+    ! @$$      PRINT*,'avant convect'
     ! cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
 
 
-    ! print*,'avant convect i=',i
+    ! PRINT*,'avant convect i=',i
     CALL convect3(dtime, epmax, ok_adj_ema, em_t, em_q, em_qs, em_u, em_v, &
       em_tra, em_p, em_ph, klev, klev+1, klev-1, ntra, dtime, iflag, em_d_t, &
@@ -276,5 +276,5 @@
       em_dtvpdq1, em_dplcldt, em_dplcldr, & ! sbl
       em_d_t2, em_d_q2, em_d_u2, em_d_v2, em_wd, em_qcond, em_qcondc) !sbl
-    ! print*,'apres convect '
+    ! PRINT*,'apres convect '
 
     ! cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
@@ -330,5 +330,5 @@
     END IF
 
-    ! sb3d       print*,'i, iflag=',i,iflag
+    ! sb3d       PRINT*,'i, iflag=',i,iflag
 
     ! cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/conemav.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/conemav.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/conemav.F90	(revision 5103)
@@ -121,5 +121,5 @@
   ! CALL dump2d(iim,jjm-1,rflag(2:klon-1),'FLAG CONVECTION   ')
   ! if (klon.eq.1) then
-  ! print*,'IFLAG ',iflag
+  ! PRINT*,'IFLAG ',iflag
   ! else
   ! write(*,'(96i1)') (iflag(i),i=2,klon-1)
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/conf_phys_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/conf_phys_m.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/conf_phys_m.F90	(revision 5103)
@@ -257,5 +257,5 @@
     !-----------------------------------------------------------------
 
-    print*, 'CONFPHYS ENTREE'
+    PRINT*, 'CONFPHYS ENTREE'
     !$OMP MASTER 
     !Config Key  = type_ocean 
@@ -1840,5 +1840,5 @@
 
 
-    print*, 'CONFPHYS OOK avant drag_ter'
+    PRINT*, 'CONFPHYS OOK avant drag_ter'
 
     ! PARAMETRES CDRAG
@@ -2034,6 +2034,6 @@
     ok_gwd_rando_omp = .FALSE.
     IF (klon_glo == 1) THEN
-      print*, 'La parametrisation des ondes de gravites non orographiques'
-      print*, 'ne fonctionne pas en 1D'
+      PRINT*, 'La parametrisation des ondes de gravites non orographiques'
+      PRINT*, 'ne fonctionne pas en 1D'
     ELSE
       CALL getin('ok_gwd_rando', ok_gwd_rando_omp)
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/conlmd.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/conlmd.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/conlmd.F90	(revision 5103)
@@ -1000,5 +1000,5 @@
 
 860 CONTINUE ! Calculer les tendances et diagnostiques
-  ! cc      print*, "Apres 860"
+  ! cc      PRINT*, "Apres 860"
 
   DO k = 1, klev
@@ -1586,5 +1586,5 @@
   INTEGER klab(klon, klev)
 
-  ! quand lflag=.true., on est sous le nuage, il faut donc appliquer
+  ! quand lflag=.TRUE., on est sous le nuage, il faut donc appliquer
   ! le processus d'elevation.
   LOGICAL lflag(klon)
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/convect1.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/convect1.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/convect1.F90	(revision 5103)
@@ -143,5 +143,5 @@
   ! t:   Array of absolute temperature (K) of dimension ND, with first
   ! index corresponding to lowest model level. Note that this array
-  ! will be altered by the subroutine if dry convective adjustment
+  ! will be altered by the SUBROUTINE if dry convective adjustment
   ! occurs and if IPBL is not equal to 0.
 
@@ -629,5 +629,5 @@
   ! moistening, velocity mixing, and precipiation.
 
-  ! print*,'cpd avant convect2 ',cpd
+  ! PRINT*,'cpd avant convect2 ',cpd
   IF (ncum>0) THEN
     CALL convect2(ncum, idcum, len, nd, ndp1, nl, minorig, nk, icb, t, q, qs, &
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/convect2.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/convect2.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/convect2.F90	(revision 5103)
@@ -354,5 +354,5 @@
   INTEGER num1, num2
 
-  ! print*,'cpd en entree de convect2 ',cpd
+  ! PRINT*,'cpd en entree de convect2 ',cpd
   nlp = nl + 1
 
@@ -395,5 +395,5 @@
       END IF
     END DO
-    ! print*,'100 ncum,nn',ncum,nn
+    ! PRINT*,'100 ncum,nn',ncum,nn
   END DO
   nn = 0
@@ -411,5 +411,5 @@
     END IF
   END DO
-  ! print*,'150 ncum,nn',ncum,nn
+  ! PRINT*,'150 ncum,nn',ncum,nn
 
   ! Initialize the tendencies, det, wd, tprime, qprime.
@@ -505,10 +505,10 @@
 
         alv = lv0 - clmcpv*(t(i,k)-273.15)
-        ! print*,'cpd dans convect2 ',cpd
-        ! print*,'tp(i,k),ah0(i),cl,cpd,qnk(i),t(i,k),gz(i,k),alv,qg,cpd'
-        ! print*,tp(i,k),ah0(i),cl,cpd,qnk(i),t(i,k),gz(i,k),alv,qg,cpd
+        ! PRINT*,'cpd dans convect2 ',cpd
+        ! PRINT*,'tp(i,k),ah0(i),cl,cpd,qnk(i),t(i,k),gz(i,k),alv,qg,cpd'
+        ! PRINT*,tp(i,k),ah0(i),cl,cpd,qnk(i),t(i,k),gz(i,k),alv,qg,cpd
         tp(i, k) = (ah0(i)-(cl-cpd)*qnk(i)*t(i,k)-gz(i,k)-alv*qg)/cpd
         ! if (.not.cpd.gt.1000.) then
-        ! print*,'CPD=',cpd
+        ! PRINT*,'CPD=',cpd
         ! stop
         ! endif
@@ -554,6 +554,6 @@
       IF (k>=(icb(i)+1)) THEN
         tvp(i, k) = tvp(i, k)*(1.0-qnk(i)+ep(i,k)*clw(i,k))
-        ! print*,'i,k,tvp(i,k),qnk(i),ep(i,k),clw(i,k)'
-        ! print*, i,k,tvp(i,k),qnk(i),ep(i,k),clw(i,k)
+        ! PRINT*,'i,k,tvp(i,k),qnk(i),ep(i,k),clw(i,k)'
+        ! PRINT*, i,k,tvp(i,k),qnk(i),ep(i,k),clw(i,k)
       END IF
     END DO
@@ -577,8 +577,8 @@
     hp(i, 1) = h(i, 1)
     ! if(.not.cpn(i,1).gt.900.) then
-    ! print*,'i,lv(i,1),cpn(i,1)'
-    ! print*, i,lv(i,1),cpn(i,1)
+    ! PRINT*,'i,lv(i,1),cpn(i,1)'
+    ! PRINT*, i,lv(i,1),cpn(i,1)
     ! k=(i-1)/ncum+1
-    ! print*,'i,k',mod(i,ncum),k,'  cpn',cpn(mod(i,ncum),k)
+    ! PRINT*,'i,k',mod(i,ncum),k,'  cpn',cpn(mod(i,ncum),k)
     ! stop
     ! endif
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/convect3.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/convect3.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/convect3.F90	(revision 5103)
@@ -326,9 +326,9 @@
   IF (t(1)<250.0 .OR. rr(1)<=0.0) THEN
     iflag = 0
-    ! sb3d         print*,'je suis passe par 366'
+    ! sb3d         PRINT*,'je suis passe par 366'
     RETURN
   END IF
 
-  ! jyg1 Utilisation de la subroutine CLIFT
+  ! jyg1 Utilisation de la SUBROUTINE CLIFT
   ! C      RH=RR(1)/RS(1)
   ! C      CHI=T(1)/(1669.0-122.0*RH-T(1))
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cpl_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cpl_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cpl_mod.F90	(revision 5103)
@@ -7,7 +7,7 @@
 ! timestep is done in here. 
 
-! Each type of surface that recevie fields from the coupler have a subroutine named 
+! Each type of surface that recevie fields from the coupler have a SUBROUTINE named
 ! cpl_receive_XXX_fields and each surface that have fields to be sent to the coupler 
-! have a subroutine named cpl_send_XXX_fields.
+! have a SUBROUTINE named cpl_send_XXX_fields.
 
 !*************************************************************************************
@@ -31,5 +31,5 @@
   PRIVATE
 
-  ! All subroutine are public except cpl_send_all
+  ! All SUBROUTINE are public except cpl_send_all
   PUBLIC :: cpl_init, cpl_receive_frac, cpl_receive_ocean_fields, cpl_receive_seaice_fields, &
        cpl_send_ocean_fields, cpl_send_seaice_fields, cpl_send_land_fields, &
@@ -402,5 +402,5 @@
 
   SUBROUTINE cpl_receive_frac(itime, dtime, pctsrf, is_modified)
-! This subroutine receives from coupler for both ocean and seaice
+! This SUBROUTINE receives from coupler for both ocean and seaice
 ! 4 fields : read_sst, read_sic, read_sit and read_alb_sic. 
 ! The new sea-ice-land-landice fraction is returned. The others fields 
@@ -652,5 +652,5 @@
        delta_sal, dTer, dSer, dt_ds)
 
-    ! This subroutine cumulates some fields for each time-step during
+    ! This SUBROUTINE cumulates some fields for each time-step during
     ! a coupling period. At last time-step in a coupling period the
     ! fields are transformed to the grid accepted by the coupler. No
@@ -914,5 +914,5 @@
        sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol)
 
-! This subroutine cumulates some fields for each time-step during a coupling 
+! This SUBROUTINE cumulates some fields for each time-step during a coupling
 ! period. At last time-step in a coupling period the fields are transformed to the 
 ! grid accepted by the coupler. All fields for all types of surfaces are sent to
@@ -1112,5 +1112,5 @@
   SUBROUTINE cpl_send_land_fields(itime, knon, knindex, rriv_in, rcoa_in)
 
-! This subroutine cumulates some fields for each time-step during a coupling 
+! This SUBROUTINE cumulates some fields for each time-step during a coupling
 ! period. At last time-step in a coupling period the fields are transformed to the 
 ! grid accepted by the coupler. No sending to the coupler will be done from here 
@@ -1169,5 +1169,5 @@
 
   SUBROUTINE cpl_send_landice_fields(itime, knon, knindex, rlic_in, rlic_in_frac)
-! This subroutine cumulates the field for melting ice for each time-step 
+! This SUBROUTINE cumulates the field for melting ice for each time-step
 ! during a coupling period. This routine will not send to coupler. Sending 
 ! will be done in cpl_send_seaice_fields.
@@ -1223,5 +1223,5 @@
   SUBROUTINE cpl_send_all(itime, dtime, pctsrf, lafin, rlon, rlat)
 ! This routine will send fields for all different surfaces to the coupler.
-! This subroutine should be executed after calculations by the last surface(sea-ice),
+! This SUBROUTINE should be executed after calculations by the last surface(sea-ice),
 ! all calculations at the different surfaces have to be done before. 
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/ctstar.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/ctstar.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/ctstar.F90	(revision 5103)
@@ -118,5 +118,5 @@
    PTSTAR(JL)=PTB(JL)*(1.0+ZALPHA*(PRESBH(JL)/PRESBF(JL)-1.0))
    PT0(JL)=PTSTAR(JL)+ZDTDZSG*POROG(JL)
-!  print*,'cstar JL ptb zalpha PRESBH PRESBF ptstar' &
+!  PRINT*,'cstar JL ptb zalpha PRESBH PRESBF ptstar' &
 !  ,JL,PTB(JL),ZALPHA,PRESBH(JL),PRESBF(JL),PTSTAR(JL)
 ENDDO
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cv30_routines.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cv30_routines.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cv30_routines.F90	(revision 5103)
@@ -967,7 +967,7 @@
         ! debug	       alv=lv0-clmcpv*(t(i,k)-t0)
         alv = lv0 - clmcpv*(t(i,k)-273.15)
-        ! print*,'cpd dans convect2 ',cpd
-        ! print*,'tp(i,k),ah0(i),cl,cpd,qnk(i),t(i,k),gz(i,k),alv,qg,cpd'
-        ! print*,tp(i,k),ah0(i),cl,cpd,qnk(i),t(i,k),gz(i,k),alv,qg,cpd
+        ! PRINT*,'cpd dans convect2 ',cpd
+        ! PRINT*,'tp(i,k),ah0(i),cl,cpd,qnk(i),t(i,k),gz(i,k),alv,qg,cpd'
+        ! PRINT*,tp(i,k),ah0(i),cl,cpd,qnk(i),t(i,k),gz(i,k),alv,qg,cpd
 
         ! ori c approximation here:
@@ -1030,6 +1030,6 @@
   ! ori        if(k.ge.(icb(i)+1))then
   ! ori          tvp(i,k)=tvp(i,k)*(1.0-qnk(i)+ep(i,k)*clw(i,k))
-  ! oric         print*,'i,k,tvp(i,k),qnk(i),ep(i,k),clw(i,k)'
-  ! oric         print*, i,k,tvp(i,k),qnk(i),ep(i,k),clw(i,k)
+  ! oric         PRINT*,'i,k,tvp(i,k),qnk(i),ep(i,k),clw(i,k)'
+  ! oric         PRINT*, i,k,tvp(i,k),qnk(i),ep(i,k),clw(i,k)
   ! ori        endif
   ! ori 330    continue
@@ -1158,9 +1158,9 @@
   ! ori      CALL zilch(byp,ncum)
   ! ori      do 515 i=1,ncum
-  ! ori        lcape(i)=.true.
+  ! ori        lcape(i)=.TRUE.
   ! ori 515  continue
   ! ori      do 530 k=minorig+1,nl-1
   ! ori        do 520 i=1,ncum
-  ! ori          if(cape(i).lt.0.0)lcape(i)=.false.
+  ! ori          if(cape(i).lt.0.0)lcape(i)=.FALSE.
   ! ori          if((k.ge.(icb(i)+1)).and.lcape(i))then
   ! ori            by=(tvp(i,k)-tv(i,k))*dph(i,k)/p(i,k)
@@ -3271,5 +3271,5 @@
 END SUBROUTINE cv30_uncompress
 
-        subroutine cv30_epmax_fn_cape(nloc,ncum,nd &
+        SUBROUTINE cv30_epmax_fn_cape(nloc,ncum,nd &
                 ,cape,ep,hp,icb,inb,clw,nk,t,h,lv &
                 ,epmax_diag)
@@ -3356,5 +3356,5 @@
 
       return
-      end subroutine cv30_epmax_fn_cape
-
-
+      END SUBROUTINE  cv30_epmax_fn_cape
+
+
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cv3_cine.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cv3_cine.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cv3_cine.F90	(revision 5103)
@@ -55,5 +55,5 @@
   DO k = 1, nd
     DO il = 1, ncum
-      ! print*,'tvp tv=',tvp(il,k),tv(il,k)
+      ! PRINT*,'tvp tv=',tvp(il,k),tv(il,k)
       buoy(il, k) = tvp(il, k) - tv(il, k)
     END DO
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cv3_enthalpmix.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cv3_enthalpmix.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cv3_enthalpmix.F90	(revision 5103)
@@ -111,5 +111,5 @@
         ! CRtest:couplage thermiques: deja normalise
         ! wi(i,j) = w(j)
-        ! print*,'wi',wi(i,j)
+        ! PRINT*,'wi',wi(i,j)
         wi(i, j) = w(j)*(p1(i,j)-p2(i,j))*coef(i)+eqwght(i)
         dpw(i) = dpw(i) + wi(i, j)
@@ -123,5 +123,5 @@
   ! CR:print
   ! do i=1,len
-  ! print*,'plim',plim1(i),plim2p(i)
+  ! PRINT*,'plim',plim1(i),plim2p(i)
   ! enddo
   DO j = 1, nd
@@ -160,8 +160,8 @@
     tmix(i) = akm(i)/b2(i)
     thmix(i) = tmix(i)*(p0/pnk(i))**rdcp(i)
-    ! print*,'thmix akm',akm(i),b2(i)
-    ! print*,'thmix t',tmix(i),p0
-    ! print*,'thmix p',pnk(i),rdcp(i)
-    ! print*,'thmix',thmix(i)
+    ! PRINT*,'thmix akm',akm(i),b2(i)
+    ! PRINT*,'thmix t',tmix(i),p0
+    ! PRINT*,'thmix p',pnk(i),rdcp(i)
+    ! PRINT*,'thmix',thmix(i)
     ! c         thmix(i) = akm(i)/a2(i)
     ! c         tmix(i)= thmix(i)*(pnk(i)*p0m1)**rdcp(i)
@@ -204,5 +204,5 @@
     END IF ! iflag=7
 
-    ! print*,'NIFLAG7  =',niflag7
+    ! PRINT*,'NIFLAG7  =',niflag7
 
   END DO
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cv3_estatmix.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cv3_estatmix.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cv3_estatmix.F90	(revision 5103)
@@ -111,5 +111,5 @@
         ! CRtest:couplage thermiques: deja normalise
         ! wi(i,j) = w(j)
-        ! print*,'wi',wi(i,j)
+        ! PRINT*,'wi',wi(i,j)
         wi(i, j) = w(j)*(p1(i,j)-p2(i,j))*coef(i)+eqwght(i)
         dpw(i) = dpw(i) + wi(i, j)
@@ -123,5 +123,5 @@
   ! CR:print
   ! do i=1,len
-  ! print*,'plim',plim1(i),plim2p(i)
+  ! PRINT*,'plim',plim1(i),plim2p(i)
   ! enddo
   DO j = 1, nd
@@ -148,5 +148,5 @@
     !      (Use of Cpv since we are dealing with dry static energy)
     thmix(i) = tmix(i)*(p0/pnk(i))**rdcp(i)
-    ! print*,'tmix thmix hmix ',tmix(i),thmix(i),hmix(i)
+    ! PRINT*,'tmix thmix hmix ',tmix(i),thmix(i),hmix(i)
     zdelta = max(0., sign(1.,rtt-tmix(i)))
     qsmix(i) = r2es*foeew(tmix(i), zdelta)/(pnk(i)*100.)
@@ -187,5 +187,5 @@
     END IF ! iflag=7
 
-    ! print*,'NIFLAG7  =',niflag7
+    ! PRINT*,'NIFLAG7  =',niflag7
 
   END DO
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cv3_routines.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cv3_routines.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cv3_routines.F90	(revision 5103)
@@ -577,5 +577,5 @@
 
 
-! print*,'icb dans cv3_feed '
+! PRINT*,'icb dans cv3_feed '
 ! write(*,'(64i2)') icb(2:len-1)
 ! CALL dump2d(64,43,'plcl dans cv3_feed ',plcl(2:len-1))
@@ -1121,5 +1121,5 @@
         END IF
       END IF
-! print*,t(i,k),qi(i,k),'temp,testglace'
+! PRINT*,t(i,k),qi(i,k),'temp,testglace'
     END DO
   END DO
@@ -1410,5 +1410,5 @@
           clw(i, k) = max(0.0, clw(i,k))
           tvp(i, k) = max(0., tp(i,k)*(1.+qg/eps-qnk(i)))
-! print*,tvp(i,k),'tvp'
+! PRINT*,tvp(i,k),'tvp'
           IF (clw(i,k)<1.E-11) THEN
             tp(i, k) = tv(i, k)
@@ -1479,5 +1479,5 @@
           clw(i, k) = max(0.0, clw(i,k))
           tvp(i, k) = max(0., tp(i,k)*(1.+qhsat(i,k)/eps-qta(i,k-1)))
-! print*,tvp(i,k),'tvp'
+! PRINT*,tvp(i,k),'tvp'
           IF (clw(i,k)<1.E-11) THEN
             tp(i, k) = tv(i, k)
@@ -1596,7 +1596,7 @@
 ! debug	       alv=lv0-clmcpv*(t(i,k)-t0)
         alv = lv0 - clmcpv*(t(i,k)-273.15)
-! print*,'cpd dans convect2 ',cpd
-! print*,'tp(i,k),ah0(i),cl,cpd,qnk(i),t(i,k),gz(i,k),alv,qg,cpd'
-! print*,tp(i,k),ah0(i),cl,cpd,qnk(i),t(i,k),gz(i,k),alv,qg,cpd
+! PRINT*,'cpd dans convect2 ',cpd
+! PRINT*,'tp(i,k),ah0(i),cl,cpd,qnk(i),t(i,k),gz(i,k),alv,qg,cpd'
+! PRINT*,tp(i,k),ah0(i),cl,cpd,qnk(i),t(i,k),gz(i,k),alv,qg,cpd
 
 ! ori c approximation here:
@@ -1659,8 +1659,8 @@
 !                                       (rrv*tbis*tbis)
 !        snew=1./snew
-!        print*,esi,qsat_new,snew,'esi,qsat,snew'
+!        PRINT*,esi,qsat_new,snew,'esi,qsat,snew'
 !        tp(i,k)=tg+(alf*qi(i,k)+alv*qg*(1.-(esi/es)))*snew
-!        print*,k,tp(i,k),qnk(i),'avec glace'
-!        print*,'tpNAN',tg,alf,qi(i,k),alv,qg,esi,es,snew
+!        PRINT*,k,tp(i,k),qnk(i),'avec glace'
+!        PRINT*,'tpNAN',tg,alf,qi(i,k),alv,qg,esi,es,snew
 !       enddo
 
@@ -1676,9 +1676,9 @@
                                                  (rrv*tp(i,k)*tp(i,k))
             snew = 1./snew
-! c             print*,esi,qsat_new,snew,'esi,qsat,snew'
+! c             PRINT*,esi,qsat_new,snew,'esi,qsat,snew'
             tp(i, k) = tp(i, k) + &
                        ((cpd*(1.-qnk(i))+cl*qnk(i))*(tg-tp(i,k)) + &
                         alv*(qg-qsat_new)+alf*qi(i,k))*snew
-! print*,k,tp(i,k),qsat_new,qnk(i),qi(i,k), &
+! PRINT*,k,tp(i,k),qsat_new,qnk(i),qi(i,k), &
 !              'k,tp,q,qt,qi avec glace'
           END DO
@@ -1688,5 +1688,5 @@
           clw(i, k) = max(0.0, clw(i,k))
           tvp(i, k) = max(0., tp(i,k)*(1.+qsat_new/eps-qnk(i)))
-! print*,tvp(i,k),'tvp'
+! PRINT*,tvp(i,k),'tvp'
         END IF
         IF (clw(i,k)<1.E-11) THEN
@@ -1766,6 +1766,6 @@
 ! ori        if(k.ge.(icb(i)+1))then
 ! ori          tvp(i,k)=tvp(i,k)*(1.0-qnk(i)+ep(i,k)*clw(i,k))
-! oric         print*,'i,k,tvp(i,k),qnk(i),ep(i,k),clw(i,k)'
-! oric         print*, i,k,tvp(i,k),qnk(i),ep(i,k),clw(i,k)
+! oric         PRINT*,'i,k,tvp(i,k),qnk(i),ep(i,k),clw(i,k)'
+! oric         PRINT*, i,k,tvp(i,k),qnk(i),ep(i,k),clw(i,k)
 ! ori        endif
 ! ori 330    continue
@@ -1870,5 +1870,5 @@
 
 !  DO i = 1, ncum
-!     print*,"inb",inb(i)
+!     PRINT*,"inb",inb(i)
 !  ENDDO
 
@@ -1941,9 +1941,9 @@
 ! ori      CALL zilch(byp,ncum)
 ! ori      do 515 i=1,ncum
-! ori        lcape(i)=.true.
+! ori        lcape(i)=.TRUE.
 ! ori 515  continue
 ! ori      do 530 k=minorig+1,nl-1
 ! ori        do 520 i=1,ncum
-! ori          if(cape(i).lt.0.0)lcape(i)=.false.
+! ori          if(cape(i).lt.0.0)lcape(i)=.FALSE.
 ! ori          if((k.ge.(icb(i)+1)).and.lcape(i))then
 ! ori            by=(tvp(i,k)-tv(i,k))*dph(i,k)/p(i,k)
@@ -2391,5 +2391,5 @@
 
           IF (cvflag_ice) THEN
-! print*,cvflag_ice,'cvflag_ice dans do 700'
+! PRINT*,cvflag_ice,'cvflag_ice dans do 700'
             IF (t(il,j)<=263.15) THEN
               bf2 = 1. + (lf(il,j)+lv(il,j))*(lv(il,j)+frac(il,j)* &
@@ -3096,5 +3096,5 @@
           END IF
           prec(il, i) = max(0., 2.*revap*revap-prec(il,i+1))
-! print*,prec(il,i),'neige'
+! PRINT*,prec(il,i),'neige'
 
 !JYG    Dans sa formulation originale, Emanuel calcule l'evaporation par:
@@ -3545,5 +3545,5 @@
 
   delti = 1.0/delt
-! print*,'cv3_yield initialisation delt', delt
+! PRINT*,'cv3_yield initialisation delt', delt
 
   DO il = 1, ncum
@@ -3583,5 +3583,5 @@
     END DO
   END DO
-! print*,'cv3_yield initialisation 2'
+! PRINT*,'cv3_yield initialisation 2'
 !AC!      do j=1,ntra
 !AC!       do i=1,nd
@@ -3591,5 +3591,5 @@
 !AC!       enddo
 !AC!      enddo
-! print*,'cv3_yield initialisation 3'
+! PRINT*,'cv3_yield initialisation 3'
   DO i = 1, nl
     DO il = 1, ncum
@@ -3614,5 +3614,5 @@
     END IF
   END DO
-! print*,'cv3_yield apres calcul precip'
+! PRINT*,'cv3_yield apres calcul precip'
 
 
@@ -3708,5 +3708,5 @@
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-!    print*,'cv3_yield avant ft'
+!    PRINT*,'cv3_yield avant ft'
 ! am is the part of cbmf taken from the first level
   DO il = 1, ncum
@@ -3835,5 +3835,5 @@
 !AC!       enddo
 !AC!      enddo
-! print*,'cv3_yield apres ft'
+! PRINT*,'cv3_yield apres ft'
 
 !jyg<
@@ -4925,5 +4925,5 @@
 
 !        qtc(il, i) = siga(il,i)*qta(il,i-1)+(1.-siga(il,i))*qtment(il,i) ! cld
-!     print*,'BIGAUSSIAN CONV',siga(il,i),sigment(il,i),qtc(il,i)  
+!     PRINT*,'BIGAUSSIAN CONV',siga(il,i),sigment(il,i),qtc(il,i)
       		
       ELSE IF (iflag_clw==1) THEN                                    ! cld
@@ -4934,5 +4934,5 @@
     END DO                                                           ! cld
   END DO
-! print*,'cv3_yield fin'
+! PRINT*,'cv3_yield fin'
 
   RETURN
@@ -5126,5 +5126,5 @@
 
 
-        subroutine cv3_epmax_fn_cape(nloc,ncum,nd &
+        SUBROUTINE cv3_epmax_fn_cape(nloc,ncum,nd &
                  , ep,hp,icb,inb,clw,nk,t,h,hnk,lv,lf,frac &
                  , pbase, p, ph, tv, buoy, sig, w0,iflag &
@@ -5266,6 +5266,6 @@
 
       return
-      end subroutine cv3_epmax_fn_cape
-
-
-
+      END SUBROUTINE  cv3_epmax_fn_cape
+
+
+
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cv3p1_closure.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cv3p1_closure.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cv3p1_closure.F90	(revision 5103)
@@ -146,5 +146,5 @@
   END DO
 
-  ! if(prt.level.GE.20) print*,'cv3p1_param apres 100'
+  ! if(prt.level.GE.20) PRINT*,'cv3p1_param apres 100'
   ! compute icbmax:
 
@@ -153,5 +153,5 @@
     icbmax = max(icbmax, icb(il))
   END DO
-  ! if(prt.level.GE.20) print*,'cv3p1_param apres 200'
+  ! if(prt.level.GE.20) PRINT*,'cv3p1_param apres 200'
 
   ! update sig and w0 below cloud base:
@@ -392,9 +392,9 @@
 
   ! do i=1,nloc
-  ! print*,'avant cine p',pbase(i),plcl(i)
+  ! PRINT*,'avant cine p',pbase(i),plcl(i)
   ! enddo
   ! do j=1,nd
   ! do i=1,nloc
-  ! print*,'avant cine t',tv(i),tvp(i)
+  ! PRINT*,'avant cine t',tv(i),tvp(i)
   ! enddo
   ! enddo
@@ -472,5 +472,5 @@
         rhodp = 0.007*p(il, k)*(ph(il,k)-ph(il,k+1))/tv(il, k)
         mlim(il, k) = amu*rhodp
-        ! print*, 'siglim ', k,siglim(1,k)
+        ! PRINT*, 'siglim ', k,siglim(1,k)
       END IF
 
@@ -589,5 +589,5 @@
       ! cbmf(il) = cbmf1(il)
       ! endif
-      ! print*,'cbmf',cbmf1(il),cbmfmax(il)
+      ! PRINT*,'cbmf',cbmf1(il),cbmfmax(il)
     END IF
   END DO
@@ -648,5 +648,5 @@
            mad(il,k)=mad(il,k+1)+m(il,k+1)
         ENDIF
-!        print*,"mad",il,k,mad(il,k)
+!        PRINT*,"mad",il,k,mad(il,k)
     ENDDO
   ENDDO
@@ -658,5 +658,5 @@
     DO il = 1, ncum
        IF ((k>=(icb(il)+1)) .AND. (k<=inb(il)) .AND. (mlim(il,k)>0.)) THEN
-!          print*,"beta_coef",il,k,icb(il),inb(il),buoy(il,k),tv(il,k),wlim(il,k),wlim(il,k+1)
+!          PRINT*,"beta_coef",il,k,icb(il),inb(il),buoy(il,k),tv(il,k),wlim(il,k),wlim(il,k+1)
           beta_coef(il,k)=RG*coef_peel*buoy(il,k)/tv(il,k)/((wlim(il,k)+wlim(il,k+1))/2.)**2
        ELSE
@@ -666,5 +666,5 @@
   ENDDO
 
-!  print*,"apres beta_coef"
+!  PRINT*,"apres beta_coef"
 
   DO k = 1, nl
@@ -673,13 +673,13 @@
       IF ((k>=(icb(il)+1)) .AND. (k<=inb(il))) THEN
 
-!        print*,"dz",il,k,tv(il, k-1)
+!        PRINT*,"dz",il,k,tv(il, k-1)
         dz = (ph(il,k-1)-ph(il,k))/(p(il, k-1)/(rrd*tv(il, k-1))*RG)
         betalim(il,k)=betalim(il,k-1)*exp(-1.*beta_coef(il,k-1)*dz)
 !        betalim(il,k)=betalim(il,k-1)*exp(-RG*coef_peel*buoy(il,k-1)/tv(il,k-1)/5.**2*dz)
-!        print*,"me",il,k,mlim(il,k),buoy(il,k),wlim(il,k),mad(il,k)
+!        PRINT*,"me",il,k,mlim(il,k),buoy(il,k),wlim(il,k),mad(il,k)
         dz = (ph(il,k)-ph(il,k+1))/(p(il, k)/(rrd*tv(il, k))*RG)
 !        me(il,k)=betalim(il,k)*(m(il,k)+RG*coef_peel*buoy(il,k)/tv(il,k)/((wlim(il,k)+wlim(il,k+1))/2.)**2*dz*mad(il,k))
         me(il,k)=betalim(il,k)*(m(il,k)+beta_coef(il,k)*dz*mad(il,k))
-!        print*,"B/w2",il,k,RG*coef_peel*buoy(il,k)/tv(il,k)/((wlim(il,k)+wlim(il,k+1))/2.)**2*dz    
+!        PRINT*,"B/w2",il,k,RG*coef_peel*buoy(il,k)/tv(il,k)/((wlim(il,k)+wlim(il,k+1))/2.)**2*dz
       
       END IF
@@ -694,5 +694,5 @@
 !     m(il,icb(il))=m(il,icb(il))+RG*coef_peel*buoy(il,icb(il))/tv(il,icb(il)) &
 !                  /((wlim(il,icb(il))+wlim(il,icb(il)+1))/2.)**2*dz*mad(il,icb(il))
-!     print*,"wlim(icb)",icb(il),wlim(il,icb(il)),m(il,icb(il))
+!     PRINT*,"wlim(icb)",icb(il),wlim(il,icb(il)),m(il,icb(il))
 !  ENDDO
 
@@ -701,5 +701,5 @@
     DO il = 1, ncum
            med(il,k)=med(il,k+1)+m(il,k+1)
-!           print*,"somme(me),somme(m)",il,k,icb(il),med(il,k),md(il,k),me(il,k),m(il,k),wlim(il,k)
+!           PRINT*,"somme(me),somme(m)",il,k,icb(il),med(il,k),md(il,k),me(il,k),m(il,k),wlim(il,k)
     ENDDO
   ENDDO
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cv3p2_closure.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cv3p2_closure.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cv3p2_closure.F90	(revision 5103)
@@ -158,5 +158,5 @@
   END DO
 
-  ! if(prt.level.GE.20) print*,'cv3p2_closure apres 100'
+  ! if(prt.level.GE.20) PRINT*,'cv3p2_closure apres 100'
   ! compute icbmax:
 
@@ -165,5 +165,5 @@
     icbmax = max(icbmax, icb(il))
   END DO
-  ! if(prt.level.GE.20) print*,'cv3p2_closure apres 200'
+  ! if(prt.level.GE.20) PRINT*,'cv3p2_closure apres 200'
 
   ! update sig and w0 below cloud base:
@@ -431,9 +431,9 @@
 
   ! do i=1,nloc
-  ! print*,'avant cine p',pbase(i),plcl(i)
+  ! PRINT*,'avant cine p',pbase(i),plcl(i)
   ! enddo
   ! do j=1,nd
   ! do i=1,nloc
-  ! print*,'avant cine t',tv(i),tvp(i)
+  ! PRINT*,'avant cine t',tv(i),tvp(i)
   ! enddo
   ! enddo
@@ -540,5 +540,5 @@
 !!        rhodp(il,k) = 0.007*p(il, k)*(ph(il,k)-ph(il,k+1))/tv(il, k) !cor jyg : computed earlier
         mlim(il, k) = amu*rhodp(il,k)
-        ! print*, 'siglim ', k,siglim(1,k)
+        ! PRINT*, 'siglim ', k,siglim(1,k)
       END IF
 
@@ -655,5 +655,5 @@
       IF (cbmflim(il)>1.E-6) THEN
         cbmfalpb(il) = min(cbmfalp(il), (cbmfmax(il)-beta*cbmf0(il))/(1.-beta))
-        ! print*,'cbmfalpb',cbmfalpb(il),cbmfmax(il)
+        ! PRINT*,'cbmfalpb',cbmfalpb(il),cbmfmax(il)
       END IF
     END DO
@@ -668,5 +668,5 @@
       ! cbmfalpb(il) = cbmfalp(il)
       ! endif
-      ! print*,'cbmfalpb',cbmfalp(il),cbmfmax(il)
+      ! PRINT*,'cbmfalpb',cbmfalp(il),cbmfmax(il)
     END IF
   END DO
@@ -729,5 +729,5 @@
            mad(il,k)=mad(il,k+1)+m(il,k+1)
         ENDIF
-!        print*,"mad",il,k,mad(il,k)
+!        PRINT*,"mad",il,k,mad(il,k)
     ENDDO
   ENDDO
@@ -739,5 +739,5 @@
     DO il = 1, ncum
        IF ((k>=(icb(il)+1)) .AND. (k<=inb(il)) .AND. (mlim(il,k)>0.)) THEN
-!          print*,"beta_coef",il,k,icb(il),inb(il),buoy(il,k),tv(il,k),wlim(il,k),wlim(il,k+1)
+!          PRINT*,"beta_coef",il,k,icb(il),inb(il),buoy(il,k),tv(il,k),wlim(il,k),wlim(il,k+1)
           beta_coef(il,k)=RG*coef_peel*buoy(il,k)/tv(il,k)/((wlim(il,k)+wlim(il,k+1))/2.)**2
        ELSE
@@ -747,5 +747,5 @@
   ENDDO
 
-!  print*,"apres beta_coef"
+!  PRINT*,"apres beta_coef"
 
   DO k = 1, nl
@@ -754,13 +754,13 @@
       IF ((k>=(icb(il)+1)) .AND. (k<=inb(il))) THEN
 
-!        print*,"dz",il,k,tv(il, k-1)
+!        PRINT*,"dz",il,k,tv(il, k-1)
         dz = (ph(il,k-1)-ph(il,k))/(p(il, k-1)/(rrd*tv(il, k-1))*RG)
         betalim(il,k)=betalim(il,k-1)*exp(-1.*beta_coef(il,k-1)*dz)
 !        betalim(il,k)=betalim(il,k-1)*exp(-RG*coef_peel*buoy(il,k-1)/tv(il,k-1)/5.**2*dz)
-!        print*,"me",il,k,mlim(il,k),buoy(il,k),wlim(il,k),mad(il,k)
+!        PRINT*,"me",il,k,mlim(il,k),buoy(il,k),wlim(il,k),mad(il,k)
         dz = (ph(il,k)-ph(il,k+1))/(p(il, k)/(rrd*tv(il, k))*RG)
 !        me(il,k)=betalim(il,k)*(m(il,k)+RG*coef_peel*buoy(il,k)/tv(il,k)/((wlim(il,k)+wlim(il,k+1))/2.)**2*dz*mad(il,k))
         me(il,k)=betalim(il,k)*(m(il,k)+beta_coef(il,k)*dz*mad(il,k))
-!        print*,"B/w2",il,k,RG*coef_peel*buoy(il,k)/tv(il,k)/((wlim(il,k)+wlim(il,k+1))/2.)**2*dz    
+!        PRINT*,"B/w2",il,k,RG*coef_peel*buoy(il,k)/tv(il,k)/((wlim(il,k)+wlim(il,k+1))/2.)**2*dz
       
       END IF
@@ -775,5 +775,5 @@
 !     m(il,icb(il))=m(il,icb(il))+RG*coef_peel*buoy(il,icb(il))/tv(il,icb(il)) &
 !                  /((wlim(il,icb(il))+wlim(il,icb(il)+1))/2.)**2*dz*mad(il,icb(il))
-!     print*,"wlim(icb)",icb(il),wlim(il,icb(il)),m(il,icb(il))
+!     PRINT*,"wlim(icb)",icb(il),wlim(il,icb(il)),m(il,icb(il))
 !  ENDDO
 
@@ -782,5 +782,5 @@
     DO il = 1, ncum
            med(il,k)=med(il,k+1)+m(il,k+1)
-!           print*,"somme(me),somme(m)",il,k,icb(il),med(il,k),md(il,k),me(il,k),m(il,k),wlim(il,k)
+!           PRINT*,"somme(me),somme(m)",il,k,icb(il),med(il,k),md(il,k),me(il,k),m(il,k),wlim(il,k)
     ENDDO
   ENDDO
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cv3p_mixing.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cv3p_mixing.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cv3p_mixing.F90	(revision 5103)
@@ -110,5 +110,5 @@
     Qcoef2max = Qcoef2(Fmax)
 !<jyg
-   print*, 'fmax, gammas, qqa1, qqa2, Qcoef1max, Qcoef2max ', &
+   PRINT*, 'fmax, gammas, qqa1, qqa2, Qcoef1max, Qcoef2max ', &
             fmax, gammas, qqa1, qqa2, Qcoef1max, Qcoef2max
 !>jyg
@@ -179,5 +179,5 @@
 !jyg(from aj)<
             IF (cvflag_ice) THEN
-! print*,cvflag_ice,'cvflag_ice dans do 700'
+! PRINT*,cvflag_ice,'cvflag_ice dans do 700'
               IF (t(il,j)<=263.15) THEN
                 bf2 = 1. + (lf(il,j)+lv(il,j))*(lv(il,j)+frac(il,j)* &
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cv_driver.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cv_driver.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cv_driver.F90	(revision 5103)
@@ -156,5 +156,5 @@
   ! t:   Array of absolute temperature (K) of dimension ND, with first
   ! index corresponding to lowest model level. Note that this array
-  ! will be altered by the subroutine if dry convective adjustment
+  ! will be altered by the SUBROUTINE if dry convective adjustment
   ! occurs and if IPBL is not equal to 0.
 
@@ -442,5 +442,5 @@
   IF (iflag_con==30) THEN
 
-    ! print*,'Emanuel version 30 '
+    ! PRINT*,'Emanuel version 30 '
     CALL cv30_prelim(len, nd, ndp1, t1, q1, p1, ph1 & ! nd->na
       , lv1, cpn1, tv1, gz1, h1, hm1, th1)
@@ -510,5 +510,5 @@
   END DO
 
-  ! print*,'cv_driver : klon, ncum = ',len,ncum
+  ! PRINT*,'cv_driver : klon, ncum = ',len,ncum
 
   IF (ncum>0) THEN
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cv_routines.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cv_routines.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cv_routines.F90	(revision 5103)
@@ -587,10 +587,10 @@
 
         alv = lv0 - clmcpv*(t(i,k)-t0)
-        ! print*,'cpd dans convect2 ',cpd
-        ! print*,'tp(i,k),ah0(i),cl,cpd,qnk(i),t(i,k),gz(i,k),alv,qg,cpd'
-        ! print*,tp(i,k),ah0(i),cl,cpd,qnk(i),t(i,k),gz(i,k),alv,qg,cpd
+        ! PRINT*,'cpd dans convect2 ',cpd
+        ! PRINT*,'tp(i,k),ah0(i),cl,cpd,qnk(i),t(i,k),gz(i,k),alv,qg,cpd'
+        ! PRINT*,tp(i,k),ah0(i),cl,cpd,qnk(i),t(i,k),gz(i,k),alv,qg,cpd
         tp(i, k) = (ah0(i)-(cl-cpd)*qnk(i)*t(i,k)-gz(i,k)-alv*qg)/cpd
         ! if (.not.cpd.gt.1000.) then
-        ! print*,'CPD=',cpd
+        ! PRINT*,'CPD=',cpd
         ! stop
         ! endif
@@ -636,6 +636,6 @@
       IF (k>=(icb(i)+1)) THEN
         tvp(i, k) = tvp(i, k)*(1.0-qnk(i)+ep(i,k)*clw(i,k))
-        ! print*,'i,k,tvp(i,k),qnk(i),ep(i,k),clw(i,k)'
-        ! print*, i,k,tvp(i,k),qnk(i),ep(i,k),clw(i,k)
+        ! PRINT*,'i,k,tvp(i,k),qnk(i),ep(i,k),clw(i,k)'
+        ! PRINT*, i,k,tvp(i,k),qnk(i),ep(i,k),clw(i,k)
       END IF
     END DO
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cva_driver.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cva_driver.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cva_driver.F90	(revision 5103)
@@ -284,5 +284,5 @@
 ! t:   Array of absolute temperature (K) of dimension ND, with first
 ! index corresponding to lowest model level. Note that this array
-! will be altered by the subroutine if dry convective adjustment
+! will be altered by the SUBROUTINE if dry convective adjustment
 ! occurs and if IPBL is not equal to 0.
 
@@ -689,5 +689,5 @@
       PRINT *, 'Emanuel version 3 nouvelle'
     END IF
-! print*,'t1, q1 ',t1,q1
+! PRINT*,'t1, q1 ',t1,q1
         if (prt_level >= 9) &
              PRINT *, 'cva_driver -> cv3_prelim'
@@ -737,5 +737,5 @@
 !testCR: on prend la couche alim des thermiques
 !   p2feed1(i)=ph1(i,lalim_conv1(i)+1)
-!   print*,'lentr=',lentr(i),ph1(i,lentr(i)+1),ph1(i,2)
+!   PRINT*,'lentr=',lentr(i),ph1(i,lentr(i)+1),ph1(i,2)
   END DO
 
@@ -743,10 +743,10 @@
   END IF
   DO i = 1, len
-! print*,'avant cv3_feed Plim',p1feed1(i),p2feed1(i)
+! PRINT*,'avant cv3_feed Plim',p1feed1(i),p2feed1(i)
   END DO
   IF (iflag_con==3) THEN
 
-! print*, 'IFLAG1 avant cv3_feed'
-! print*,'len,nd',len,nd
+! PRINT*, 'IFLAG1 avant cv3_feed'
+! PRINT*,'len,nd',len,nd
 ! write(*,'(64i1)') iflag1(2:len-1)
 
@@ -760,6 +760,6 @@
   END IF
 
-! print*, 'IFLAG1 apres cv3_feed'
-! print*,'len,nd',len,nd
+! PRINT*, 'IFLAG1 apres cv3_feed'
+! PRINT*,'len,nd',len,nd
 ! write(*,'(64i1)') iflag1(2:len-1)
 
@@ -810,6 +810,6 @@
 
 
-! print*, 'IFLAG1 apres cv3_triger'
-! print*,'len,nd',len,nd
+! PRINT*, 'IFLAG1 apres cv3_triger'
+! PRINT*,'len,nd',len,nd
 ! write(*,'(64i1)') iflag1(2:len-1)
 
@@ -841,5 +841,5 @@
   END DO
 
-! print*,'len, ncum = ',len,ncum
+! PRINT*,'len, ncum = ',len,ncum
 
   IF (ncum>0) THEN
@@ -851,6 +851,6 @@
 
     IF (iflag_con==3) THEN
-! print*,'ncum tv1 ',ncum,tv1
-! print*,'tvp1 ',tvp1
+! PRINT*,'ncum tv1 ',ncum,tv1
+! PRINT*,'tvp1 ',tvp1
 !jyg<
 !   If the fraction of convective points is larger than comp_threshold, then compression
@@ -890,6 +890,6 @@
                          Ale, Alp, omega)
 
-! print*,'tv ',tv
-! print*,'tvp ',tvp
+! PRINT*,'tv ',tv
+! PRINT*,'tvp ',tvp
 
     END IF
@@ -966,5 +966,5 @@
                          ment, qent, hent, uent, vent, nent, &
                          sigij, elij, supmax, ments, qents, traent)
-! print*, 'cv3p_mixing-> supmax ', (supmax(1,k), k=1,nd)
+! PRINT*, 'cv3p_mixing-> supmax ', (supmax(1,k), k=1,nd)
 
       ELSE
@@ -1073,5 +1073,5 @@
     END IF !(debut) THEN
 ! do i = 1,nd
-! print*,'cv_mixing-> i,ment ',i,(ment(1,i,j),j=1,nd)
+! PRINT*,'cv_mixing-> i,ment ',i,(ment(1,i,j),j=1,nd)
 ! enddo
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cvltr.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cvltr.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cvltr.F90	(revision 5103)
@@ -130,5 +130,5 @@
 !$OMP END MASTER
 !$OMP BARRIER
-  print*,'cvltr coef lessivage convectif', ccntrAA_coef,ccntrENV_coef,coefcoli
+  PRINT*,'cvltr coef lessivage convectif', ccntrAA_coef,ccntrENV_coef,coefcoli
 
 !  scavON=.TRUE.
@@ -675,6 +675,6 @@
 
 ! test de conservation du traceur
-!print*,"_____________________________________________________________"
-!print*,"                                                             "
+!PRINT*,"_____________________________________________________________"
+!PRINT*,"                                                             "
 !      conserv=0.
 !      conservMA=0.
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cvltr_scav.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cvltr_scav.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cvltr_scav.F90	(revision 5103)
@@ -686,6 +686,6 @@
 
   ! test de conservation du traceur
-  !print*,"_____________________________________________________________"
-  !print*,"                                                             "
+  !PRINT*,"_____________________________________________________________"
+  !PRINT*,"                                                             "
   !      conserv=0.
   !      conservMA=0.
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cvltr_spl.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cvltr_spl.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cvltr_spl.F90	(revision 5103)
@@ -170,5 +170,5 @@
 !!! for SPLA
 !!!JEend
-!  print*,'cvltr coef lessivage convectif', ccntrAA_coef,ccntrENV_coef,coefcoli
+!  PRINT*,'cvltr coef lessivage convectif', ccntrAA_coef,ccntrENV_coef,coefcoli
 
 !JE20140724>>
@@ -819,6 +819,6 @@
 
 ! test de conservation du traceur
-!print*,"_____________________________________________________________"
-!print*,"                                                             "
+!PRINT*,"_____________________________________________________________"
+!PRINT*,"                                                             "
 !      conserv=0.
 !      conservMA=0.
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1DUTILS.h
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1DUTILS.h	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1DUTILS.h	(revision 5103)
@@ -1,1268 +1,1255 @@
-#include "conf_gcm.F90"
-
 ! $Id$
 
-
-
-      SUBROUTINE conf_unicol
-
-#ifdef CPP_IOIPSL
-      use IOIPSL
-#else
-! if not using IOIPSL, we still need to use (a local version of) getin
-      use ioipsl_getincom
-#endif
-      USE print_control_mod, ONLY: lunout
-      IMPLICIT NONE
-!-----------------------------------------------------------------------
-!     Auteurs :   A. Lahellec  .
-
-!   Declarations :
-!   --------------
-
-#include "compar1d.h"
-#include "flux_arp.h"
-#include "tsoilnudge.h"
-#include "fcg_gcssold.h"
+INCLUDE "conf_gcm.f90"
+
+SUBROUTINE conf_unicol
+
+  use IOIPSL
+  USE print_control_mod, ONLY: lunout
+  IMPLICIT NONE
+  !-----------------------------------------------------------------------
+  !     Auteurs :   A. Lahellec  .
+
+  !   Declarations :
+  !   --------------
+
+  include "compar1d.h"
+  include "flux_arp.h"
+  include "tsoilnudge.h"
+  include "fcg_gcssold.h"
 #include "fcg_racmo.h"
-
-
-!   local:
-!   ------
-
-!      CHARACTER ch1*72,ch2*72,ch3*72,ch4*12
-
-!  -------------------------------------------------------------------
-
-!      .........    Initilisation parametres du lmdz1D      ..........
-
-!---------------------------------------------------------------------
-!   initialisations:
-!   ----------------
-
-!Config  Key  = lunout
-!Config  Desc = unite de fichier pour les impressions
-!Config  Def  = 6
-!Config  Help = unite de fichier pour les impressions 
-!Config         (defaut sortie standard = 6)
-      lunout=6
-!      CALL getin('lunout', lunout)
-      IF (lunout /= 5 .and. lunout /= 6) THEN
-        OPEN(lunout,FILE='lmdz.out')
-      ENDIF
-
-!Config  Key  = prt_level
-!Config  Desc = niveau d'impressions de debogage
-!Config  Def  = 0
-!Config  Help = Niveau d'impression pour le debogage
-!Config         (0 = minimum d'impression)
-!      prt_level = 0
-!      CALL getin('prt_level',prt_level)
-
-!-----------------------------------------------------------------------
-!  Parametres de controle du run:
-!-----------------------------------------------------------------------
-
-!Config  Key  = restart
-!Config  Desc = on repart des startphy et start1dyn
-!Config  Def  = false
-!Config  Help = les fichiers restart doivent etre renomme en start
-       restart =.false.
-       CALL getin('restart',restart)
-
-!Config  Key  = forcing_type
-!Config  Desc = defines the way the SCM is forced:
-!Config  Def  = 0
-!!Config  Help = 0 ==> forcing_les = .true.
-!             initial profiles from file prof.inp.001
-!             no forcing by LS convergence ; 
-!             surface temperature imposed ;
-!             radiative cooling may be imposed (iflag_radia=0 in physiq.def)
-!         = 1 ==> forcing_radconv = .true.
-!             idem forcing_type = 0, but the imposed radiative cooling 
-!             is set to 0 (hence, if iflag_radia=0 in physiq.def, 
-!             then there is no radiative cooling at all)
-!         = 2 ==> forcing_toga = .true.
-!             initial profiles from TOGA-COARE IFA files 
-!             LS convergence and SST imposed from TOGA-COARE IFA files 
-!         = 3 ==> forcing_GCM2SCM = .true.
-!             initial profiles from the GCM output
-!             LS convergence imposed from the GCM output
-!         = 4 ==> forcing_twpi = .true.
-!             initial profiles from TWPICE nc files 
-!             LS convergence and SST imposed from TWPICE nc files 
-!         = 5 ==> forcing_rico = .true.
-!             initial profiles from RICO idealized
-!             LS convergence imposed from  RICO (cst) 
-!         = 6 ==> forcing_amma = .true.
-!         = 10 ==> forcing_case = .true.
-!             initial profiles from case.nc file 
-!         = 40 ==> forcing_GCSSold = .true.
-!             initial profile from GCSS file
-!             LS convergence imposed from GCSS file
-!         = 50 ==> forcing_fire = .true.
-!         = 59 ==> forcing_sandu = .true.
-!             initial profiles from sanduref file: see prof.inp.001
-!             SST varying with time and divergence constante: see ifa_sanduref.txt file
-!             Radiation has to be computed interactively
-!         = 60 ==> forcing_astex = .true.
-!             initial profiles from file: see prof.inp.001 
-!             SST,divergence,ug,vg,ufa,vfa varying with time : see ifa_astex.txt file
-!             Radiation has to be computed interactively
-!         = 61 ==> forcing_armcu = .true.
-!             initial profiles from file: see prof.inp.001 
-!             sensible and latent heat flux imposed: see ifa_arm_cu_1.txt
-!             large scale advective forcing & radiative tendencies applied below 1000m: see ifa_arm_cu_2.txt
-!             use geostrophic wind ug=10m/s vg=0m/s. Duration of the case 53100s 
-!             Radiation to be switched off
-!         > 100 ==> forcing_case = .true. or forcing_case2 = .true.
-!             initial profiles from case.nc file 
-
-       forcing_type = 0
-       CALL getin('forcing_type',forcing_type)
-         imp_fcg_gcssold   = .false.
-         ts_fcg_gcssold    = .false.  
-         Tp_fcg_gcssold    = .false.  
-         Tp_ini_gcssold    = .false.  
-         xTurb_fcg_gcssold = .false. 
-        IF (forcing_type .eq.40) THEN
-          CALL getin('imp_fcg',imp_fcg_gcssold)
-          CALL getin('ts_fcg',ts_fcg_gcssold)
-          CALL getin('tp_fcg',Tp_fcg_gcssold)
-          CALL getin('tp_ini',Tp_ini_gcssold)
-          CALL getin('turb_fcg',xTurb_fcg_gcssold)
-        ENDIF
-
-!Parametres de forcage
-!Config  Key  = tend_t
-!Config  Desc = forcage ou non par advection de T
-!Config  Def  = false
-!Config  Help = forcage ou non par advection de T
-       tend_t =0
-       CALL getin('tend_t',tend_t)
-
-!Config  Key  = tend_q
-!Config  Desc = forcage ou non par advection de q
-!Config  Def  = false
-!Config  Help = forcage ou non par advection de q
-       tend_q =0
-       CALL getin('tend_q',tend_q)
-
-!Config  Key  = tend_u
-!Config  Desc = forcage ou non par advection de u
-!Config  Def  = false
-!Config  Help = forcage ou non par advection de u
-       tend_u =0
-       CALL getin('tend_u',tend_u)
-
-!Config  Key  = tend_v
-!Config  Desc = forcage ou non par advection de v
-!Config  Def  = false
-!Config  Help = forcage ou non par advection de v
-       tend_v =0
-       CALL getin('tend_v',tend_v)
-
-!Config  Key  = tend_w
-!Config  Desc = forcage ou non par vitesse verticale
-!Config  Def  = false
-!Config  Help = forcage ou non par vitesse verticale
-       tend_w =0
-       CALL getin('tend_w',tend_w)
-
-!Config  Key  = tend_rayo
-!Config  Desc = forcage ou non par dtrad
-!Config  Def  = false
-!Config  Help = forcage ou non par dtrad
-       tend_rayo =0
-       CALL getin('tend_rayo',tend_rayo)
-
-
-!Config  Key  = nudge_t
-!Config  Desc = constante de nudging de T
-!Config  Def  = false
-!Config  Help = constante de nudging de T
-       nudge_t =0.
-       CALL getin('nudge_t',nudge_t)
-
-!Config  Key  = nudge_q
-!Config  Desc = constante de nudging de q
-!Config  Def  = false
-!Config  Help = constante de nudging de q
-       nudge_q =0.
-       CALL getin('nudge_q',nudge_q)
-
-!Config  Key  = nudge_u
-!Config  Desc = constante de nudging de u
-!Config  Def  = false
-!Config  Help = constante de nudging de u
-       nudge_u =0.
-       CALL getin('nudge_u',nudge_u)
-
-!Config  Key  = nudge_v
-!Config  Desc = constante de nudging de v
-!Config  Def  = false
-!Config  Help = constante de nudging de v
-       nudge_v =0.
-       CALL getin('nudge_v',nudge_v)
-
-!Config  Key  = nudge_w
-!Config  Desc = constante de nudging de w
-!Config  Def  = false
-!Config  Help = constante de nudging de w
-       nudge_w =0.
-       CALL getin('nudge_w',nudge_w)
-
-
-!Config  Key  = iflag_nudge
-!Config  Desc = atmospheric nudging ttype (decimal code)
-!Config  Def  = 0
-!Config  Help = 0 ==> no nudging
-!  If digit number n of iflag_nudge is set, then nudging of type n is on
-!  If digit number n of iflag_nudge is not set, then nudging of type n is off
-!   (digits are numbered from the right)
-       iflag_nudge = 0
-       CALL getin('iflag_nudge',iflag_nudge)
-
-!Config  Key  = ok_flux_surf
-!Config  Desc = forcage ou non par les flux de surface
-!Config  Def  = false
-!Config  Help = forcage ou non par les flux de surface
-       ok_flux_surf =.false.
-       CALL getin('ok_flux_surf',ok_flux_surf)
-
-!Config  Key  = ok_forc_tsurf
-!Config  Desc = forcage ou non par la Ts
-!Config  Def  = false
-!Config  Help = forcage ou non par la Ts
-       ok_forc_tsurf=.false.
-       CALL getin('ok_forc_tsurf',ok_forc_tsurf)
-
-!Config  Key  = ok_prescr_ust
-!Config  Desc = ustar impose ou non
-!Config  Def  = false
-!Config  Help = ustar impose ou non
-       ok_prescr_ust = .false.
-       CALL getin('ok_prescr_ust',ok_prescr_ust)
-
-
-!Config  Key  = ok_prescr_beta
-!Config  Desc = betaevap impose ou non
-!Config  Def  = false
-!Config  Help = betaevap impose ou non
-       ok_prescr_beta = .false.
-       CALL getin('ok_prescr_beta',ok_prescr_beta)
-
-!Config  Key  = ok_old_disvert
-!Config  Desc = utilisation de l ancien programme disvert0 (dans 1DUTILS.h)
-!Config  Def  = false
-!Config  Help = utilisation de l ancien programme disvert0 (dans 1DUTILS.h)
-       ok_old_disvert = .FALSE.
-       CALL getin('ok_old_disvert',ok_old_disvert)
-
-!Config  Key  = time_ini
-!Config  Desc = meaningless in this  case
-!Config  Def  = 0.
-!Config  Help = 
-       time_ini = 0.
-       CALL getin('time_ini',time_ini)
-
-!Config  Key  = rlat et rlon
-!Config  Desc = latitude et longitude
-!Config  Def  = 0.0  0.0
-!Config  Help = fixe la position de la colonne
-       xlat = 0.
-       xlon = 0.
-       CALL getin('rlat',xlat)
-       CALL getin('rlon',xlon)
-
-!Config  Key  = airephy
-!Config  Desc = Grid cell area
-!Config  Def  = 1.e11
-!Config  Help = 
-       airefi = 1.e11
-       CALL getin('airephy',airefi)
-
-!Config  Key  = nat_surf
-!Config  Desc = surface type
-!Config  Def  = 0 (ocean)
-!Config  Help = 0=ocean,1=land,2=glacier,3=banquise
-       nat_surf = 0.
-       CALL getin('nat_surf',nat_surf)
-
-!Config  Key  = tsurf
-!Config  Desc = surface temperature
-!Config  Def  = 290.
-!Config  Help = surface temperature
-       tsurf = 290.
-       CALL getin('tsurf',tsurf)
-
-!Config  Key  = psurf
-!Config  Desc = surface pressure
-!Config  Def  = 102400.
-!Config  Help = 
-       psurf = 102400.
-       CALL getin('psurf',psurf)
-
-!Config  Key  = zsurf
-!Config  Desc = surface altitude
-!Config  Def  = 0.
-!Config  Help = 
-       zsurf = 0.
-       CALL getin('zsurf',zsurf)
-! EV pour accord avec format standard       
-       CALL getin('zorog',zsurf)
-
-
-!Config  Key  = rugos
-!Config  Desc = coefficient de frottement
-!Config  Def  = 0.0001
-!Config  Help = calcul du Cdrag
-       rugos = 0.0001
-       CALL getin('rugos',rugos)
-! FH/2020/04/08/confinement: Pour le nouveau format standard, la rugosite s'appelle z0
-       CALL getin('z0',rugos)
-
-!Config  Key  = rugosh
-!Config  Desc = coefficient de frottement
-!Config  Def  = rugos
-!Config  Help = calcul du Cdrag
-       rugosh = rugos
-       CALL getin('rugosh',rugosh)
-
-
-
-!Config  Key  = snowmass
-!Config  Desc = mass de neige de la surface en kg/m2
-!Config  Def  = 0.0000
-!Config  Help = snowmass
-       snowmass = 0.0000
-       CALL getin('snowmass',snowmass)
-
-!Config  Key  = wtsurf et wqsurf
-!Config  Desc = ???
-!Config  Def  = 0.0 0.0
-!Config  Help = 
-       wtsurf = 0.0
-       wqsurf = 0.0
-       CALL getin('wtsurf',wtsurf)
-       CALL getin('wqsurf',wqsurf)
-
-!Config  Key  = albedo
-!Config  Desc = albedo
-!Config  Def  = 0.09
-!Config  Help = 
-       albedo = 0.09
-       CALL getin('albedo',albedo)
-
-!Config  Key  = agesno
-!Config  Desc = age de la neige
-!Config  Def  = 30.0
-!Config  Help = 
-       xagesno = 30.0
-       CALL getin('agesno',xagesno)
-
-!Config  Key  = restart_runoff
-!Config  Desc = age de la neige
-!Config  Def  = 30.0
-!Config  Help = 
-       restart_runoff = 0.0
-       CALL getin('restart_runoff',restart_runoff)
-
-!Config  Key  = qsolinp
-!Config  Desc = initial bucket water content (kg/m2) when land (5std)
-!Config  Def  = 30.0
-!Config  Help = 
-       qsolinp = 1.
-       CALL getin('qsolinp',qsolinp)
-
-
-
-!Config  Key  = betaevap
-!Config  Desc = beta for actual evaporation when prescribed
-!Config  Def  = 1.0
-!Config  Help = 
-       betaevap = 1.
-       CALL getin('betaevap',betaevap)      
-
-!Config  Key  = zpicinp
-!Config  Desc = denivellation orographie
-!Config  Def  = 0.
-!Config  Help =  input brise
-       zpicinp = 0.
-       CALL getin('zpicinp',zpicinp)
-!Config key = nudge_tsoil
-!Config  Desc = activation of soil temperature nudging
-!Config  Def  = .FALSE.
-!Config  Help = ...
-
-       nudge_tsoil=.FALSE.
-       CALL getin('nudge_tsoil',nudge_tsoil)
-
-!Config key = isoil_nudge
-!Config  Desc = level number where soil temperature is nudged
-!Config  Def  = 3
-!Config  Help = ...
-
-       isoil_nudge=3
-       CALL getin('isoil_nudge',isoil_nudge)
-
-!Config key = Tsoil_nudge
-!Config  Desc = target temperature for tsoil(isoil_nudge)
-!Config  Def  = 300.
-!Config  Help = ...
-
-       Tsoil_nudge=300.
-       CALL getin('Tsoil_nudge',Tsoil_nudge)
-
-!Config key = tau_soil_nudge
-!Config  Desc = nudging relaxation time for tsoil
-!Config  Def  = 3600.
-!Config  Help = ...
-
-       tau_soil_nudge=3600.
-       CALL getin('tau_soil_nudge',tau_soil_nudge)
-
-!----------------------------------------------------------
-! Param??tres de for??age pour les forcages communs:
-! Pour les forcages communs: ces entiers valent 0 ou 1
-! tadv= advection tempe, tadvv= adv tempe verticale, tadvh= adv tempe horizontale
-! qadv= advection q, qadvv= adv q verticale, qadvh= adv q horizontale
-! trad= 0 (rayonnement actif) ou 1 (prescrit par tend_rad) ou adv (prescir et contenu dans les tadv)
-! forcages en omega, w, vent geostrophique ou ustar
-! Parametres de nudging en u,v,t,q valent 0 ou 1 ou le temps de nudging
-!----------------------------------------------------------
-
-!Config  Key  = tadv
-!Config  Desc = forcage ou non par advection totale de T
-!Config  Def  = false
-!Config  Help = forcage ou non par advection totale de T
-       tadv =0
-       CALL getin('tadv',tadv)
-
-!Config  Key  = tadvv
-!Config  Desc = forcage ou non par advection verticale de T
-!Config  Def  = false
-!Config  Help = forcage ou non par advection verticale de T
-       tadvv =0
-       CALL getin('tadvv',tadvv)
-
-!Config  Key  = tadvh
-!Config  Desc = forcage ou non par advection horizontale de T
-!Config  Def  = false
-!Config  Help = forcage ou non par advection horizontale de T
-       tadvh =0
-       CALL getin('tadvh',tadvh)
-
-!Config  Key  = thadv
-!Config  Desc = forcage ou non par advection totale de Theta
-!Config  Def  = false
-!Config  Help = forcage ou non par advection totale de Theta
-       thadv =0
-       CALL getin('thadv',thadv)
-
-!Config  Key  = thadvv
-!Config  Desc = forcage ou non par advection verticale de Theta
-!Config  Def  = false
-!Config  Help = forcage ou non par advection verticale de Theta
-       thadvv =0
-       CALL getin('thadvv',thadvv)
-
-!Config  Key  = thadvh
-!Config  Desc = forcage ou non par advection horizontale de Theta
-!Config  Def  = false
-!Config  Help = forcage ou non par advection horizontale de Theta
-       thadvh =0
-       CALL getin('thadvh',thadvh)
-
-!Config  Key  = qadv
-!Config  Desc = forcage ou non par advection totale de Q
-!Config  Def  = false
-!Config  Help = forcage ou non par advection totale de Q
-       qadv =0
-       CALL getin('qadv',qadv)
-
-!Config  Key  = qadvv
-!Config  Desc = forcage ou non par advection verticale de Q
-!Config  Def  = false
-!Config  Help = forcage ou non par advection verticale de Q
-       qadvv =0
-       CALL getin('qadvv',qadvv)
-
-!Config  Key  = qadvh
-!Config  Desc = forcage ou non par advection horizontale de Q
-!Config  Def  = false
-!Config  Help = forcage ou non par advection horizontale de Q
-       qadvh =0
-       CALL getin('qadvh',qadvh)
-
-!Config  Key  = trad
-!Config  Desc = forcage ou non par tendance radiative
-!Config  Def  = false
-!Config  Help = forcage ou non par tendance radiative
-       trad =0
-       CALL getin('trad',trad)
-
-!Config  Key  = forc_omega
-!Config  Desc = forcage ou non par omega
-!Config  Def  = false
-!Config  Help = forcage ou non par omega
-       forc_omega =0
-       CALL getin('forc_omega',forc_omega)
-
-!Config  Key  = forc_u
-!Config  Desc = forcage ou non par u
-!Config  Def  = false
-!Config  Help = forcage ou non par u
-       forc_u =0
-       CALL getin('forc_u',forc_u)
-
-!Config  Key  = forc_v
-!Config  Desc = forcage ou non par v
-!Config  Def  = false
-!Config  Help = forcage ou non par v
-       forc_v =0
-       CALL getin('forc_v',forc_v)
-!Config  Key  = forc_w
-!Config  Desc = forcage ou non par w
-!Config  Def  = false
-!Config  Help = forcage ou non par w
-       forc_w =0
-       CALL getin('forc_w',forc_w)
-
-!Config  Key  = forc_geo
-!Config  Desc = forcage ou non par geo
-!Config  Def  = false
-!Config  Help = forcage ou non par geo
-       forc_geo =0
-       CALL getin('forc_geo',forc_geo)
-
-! Meme chose que ok_precr_ust
-!Config  Key  = forc_ustar
-!Config  Desc = forcage ou non par ustar
-!Config  Def  = false
-!Config  Help = forcage ou non par ustar
-       forc_ustar =0
-       CALL getin('forc_ustar',forc_ustar)
-       IF (forc_ustar .EQ. 1) ok_prescr_ust=.true.
-
-
-!Config  Key  = nudging_u
-!Config  Desc = forcage ou non par nudging sur u
-!Config  Def  = false
-!Config  Help = forcage ou non par nudging sur u
-       nudging_u =0
-       CALL getin('nudging_u',nudging_u)
-
-!Config  Key  = nudging_v
-!Config  Desc = forcage ou non par nudging sur v
-!Config  Def  = false
-!Config  Help = forcage ou non par nudging sur v
-       nudging_v =0
-       CALL getin('nudging_v',nudging_v)
-
-!Config  Key  = nudging_w
-!Config  Desc = forcage ou non par nudging sur w
-!Config  Def  = false
-!Config  Help = forcage ou non par nudging sur w
-       nudging_w =0
-       CALL getin('nudging_w',nudging_w)
-
-! RELIQUE ANCIENS FORMAT. ECRASE PAR LE SUIVANT
-!Config  Key  = nudging_q
-!Config  Desc = forcage ou non par nudging sur q
-!Config  Def  = false
-!Config  Help = forcage ou non par nudging sur q
-       nudging_qv =0
-       CALL getin('nudging_q',nudging_qv)
-       CALL getin('nudging_qv',nudging_qv)
-
-       p_nudging_u=11000.
-       p_nudging_v=11000.
-       p_nudging_t=11000.
-       p_nudging_qv=11000.
-       CALL getin('p_nudging_u',p_nudging_u)
-       CALL getin('p_nudging_v',p_nudging_v)
-       CALL getin('p_nudging_t',p_nudging_t)
-       CALL getin('p_nudging_qv',p_nudging_qv)
-
-!Config  Key  = nudging_t
-!Config  Desc = forcage ou non par nudging sur t
-!Config  Def  = false
-!Config  Help = forcage ou non par nudging sur t
-       nudging_t =0
-       CALL getin('nudging_t',nudging_t)
-
-
-
-      write(lunout,*)' +++++++++++++++++++++++++++++++++++++++'
-      write(lunout,*)' Configuration des parametres du gcm1D: '
-      write(lunout,*)' +++++++++++++++++++++++++++++++++++++++'
-      write(lunout,*)' restart = ', restart
-      write(lunout,*)' forcing_type = ', forcing_type
-      write(lunout,*)' time_ini = ', time_ini
-      write(lunout,*)' rlat = ', xlat
-      write(lunout,*)' rlon = ', xlon
-      write(lunout,*)' airephy = ', airefi
-      write(lunout,*)' nat_surf = ', nat_surf
-      write(lunout,*)' tsurf = ', tsurf
-      write(lunout,*)' psurf = ', psurf
-      write(lunout,*)' zsurf = ', zsurf
-      write(lunout,*)' rugos = ', rugos
-      write(lunout,*)' snowmass=', snowmass
-      write(lunout,*)' wtsurf = ', wtsurf
-      write(lunout,*)' wqsurf = ', wqsurf
-      write(lunout,*)' albedo = ', albedo
-      write(lunout,*)' xagesno = ', xagesno
-      write(lunout,*)' restart_runoff = ', restart_runoff
-      write(lunout,*)' qsolinp = ', qsolinp
-      write(lunout,*)' zpicinp = ', zpicinp
-      write(lunout,*)' nudge_tsoil = ', nudge_tsoil
-      write(lunout,*)' isoil_nudge = ', isoil_nudge
-      write(lunout,*)' Tsoil_nudge = ', Tsoil_nudge
-      write(lunout,*)' tau_soil_nudge = ', tau_soil_nudge
-      write(lunout,*)' tadv =      ', tadv
-      write(lunout,*)' tadvv =     ', tadvv
-      write(lunout,*)' tadvh =     ', tadvh
-      write(lunout,*)' thadv =     ', thadv
-      write(lunout,*)' thadvv =    ', thadvv
-      write(lunout,*)' thadvh =    ', thadvh
-      write(lunout,*)' qadv =      ', qadv
-      write(lunout,*)' qadvv =     ', qadvv
-      write(lunout,*)' qadvh =     ', qadvh
-      write(lunout,*)' trad =      ', trad
-      write(lunout,*)' forc_omega = ', forc_omega
-      write(lunout,*)' forc_w     = ', forc_w
-      write(lunout,*)' forc_geo   = ', forc_geo
-      write(lunout,*)' forc_ustar = ', forc_ustar
-      write(lunout,*)' nudging_u  = ', nudging_u
-      write(lunout,*)' nudging_v  = ', nudging_v
-      write(lunout,*)' nudging_t  = ', nudging_t
-      write(lunout,*)' nudging_qv  = ', nudging_qv
-      IF (forcing_type .eq.40) THEN
-        write(lunout,*) '--- Forcing type GCSS Old --- with:'
-        write(lunout,*)'imp_fcg',imp_fcg_gcssold
-        write(lunout,*)'ts_fcg',ts_fcg_gcssold
-        write(lunout,*)'tp_fcg',Tp_fcg_gcssold
-        write(lunout,*)'tp_ini',Tp_ini_gcssold
-        write(lunout,*)'xturb_fcg',xTurb_fcg_gcssold
-      ENDIF
-
-      write(lunout,*)' +++++++++++++++++++++++++++++++++++++++'
-      write(lunout,*)
-
-      RETURN
-      END
+  include "fcg_racmo.h"
+
+
+  !   local:
+  !   ------
+
+  !      CHARACTER ch1*72,ch2*72,ch3*72,ch4*12
+
+  !  -------------------------------------------------------------------
+
+  !      .........    Initilisation parametres du lmdz1D      ..........
+
+  !---------------------------------------------------------------------
+  !   initialisations:
+  !   ----------------
+
+  !Config  Key  = lunout
+  !Config  Desc = unite de fichier pour les impressions
+  !Config  Def  = 6
+  !Config  Help = unite de fichier pour les impressions
+  !Config         (defaut sortie standard = 6)
+  lunout = 6
+  !      CALL getin('lunout', lunout)
+  IF (lunout /= 5 .and. lunout /= 6) THEN
+    OPEN(lunout, FILE = 'lmdz.out')
+  ENDIF
+
+  !Config  Key  = prt_level
+  !Config  Desc = niveau d'impressions de debogage
+  !Config  Def  = 0
+  !Config  Help = Niveau d'impression pour le debogage
+  !Config         (0 = minimum d'impression)
+  !      prt_level = 0
+  !      CALL getin('prt_level',prt_level)
+
+  !-----------------------------------------------------------------------
+  !  Parametres de controle du run:
+  !-----------------------------------------------------------------------
+
+  !Config  Key  = restart
+  !Config  Desc = on repart des startphy et start1dyn
+  !Config  Def  = false
+  !Config  Help = les fichiers restart doivent etre renomme en start
+  restart = .FALSE.
+  CALL getin('restart', restart)
+
+  !Config  Key  = forcing_type
+  !Config  Desc = defines the way the SCM is forced:
+  !Config  Def  = 0
+  !!Config  Help = 0 ==> forcing_les = .TRUE.
+  !             initial profiles from file prof.inp.001
+  !             no forcing by LS convergence ;
+  !             surface temperature imposed ;
+  !             radiative cooling may be imposed (iflag_radia=0 in physiq.def)
+  !         = 1 ==> forcing_radconv = .TRUE.
+  !             idem forcing_type = 0, but the imposed radiative cooling
+  !             is set to 0 (hence, if iflag_radia=0 in physiq.def,
+  !             then there is no radiative cooling at all)
+  !         = 2 ==> forcing_toga = .TRUE.
+  !             initial profiles from TOGA-COARE IFA files
+  !             LS convergence and SST imposed from TOGA-COARE IFA files
+  !         = 3 ==> forcing_GCM2SCM = .TRUE.
+  !             initial profiles from the GCM output
+  !             LS convergence imposed from the GCM output
+  !         = 4 ==> forcing_twpi = .TRUE.
+  !             initial profiles from TWPICE nc files
+  !             LS convergence and SST imposed from TWPICE nc files
+  !         = 5 ==> forcing_rico = .TRUE.
+  !             initial profiles from RICO idealized
+  !             LS convergence imposed from  RICO (cst)
+  !         = 6 ==> forcing_amma = .TRUE.
+  !         = 10 ==> forcing_case = .TRUE.
+  !             initial profiles from case.nc file
+  !         = 40 ==> forcing_GCSSold = .TRUE.
+  !             initial profile from GCSS file
+  !             LS convergence imposed from GCSS file
+  !         = 50 ==> forcing_fire = .TRUE.
+  !         = 59 ==> forcing_sandu = .TRUE.
+  !             initial profiles from sanduref file: see prof.inp.001
+  !             SST varying with time and divergence constante: see ifa_sanduref.txt file
+  !             Radiation has to be computed interactively
+  !         = 60 ==> forcing_astex = .TRUE.
+  !             initial profiles from file: see prof.inp.001
+  !             SST,divergence,ug,vg,ufa,vfa varying with time : see ifa_astex.txt file
+  !             Radiation has to be computed interactively
+  !         = 61 ==> forcing_armcu = .TRUE.
+  !             initial profiles from file: see prof.inp.001
+  !             sensible and latent heat flux imposed: see ifa_arm_cu_1.txt
+  !             large scale advective forcing & radiative tendencies applied below 1000m: see ifa_arm_cu_2.txt
+  !             use geostrophic wind ug=10m/s vg=0m/s. Duration of the case 53100s
+  !             Radiation to be switched off
+  !         > 100 ==> forcing_case = .TRUE. or forcing_case2 = .TRUE.
+  !             initial profiles from case.nc file
+
+  forcing_type = 0
+  CALL getin('forcing_type', forcing_type)
+  imp_fcg_gcssold = .FALSE.
+  ts_fcg_gcssold = .FALSE.
+  Tp_fcg_gcssold = .FALSE.
+  Tp_ini_gcssold = .FALSE.
+  xTurb_fcg_gcssold = .FALSE.
+  IF (forcing_type ==40) THEN
+    CALL getin('imp_fcg', imp_fcg_gcssold)
+    CALL getin('ts_fcg', ts_fcg_gcssold)
+    CALL getin('tp_fcg', Tp_fcg_gcssold)
+    CALL getin('tp_ini', Tp_ini_gcssold)
+    CALL getin('turb_fcg', xTurb_fcg_gcssold)
+  ENDIF
+
+  !Parametres de forcage
+  !Config  Key  = tend_t
+  !Config  Desc = forcage ou non par advection de T
+  !Config  Def  = false
+  !Config  Help = forcage ou non par advection de T
+  tend_t = 0
+  CALL getin('tend_t', tend_t)
+
+  !Config  Key  = tend_q
+  !Config  Desc = forcage ou non par advection de q
+  !Config  Def  = false
+  !Config  Help = forcage ou non par advection de q
+  tend_q = 0
+  CALL getin('tend_q', tend_q)
+
+  !Config  Key  = tend_u
+  !Config  Desc = forcage ou non par advection de u
+  !Config  Def  = false
+  !Config  Help = forcage ou non par advection de u
+  tend_u = 0
+  CALL getin('tend_u', tend_u)
+
+  !Config  Key  = tend_v
+  !Config  Desc = forcage ou non par advection de v
+  !Config  Def  = false
+  !Config  Help = forcage ou non par advection de v
+  tend_v = 0
+  CALL getin('tend_v', tend_v)
+
+  !Config  Key  = tend_w
+  !Config  Desc = forcage ou non par vitesse verticale
+  !Config  Def  = false
+  !Config  Help = forcage ou non par vitesse verticale
+  tend_w = 0
+  CALL getin('tend_w', tend_w)
+
+  !Config  Key  = tend_rayo
+  !Config  Desc = forcage ou non par dtrad
+  !Config  Def  = false
+  !Config  Help = forcage ou non par dtrad
+  tend_rayo = 0
+  CALL getin('tend_rayo', tend_rayo)
+
+
+  !Config  Key  = nudge_t
+  !Config  Desc = constante de nudging de T
+  !Config  Def  = false
+  !Config  Help = constante de nudging de T
+  nudge_t = 0.
+  CALL getin('nudge_t', nudge_t)
+
+  !Config  Key  = nudge_q
+  !Config  Desc = constante de nudging de q
+  !Config  Def  = false
+  !Config  Help = constante de nudging de q
+  nudge_q = 0.
+  CALL getin('nudge_q', nudge_q)
+
+  !Config  Key  = nudge_u
+  !Config  Desc = constante de nudging de u
+  !Config  Def  = false
+  !Config  Help = constante de nudging de u
+  nudge_u = 0.
+  CALL getin('nudge_u', nudge_u)
+
+  !Config  Key  = nudge_v
+  !Config  Desc = constante de nudging de v
+  !Config  Def  = false
+  !Config  Help = constante de nudging de v
+  nudge_v = 0.
+  CALL getin('nudge_v', nudge_v)
+
+  !Config  Key  = nudge_w
+  !Config  Desc = constante de nudging de w
+  !Config  Def  = false
+  !Config  Help = constante de nudging de w
+  nudge_w = 0.
+  CALL getin('nudge_w', nudge_w)
+
+
+  !Config  Key  = iflag_nudge
+  !Config  Desc = atmospheric nudging ttype (decimal code)
+  !Config  Def  = 0
+  !Config  Help = 0 ==> no nudging
+  !  If digit number n of iflag_nudge is set, then nudging of type n is on
+  !  If digit number n of iflag_nudge is not set, then nudging of type n is off
+  !   (digits are numbered from the right)
+  iflag_nudge = 0
+  CALL getin('iflag_nudge', iflag_nudge)
+
+  !Config  Key  = ok_flux_surf
+  !Config  Desc = forcage ou non par les flux de surface
+  !Config  Def  = false
+  !Config  Help = forcage ou non par les flux de surface
+  ok_flux_surf = .FALSE.
+  CALL getin('ok_flux_surf', ok_flux_surf)
+
+  !Config  Key  = ok_forc_tsurf
+  !Config  Desc = forcage ou non par la Ts
+  !Config  Def  = false
+  !Config  Help = forcage ou non par la Ts
+  ok_forc_tsurf = .FALSE.
+  CALL getin('ok_forc_tsurf', ok_forc_tsurf)
+
+  !Config  Key  = ok_prescr_ust
+  !Config  Desc = ustar impose ou non
+  !Config  Def  = false
+  !Config  Help = ustar impose ou non
+  ok_prescr_ust = .FALSE.
+  CALL getin('ok_prescr_ust', ok_prescr_ust)
+
+
+  !Config  Key  = ok_prescr_beta
+  !Config  Desc = betaevap impose ou non
+  !Config  Def  = false
+  !Config  Help = betaevap impose ou non
+  ok_prescr_beta = .FALSE.
+  CALL getin('ok_prescr_beta', ok_prescr_beta)
+
+  !Config  Key  = ok_old_disvert
+  !Config  Desc = utilisation de l ancien programme disvert0 (dans 1DUTILS.h)
+  !Config  Def  = false
+  !Config  Help = utilisation de l ancien programme disvert0 (dans 1DUTILS.h)
+  ok_old_disvert = .FALSE.
+  CALL getin('ok_old_disvert', ok_old_disvert)
+
+  !Config  Key  = time_ini
+  !Config  Desc = meaningless in this  case
+  !Config  Def  = 0.
+  !Config  Help =
+  time_ini = 0.
+  CALL getin('time_ini', time_ini)
+
+  !Config  Key  = rlat et rlon
+  !Config  Desc = latitude et longitude
+  !Config  Def  = 0.0  0.0
+  !Config  Help = fixe la position de la colonne
+  xlat = 0.
+  xlon = 0.
+  CALL getin('rlat', xlat)
+  CALL getin('rlon', xlon)
+
+  !Config  Key  = airephy
+  !Config  Desc = Grid cell area
+  !Config  Def  = 1.e11
+  !Config  Help =
+  airefi = 1.e11
+  CALL getin('airephy', airefi)
+
+  !Config  Key  = nat_surf
+  !Config  Desc = surface type
+  !Config  Def  = 0 (ocean)
+  !Config  Help = 0=ocean,1=land,2=glacier,3=banquise
+  nat_surf = 0.
+  CALL getin('nat_surf', nat_surf)
+
+  !Config  Key  = tsurf
+  !Config  Desc = surface temperature
+  !Config  Def  = 290.
+  !Config  Help = surface temperature
+  tsurf = 290.
+  CALL getin('tsurf', tsurf)
+
+  !Config  Key  = psurf
+  !Config  Desc = surface pressure
+  !Config  Def  = 102400.
+  !Config  Help =
+  psurf = 102400.
+  CALL getin('psurf', psurf)
+
+  !Config  Key  = zsurf
+  !Config  Desc = surface altitude
+  !Config  Def  = 0.
+  !Config  Help =
+  zsurf = 0.
+  CALL getin('zsurf', zsurf)
+  ! EV pour accord avec format standard
+  CALL getin('zorog', zsurf)
+
+
+  !Config  Key  = rugos
+  !Config  Desc = coefficient de frottement
+  !Config  Def  = 0.0001
+  !Config  Help = calcul du Cdrag
+  rugos = 0.0001
+  CALL getin('rugos', rugos)
+  ! FH/2020/04/08/confinement: Pour le nouveau format standard, la rugosite s'appelle z0
+  CALL getin('z0', rugos)
+
+  !Config  Key  = rugosh
+  !Config  Desc = coefficient de frottement
+  !Config  Def  = rugos
+  !Config  Help = calcul du Cdrag
+  rugosh = rugos
+  CALL getin('rugosh', rugosh)
+
+
+
+  !Config  Key  = snowmass
+  !Config  Desc = mass de neige de la surface en kg/m2
+  !Config  Def  = 0.0000
+  !Config  Help = snowmass
+  snowmass = 0.0000
+  CALL getin('snowmass', snowmass)
+
+  !Config  Key  = wtsurf et wqsurf
+  !Config  Desc = ???
+  !Config  Def  = 0.0 0.0
+  !Config  Help =
+  wtsurf = 0.0
+  wqsurf = 0.0
+  CALL getin('wtsurf', wtsurf)
+  CALL getin('wqsurf', wqsurf)
+
+  !Config  Key  = albedo
+  !Config  Desc = albedo
+  !Config  Def  = 0.09
+  !Config  Help =
+  albedo = 0.09
+  CALL getin('albedo', albedo)
+
+  !Config  Key  = agesno
+  !Config  Desc = age de la neige
+  !Config  Def  = 30.0
+  !Config  Help =
+  xagesno = 30.0
+  CALL getin('agesno', xagesno)
+
+  !Config  Key  = restart_runoff
+  !Config  Desc = age de la neige
+  !Config  Def  = 30.0
+  !Config  Help =
+  restart_runoff = 0.0
+  CALL getin('restart_runoff', restart_runoff)
+
+  !Config  Key  = qsolinp
+  !Config  Desc = initial bucket water content (kg/m2) when land (5std)
+  !Config  Def  = 30.0
+  !Config  Help =
+  qsolinp = 1.
+  CALL getin('qsolinp', qsolinp)
+
+
+
+  !Config  Key  = betaevap
+  !Config  Desc = beta for actual evaporation when prescribed
+  !Config  Def  = 1.0
+  !Config  Help =
+  betaevap = 1.
+  CALL getin('betaevap', betaevap)
+
+  !Config  Key  = zpicinp
+  !Config  Desc = denivellation orographie
+  !Config  Def  = 0.
+  !Config  Help =  input brise
+  zpicinp = 0.
+  CALL getin('zpicinp', zpicinp)
+  !Config key = nudge_tsoil
+  !Config  Desc = activation of soil temperature nudging
+  !Config  Def  = .FALSE.
+  !Config  Help = ...
+
+  nudge_tsoil = .FALSE.
+  CALL getin('nudge_tsoil', nudge_tsoil)
+
+  !Config key = isoil_nudge
+  !Config  Desc = level number where soil temperature is nudged
+  !Config  Def  = 3
+  !Config  Help = ...
+
+  isoil_nudge = 3
+  CALL getin('isoil_nudge', isoil_nudge)
+
+  !Config key = Tsoil_nudge
+  !Config  Desc = target temperature for tsoil(isoil_nudge)
+  !Config  Def  = 300.
+  !Config  Help = ...
+
+  Tsoil_nudge = 300.
+  CALL getin('Tsoil_nudge', Tsoil_nudge)
+
+  !Config key = tau_soil_nudge
+  !Config  Desc = nudging relaxation time for tsoil
+  !Config  Def  = 3600.
+  !Config  Help = ...
+
+  tau_soil_nudge = 3600.
+  CALL getin('tau_soil_nudge', tau_soil_nudge)
+
+  !----------------------------------------------------------
+  ! Param??tres de for??age pour les forcages communs:
+  ! Pour les forcages communs: ces entiers valent 0 ou 1
+  ! tadv= advection tempe, tadvv= adv tempe verticale, tadvh= adv tempe horizontale
+  ! qadv= advection q, qadvv= adv q verticale, qadvh= adv q horizontale
+  ! trad= 0 (rayonnement actif) ou 1 (prescrit par tend_rad) ou adv (prescir et contenu dans les tadv)
+  ! forcages en omega, w, vent geostrophique ou ustar
+  ! Parametres de nudging en u,v,t,q valent 0 ou 1 ou le temps de nudging
+  !----------------------------------------------------------
+
+  !Config  Key  = tadv
+  !Config  Desc = forcage ou non par advection totale de T
+  !Config  Def  = false
+  !Config  Help = forcage ou non par advection totale de T
+  tadv = 0
+  CALL getin('tadv', tadv)
+
+  !Config  Key  = tadvv
+  !Config  Desc = forcage ou non par advection verticale de T
+  !Config  Def  = false
+  !Config  Help = forcage ou non par advection verticale de T
+  tadvv = 0
+  CALL getin('tadvv', tadvv)
+
+  !Config  Key  = tadvh
+  !Config  Desc = forcage ou non par advection horizontale de T
+  !Config  Def  = false
+  !Config  Help = forcage ou non par advection horizontale de T
+  tadvh = 0
+  CALL getin('tadvh', tadvh)
+
+  !Config  Key  = thadv
+  !Config  Desc = forcage ou non par advection totale de Theta
+  !Config  Def  = false
+  !Config  Help = forcage ou non par advection totale de Theta
+  thadv = 0
+  CALL getin('thadv', thadv)
+
+  !Config  Key  = thadvv
+  !Config  Desc = forcage ou non par advection verticale de Theta
+  !Config  Def  = false
+  !Config  Help = forcage ou non par advection verticale de Theta
+  thadvv = 0
+  CALL getin('thadvv', thadvv)
+
+  !Config  Key  = thadvh
+  !Config  Desc = forcage ou non par advection horizontale de Theta
+  !Config  Def  = false
+  !Config  Help = forcage ou non par advection horizontale de Theta
+  thadvh = 0
+  CALL getin('thadvh', thadvh)
+
+  !Config  Key  = qadv
+  !Config  Desc = forcage ou non par advection totale de Q
+  !Config  Def  = false
+  !Config  Help = forcage ou non par advection totale de Q
+  qadv = 0
+  CALL getin('qadv', qadv)
+
+  !Config  Key  = qadvv
+  !Config  Desc = forcage ou non par advection verticale de Q
+  !Config  Def  = false
+  !Config  Help = forcage ou non par advection verticale de Q
+  qadvv = 0
+  CALL getin('qadvv', qadvv)
+
+  !Config  Key  = qadvh
+  !Config  Desc = forcage ou non par advection horizontale de Q
+  !Config  Def  = false
+  !Config  Help = forcage ou non par advection horizontale de Q
+  qadvh = 0
+  CALL getin('qadvh', qadvh)
+
+  !Config  Key  = trad
+  !Config  Desc = forcage ou non par tendance radiative
+  !Config  Def  = false
+  !Config  Help = forcage ou non par tendance radiative
+  trad = 0
+  CALL getin('trad', trad)
+
+  !Config  Key  = forc_omega
+  !Config  Desc = forcage ou non par omega
+  !Config  Def  = false
+  !Config  Help = forcage ou non par omega
+  forc_omega = 0
+  CALL getin('forc_omega', forc_omega)
+
+  !Config  Key  = forc_u
+  !Config  Desc = forcage ou non par u
+  !Config  Def  = false
+  !Config  Help = forcage ou non par u
+  forc_u = 0
+  CALL getin('forc_u', forc_u)
+
+  !Config  Key  = forc_v
+  !Config  Desc = forcage ou non par v
+  !Config  Def  = false
+  !Config  Help = forcage ou non par v
+  forc_v = 0
+  CALL getin('forc_v', forc_v)
+  !Config  Key  = forc_w
+  !Config  Desc = forcage ou non par w
+  !Config  Def  = false
+  !Config  Help = forcage ou non par w
+  forc_w = 0
+  CALL getin('forc_w', forc_w)
+
+  !Config  Key  = forc_geo
+  !Config  Desc = forcage ou non par geo
+  !Config  Def  = false
+  !Config  Help = forcage ou non par geo
+  forc_geo = 0
+  CALL getin('forc_geo', forc_geo)
+
+  ! Meme chose que ok_precr_ust
+  !Config  Key  = forc_ustar
+  !Config  Desc = forcage ou non par ustar
+  !Config  Def  = false
+  !Config  Help = forcage ou non par ustar
+  forc_ustar = 0
+  CALL getin('forc_ustar', forc_ustar)
+  IF (forc_ustar == 1) ok_prescr_ust = .TRUE.
+
+
+  !Config  Key  = nudging_u
+  !Config  Desc = forcage ou non par nudging sur u
+  !Config  Def  = false
+  !Config  Help = forcage ou non par nudging sur u
+  nudging_u = 0
+  CALL getin('nudging_u', nudging_u)
+
+  !Config  Key  = nudging_v
+  !Config  Desc = forcage ou non par nudging sur v
+  !Config  Def  = false
+  !Config  Help = forcage ou non par nudging sur v
+  nudging_v = 0
+  CALL getin('nudging_v', nudging_v)
+
+  !Config  Key  = nudging_w
+  !Config  Desc = forcage ou non par nudging sur w
+  !Config  Def  = false
+  !Config  Help = forcage ou non par nudging sur w
+  nudging_w = 0
+  CALL getin('nudging_w', nudging_w)
+
+  ! RELIQUE ANCIENS FORMAT. ECRASE PAR LE SUIVANT
+  !Config  Key  = nudging_q
+  !Config  Desc = forcage ou non par nudging sur q
+  !Config  Def  = false
+  !Config  Help = forcage ou non par nudging sur q
+  nudging_qv = 0
+  CALL getin('nudging_q', nudging_qv)
+  CALL getin('nudging_qv', nudging_qv)
+
+  p_nudging_u = 11000.
+  p_nudging_v = 11000.
+  p_nudging_t = 11000.
+  p_nudging_qv = 11000.
+  CALL getin('p_nudging_u', p_nudging_u)
+  CALL getin('p_nudging_v', p_nudging_v)
+  CALL getin('p_nudging_t', p_nudging_t)
+  CALL getin('p_nudging_qv', p_nudging_qv)
+
+  !Config  Key  = nudging_t
+  !Config  Desc = forcage ou non par nudging sur t
+  !Config  Def  = false
+  !Config  Help = forcage ou non par nudging sur t
+  nudging_t = 0
+  CALL getin('nudging_t', nudging_t)
+
+  write(lunout, *)' +++++++++++++++++++++++++++++++++++++++'
+  write(lunout, *)' Configuration des parametres du gcm1D: '
+  write(lunout, *)' +++++++++++++++++++++++++++++++++++++++'
+  write(lunout, *)' restart = ', restart
+  write(lunout, *)' forcing_type = ', forcing_type
+  write(lunout, *)' time_ini = ', time_ini
+  write(lunout, *)' rlat = ', xlat
+  write(lunout, *)' rlon = ', xlon
+  write(lunout, *)' airephy = ', airefi
+  write(lunout, *)' nat_surf = ', nat_surf
+  write(lunout, *)' tsurf = ', tsurf
+  write(lunout, *)' psurf = ', psurf
+  write(lunout, *)' zsurf = ', zsurf
+  write(lunout, *)' rugos = ', rugos
+  write(lunout, *)' snowmass=', snowmass
+  write(lunout, *)' wtsurf = ', wtsurf
+  write(lunout, *)' wqsurf = ', wqsurf
+  write(lunout, *)' albedo = ', albedo
+  write(lunout, *)' xagesno = ', xagesno
+  write(lunout, *)' restart_runoff = ', restart_runoff
+  write(lunout, *)' qsolinp = ', qsolinp
+  write(lunout, *)' zpicinp = ', zpicinp
+  write(lunout, *)' nudge_tsoil = ', nudge_tsoil
+  write(lunout, *)' isoil_nudge = ', isoil_nudge
+  write(lunout, *)' Tsoil_nudge = ', Tsoil_nudge
+  write(lunout, *)' tau_soil_nudge = ', tau_soil_nudge
+  write(lunout, *)' tadv =      ', tadv
+  write(lunout, *)' tadvv =     ', tadvv
+  write(lunout, *)' tadvh =     ', tadvh
+  write(lunout, *)' thadv =     ', thadv
+  write(lunout, *)' thadvv =    ', thadvv
+  write(lunout, *)' thadvh =    ', thadvh
+  write(lunout, *)' qadv =      ', qadv
+  write(lunout, *)' qadvv =     ', qadvv
+  write(lunout, *)' qadvh =     ', qadvh
+  write(lunout, *)' trad =      ', trad
+  write(lunout, *)' forc_omega = ', forc_omega
+  write(lunout, *)' forc_w     = ', forc_w
+  write(lunout, *)' forc_geo   = ', forc_geo
+  write(lunout, *)' forc_ustar = ', forc_ustar
+  write(lunout, *)' nudging_u  = ', nudging_u
+  write(lunout, *)' nudging_v  = ', nudging_v
+  write(lunout, *)' nudging_t  = ', nudging_t
+  write(lunout, *)' nudging_qv  = ', nudging_qv
+  IF (forcing_type ==40) THEN
+    write(lunout, *) '--- Forcing type GCSS Old --- with:'
+    write(lunout, *)'imp_fcg', imp_fcg_gcssold
+    write(lunout, *)'ts_fcg', ts_fcg_gcssold
+    write(lunout, *)'tp_fcg', Tp_fcg_gcssold
+    write(lunout, *)'tp_ini', Tp_ini_gcssold
+    write(lunout, *)'xturb_fcg', xTurb_fcg_gcssold
+  ENDIF
+
+  write(lunout, *)' +++++++++++++++++++++++++++++++++++++++'
+  write(lunout, *)
+
+  RETURN
+END
 
 ! $Id: dyn1deta0.F 1279 2010/07/30 A Lahellec$
 
 
-      SUBROUTINE dyn1deta0(fichnom,plev,play,phi,phis,presnivs,                 &
-     &                          ucov,vcov,temp,q,omega2)
-      USE dimphy
-      USE mod_grid_phy_lmdz
-      USE mod_phys_lmdz_para
-      USE iophy
-      USE phys_state_var_mod
-      USE iostart
-      USE write_field_phy
-      USE infotrac
-      use control_mod
-      USE comconst_mod, ONLY: im, jm, lllm
-      USE logic_mod, ONLY: fxyhypb, ysinus
-      USE temps_mod, ONLY: annee_ref, day_ini, day_ref, itau_dyn
-      USE netcdf, ONLY:nf90_open,nf90_write,nf90_noerr
-
-      IMPLICIT NONE
-!=======================================================
-! Ecriture du fichier de redemarrage sous format NetCDF
-!=======================================================
-!   Declarations:
-!   -------------
-      include "dimensions.h"
-!!#include "control.h"
-
-!   Arguments:
-!   ----------
-      CHARACTER*(*) fichnom
-!Al1 plev tronque pour .nc mais plev(klev+1):=0
-      real :: plev(klon,klev+1),play (klon,klev),phi(klon,klev)
-      real :: presnivs(klon,klev)
-      real :: ucov(klon,klev),vcov(klon,klev),temp(klon,klev)
-      real :: q(klon,klev,nqtot),omega2(klon,klev)
-!      real :: ug(klev),vg(klev),fcoriolis
-      real :: phis(klon) 
-
-!   Variables locales pour NetCDF:
-!   ------------------------------
-      INTEGER iq
-      INTEGER length
-      PARAMETER (length = 100)
-      REAL tab_cntrl(length) ! tableau des parametres du run
-      character*4 nmq(nqtot)
-      character*12 modname
-      character*80 abort_message
-      LOGICAL found
-
-      modname = 'dyn1deta0 : '
-!!      nmq(1)="vap"
-!!      nmq(2)="cond"
-!!      do iq=3,nqtot
-!!        write(nmq(iq),'("tra",i1)') iq-2
-!!      enddo
-      DO iq = 1,nqtot
-        nmq(iq) = trim(tracers(iq)%name)
-      ENDDO
-      print*,'in dyn1deta0 ',fichnom,klon,klev,nqtot
-      CALL open_startphy(fichnom)
-      print*,'after open startphy ',fichnom,nmq
-
-! Lecture des parametres de controle:
-
-      CALL get_var("controle",tab_cntrl)
-       
-
-      im         = tab_cntrl(1)
-      jm         = tab_cntrl(2)
-      lllm       = tab_cntrl(3)
-      day_ref    = tab_cntrl(4)
-      annee_ref  = tab_cntrl(5)
-!      rad        = tab_cntrl(6)
-!      omeg       = tab_cntrl(7)
-!      g          = tab_cntrl(8)
-!      cpp        = tab_cntrl(9)
-!      kappa      = tab_cntrl(10)
-!      daysec     = tab_cntrl(11)
-!      dtvr       = tab_cntrl(12)
-!      etot0      = tab_cntrl(13)
-!      ptot0      = tab_cntrl(14)
-!      ztot0      = tab_cntrl(15)
-!      stot0      = tab_cntrl(16)
-!      ang0       = tab_cntrl(17)
-!      pa         = tab_cntrl(18)
-!      preff      = tab_cntrl(19)
-
-!      clon       = tab_cntrl(20)
-!      clat       = tab_cntrl(21)
-!      grossismx  = tab_cntrl(22)
-!      grossismy  = tab_cntrl(23)
-
-      IF ( tab_cntrl(24).EQ.1. )  THEN
-        fxyhypb  =.true.
-!        dzoomx   = tab_cntrl(25)
-!        dzoomy   = tab_cntrl(26)
-!        taux     = tab_cntrl(28)
-!        tauy     = tab_cntrl(29)
-      ELSE
-        fxyhypb = .false.
-        ysinus  = .false.
-        IF( tab_cntrl(27).EQ.1. ) ysinus =.true. 
-      ENDIF
-
-      day_ini = tab_cntrl(30)
-      itau_dyn = tab_cntrl(31)
-!   .................................................................
-
-
-!      PRINT*,'rad,omeg,g,cpp,kappa',rad,omeg,g,cpp,kappa
-!Al1
-       Print*,'day_ref,annee_ref,day_ini,itau_dyn',                         &
-     &              day_ref,annee_ref,day_ini,itau_dyn
-
-!  Lecture des champs
-
-      CALL get_field("play",play,found)
-      IF (.NOT. found) PRINT*, modname//'Le champ <Play> est absent'
-      CALL get_field("phi",phi,found)
-      IF (.NOT. found) PRINT*, modname//'Le champ <Phi> est absent'
-      CALL get_field("phis",phis,found)
-      IF (.NOT. found) PRINT*, modname//'Le champ <Phis> est absent'
-      CALL get_field("presnivs",presnivs,found)
-      IF (.NOT. found) PRINT*, modname//'Le champ <Presnivs> est absent'
-      CALL get_field("ucov",ucov,found)
-      IF (.NOT. found) PRINT*, modname//'Le champ <ucov> est absent'
-      CALL get_field("vcov",vcov,found)
-      IF (.NOT. found) PRINT*, modname//'Le champ <vcov> est absent'
-      CALL get_field("temp",temp,found)
-      IF (.NOT. found) PRINT*, modname//'Le champ <temp> est absent'
-      CALL get_field("omega2",omega2,found)
-      IF (.NOT. found) PRINT*, modname//'Le champ <omega2> est absent'
-      plev(1,klev+1)=0.
-      CALL get_field("plev",plev(:,1:klev),found)
-      IF (.NOT. found) PRINT*, modname//'Le champ <Plev> est absent'
-
-      Do iq=1,nqtot
-        CALL get_field("q"//nmq(iq),q(:,:,iq),found)
-        IF (.NOT.found)PRINT*, modname//'Le champ <q'//nmq//'> est absent'
-      EndDo
-
-      CALL close_startphy
-      print*,' close startphy',fichnom,play(1,1),play(1,klev),temp(1,klev)
-
-      RETURN
-      END
+SUBROUTINE dyn1deta0(fichnom, plev, play, phi, phis, presnivs, &
+        &                          ucov, vcov, temp, q, omega2)
+  USE dimphy
+  USE mod_grid_phy_lmdz
+  USE mod_phys_lmdz_para
+  USE iophy
+  USE phys_state_var_mod
+  USE iostart
+  USE write_field_phy
+  USE infotrac
+  use control_mod
+  USE comconst_mod, ONLY: im, jm, lllm
+  USE logic_mod, ONLY: fxyhypb, ysinus
+  USE temps_mod, ONLY: annee_ref, day_ini, day_ref, itau_dyn
+  USE netcdf, ONLY: nf90_open, nf90_write, nf90_noerr
+
+  IMPLICIT NONE
+  !=======================================================
+  ! Ecriture du fichier de redemarrage sous format NetCDF
+  !=======================================================
+  !   Declarations:
+  !   -------------
+  include "dimensions.h"
+  !!#include "control.h"
+
+  !   Arguments:
+  !   ----------
+  CHARACTER*(*) fichnom
+  !Al1 plev tronque pour .nc mais plev(klev+1):=0
+  real :: plev(klon, klev + 1), play (klon, klev), phi(klon, klev)
+  real :: presnivs(klon, klev)
+  real :: ucov(klon, klev), vcov(klon, klev), temp(klon, klev)
+  real :: q(klon, klev, nqtot), omega2(klon, klev)
+  !      real :: ug(klev),vg(klev),fcoriolis
+  real :: phis(klon)
+
+  !   Variables locales pour NetCDF:
+  !   ------------------------------
+  INTEGER iq
+  INTEGER length
+  PARAMETER (length = 100)
+  REAL tab_cntrl(length) ! tableau des parametres du run
+  character*4 nmq(nqtot)
+  character*12 modname
+  character*80 abort_message
+  LOGICAL found
+
+  modname = 'dyn1deta0 : '
+  !!      nmq(1)="vap"
+  !!      nmq(2)="cond"
+  !!      do iq=3,nqtot
+  !!        write(nmq(iq),'("tra",i1)') iq-2
+  !!      enddo
+  DO iq = 1, nqtot
+    nmq(iq) = trim(tracers(iq)%name)
+  ENDDO
+  PRINT*, 'in dyn1deta0 ', fichnom, klon, klev, nqtot
+  CALL open_startphy(fichnom)
+  PRINT*, 'after open startphy ', fichnom, nmq
+
+  ! Lecture des parametres de controle:
+
+  CALL get_var("controle", tab_cntrl)
+
+  im = tab_cntrl(1)
+  jm = tab_cntrl(2)
+  lllm = tab_cntrl(3)
+  day_ref = tab_cntrl(4)
+  annee_ref = tab_cntrl(5)
+  !      rad        = tab_cntrl(6)
+  !      omeg       = tab_cntrl(7)
+  !      g          = tab_cntrl(8)
+  !      cpp        = tab_cntrl(9)
+  !      kappa      = tab_cntrl(10)
+  !      daysec     = tab_cntrl(11)
+  !      dtvr       = tab_cntrl(12)
+  !      etot0      = tab_cntrl(13)
+  !      ptot0      = tab_cntrl(14)
+  !      ztot0      = tab_cntrl(15)
+  !      stot0      = tab_cntrl(16)
+  !      ang0       = tab_cntrl(17)
+  !      pa         = tab_cntrl(18)
+  !      preff      = tab_cntrl(19)
+
+  !      clon       = tab_cntrl(20)
+  !      clat       = tab_cntrl(21)
+  !      grossismx  = tab_cntrl(22)
+  !      grossismy  = tab_cntrl(23)
+
+  IF (tab_cntrl(24)==1.)  THEN
+    fxyhypb = .TRUE.
+    !        dzoomx   = tab_cntrl(25)
+    !        dzoomy   = tab_cntrl(26)
+    !        taux     = tab_cntrl(28)
+    !        tauy     = tab_cntrl(29)
+  ELSE
+    fxyhypb = .FALSE.
+    ysinus = .FALSE.
+    IF(tab_cntrl(27)==1.) ysinus = .TRUE.
+  ENDIF
+
+  day_ini = tab_cntrl(30)
+  itau_dyn = tab_cntrl(31)
+  !   .................................................................
+
+
+  !      PRINT*,'rad,omeg,g,cpp,kappa',rad,omeg,g,cpp,kappa
+  !Al1
+  Print*, 'day_ref,annee_ref,day_ini,itau_dyn', &
+          &              day_ref, annee_ref, day_ini, itau_dyn
+
+  !  Lecture des champs
+
+  CALL get_field("play", play, found)
+  IF (.NOT. found) PRINT*, modname // 'Le champ <Play> est absent'
+  CALL get_field("phi", phi, found)
+  IF (.NOT. found) PRINT*, modname // 'Le champ <Phi> est absent'
+  CALL get_field("phis", phis, found)
+  IF (.NOT. found) PRINT*, modname // 'Le champ <Phis> est absent'
+  CALL get_field("presnivs", presnivs, found)
+  IF (.NOT. found) PRINT*, modname // 'Le champ <Presnivs> est absent'
+  CALL get_field("ucov", ucov, found)
+  IF (.NOT. found) PRINT*, modname // 'Le champ <ucov> est absent'
+  CALL get_field("vcov", vcov, found)
+  IF (.NOT. found) PRINT*, modname // 'Le champ <vcov> est absent'
+  CALL get_field("temp", temp, found)
+  IF (.NOT. found) PRINT*, modname // 'Le champ <temp> est absent'
+  CALL get_field("omega2", omega2, found)
+  IF (.NOT. found) PRINT*, modname // 'Le champ <omega2> est absent'
+  plev(1, klev + 1) = 0.
+  CALL get_field("plev", plev(:, 1:klev), found)
+  IF (.NOT. found) PRINT*, modname // 'Le champ <Plev> est absent'
+
+  Do iq = 1, nqtot
+    CALL get_field("q" // nmq(iq), q(:, :, iq), found)
+    IF (.NOT.found)PRINT*, modname // 'Le champ <q' // nmq // '> est absent'
+  EndDo
+
+  CALL close_startphy
+  PRINT*, ' close startphy', fichnom, play(1, 1), play(1, klev), temp(1, klev)
+
+  RETURN
+END
 
 ! $Id: dyn1dredem.F 1279 2010/07/29 A Lahellec$
 
 
-      SUBROUTINE dyn1dredem(fichnom,plev,play,phi,phis,presnivs,           &
-     &                          ucov,vcov,temp,q,omega2)
-      USE dimphy
-      USE mod_grid_phy_lmdz
-      USE mod_phys_lmdz_para
-      USE phys_state_var_mod
-      USE iostart
-      USE infotrac
-      use control_mod
-      USE comconst_mod, ONLY: cpp, daysec, dtvr, g, kappa, omeg, rad
-      USE logic_mod, ONLY: fxyhypb, ysinus
-      USE temps_mod, ONLY: annee_ref,day_end,day_ref,itau_dyn,itaufin
-      USE netcdf, ONLY:nf90_open,nf90_write,nf90_noerr
-
-      IMPLICIT NONE
-!=======================================================
-! Ecriture du fichier de redemarrage sous format NetCDF
-!=======================================================
-!   Declarations:
-!   -------------
-      include "dimensions.h"
-!!#include "control.h"
-
-!   Arguments:
-!   ----------
-      CHARACTER*(*) fichnom
-!Al1 plev tronque pour .nc mais plev(klev+1):=0
-      real :: plev(klon,klev),play (klon,klev),phi(klon,klev)
-      real :: presnivs(klon,klev)
-      real :: ucov(klon,klev),vcov(klon,klev),temp(klon,klev)
-      real :: q(klon,klev,nqtot)
-      real :: omega2(klon,klev),rho(klon,klev+1)
-!      real :: ug(klev),vg(klev),fcoriolis
-      real :: phis(klon) 
-
-!   Variables locales pour NetCDF:
-!   ------------------------------
-      INTEGER nid
-      INTEGER ierr
-      INTEGER iq,l
-      INTEGER length
-      PARAMETER (length = 100)
-      REAL tab_cntrl(length) ! tableau des parametres du run
-      character*4 nmq(nqtot)
-      character*20 modname
-      character*80 abort_message
-
-      INTEGER pass
-
-      CALL open_restartphy(fichnom)
-      print*,'redm1 ',fichnom,klon,klev,nqtot
-!!      nmq(1)="vap"
-!!      nmq(2)="cond"
-!!      nmq(3)="tra1"
-!!      nmq(4)="tra2"
-      DO iq = 1,nqtot
-        nmq(iq) = trim(tracers(iq)%name)
-      ENDDO
-
-!     modname = 'dyn1dredem'
-!     ierr = nf90_open(fichnom, nf90_write, nid)
-!     IF (ierr .NE. nf90_noerr) THEN
-!        abort_message="Pb. d ouverture "//fichnom
-!        CALL abort_gcm('Modele 1D',abort_message,1)
-!     ENDIF
-
-      DO l=1,length
-       tab_cntrl(l) = 0.
-      ENDDO
-       tab_cntrl(1)  = FLOAT(iim)
-       tab_cntrl(2)  = FLOAT(jjm)
-       tab_cntrl(3)  = FLOAT(llm)
-       tab_cntrl(4)  = FLOAT(day_ref)
-       tab_cntrl(5)  = FLOAT(annee_ref)
-       tab_cntrl(6)  = rad
-       tab_cntrl(7)  = omeg
-       tab_cntrl(8)  = g
-       tab_cntrl(9)  = cpp
-       tab_cntrl(10) = kappa
-       tab_cntrl(11) = daysec
-       tab_cntrl(12) = dtvr
-!       tab_cntrl(13) = etot0
-!       tab_cntrl(14) = ptot0
-!       tab_cntrl(15) = ztot0
-!       tab_cntrl(16) = stot0
-!       tab_cntrl(17) = ang0
-!       tab_cntrl(18) = pa
-!       tab_cntrl(19) = preff
-
-!    .....    parametres  pour le zoom      ......   
-
-!       tab_cntrl(20)  = clon
-!       tab_cntrl(21)  = clat
-!       tab_cntrl(22)  = grossismx
-!       tab_cntrl(23)  = grossismy
-
-      IF ( fxyhypb )   THEN
-       tab_cntrl(24) = 1.
-!       tab_cntrl(25) = dzoomx
-!       tab_cntrl(26) = dzoomy
-       tab_cntrl(27) = 0.
-!       tab_cntrl(28) = taux
-!       tab_cntrl(29) = tauy
-      ELSE
-       tab_cntrl(24) = 0.
-!       tab_cntrl(25) = dzoomx
-!       tab_cntrl(26) = dzoomy
-       tab_cntrl(27) = 0.
-       tab_cntrl(28) = 0.
-       tab_cntrl(29) = 0.
-       IF( ysinus )  tab_cntrl(27) = 1.
-      ENDIF
-!Al1 iday_end -> day_end
-       tab_cntrl(30) = FLOAT(day_end)
-       tab_cntrl(31) = FLOAT(itau_dyn + itaufin)
-
-      DO pass=1,2
-      CALL put_var(pass,"controle","Param. de controle Dyn1D",tab_cntrl)
-
-!  Ecriture/extension de la coordonnee temps
-
-
-!  Ecriture des champs
-
-      CALL put_field(pass,"plev","p interfaces sauf la nulle",plev)
-      CALL put_field(pass,"play","",play)
-      CALL put_field(pass,"phi","geopotentielle",phi)
-      CALL put_field(pass,"phis","geopotentiell de surface",phis)
-      CALL put_field(pass,"presnivs","",presnivs)
-      CALL put_field(pass,"ucov","",ucov)
-      CALL put_field(pass,"vcov","",vcov)
-      CALL put_field(pass,"temp","",temp)
-      CALL put_field(pass,"omega2","",omega2)
-
-      Do iq=1,nqtot
-        CALL put_field(pass,"q"//nmq(iq),"eau vap ou condens et traceurs",           &
-     &                                                      q(:,:,iq))
-      EndDo
+SUBROUTINE dyn1dredem(fichnom, plev, play, phi, phis, presnivs, &
+        &                          ucov, vcov, temp, q, omega2)
+  USE dimphy
+  USE mod_grid_phy_lmdz
+  USE mod_phys_lmdz_para
+  USE phys_state_var_mod
+  USE iostart
+  USE infotrac
+  use control_mod
+  USE comconst_mod, ONLY: cpp, daysec, dtvr, g, kappa, omeg, rad
+  USE logic_mod, ONLY: fxyhypb, ysinus
+  USE temps_mod, ONLY: annee_ref, day_end, day_ref, itau_dyn, itaufin
+  USE netcdf, ONLY: nf90_open, nf90_write, nf90_noerr
+
+  IMPLICIT NONE
+  !=======================================================
+  ! Ecriture du fichier de redemarrage sous format NetCDF
+  !=======================================================
+  !   Declarations:
+  !   -------------
+  include "dimensions.h"
+  !!#include "control.h"
+
+  !   Arguments:
+  !   ----------
+  CHARACTER*(*) fichnom
+  !Al1 plev tronque pour .nc mais plev(klev+1):=0
+  real :: plev(klon, klev), play (klon, klev), phi(klon, klev)
+  real :: presnivs(klon, klev)
+  real :: ucov(klon, klev), vcov(klon, klev), temp(klon, klev)
+  real :: q(klon, klev, nqtot)
+  real :: omega2(klon, klev), rho(klon, klev + 1)
+  !      real :: ug(klev),vg(klev),fcoriolis
+  real :: phis(klon)
+
+  !   Variables locales pour NetCDF:
+  !   ------------------------------
+  INTEGER nid
+  INTEGER ierr
+  INTEGER iq, l
+  INTEGER length
+  PARAMETER (length = 100)
+  REAL tab_cntrl(length) ! tableau des parametres du run
+  character*4 nmq(nqtot)
+  character*20 modname
+  character*80 abort_message
+
+  INTEGER pass
+
+  CALL open_restartphy(fichnom)
+  PRINT*, 'redm1 ', fichnom, klon, klev, nqtot
+  !!      nmq(1)="vap"
+  !!      nmq(2)="cond"
+  !!      nmq(3)="tra1"
+  !!      nmq(4)="tra2"
+  DO iq = 1, nqtot
+    nmq(iq) = trim(tracers(iq)%name)
+  ENDDO
+
+  !     modname = 'dyn1dredem'
+  !     ierr = nf90_open(fichnom, nf90_write, nid)
+  !     IF (ierr .NE. nf90_noerr) THEN
+  !        abort_message="Pb. d ouverture "//fichnom
+  !        CALL abort_gcm('Modele 1D',abort_message,1)
+  !     ENDIF
+
+  DO l = 1, length
+    tab_cntrl(l) = 0.
+  ENDDO
+  tab_cntrl(1) = FLOAT(iim)
+  tab_cntrl(2) = FLOAT(jjm)
+  tab_cntrl(3) = FLOAT(llm)
+  tab_cntrl(4) = FLOAT(day_ref)
+  tab_cntrl(5) = FLOAT(annee_ref)
+  tab_cntrl(6) = rad
+  tab_cntrl(7) = omeg
+  tab_cntrl(8) = g
+  tab_cntrl(9) = cpp
+  tab_cntrl(10) = kappa
+  tab_cntrl(11) = daysec
+  tab_cntrl(12) = dtvr
+  !       tab_cntrl(13) = etot0
+  !       tab_cntrl(14) = ptot0
+  !       tab_cntrl(15) = ztot0
+  !       tab_cntrl(16) = stot0
+  !       tab_cntrl(17) = ang0
+  !       tab_cntrl(18) = pa
+  !       tab_cntrl(19) = preff
+
+  !    .....    parametres  pour le zoom      ......
+
+  !       tab_cntrl(20)  = clon
+  !       tab_cntrl(21)  = clat
+  !       tab_cntrl(22)  = grossismx
+  !       tab_cntrl(23)  = grossismy
+
+  IF (fxyhypb)   THEN
+    tab_cntrl(24) = 1.
+    !       tab_cntrl(25) = dzoomx
+    !       tab_cntrl(26) = dzoomy
+    tab_cntrl(27) = 0.
+    !       tab_cntrl(28) = taux
+    !       tab_cntrl(29) = tauy
+  ELSE
+    tab_cntrl(24) = 0.
+    !       tab_cntrl(25) = dzoomx
+    !       tab_cntrl(26) = dzoomy
+    tab_cntrl(27) = 0.
+    tab_cntrl(28) = 0.
+    tab_cntrl(29) = 0.
+    IF(ysinus)  tab_cntrl(27) = 1.
+  ENDIF
+  !Al1 iday_end -> day_end
+  tab_cntrl(30) = FLOAT(day_end)
+  tab_cntrl(31) = FLOAT(itau_dyn + itaufin)
+
+  DO pass = 1, 2
+    CALL put_var(pass, "controle", "Param. de controle Dyn1D", tab_cntrl)
+
+    !  Ecriture/extension de la coordonnee temps
+
+
+    !  Ecriture des champs
+
+    CALL put_field(pass, "plev", "p interfaces sauf la nulle", plev)
+    CALL put_field(pass, "play", "", play)
+    CALL put_field(pass, "phi", "geopotentielle", phi)
+    CALL put_field(pass, "phis", "geopotentiell de surface", phis)
+    CALL put_field(pass, "presnivs", "", presnivs)
+    CALL put_field(pass, "ucov", "", ucov)
+    CALL put_field(pass, "vcov", "", vcov)
+    CALL put_field(pass, "temp", "", temp)
+    CALL put_field(pass, "omega2", "", omega2)
+
+    Do iq = 1, nqtot
+      CALL put_field(pass, "q" // nmq(iq), "eau vap ou condens et traceurs", &
+              &                                                      q(:, :, iq))
+    EndDo
     IF (pass==1) CALL enddef_restartphy
     IF (pass==2) CALL close_restartphy
 
-
-      ENDDO
-
-      RETURN
-      END
-      SUBROUTINE gr_fi_dyn(nfield,ngrid,im,jm,pfi,pdyn)
-      IMPLICIT NONE
-!=======================================================================
-!   passage d'un champ de la grille scalaire a la grille physique
-!=======================================================================
- 
-!-----------------------------------------------------------------------
-!   declarations:
-!   -------------
- 
-      INTEGER im,jm,ngrid,nfield
-      REAL pdyn(im,jm,nfield)
-      REAL pfi(ngrid,nfield)
- 
-      INTEGER i,j,ifield,ig
- 
-!-----------------------------------------------------------------------
-!   calcul:
-!   -------
- 
-      DO ifield=1,nfield
-!   traitement des poles
-         DO i=1,im
-            pdyn(i,1,ifield)=pfi(1,ifield)
-            pdyn(i,jm,ifield)=pfi(ngrid,ifield)
-         ENDDO
- 
-!   traitement des point normaux
-         DO j=2,jm-1
-            ig=2+(j-2)*(im-1)
-            CALL SCOPY(im-1,pfi(ig,ifield),1,pdyn(1,j,ifield),1)
-            pdyn(im,j,ifield)=pdyn(1,j,ifield)
-         ENDDO
-      ENDDO
- 
-      RETURN
-      END
- 
- 
-
-      SUBROUTINE abort_gcm(modname, message, ierr)
- 
-      USE IOIPSL
-
-! Stops the simulation cleanly, closing files and printing various
-! comments
-
-!  Input: modname = name of calling program
-!         message = stuff to print
-!         ierr    = severity of situation ( = 0 normal )
- 
-      character(len=*) modname
-      integer ierr
-      character(len=*) message
- 
-      write(*,*) 'in abort_gcm'
-      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
-
-      if (ierr .eq. 0) then
-        write(*,*) 'Everything is cool'
-      else
-        write(*,*) 'Houston, we have a problem ', ierr
-      endif
-      STOP
-      END
-      REAL FUNCTION fq_sat(kelvin, millibar)
-
-      IMPLICIT none
-!======================================================================
-! Autheur(s): Z.X. Li (LMD/CNRS)
-! Objet: calculer la vapeur d'eau saturante (formule Centre Euro.)
-!======================================================================
-! Arguments:
-! kelvin---input-R: temperature en Kelvin
-! millibar--input-R: pression en mb
-
-! fq_sat----output-R: vapeur d'eau saturante en kg/kg
-!======================================================================
-
-      REAL kelvin, millibar
-
-      REAL r2es
-      PARAMETER (r2es=611.14 *18.0153/28.9644)
-
-      REAL r3les, r3ies, r3es
-      PARAMETER (R3LES=17.269)
-      PARAMETER (R3IES=21.875)
-
-      REAL r4les, r4ies, r4es
-      PARAMETER (R4LES=35.86)
-      PARAMETER (R4IES=7.66)
-
-      REAL rtt
-      PARAMETER (rtt=273.16)
-
-      REAL retv
-      PARAMETER (retv=28.9644/18.0153 - 1.0)
-
-      REAL zqsat
-      REAL temp, pres
-!     ------------------------------------------------------------------
-
-
-      temp = kelvin
-      pres = millibar * 100.0
-!      write(*,*)'kelvin,millibar=',kelvin,millibar
-!      write(*,*)'temp,pres=',temp,pres
-
-      IF (temp .LE. rtt) THEN
-         r3es = r3ies
-         r4es = r4ies
-      ELSE
-         r3es = r3les
-         r4es = r4les
-      ENDIF
-
-      zqsat=r2es/pres * EXP ( r3es*(temp-rtt) / (temp-r4es) )
-      zqsat=MIN(0.5,ZQSAT)
-      zqsat=zqsat/(1.-retv  *zqsat)
-
-      fq_sat = zqsat
-
-      RETURN
-      END
- 
-      SUBROUTINE gr_dyn_fi(nfield,im,jm,ngrid,pdyn,pfi)
-      IMPLICIT NONE
-!=======================================================================
-!   passage d'un champ de la grille scalaire a la grille physique
-!=======================================================================
- 
-!-----------------------------------------------------------------------
-!   declarations:
-!   -------------
- 
-      INTEGER im,jm,ngrid,nfield
-      REAL pdyn(im,jm,nfield)
-      REAL pfi(ngrid,nfield)
- 
-      INTEGER j,ifield,ig
- 
-!-----------------------------------------------------------------------
-!   calcul:
-!   -------
- 
-      IF(ngrid.NE.2+(jm-2)*(im-1).AND.ngrid.NE.1)                          &
-     &    STOP 'probleme de dim'
-!   traitement des poles
-      CALL SCOPY(nfield,pdyn,im*jm,pfi,ngrid)
-      CALL SCOPY(nfield,pdyn(1,jm,1),im*jm,pfi(ngrid,1),ngrid)
- 
-!   traitement des point normaux
-      DO ifield=1,nfield
-         DO j=2,jm-1
-            ig=2+(j-2)*(im-1)
-            CALL SCOPY(im-1,pdyn(1,j,ifield),1,pfi(ig,ifield),1)
-         ENDDO
-      ENDDO
- 
-      RETURN
-      END
- 
-      SUBROUTINE disvert0(pa,preff,ap,bp,dpres,presnivs,nivsigs,nivsig)
- 
-!    Ancienne version disvert dont on a modifie nom pour utiliser
-!    le disvert de dyn3d (qui permet d'utiliser grille avec ab,bp imposes)
-!    (MPL 18092012)
-
-!    Auteur :  P. Le Van .
-
-      IMPLICIT NONE
- 
-      include "dimensions.h"
-      include "paramet.h"
-
-!=======================================================================
-
-
-!    s = sigma ** kappa   :  coordonnee  verticale
-!    dsig(l)            : epaisseur de la couche l ds la coord.  s
-!    sig(l)             : sigma a l'interface des couches l et l-1
-!    ds(l)              : distance entre les couches l et l-1 en coord.s
-
-!=======================================================================
-
-      REAL pa,preff
-      REAL ap(llmp1),bp(llmp1),dpres(llm),nivsigs(llm),nivsig(llmp1)
-      REAL presnivs(llm)
-
-!   declarations:
-!   -------------
-
-      REAL sig(llm+1),dsig(llm)
-
-      INTEGER l
-      REAL snorm
-      REAL alpha,beta,gama,delta,deltaz,h
-      INTEGER np,ierr
-      REAL pi,x
- 
-!-----------------------------------------------------------------------
-
-      pi=2.*ASIN(1.)
- 
-      OPEN(99,file='sigma.def',status='old',form='formatted',                   &
-     &   iostat=ierr)
- 
-!-----------------------------------------------------------------------
-!   cas 1 on lit les options dans sigma.def:
-!   ----------------------------------------
- 
-      IF (ierr.eq.0) THEN
- 
-      print*,'WARNING!!! on lit les options dans sigma.def'
-      READ(99,*) deltaz
-      READ(99,*) h
-      READ(99,*) beta
-      READ(99,*) gama
-      READ(99,*) delta
-      READ(99,*) np
-      CLOSE(99)
-      alpha=deltaz/(llm*h)
-
-       DO 1  l = 1, llm
-       dsig(l) = (alpha+(1.-alpha)*exp(-beta*(llm-l)))*                    &
-     &          ( (tanh(gama*l)/tanh(gama*llm))**np +                      &
-     &            (1.-l/FLOAT(llm))*delta )
-   1   CONTINUE
- 
-       sig(1)=1.
-       DO 101 l=1,llm-1
-          sig(l+1)=sig(l)*(1.-dsig(l))/(1.+dsig(l))
-101    CONTINUE
-       sig(llm+1)=0.
- 
-       DO 2  l = 1, llm
-       dsig(l) = sig(l)-sig(l+1)
-   2   CONTINUE
-
-      ELSE
-!-----------------------------------------------------------------------
-!   cas 2 ancienne discretisation (LMD5...):
-!   ----------------------------------------
- 
-      PRINT*,'WARNING!!! Ancienne discretisation verticale'
- 
-      h=7.
-      snorm  = 0.
-      DO l = 1, llm
-         x = 2.*asin(1.) * (FLOAT(l)-0.5) / float(llm+1)
-         dsig(l) = 1.0 + 7.0 * SIN(x)**2
-         snorm = snorm + dsig(l)
-      ENDDO
-      snorm = 1./snorm
-      DO l = 1, llm
-         dsig(l) = dsig(l)*snorm
-      ENDDO
-      sig(llm+1) = 0.
-      DO l = llm, 1, -1
-         sig(l) = sig(l+1) + dsig(l)
-      ENDDO
- 
-      ENDIF
- 
- 
-      DO l=1,llm
-        nivsigs(l) = FLOAT(l)
-      ENDDO
- 
-      DO l=1,llmp1
-        nivsig(l)= FLOAT(l)
-      ENDDO
-
-!    ....  Calculs  de ap(l) et de bp(l)  ....
-!    .........................................
-
-!   .....  pa et preff sont lus  sur les fichiers start par lectba  .....
-
-      bp(llmp1) =   0.
- 
-      DO l = 1, llm
-!c
-!cc    ap(l) = 0.
-!cc    bp(l) = sig(l)
- 
-      bp(l) = EXP( 1. -1./( sig(l)*sig(l)) )
-      ap(l) = pa * ( sig(l) - bp(l) )
-
-      ENDDO
-      ap(llmp1) = pa * ( sig(llmp1) - bp(llmp1) )
- 
-      PRINT *,' BP '
-      PRINT *,  bp
-      PRINT *,' AP '
-      PRINT *,  ap
- 
-      DO l = 1, llm
-       dpres(l) = bp(l) - bp(l+1)
-       presnivs(l) = 0.5 *( ap(l)+bp(l)*preff + ap(l+1)+bp(l+1)*preff )
-      ENDDO
- 
-      PRINT *,' PRESNIVS '
-      PRINT *,presnivs
- 
-      RETURN
-      END
+  ENDDO
+
+  RETURN
+END
+SUBROUTINE gr_fi_dyn(nfield, ngrid, im, jm, pfi, pdyn)
+  IMPLICIT NONE
+  !=======================================================================
+  !   passage d'un champ de la grille scalaire a la grille physique
+  !=======================================================================
+
+  !-----------------------------------------------------------------------
+  !   declarations:
+  !   -------------
+
+  INTEGER im, jm, ngrid, nfield
+  REAL pdyn(im, jm, nfield)
+  REAL pfi(ngrid, nfield)
+
+  INTEGER i, j, ifield, ig
+
+  !-----------------------------------------------------------------------
+  !   calcul:
+  !   -------
+
+  DO ifield = 1, nfield
+    !   traitement des poles
+    DO i = 1, im
+      pdyn(i, 1, ifield) = pfi(1, ifield)
+      pdyn(i, jm, ifield) = pfi(ngrid, ifield)
+    ENDDO
+
+    !   traitement des point normaux
+    DO j = 2, jm - 1
+      ig = 2 + (j - 2) * (im - 1)
+      CALL SCOPY(im - 1, pfi(ig, ifield), 1, pdyn(1, j, ifield), 1)
+      pdyn(im, j, ifield) = pdyn(1, j, ifield)
+    ENDDO
+  ENDDO
+
+  RETURN
+END
+
+
+SUBROUTINE abort_gcm(modname, message, ierr)
+
+  USE IOIPSL
+
+  ! Stops the simulation cleanly, closing files and printing various
+  ! comments
+
+  !  Input: modname = name of calling program
+  !         message = stuff to print
+  !         ierr    = severity of situation ( = 0 normal )
+
+  character(len = *) modname
+  integer ierr
+  character(len = *) message
+
+  write(*, *) 'in abort_gcm'
+  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
+
+  if (ierr == 0) then
+    write(*, *) 'Everything is cool'
+  else
+    write(*, *) 'Houston, we have a problem ', ierr
+  endif
+  STOP
+END
+REAL FUNCTION fq_sat(kelvin, millibar)
+
+  IMPLICIT none
+  !======================================================================
+  ! Autheur(s): Z.X. Li (LMD/CNRS)
+  ! Objet: calculer la vapeur d'eau saturante (formule Centre Euro.)
+  !======================================================================
+  ! Arguments:
+  ! kelvin---input-R: temperature en Kelvin
+  ! millibar--input-R: pression en mb
+
+  ! fq_sat----output-R: vapeur d'eau saturante en kg/kg
+  !======================================================================
+
+  REAL kelvin, millibar
+
+  REAL r2es
+  PARAMETER (r2es = 611.14 * 18.0153 / 28.9644)
+
+  REAL r3les, r3ies, r3es
+  PARAMETER (R3LES = 17.269)
+  PARAMETER (R3IES = 21.875)
+
+  REAL r4les, r4ies, r4es
+  PARAMETER (R4LES = 35.86)
+  PARAMETER (R4IES = 7.66)
+
+  REAL rtt
+  PARAMETER (rtt = 273.16)
+
+  REAL retv
+  PARAMETER (retv = 28.9644 / 18.0153 - 1.0)
+
+  REAL zqsat
+  REAL temp, pres
+  !     ------------------------------------------------------------------
+
+  temp = kelvin
+  pres = millibar * 100.0
+  !      write(*,*)'kelvin,millibar=',kelvin,millibar
+  !      write(*,*)'temp,pres=',temp,pres
+
+  IF (temp <= rtt) THEN
+    r3es = r3ies
+    r4es = r4ies
+  ELSE
+    r3es = r3les
+    r4es = r4les
+  ENDIF
+
+  zqsat = r2es / pres * EXP (r3es * (temp - rtt) / (temp - r4es))
+  zqsat = MIN(0.5, ZQSAT)
+  zqsat = zqsat / (1. - retv * zqsat)
+
+  fq_sat = zqsat
+
+  RETURN
+END
+
+SUBROUTINE gr_dyn_fi(nfield, im, jm, ngrid, pdyn, pfi)
+  IMPLICIT NONE
+  !=======================================================================
+  !   passage d'un champ de la grille scalaire a la grille physique
+  !=======================================================================
+
+  !-----------------------------------------------------------------------
+  !   declarations:
+  !   -------------
+
+  INTEGER im, jm, ngrid, nfield
+  REAL pdyn(im, jm, nfield)
+  REAL pfi(ngrid, nfield)
+
+  INTEGER j, ifield, ig
+
+  !-----------------------------------------------------------------------
+  !   calcul:
+  !   -------
+
+  IF(ngrid/=2 + (jm - 2) * (im - 1).AND.ngrid/=1)                          &
+          &    STOP 'probleme de dim'
+  !   traitement des poles
+  CALL SCOPY(nfield, pdyn, im * jm, pfi, ngrid)
+  CALL SCOPY(nfield, pdyn(1, jm, 1), im * jm, pfi(ngrid, 1), ngrid)
+
+  !   traitement des point normaux
+  DO ifield = 1, nfield
+    DO j = 2, jm - 1
+      ig = 2 + (j - 2) * (im - 1)
+      CALL SCOPY(im - 1, pdyn(1, j, ifield), 1, pfi(ig, ifield), 1)
+    ENDDO
+  ENDDO
+
+  RETURN
+END
+
+SUBROUTINE disvert0(pa, preff, ap, bp, dpres, presnivs, nivsigs, nivsig)
+
+  !    Ancienne version disvert dont on a modifie nom pour utiliser
+  !    le disvert de dyn3d (qui permet d'utiliser grille avec ab,bp imposes)
+  !    (MPL 18092012)
+
+  !    Auteur :  P. Le Van .
+
+  IMPLICIT NONE
+
+  include "dimensions.h"
+  include "paramet.h"
+
+  !=======================================================================
+
+
+  !    s = sigma ** kappa   :  coordonnee  verticale
+  !    dsig(l)            : epaisseur de la couche l ds la coord.  s
+  !    sig(l)             : sigma a l'interface des couches l et l-1
+  !    ds(l)              : distance entre les couches l et l-1 en coord.s
+
+  !=======================================================================
+
+  REAL pa, preff
+  REAL ap(llmp1), bp(llmp1), dpres(llm), nivsigs(llm), nivsig(llmp1)
+  REAL presnivs(llm)
+
+  !   declarations:
+  !   -------------
+
+  REAL sig(llm + 1), dsig(llm)
+
+  INTEGER l
+  REAL snorm
+  REAL alpha, beta, gama, delta, deltaz, h
+  INTEGER np, ierr
+  REAL pi, x
+
+  !-----------------------------------------------------------------------
+
+  pi = 2. * ASIN(1.)
+
+  OPEN(99, file = 'sigma.def', status = 'old', form = 'formatted', &
+          &   iostat = ierr)
+
+  !-----------------------------------------------------------------------
+  !   cas 1 on lit les options dans sigma.def:
+  !   ----------------------------------------
+
+  IF (ierr==0) THEN
+
+    PRINT*, 'WARNING!!! on lit les options dans sigma.def'
+    READ(99, *) deltaz
+    READ(99, *) h
+    READ(99, *) beta
+    READ(99, *) gama
+    READ(99, *) delta
+    READ(99, *) np
+    CLOSE(99)
+    alpha = deltaz / (llm * h)
+
+    DO l = 1, llm
+      dsig(l) = (alpha + (1. - alpha) * exp(-beta * (llm - l))) * &
+              &          ((tanh(gama * l) / tanh(gama * llm))**np + &
+                      &            (1. - l / FLOAT(llm)) * delta)
+    END DO
+
+    sig(1) = 1.
+    DO l = 1, llm - 1
+      sig(l + 1) = sig(l) * (1. - dsig(l)) / (1. + dsig(l))
+    END DO
+    sig(llm + 1) = 0.
+
+    DO l = 1, llm
+      dsig(l) = sig(l) - sig(l + 1)
+    END DO
+
+  ELSE
+    !-----------------------------------------------------------------------
+    !   cas 2 ancienne discretisation (LMD5...):
+    !   ----------------------------------------
+
+    PRINT*, 'WARNING!!! Ancienne discretisation verticale'
+
+    h = 7.
+    snorm = 0.
+    DO l = 1, llm
+      x = 2. * asin(1.) * (FLOAT(l) - 0.5) / float(llm + 1)
+      dsig(l) = 1.0 + 7.0 * SIN(x)**2
+      snorm = snorm + dsig(l)
+    ENDDO
+    snorm = 1. / snorm
+    DO l = 1, llm
+      dsig(l) = dsig(l) * snorm
+    ENDDO
+    sig(llm + 1) = 0.
+    DO l = llm, 1, -1
+      sig(l) = sig(l + 1) + dsig(l)
+    ENDDO
+
+  ENDIF
+
+  DO l = 1, llm
+    nivsigs(l) = FLOAT(l)
+  ENDDO
+
+  DO l = 1, llmp1
+    nivsig(l) = FLOAT(l)
+  ENDDO
+
+  !    ....  Calculs  de ap(l) et de bp(l)  ....
+  !    .........................................
+
+  !   .....  pa et preff sont lus  sur les fichiers start par lectba  .....
+
+  bp(llmp1) = 0.
+
+  DO l = 1, llm
+    !c
+    !cc    ap(l) = 0.
+    !cc    bp(l) = sig(l)
+
+    bp(l) = EXP(1. - 1. / (sig(l) * sig(l)))
+    ap(l) = pa * (sig(l) - bp(l))
+
+  ENDDO
+  ap(llmp1) = pa * (sig(llmp1) - bp(llmp1))
+
+  PRINT *, ' BP '
+  PRINT *, bp
+  PRINT *, ' AP '
+  PRINT *, ap
+
+  DO l = 1, llm
+    dpres(l) = bp(l) - bp(l + 1)
+    presnivs(l) = 0.5 * (ap(l) + bp(l) * preff + ap(l + 1) + bp(l + 1) * preff)
+  ENDDO
+
+  PRINT *, ' PRESNIVS '
+  PRINT *, presnivs
+
+  RETURN
+END
 
 !!======================================================================
@@ -1288,205 +1275,202 @@
 
 !===============================================================
-      subroutine advect_vert(llm,w,dt,q,plev)
+subroutine advect_vert(llm, w, dt, q, plev)
+  !===============================================================
+  !   Schema amont pour l'advection verticale en 1D
+  !   w est la vitesse verticale dp/dt en Pa/s
+  !   Traitement en volumes finis
+  !   d / dt ( zm q ) = delta_z ( omega q )
+  !   d / dt ( zm ) = delta_z ( omega )
+  !   avec zm = delta_z ( p )
+  !   si * designe la valeur au pas de temps t+dt
+  !   zm*(l) q*(l) - zm(l) q(l) = w(l+1) q(l+1) - w(l) q(l)
+  !   zm*(l) -zm(l) = w(l+1) - w(l)
+  !   avec w=omega * dt
+  !---------------------------------------------------------------
+  implicit none
+  ! arguments
+  integer llm
+  real w(llm + 1), q(llm), plev(llm + 1), dt
+
+  ! local
+  integer l
+  real zwq(llm + 1), zm(llm + 1), zw(llm + 1)
+  real qold
+
+  !---------------------------------------------------------------
+
+  do l = 1, llm
+    zw(l) = dt * w(l)
+    zm(l) = plev(l) - plev(l + 1)
+    zwq(l) = q(l) * zw(l)
+  enddo
+  zwq(llm + 1) = 0.
+  zw(llm + 1) = 0.
+
+  do l = 1, llm
+    qold = q(l)
+    q(l) = (q(l) * zm(l) + zwq(l + 1) - zwq(l)) / (zm(l) + zw(l + 1) - zw(l))
+    PRINT*, 'ADV Q ', zm(l), zw(l), zwq(l), qold, q(l)
+  enddo
+
+  return
+end
+
 !===============================================================
-!   Schema amont pour l'advection verticale en 1D
-!   w est la vitesse verticale dp/dt en Pa/s
-!   Traitement en volumes finis 
-!   d / dt ( zm q ) = delta_z ( omega q )
-!   d / dt ( zm ) = delta_z ( omega )
-!   avec zm = delta_z ( p )
-!   si * designe la valeur au pas de temps t+dt
-!   zm*(l) q*(l) - zm(l) q(l) = w(l+1) q(l+1) - w(l) q(l)
-!   zm*(l) -zm(l) = w(l+1) - w(l)
-!   avec w=omega * dt
-!---------------------------------------------------------------
-      implicit none
-! arguments
-      integer llm
-      real w(llm+1),q(llm),plev(llm+1),dt
-
-! local
-      integer l
-      real zwq(llm+1),zm(llm+1),zw(llm+1)
-      real qold
-
-!---------------------------------------------------------------
-
-      do l=1,llm
-         zw(l)=dt*w(l)
-         zm(l)=plev(l)-plev(l+1)
-         zwq(l)=q(l)*zw(l)
-      enddo
-      zwq(llm+1)=0.
-      zw(llm+1)=0.
- 
-      do l=1,llm
-         qold=q(l)
-         q(l)=(q(l)*zm(l)+zwq(l+1)-zwq(l))/(zm(l)+zw(l+1)-zw(l))
-         print*,'ADV Q ',zm(l),zw(l),zwq(l),qold,q(l)
-      enddo
-
- 
-      return
-      end
-
-!===============================================================
-
-
-       SUBROUTINE advect_va(llm,omega,d_t_va,d_q_va,d_u_va,d_v_va,              &
-     &                q,temp,u,v,play)
-!itlmd 
-!----------------------------------------------------------------------
-!   Calcul de l'advection verticale (ascendance et subsidence) de 
-!   temperature et d'humidite. Hypothese : ce qui rentre de l'exterieur
-!   a les memes caracteristiques que l'air de la colonne 1D (WTG) ou 
-!   sans WTG rajouter une advection horizontale 
-!----------------------------------------------------------------------  
-        implicit none
-#include "YOMCST.h"
-!        argument
-        integer llm
-        real  omega(llm+1),d_t_va(llm), d_q_va(llm,3)
-        real  d_u_va(llm), d_v_va(llm)
-        real  q(llm,3),temp(llm)
-        real  u(llm),v(llm)
-        real  play(llm)
-! interne
-        integer l
-        real alpha,omgdown,omgup
-
-      do l= 1,llm
-       if(l.eq.1) then
-!si omgup pour la couche 1, alors tendance nulle
-        omgdown=max(omega(2),0.0)
-        alpha = rkappa*temp(l)*(1.+q(l,1)*rv/rd)/(play(l)*(1.+q(l,1)))
-        d_t_va(l)= alpha*(omgdown)-omgdown*(temp(l)-temp(l+1))             &
-     &       /(play(l)-play(l+1))
-
-        d_q_va(l,:)= -omgdown*(q(l,:)-q(l+1,:))/(play(l)-play(l+1))              
-
-        d_u_va(l)= -omgdown*(u(l)-u(l+1))/(play(l)-play(l+1))              
-        d_v_va(l)= -omgdown*(v(l)-v(l+1))/(play(l)-play(l+1))              
-
-        
-       elseif(l.eq.llm) then
-        omgup=min(omega(l),0.0)
-        alpha = rkappa*temp(l)*(1.+q(l,1)*rv/rd)/(play(l)*(1.+q(l,1)))
-        d_t_va(l)= alpha*(omgup)-                                          &
-
-!bug?     &              omgup*(temp(l-1)-temp(l))/(play(l-1)-plev(l))
-     &              omgup*(temp(l-1)-temp(l))/(play(l-1)-play(l))
-        d_q_va(l,:)= -omgup*(q(l-1,:)-q(l,:))/(play(l-1)-play(l))
-        d_u_va(l)= -omgup*(u(l-1)-u(l))/(play(l-1)-play(l))
-        d_v_va(l)= -omgup*(v(l-1)-v(l))/(play(l-1)-play(l))
-       
-       else
-        omgup=min(omega(l),0.0)
-        omgdown=max(omega(l+1),0.0)
-        alpha = rkappa*temp(l)*(1.+q(l,1)*rv/rd)/(play(l)*(1.+q(l,1)))
-        d_t_va(l)= alpha*(omgup+omgdown)-omgdown*(temp(l)-temp(l+1))       &
-     &              /(play(l)-play(l+1))-                                  &
-!bug?     &              omgup*(temp(l-1)-temp(l))/(play(l-1)-plev(l))
-     &              omgup*(temp(l-1)-temp(l))/(play(l-1)-play(l))
-!      print*, '  ??? '
-
-        d_q_va(l,:)= -omgdown*(q(l,:)-q(l+1,:))                            &
-     &              /(play(l)-play(l+1))-                                  &
-     &              omgup*(q(l-1,:)-q(l,:))/(play(l-1)-play(l)) 
-        d_u_va(l)= -omgdown*(u(l)-u(l+1))                                  &
-     &              /(play(l)-play(l+1))-                                  &
-     &              omgup*(u(l-1)-u(l))/(play(l-1)-play(l)) 
-        d_v_va(l)= -omgdown*(v(l)-v(l+1))                                  &
-     &              /(play(l)-play(l+1))-                                  &
-     &              omgup*(v(l-1)-v(l))/(play(l-1)-play(l))
-       
-      endif
-         
-      enddo
-!fin itlmd
-        return
-        end
+
+
+SUBROUTINE advect_va(llm, omega, d_t_va, d_q_va, d_u_va, d_v_va, &
+        &                q, temp, u, v, play)
+  !itlmd
+  !----------------------------------------------------------------------
+  !   Calcul de l'advection verticale (ascendance et subsidence) de
+  !   temperature et d'humidite. Hypothese : ce qui rentre de l'exterieur
+  !   a les memes caracteristiques que l'air de la colonne 1D (WTG) ou
+  !   sans WTG rajouter une advection horizontale
+  !----------------------------------------------------------------------
+  implicit none
+  include "YOMCST.h"
+  !        argument
+  integer llm
+  real  omega(llm + 1), d_t_va(llm), d_q_va(llm, 3)
+  real  d_u_va(llm), d_v_va(llm)
+  real  q(llm, 3), temp(llm)
+  real  u(llm), v(llm)
+  real  play(llm)
+  ! interne
+  integer l
+  real alpha, omgdown, omgup
+
+  do l = 1, llm
+    if(l==1) then
+      !si omgup pour la couche 1, alors tendance nulle
+      omgdown = max(omega(2), 0.0)
+      alpha = rkappa * temp(l) * (1. + q(l, 1) * rv / rd) / (play(l) * (1. + q(l, 1)))
+      d_t_va(l) = alpha * (omgdown) - omgdown * (temp(l) - temp(l + 1))             &
+              & / (play(l) - play(l + 1))
+
+      d_q_va(l, :) = -omgdown * (q(l, :) - q(l + 1, :)) / (play(l) - play(l + 1))
+
+      d_u_va(l) = -omgdown * (u(l) - u(l + 1)) / (play(l) - play(l + 1))
+      d_v_va(l) = -omgdown * (v(l) - v(l + 1)) / (play(l) - play(l + 1))
+
+    elseif(l==llm) then
+      omgup = min(omega(l), 0.0)
+      alpha = rkappa * temp(l) * (1. + q(l, 1) * rv / rd) / (play(l) * (1. + q(l, 1)))
+      d_t_va(l) = alpha * (omgup) - &
+
+              !bug?     &              omgup*(temp(l-1)-temp(l))/(play(l-1)-plev(l))
+              &              omgup * (temp(l - 1) - temp(l)) / (play(l - 1) - play(l))
+      d_q_va(l, :) = -omgup * (q(l - 1, :) - q(l, :)) / (play(l - 1) - play(l))
+      d_u_va(l) = -omgup * (u(l - 1) - u(l)) / (play(l - 1) - play(l))
+      d_v_va(l) = -omgup * (v(l - 1) - v(l)) / (play(l - 1) - play(l))
+
+    else
+      omgup = min(omega(l), 0.0)
+      omgdown = max(omega(l + 1), 0.0)
+      alpha = rkappa * temp(l) * (1. + q(l, 1) * rv / rd) / (play(l) * (1. + q(l, 1)))
+      d_t_va(l) = alpha * (omgup + omgdown) - omgdown * (temp(l) - temp(l + 1))       &
+              & / (play(l) - play(l + 1)) - &
+              !bug?     &              omgup*(temp(l-1)-temp(l))/(play(l-1)-plev(l))
+              &              omgup * (temp(l - 1) - temp(l)) / (play(l - 1) - play(l))
+      !      PRINT*, '  ??? '
+
+      d_q_va(l, :) = -omgdown * (q(l, :) - q(l + 1, :))                            &
+              & / (play(l) - play(l + 1)) - &
+              &              omgup * (q(l - 1, :) - q(l, :)) / (play(l - 1) - play(l))
+      d_u_va(l) = -omgdown * (u(l) - u(l + 1))                                  &
+              & / (play(l) - play(l + 1)) - &
+              &              omgup * (u(l - 1) - u(l)) / (play(l - 1) - play(l))
+      d_v_va(l) = -omgdown * (v(l) - v(l + 1))                                  &
+              & / (play(l) - play(l + 1)) - &
+              &              omgup * (v(l - 1) - v(l)) / (play(l - 1) - play(l))
+
+    endif
+
+  enddo
+  !fin itlmd
+  return
+end
 !       SUBROUTINE lstendH(llm,omega,d_t_va,d_q_va,d_u_va,d_v_va,
-       SUBROUTINE lstendH(llm,nqtot,omega,d_t_va,d_q_va,                        &
-     &                q,temp,u,v,play)
-!itlmd 
-!----------------------------------------------------------------------
-!   Calcul de l'advection verticale (ascendance et subsidence) de 
-!   temperature et d'humidite. Hypothese : ce qui rentre de l'exterieur
-!   a les memes caracteristiques que l'air de la colonne 1D (WTG) ou 
-!   sans WTG rajouter une advection horizontale 
-!----------------------------------------------------------------------  
-        implicit none
-#include "YOMCST.h"
-!        argument
-        integer llm,nqtot
-        real  omega(llm+1),d_t_va(llm), d_q_va(llm,nqtot)
-!        real  d_u_va(llm), d_v_va(llm)
-        real  q(llm,nqtot),temp(llm)
-        real  u(llm),v(llm)
-        real  play(llm)
-        real cor(llm)
-!        real dph(llm),dudp(llm),dvdp(llm),dqdp(llm),dtdp(llm)
-        real dph(llm),dqdp(llm),dtdp(llm)
-! interne
-        integer k
-        real omdn,omup
-
-!        dudp=0.
-!        dvdp=0.
-        dqdp=0.
-        dtdp=0.
-!        d_u_va=0.
-!        d_v_va=0.
-
-      cor(:) = rkappa*temp*(1.+q(:,1)*rv/rd)/(play*(1.+q(:,1)))
-
-
-      do k=2,llm-1
-
-       dph  (k-1) = (play(k  )- play(k-1  ))
-!       dudp (k-1) = (u   (k  )- u   (k-1  ))/dph(k-1)
-!       dvdp (k-1) = (v   (k  )- v   (k-1  ))/dph(k-1)
-       dqdp (k-1) = (q   (k,1)- q   (k-1,1))/dph(k-1)
-       dtdp (k-1) = (temp(k  )- temp(k-1  ))/dph(k-1)
-
-      enddo
-
-!      dudp (  llm  ) = dudp ( llm-1 )
-!      dvdp (  llm  ) = dvdp ( llm-1 )
-      dqdp (  llm  ) = dqdp ( llm-1 )
-      dtdp (  llm  ) = dtdp ( llm-1 )
-
-      do k=2,llm-1
-      omdn=max(0.0,omega(k+1))
-      omup=min(0.0,omega( k ))
-
-!      d_u_va(k)  = -omdn*dudp(k)-omup*dudp(k-1)
-!      d_v_va(k)  = -omdn*dvdp(k)-omup*dvdp(k-1)
-      d_q_va(k,1)= -omdn*dqdp(k)-omup*dqdp(k-1)
-      d_t_va(k)  = -omdn*dtdp(k)-omup*dtdp(k-1)+(omup+omdn)*cor(k)
-      enddo
-
-      omdn=max(0.0,omega( 2 ))
-      omup=min(0.0,omega(llm))
-!      d_u_va( 1 )   = -omdn*dudp( 1 )
-!      d_u_va(llm)   = -omup*dudp(llm)
-!      d_v_va( 1 )   = -omdn*dvdp( 1 )
-!      d_v_va(llm)   = -omup*dvdp(llm)
-      d_q_va( 1 ,1) = -omdn*dqdp( 1 )
-      d_q_va(llm,1) = -omup*dqdp(llm)
-      d_t_va( 1 )   = -omdn*dtdp( 1 )+omdn*cor( 1 )
-      d_t_va(llm)   = -omup*dtdp(llm)!+omup*cor(llm)
-
-!      if(abs(rlat(1))>10.) then
-!     Calculate the tendency due agestrophic motions
-!      du_age = fcoriolis*(v-vg)
-!      dv_age = fcoriolis*(ug-u)
-!      endif
-
-!       CALL writefield_phy('d_t_va',d_t_va,llm)
-
-          return
-         end
+SUBROUTINE lstendH(llm, nqtot, omega, d_t_va, d_q_va, &
+        &                q, temp, u, v, play)
+  !itlmd
+  !----------------------------------------------------------------------
+  !   Calcul de l'advection verticale (ascendance et subsidence) de
+  !   temperature et d'humidite. Hypothese : ce qui rentre de l'exterieur
+  !   a les memes caracteristiques que l'air de la colonne 1D (WTG) ou
+  !   sans WTG rajouter une advection horizontale
+  !----------------------------------------------------------------------
+  implicit none
+  include "YOMCST.h"
+  !        argument
+  integer llm, nqtot
+  real  omega(llm + 1), d_t_va(llm), d_q_va(llm, nqtot)
+  !        real  d_u_va(llm), d_v_va(llm)
+  real  q(llm, nqtot), temp(llm)
+  real  u(llm), v(llm)
+  real  play(llm)
+  real cor(llm)
+  !        real dph(llm),dudp(llm),dvdp(llm),dqdp(llm),dtdp(llm)
+  real dph(llm), dqdp(llm), dtdp(llm)
+  ! interne
+  integer k
+  real omdn, omup
+
+  !        dudp=0.
+  !        dvdp=0.
+  dqdp = 0.
+  dtdp = 0.
+  !        d_u_va=0.
+  !        d_v_va=0.
+
+  cor(:) = rkappa * temp * (1. + q(:, 1) * rv / rd) / (play * (1. + q(:, 1)))
+
+  do k = 2, llm - 1
+
+    dph  (k - 1) = (play(k) - play(k - 1))
+    !       dudp (k-1) = (u   (k  )- u   (k-1  ))/dph(k-1)
+    !       dvdp (k-1) = (v   (k  )- v   (k-1  ))/dph(k-1)
+    dqdp (k - 1) = (q   (k, 1) - q   (k - 1, 1)) / dph(k - 1)
+    dtdp (k - 1) = (temp(k) - temp(k - 1)) / dph(k - 1)
+
+  enddo
+
+  !      dudp (  llm  ) = dudp ( llm-1 )
+  !      dvdp (  llm  ) = dvdp ( llm-1 )
+  dqdp (llm) = dqdp (llm - 1)
+  dtdp (llm) = dtdp (llm - 1)
+
+  do k = 2, llm - 1
+    omdn = max(0.0, omega(k + 1))
+    omup = min(0.0, omega(k))
+
+    !      d_u_va(k)  = -omdn*dudp(k)-omup*dudp(k-1)
+    !      d_v_va(k)  = -omdn*dvdp(k)-omup*dvdp(k-1)
+    d_q_va(k, 1) = -omdn * dqdp(k) - omup * dqdp(k - 1)
+    d_t_va(k) = -omdn * dtdp(k) - omup * dtdp(k - 1) + (omup + omdn) * cor(k)
+  enddo
+
+  omdn = max(0.0, omega(2))
+  omup = min(0.0, omega(llm))
+  !      d_u_va( 1 )   = -omdn*dudp( 1 )
+  !      d_u_va(llm)   = -omup*dudp(llm)
+  !      d_v_va( 1 )   = -omdn*dvdp( 1 )
+  !      d_v_va(llm)   = -omup*dvdp(llm)
+  d_q_va(1, 1) = -omdn * dqdp(1)
+  d_q_va(llm, 1) = -omup * dqdp(llm)
+  d_t_va(1) = -omdn * dtdp(1) + omdn * cor(1)
+  d_t_va(llm) = -omup * dtdp(llm)!+omup*cor(llm)
+
+  !      if(abs(rlat(1))>10.) then
+  !     Calculate the tendency due agestrophic motions
+  !      du_age = fcoriolis*(v-vg)
+  !      dv_age = fcoriolis*(ug-u)
+  !      endif
+
+  !       CALL writefield_phy('d_t_va',d_t_va,llm)
+
+  return
+end
 
 !======================================================================
@@ -1494,435 +1478,433 @@
 !  Subroutines for nudging
 
-      Subroutine Nudge_RHT_init (paprs,pplay,t,q,t_targ,rh_targ)
-! ========================================================
+Subroutine Nudge_RHT_init (paprs, pplay, t, q, t_targ, rh_targ)
+  ! ========================================================
   USE dimphy
 
   implicit none
 
-! ========================================================
-      REAL paprs(klon,klevp1)
-      REAL pplay(klon,klev)
-
-!      Variables d'etat
-      REAL t(klon,klev)
-      REAL q(klon,klev)
-
-!   Profiles cible
-      REAL t_targ(klon,klev)
-      REAL rh_targ(klon,klev)
-
-   INTEGER k,i
-   REAL zx_qs
-
-! Declaration des constantes et des fonctions thermodynamiques
-
-include "YOMCST.h"
-include "YOETHF.h"
-
-!  ----------------------------------------
-!  Statement functions
-include "FCTTRE.h"
-!  ----------------------------------------
-
-        DO k = 1,klev
-         DO i = 1,klon
-           t_targ(i,k) = t(i,k)
-           IF (t(i,k).LT.RTT) THEN
-              zx_qs = qsats(t(i,k))/(pplay(i,k))
-           ELSE
-              zx_qs = qsatl(t(i,k))/(pplay(i,k))
-           ENDIF
-           rh_targ(i,k) = q(i,k)/zx_qs
-         ENDDO
-        ENDDO
-      print *, 't_targ',t_targ
-      print *, 'rh_targ',rh_targ
-
-
-      RETURN
-      END
-
-      Subroutine Nudge_UV_init (paprs,pplay,u,v,u_targ,v_targ)
-! ========================================================
+  ! ========================================================
+  REAL paprs(klon, klevp1)
+  REAL pplay(klon, klev)
+
+  !      Variables d'etat
+  REAL t(klon, klev)
+  REAL q(klon, klev)
+
+  !   Profiles cible
+  REAL t_targ(klon, klev)
+  REAL rh_targ(klon, klev)
+
+  INTEGER k, i
+  REAL zx_qs
+
+  ! Declaration des constantes et des fonctions thermodynamiques
+
+  include "YOMCST.h"
+  include "YOETHF.h"
+
+  !  ----------------------------------------
+  !  Statement functions
+  include "FCTTRE.h"
+  !  ----------------------------------------
+
+  DO k = 1, klev
+    DO i = 1, klon
+      t_targ(i, k) = t(i, k)
+      IF (t(i, k)<RTT) THEN
+        zx_qs = qsats(t(i, k)) / (pplay(i, k))
+      ELSE
+        zx_qs = qsatl(t(i, k)) / (pplay(i, k))
+      ENDIF
+      rh_targ(i, k) = q(i, k) / zx_qs
+    ENDDO
+  ENDDO
+  print *, 't_targ', t_targ
+  print *, 'rh_targ', rh_targ
+
+  RETURN
+END
+
+Subroutine Nudge_UV_init (paprs, pplay, u, v, u_targ, v_targ)
+  ! ========================================================
   USE dimphy
 
   implicit none
 
-! ========================================================
-      REAL paprs(klon,klevp1)
-      REAL pplay(klon,klev)
-
-!      Variables d'etat
-      REAL u(klon,klev)
-      REAL v(klon,klev)
-
-!   Profiles cible
-      REAL u_targ(klon,klev)
-      REAL v_targ(klon,klev)
-
-   INTEGER k,i
-
-        DO k = 1,klev
-         DO i = 1,klon
-           u_targ(i,k) = u(i,k)
-           v_targ(i,k) = v(i,k)
-         ENDDO
-        ENDDO
-      print *, 'u_targ',u_targ
-      print *, 'v_targ',v_targ
-
-
-      RETURN
-      END
-
-      Subroutine Nudge_RHT (dtime,paprs,pplay,t_targ,rh_targ,t,q,          &
-     &                      d_t,d_q)
-! ========================================================
+  ! ========================================================
+  REAL paprs(klon, klevp1)
+  REAL pplay(klon, klev)
+
+  !      Variables d'etat
+  REAL u(klon, klev)
+  REAL v(klon, klev)
+
+  !   Profiles cible
+  REAL u_targ(klon, klev)
+  REAL v_targ(klon, klev)
+
+  INTEGER k, i
+
+  DO k = 1, klev
+    DO i = 1, klon
+      u_targ(i, k) = u(i, k)
+      v_targ(i, k) = v(i, k)
+    ENDDO
+  ENDDO
+  print *, 'u_targ', u_targ
+  print *, 'v_targ', v_targ
+
+  RETURN
+END
+
+Subroutine Nudge_RHT (dtime, paprs, pplay, t_targ, rh_targ, t, q, &
+        &                      d_t, d_q)
+  ! ========================================================
   USE dimphy
 
   implicit none
 
-! ========================================================
-      REAL dtime
-      REAL paprs(klon,klevp1)
-      REAL pplay(klon,klev)
-
-!      Variables d'etat
-      REAL t(klon,klev)
-      REAL q(klon,klev)
-
-! Tendances
-      REAL d_t(klon,klev)
-      REAL d_q(klon,klev)
-
-!   Profiles cible
-      REAL t_targ(klon,klev)
-      REAL rh_targ(klon,klev)
-
-!   Temps de relaxation
-      REAL tau
-!c      DATA tau /3600./
-!!      DATA tau /5400./
-      DATA tau /1800./
-
-   INTEGER k,i
-   REAL zx_qs, rh, tnew, d_rh, rhnew
-
-! Declaration des constantes et des fonctions thermodynamiques
-
-include "YOMCST.h"
-include "YOETHF.h"
-
-!  ----------------------------------------
-!  Statement functions
-include "FCTTRE.h"
-!  ----------------------------------------
-
-        print *,'dtime, tau ',dtime,tau
-        print *, 't_targ',t_targ
-        print *, 'rh_targ',rh_targ
-        print *,'temp ',t
-        print *,'hum ',q
-
-        DO k = 1,klev
-         DO i = 1,klon
-           IF (paprs(i,1)-pplay(i,k) .GT. 10000.) THEN
-            IF (t(i,k).LT.RTT) THEN
-               zx_qs = qsats(t(i,k))/(pplay(i,k))
-            ELSE
-               zx_qs = qsatl(t(i,k))/(pplay(i,k))
-            ENDIF
-            rh = q(i,k)/zx_qs
-
-            d_t(i,k) = d_t(i,k) + 1./tau*(t_targ(i,k)-t(i,k))
-            d_rh = 1./tau*(rh_targ(i,k)-rh)
-
-            tnew = t(i,k)+d_t(i,k)*dtime
-!jyg<
-!   Formule pour q :
-!                         d_q = (1/tau) [rh_targ*qsat(T_new) - q] 
-
-!  Cette formule remplace d_q = (1/tau) [rh_targ - rh] qsat(T_new)
-!   qui n'etait pas correcte.
-
-            IF (tnew.LT.RTT) THEN
-               zx_qs = qsats(tnew)/(pplay(i,k))
-            ELSE
-               zx_qs = qsatl(tnew)/(pplay(i,k))
-            ENDIF
-!!            d_q(i,k) = d_q(i,k) + d_rh*zx_qs
-            d_q(i,k) = d_q(i,k) + (1./tau)*(rh_targ(i,k)*zx_qs - q(i,k))
-            rhnew = (q(i,k)+d_q(i,k)*dtime)/zx_qs
-
-            print *,' k,d_t,rh,d_rh,rhnew,d_q ',    &
-                      k,d_t(i,k),rh,d_rh,rhnew,d_q(i,k)
-           ENDIF
-
-         ENDDO
-        ENDDO
-
-      RETURN
-      END
-
-      Subroutine Nudge_UV (dtime,paprs,pplay,u_targ,v_targ,u,v,          &
-     &                      d_u,d_v)
-! ========================================================
+  ! ========================================================
+  REAL dtime
+  REAL paprs(klon, klevp1)
+  REAL pplay(klon, klev)
+
+  !      Variables d'etat
+  REAL t(klon, klev)
+  REAL q(klon, klev)
+
+  ! Tendances
+  REAL d_t(klon, klev)
+  REAL d_q(klon, klev)
+
+  !   Profiles cible
+  REAL t_targ(klon, klev)
+  REAL rh_targ(klon, klev)
+
+  !   Temps de relaxation
+  REAL tau
+  !c      DATA tau /3600./
+  !!      DATA tau /5400./
+  DATA tau /1800./
+
+  INTEGER k, i
+  REAL zx_qs, rh, tnew, d_rh, rhnew
+
+  ! Declaration des constantes et des fonctions thermodynamiques
+
+  include "YOMCST.h"
+  include "YOETHF.h"
+
+  !  ----------------------------------------
+  !  Statement functions
+  include "FCTTRE.h"
+  !  ----------------------------------------
+
+  print *, 'dtime, tau ', dtime, tau
+  print *, 't_targ', t_targ
+  print *, 'rh_targ', rh_targ
+  print *, 'temp ', t
+  print *, 'hum ', q
+
+  DO k = 1, klev
+    DO i = 1, klon
+      IF (paprs(i, 1) - pplay(i, k) > 10000.) THEN
+        IF (t(i, k)<RTT) THEN
+          zx_qs = qsats(t(i, k)) / (pplay(i, k))
+        ELSE
+          zx_qs = qsatl(t(i, k)) / (pplay(i, k))
+        ENDIF
+        rh = q(i, k) / zx_qs
+
+        d_t(i, k) = d_t(i, k) + 1. / tau * (t_targ(i, k) - t(i, k))
+        d_rh = 1. / tau * (rh_targ(i, k) - rh)
+
+        tnew = t(i, k) + d_t(i, k) * dtime
+        !jyg<
+        !   Formule pour q :
+        !                         d_q = (1/tau) [rh_targ*qsat(T_new) - q]
+
+        !  Cette formule remplace d_q = (1/tau) [rh_targ - rh] qsat(T_new)
+        !   qui n'etait pas correcte.
+
+        IF (tnew<RTT) THEN
+          zx_qs = qsats(tnew) / (pplay(i, k))
+        ELSE
+          zx_qs = qsatl(tnew) / (pplay(i, k))
+        ENDIF
+        !!            d_q(i,k) = d_q(i,k) + d_rh*zx_qs
+        d_q(i, k) = d_q(i, k) + (1. / tau) * (rh_targ(i, k) * zx_qs - q(i, k))
+        rhnew = (q(i, k) + d_q(i, k) * dtime) / zx_qs
+
+        print *, ' k,d_t,rh,d_rh,rhnew,d_q ', &
+                k, d_t(i, k), rh, d_rh, rhnew, d_q(i, k)
+      ENDIF
+
+    ENDDO
+  ENDDO
+
+  RETURN
+END
+
+Subroutine Nudge_UV (dtime, paprs, pplay, u_targ, v_targ, u, v, &
+        &                      d_u, d_v)
+  ! ========================================================
   USE dimphy
 
   implicit none
 
-! ========================================================
-      REAL dtime
-      REAL paprs(klon,klevp1)
-      REAL pplay(klon,klev)
-
-!      Variables d'etat
-      REAL u(klon,klev)
-      REAL v(klon,klev)
-
-! Tendances
-      REAL d_u(klon,klev)
-      REAL d_v(klon,klev)
-
-!   Profiles cible
-      REAL u_targ(klon,klev)
-      REAL v_targ(klon,klev)
-
-!   Temps de relaxation
-      REAL tau
-!c      DATA tau /3600./
-!      DATA tau /5400./
-       DATA tau /43200./
-
-   INTEGER k,i
-
-        !print *,'dtime, tau ',dtime,tau
-        !print *, 'u_targ',u_targ
-        !print *, 'v_targ',v_targ
-        !print *,'zonal velocity ',u
-        !print *,'meridional velocity ',v
-        DO k = 1,klev
-         DO i = 1,klon
-!CR: nudging everywhere
-!           IF (paprs(i,1)-pplay(i,k) .GT. 10000.) THEN
-
-            d_u(i,k) = d_u(i,k) + 1./tau*(u_targ(i,k)-u(i,k))
-            d_v(i,k) = d_v(i,k) + 1./tau*(v_targ(i,k)-v(i,k))
-
-!           print *,' k,u,d_u,v,d_v ',    &
-!                     k,u(i,k),d_u(i,k),v(i,k),d_v(i,k)
-!           ENDIF
-
-         ENDDO
-        ENDDO
-
-      RETURN
-      END
+  ! ========================================================
+  REAL dtime
+  REAL paprs(klon, klevp1)
+  REAL pplay(klon, klev)
+
+  !      Variables d'etat
+  REAL u(klon, klev)
+  REAL v(klon, klev)
+
+  ! Tendances
+  REAL d_u(klon, klev)
+  REAL d_v(klon, klev)
+
+  !   Profiles cible
+  REAL u_targ(klon, klev)
+  REAL v_targ(klon, klev)
+
+  !   Temps de relaxation
+  REAL tau
+  !c      DATA tau /3600./
+  !      DATA tau /5400./
+  DATA tau /43200./
+
+  INTEGER k, i
+
+  !print *,'dtime, tau ',dtime,tau
+  !print *, 'u_targ',u_targ
+  !print *, 'v_targ',v_targ
+  !print *,'zonal velocity ',u
+  !print *,'meridional velocity ',v
+  DO k = 1, klev
+    DO i = 1, klon
+      !CR: nudging everywhere
+      !           IF (paprs(i,1)-pplay(i,k) .GT. 10000.) THEN
+
+      d_u(i, k) = d_u(i, k) + 1. / tau * (u_targ(i, k) - u(i, k))
+      d_v(i, k) = d_v(i, k) + 1. / tau * (v_targ(i, k) - v(i, k))
+
+      !           print *,' k,u,d_u,v,d_v ',    &
+      !                     k,u(i,k),d_u(i,k),v(i,k),d_v(i,k)
+      !           ENDIF
+
+    ENDDO
+  ENDDO
+
+  RETURN
+END
 
 !=====================================================================
-       SUBROUTINE interp2_case_vertical(play,nlev_cas,plev_prof_cas                                    &
-     &         ,t_prof_cas,th_prof_cas,thv_prof_cas,thl_prof_cas                                       &
-     &         ,qv_prof_cas,ql_prof_cas,qi_prof_cas,u_prof_cas,v_prof_cas                              &
-     &         ,ug_prof_cas,vg_prof_cas,vitw_prof_cas,omega_prof_cas                                   &
-     &         ,du_prof_cas,hu_prof_cas,vu_prof_cas,dv_prof_cas,hv_prof_cas,vv_prof_cas                &
-     &         ,dt_prof_cas,ht_prof_cas,vt_prof_cas,dtrad_prof_cas,dq_prof_cas,hq_prof_cas,vq_prof_cas &
-     &         ,dth_prof_cas,hth_prof_cas,vth_prof_cas                                                 &
-
-     &         ,t_mod_cas,theta_mod_cas,thv_mod_cas,thl_mod_cas                                        &
-     &         ,qv_mod_cas,ql_mod_cas,qi_mod_cas,u_mod_cas,v_mod_cas                                   &
-     &         ,ug_mod_cas,vg_mod_cas,w_mod_cas,omega_mod_cas                                          &
-     &         ,du_mod_cas,hu_mod_cas,vu_mod_cas,dv_mod_cas,hv_mod_cas,vv_mod_cas                      &
-     &         ,dt_mod_cas,ht_mod_cas,vt_mod_cas,dtrad_mod_cas,dq_mod_cas,hq_mod_cas,vq_mod_cas        &
-     &         ,dth_mod_cas,hth_mod_cas,vth_mod_cas,mxcalc)
- 
-       implicit none
- 
-#include "YOMCST.h"
-#include "dimensions.h"
-
-!-------------------------------------------------------------------------
-! Vertical interpolation of generic case forcing data onto mod_casel levels
-!-------------------------------------------------------------------------
- 
-       integer nlevmax
-       parameter (nlevmax=41)
-       integer nlev_cas,mxcalc
-!       real play(llm), plev_prof(nlevmax) 
-!       real t_prof(nlevmax),q_prof(nlevmax)
-!       real u_prof(nlevmax),v_prof(nlevmax), w_prof(nlevmax)
-!       real ht_prof(nlevmax),vt_prof(nlevmax)
-!       real hq_prof(nlevmax),vq_prof(nlevmax)
- 
-       real play(llm), plev_prof_cas(nlev_cas) 
-       real t_prof_cas(nlev_cas),th_prof_cas(nlev_cas),thv_prof_cas(nlev_cas),thl_prof_cas(nlev_cas)
-       real qv_prof_cas(nlev_cas),ql_prof_cas(nlev_cas),qi_prof_cas(nlev_cas)
-       real u_prof_cas(nlev_cas),v_prof_cas(nlev_cas)
-       real ug_prof_cas(nlev_cas),vg_prof_cas(nlev_cas), vitw_prof_cas(nlev_cas),omega_prof_cas(nlev_cas)
-       real du_prof_cas(nlev_cas),hu_prof_cas(nlev_cas),vu_prof_cas(nlev_cas)
-       real dv_prof_cas(nlev_cas),hv_prof_cas(nlev_cas),vv_prof_cas(nlev_cas)
-       real dt_prof_cas(nlev_cas),ht_prof_cas(nlev_cas),vt_prof_cas(nlev_cas),dtrad_prof_cas(nlev_cas)
-       real dth_prof_cas(nlev_cas),hth_prof_cas(nlev_cas),vth_prof_cas(nlev_cas)
-       real dq_prof_cas(nlev_cas),hq_prof_cas(nlev_cas),vq_prof_cas(nlev_cas)
- 
-       real t_mod_cas(llm),theta_mod_cas(llm),thv_mod_cas(llm),thl_mod_cas(llm)
-       real qv_mod_cas(llm),ql_mod_cas(llm),qi_mod_cas(llm)
-       real u_mod_cas(llm),v_mod_cas(llm)
-       real ug_mod_cas(llm),vg_mod_cas(llm), w_mod_cas(llm),omega_mod_cas(llm)
-       real du_mod_cas(llm),hu_mod_cas(llm),vu_mod_cas(llm)
-       real dv_mod_cas(llm),hv_mod_cas(llm),vv_mod_cas(llm)
-       real dt_mod_cas(llm),ht_mod_cas(llm),vt_mod_cas(llm),dtrad_mod_cas(llm)
-       real dth_mod_cas(llm),hth_mod_cas(llm),vth_mod_cas(llm)
-       real dq_mod_cas(llm),hq_mod_cas(llm),vq_mod_cas(llm)
- 
-       integer l,k,k1,k2
-       real frac,frac1,frac2,fact
- 
-!       do l = 1, llm
-!       print *,'debut interp2, play=',l,play(l)
-!       enddo
-!      do l = 1, nlev_cas
-!      print *,'debut interp2, plev_prof_cas=',l,play(l),plev_prof_cas(l)
-!      enddo
-
-       do l = 1, llm
-
-        if (play(l).ge.plev_prof_cas(nlev_cas)) then
- 
-        mxcalc=l
-!        print *,'debut interp2, mxcalc=',mxcalc
-         k1=0
-         k2=0
-
-         if (play(l).le.plev_prof_cas(1)) then
-
-         do k = 1, nlev_cas-1
-          if (play(l).le.plev_prof_cas(k).and. play(l).gt.plev_prof_cas(k+1)) then
-            k1=k
-            k2=k+1
+SUBROUTINE interp2_case_vertical(play, nlev_cas, plev_prof_cas                                    &
+        &, t_prof_cas, th_prof_cas, thv_prof_cas, thl_prof_cas                                       &
+        &, qv_prof_cas, ql_prof_cas, qi_prof_cas, u_prof_cas, v_prof_cas                              &
+        &, ug_prof_cas, vg_prof_cas, vitw_prof_cas, omega_prof_cas                                   &
+        &, du_prof_cas, hu_prof_cas, vu_prof_cas, dv_prof_cas, hv_prof_cas, vv_prof_cas                &
+        &, dt_prof_cas, ht_prof_cas, vt_prof_cas, dtrad_prof_cas, dq_prof_cas, hq_prof_cas, vq_prof_cas &
+        &, dth_prof_cas, hth_prof_cas, vth_prof_cas                                                 &
+
+        &, t_mod_cas, theta_mod_cas, thv_mod_cas, thl_mod_cas                                        &
+        &, qv_mod_cas, ql_mod_cas, qi_mod_cas, u_mod_cas, v_mod_cas                                   &
+        &, ug_mod_cas, vg_mod_cas, w_mod_cas, omega_mod_cas                                          &
+        &, du_mod_cas, hu_mod_cas, vu_mod_cas, dv_mod_cas, hv_mod_cas, vv_mod_cas                      &
+        &, dt_mod_cas, ht_mod_cas, vt_mod_cas, dtrad_mod_cas, dq_mod_cas, hq_mod_cas, vq_mod_cas        &
+        &, dth_mod_cas, hth_mod_cas, vth_mod_cas, mxcalc)
+
+  implicit none
+
+  include "YOMCST.h"
+  include "dimensions.h"
+
+  !-------------------------------------------------------------------------
+  ! Vertical interpolation of generic case forcing data onto mod_casel levels
+  !-------------------------------------------------------------------------
+
+  integer nlevmax
+  parameter (nlevmax = 41)
+  integer nlev_cas, mxcalc
+  !       real play(llm), plev_prof(nlevmax)
+  !       real t_prof(nlevmax),q_prof(nlevmax)
+  !       real u_prof(nlevmax),v_prof(nlevmax), w_prof(nlevmax)
+  !       real ht_prof(nlevmax),vt_prof(nlevmax)
+  !       real hq_prof(nlevmax),vq_prof(nlevmax)
+
+  real play(llm), plev_prof_cas(nlev_cas)
+  real t_prof_cas(nlev_cas), th_prof_cas(nlev_cas), thv_prof_cas(nlev_cas), thl_prof_cas(nlev_cas)
+  real qv_prof_cas(nlev_cas), ql_prof_cas(nlev_cas), qi_prof_cas(nlev_cas)
+  real u_prof_cas(nlev_cas), v_prof_cas(nlev_cas)
+  real ug_prof_cas(nlev_cas), vg_prof_cas(nlev_cas), vitw_prof_cas(nlev_cas), omega_prof_cas(nlev_cas)
+  real du_prof_cas(nlev_cas), hu_prof_cas(nlev_cas), vu_prof_cas(nlev_cas)
+  real dv_prof_cas(nlev_cas), hv_prof_cas(nlev_cas), vv_prof_cas(nlev_cas)
+  real dt_prof_cas(nlev_cas), ht_prof_cas(nlev_cas), vt_prof_cas(nlev_cas), dtrad_prof_cas(nlev_cas)
+  real dth_prof_cas(nlev_cas), hth_prof_cas(nlev_cas), vth_prof_cas(nlev_cas)
+  real dq_prof_cas(nlev_cas), hq_prof_cas(nlev_cas), vq_prof_cas(nlev_cas)
+
+  real t_mod_cas(llm), theta_mod_cas(llm), thv_mod_cas(llm), thl_mod_cas(llm)
+  real qv_mod_cas(llm), ql_mod_cas(llm), qi_mod_cas(llm)
+  real u_mod_cas(llm), v_mod_cas(llm)
+  real ug_mod_cas(llm), vg_mod_cas(llm), w_mod_cas(llm), omega_mod_cas(llm)
+  real du_mod_cas(llm), hu_mod_cas(llm), vu_mod_cas(llm)
+  real dv_mod_cas(llm), hv_mod_cas(llm), vv_mod_cas(llm)
+  real dt_mod_cas(llm), ht_mod_cas(llm), vt_mod_cas(llm), dtrad_mod_cas(llm)
+  real dth_mod_cas(llm), hth_mod_cas(llm), vth_mod_cas(llm)
+  real dq_mod_cas(llm), hq_mod_cas(llm), vq_mod_cas(llm)
+
+  integer l, k, k1, k2
+  real frac, frac1, frac2, fact
+
+  !       do l = 1, llm
+  !       print *,'debut interp2, play=',l,play(l)
+  !       enddo
+  !      do l = 1, nlev_cas
+  !      print *,'debut interp2, plev_prof_cas=',l,play(l),plev_prof_cas(l)
+  !      enddo
+
+  do l = 1, llm
+
+    if (play(l)>=plev_prof_cas(nlev_cas)) then
+
+      mxcalc = l
+      !        print *,'debut interp2, mxcalc=',mxcalc
+      k1 = 0
+      k2 = 0
+
+      if (play(l)<=plev_prof_cas(1)) then
+
+        do k = 1, nlev_cas - 1
+          if (play(l)<=plev_prof_cas(k).and. play(l)>plev_prof_cas(k + 1)) then
+            k1 = k
+            k2 = k + 1
           endif
-         enddo
-
-         if (k1.eq.0 .or. k2.eq.0) then
-          write(*,*) 'PB! k1, k2 = ',k1,k2
-          write(*,*) 'l,play(l) = ',l,play(l)/100
-         do k = 1, nlev_cas-1
-          write(*,*) 'k,plev_prof_cas(k) = ',k,plev_prof_cas(k)/100
-         enddo
-         endif
-
-         frac = (plev_prof_cas(k2)-play(l))/(plev_prof_cas(k2)-plev_prof_cas(k1))
-         t_mod_cas(l)= t_prof_cas(k2) - frac*(t_prof_cas(k2)-t_prof_cas(k1))
-         theta_mod_cas(l)= th_prof_cas(k2) - frac*(th_prof_cas(k2)-th_prof_cas(k1))
-         if(theta_mod_cas(l).NE.0) t_mod_cas(l)= theta_mod_cas(l)*(play(l)/100000.)**(RD/RCPD)
-         thv_mod_cas(l)= thv_prof_cas(k2) - frac*(thv_prof_cas(k2)-thv_prof_cas(k1))
-         thl_mod_cas(l)= thl_prof_cas(k2) - frac*(thl_prof_cas(k2)-thl_prof_cas(k1))
-         qv_mod_cas(l)= qv_prof_cas(k2) - frac*(qv_prof_cas(k2)-qv_prof_cas(k1))
-         ql_mod_cas(l)= ql_prof_cas(k2) - frac*(ql_prof_cas(k2)-ql_prof_cas(k1))
-         qi_mod_cas(l)= qi_prof_cas(k2) - frac*(qi_prof_cas(k2)-qi_prof_cas(k1))
-         u_mod_cas(l)= u_prof_cas(k2) - frac*(u_prof_cas(k2)-u_prof_cas(k1))
-         v_mod_cas(l)= v_prof_cas(k2) - frac*(v_prof_cas(k2)-v_prof_cas(k1))
-         ug_mod_cas(l)= ug_prof_cas(k2) - frac*(ug_prof_cas(k2)-ug_prof_cas(k1))
-         vg_mod_cas(l)= vg_prof_cas(k2) - frac*(vg_prof_cas(k2)-vg_prof_cas(k1))
-         w_mod_cas(l)= vitw_prof_cas(k2) - frac*(vitw_prof_cas(k2)-vitw_prof_cas(k1))
-         omega_mod_cas(l)= omega_prof_cas(k2) - frac*(omega_prof_cas(k2)-omega_prof_cas(k1))
-         du_mod_cas(l)= du_prof_cas(k2) - frac*(du_prof_cas(k2)-du_prof_cas(k1))
-         hu_mod_cas(l)= hu_prof_cas(k2) - frac*(hu_prof_cas(k2)-hu_prof_cas(k1))
-         vu_mod_cas(l)= vu_prof_cas(k2) - frac*(vu_prof_cas(k2)-vu_prof_cas(k1))
-         dv_mod_cas(l)= dv_prof_cas(k2) - frac*(dv_prof_cas(k2)-dv_prof_cas(k1))
-         hv_mod_cas(l)= hv_prof_cas(k2) - frac*(hv_prof_cas(k2)-hv_prof_cas(k1))
-         vv_mod_cas(l)= vv_prof_cas(k2) - frac*(vv_prof_cas(k2)-vv_prof_cas(k1))
-         dt_mod_cas(l)= dt_prof_cas(k2) - frac*(dt_prof_cas(k2)-dt_prof_cas(k1))
-         ht_mod_cas(l)= ht_prof_cas(k2) - frac*(ht_prof_cas(k2)-ht_prof_cas(k1))
-         vt_mod_cas(l)= vt_prof_cas(k2) - frac*(vt_prof_cas(k2)-vt_prof_cas(k1))
-         dth_mod_cas(l)= dth_prof_cas(k2) - frac*(dth_prof_cas(k2)-dth_prof_cas(k1))
-         hth_mod_cas(l)= hth_prof_cas(k2) - frac*(hth_prof_cas(k2)-hth_prof_cas(k1))
-         vth_mod_cas(l)= vth_prof_cas(k2) - frac*(vth_prof_cas(k2)-vth_prof_cas(k1))
-         dq_mod_cas(l)= dq_prof_cas(k2) - frac*(dq_prof_cas(k2)-dq_prof_cas(k1))
-         hq_mod_cas(l)= hq_prof_cas(k2) - frac*(hq_prof_cas(k2)-hq_prof_cas(k1))
-         vq_mod_cas(l)= vq_prof_cas(k2) - frac*(vq_prof_cas(k2)-vq_prof_cas(k1))
-         dtrad_mod_cas(l)= dtrad_prof_cas(k2) - frac*(dtrad_prof_cas(k2)-dtrad_prof_cas(k1))
-     
-         else !play>plev_prof_cas(1)
-
-         k1=1
-         k2=2
-         print *,'interp2_vert, k1,k2=',plev_prof_cas(k1),plev_prof_cas(k2)
-         frac1 = (play(l)-plev_prof_cas(k2))/(plev_prof_cas(k1)-plev_prof_cas(k2))
-         frac2 = (play(l)-plev_prof_cas(k1))/(plev_prof_cas(k1)-plev_prof_cas(k2))
-         t_mod_cas(l)= frac1*t_prof_cas(k1) - frac2*t_prof_cas(k2)
-         theta_mod_cas(l)= frac1*th_prof_cas(k1) - frac2*th_prof_cas(k2)
-         if(theta_mod_cas(l).NE.0) t_mod_cas(l)= theta_mod_cas(l)*(play(l)/100000.)**(RD/RCPD)
-         thv_mod_cas(l)= frac1*thv_prof_cas(k1) - frac2*thv_prof_cas(k2)
-         thl_mod_cas(l)= frac1*thl_prof_cas(k1) - frac2*thl_prof_cas(k2)
-         qv_mod_cas(l)= frac1*qv_prof_cas(k1) - frac2*qv_prof_cas(k2)
-         ql_mod_cas(l)= frac1*ql_prof_cas(k1) - frac2*ql_prof_cas(k2)
-         qi_mod_cas(l)= frac1*qi_prof_cas(k1) - frac2*qi_prof_cas(k2)
-         u_mod_cas(l)= frac1*u_prof_cas(k1) - frac2*u_prof_cas(k2)
-         v_mod_cas(l)= frac1*v_prof_cas(k1) - frac2*v_prof_cas(k2)
-         ug_mod_cas(l)= frac1*ug_prof_cas(k1) - frac2*ug_prof_cas(k2)
-         vg_mod_cas(l)= frac1*vg_prof_cas(k1) - frac2*vg_prof_cas(k2)
-         w_mod_cas(l)= frac1*vitw_prof_cas(k1) - frac2*vitw_prof_cas(k2)
-         omega_mod_cas(l)= frac1*omega_prof_cas(k1) - frac2*omega_prof_cas(k2)
-         du_mod_cas(l)= frac1*du_prof_cas(k1) - frac2*du_prof_cas(k2)
-         hu_mod_cas(l)= frac1*hu_prof_cas(k1) - frac2*hu_prof_cas(k2)
-         vu_mod_cas(l)= frac1*vu_prof_cas(k1) - frac2*vu_prof_cas(k2)
-         dv_mod_cas(l)= frac1*dv_prof_cas(k1) - frac2*dv_prof_cas(k2)
-         hv_mod_cas(l)= frac1*hv_prof_cas(k1) - frac2*hv_prof_cas(k2)
-         vv_mod_cas(l)= frac1*vv_prof_cas(k1) - frac2*vv_prof_cas(k2)
-         dt_mod_cas(l)= frac1*dt_prof_cas(k1) - frac2*dt_prof_cas(k2)
-         ht_mod_cas(l)= frac1*ht_prof_cas(k1) - frac2*ht_prof_cas(k2)
-         vt_mod_cas(l)= frac1*vt_prof_cas(k1) - frac2*vt_prof_cas(k2)
-         dth_mod_cas(l)= frac1*dth_prof_cas(k1) - frac2*dth_prof_cas(k2)
-         hth_mod_cas(l)= frac1*hth_prof_cas(k1) - frac2*hth_prof_cas(k2)
-         vth_mod_cas(l)= frac1*vth_prof_cas(k1) - frac2*vth_prof_cas(k2)
-         dq_mod_cas(l)= frac1*dq_prof_cas(k1) - frac2*dq_prof_cas(k2)
-         hq_mod_cas(l)= frac1*hq_prof_cas(k1) - frac2*hq_prof_cas(k2)
-         vq_mod_cas(l)= frac1*vq_prof_cas(k1) - frac2*vq_prof_cas(k2)
-         dtrad_mod_cas(l)= frac1*dtrad_prof_cas(k1) - frac2*dtrad_prof_cas(k2)
-
-         endif ! play.le.plev_prof_cas(1)
-
-        else ! above max altitude of forcing file
- 
-!jyg
-         fact=20.*(plev_prof_cas(nlev_cas)-play(l))/plev_prof_cas(nlev_cas) !jyg
-         fact = max(fact,0.)                                           !jyg
-         fact = exp(-fact)                                             !jyg
-         t_mod_cas(l)= t_prof_cas(nlev_cas)                            !jyg
-         theta_mod_cas(l)= th_prof_cas(nlev_cas)                       !jyg
-         thv_mod_cas(l)= thv_prof_cas(nlev_cas)                        !jyg
-         thl_mod_cas(l)= thl_prof_cas(nlev_cas)                        !jyg
-         qv_mod_cas(l)= qv_prof_cas(nlev_cas)*fact                     !jyg
-         ql_mod_cas(l)= ql_prof_cas(nlev_cas)*fact                     !jyg
-         qi_mod_cas(l)= qi_prof_cas(nlev_cas)*fact                     !jyg
-         u_mod_cas(l)= u_prof_cas(nlev_cas)*fact                       !jyg
-         v_mod_cas(l)= v_prof_cas(nlev_cas)*fact                       !jyg
-         ug_mod_cas(l)= ug_prof_cas(nlev_cas)*fact                     !jyg
-         vg_mod_cas(l)= vg_prof_cas(nlev_cas)*fact                     !jyg
-         w_mod_cas(l)= 0.0                                             !jyg
-         omega_mod_cas(l)= 0.0                                         !jyg
-         du_mod_cas(l)= du_prof_cas(nlev_cas)*fact 
-         hu_mod_cas(l)= hu_prof_cas(nlev_cas)*fact                     !jyg
-         vu_mod_cas(l)= vu_prof_cas(nlev_cas)*fact                     !jyg
-         dv_mod_cas(l)= dv_prof_cas(nlev_cas)*fact
-         hv_mod_cas(l)= hv_prof_cas(nlev_cas)*fact                     !jyg
-         vv_mod_cas(l)= vv_prof_cas(nlev_cas)*fact                     !jyg
-         dt_mod_cas(l)= dt_prof_cas(nlev_cas) 
-         ht_mod_cas(l)= ht_prof_cas(nlev_cas)                          !jyg
-         vt_mod_cas(l)= vt_prof_cas(nlev_cas)                          !jyg
-         dth_mod_cas(l)= dth_prof_cas(nlev_cas) 
-         hth_mod_cas(l)= hth_prof_cas(nlev_cas)                        !jyg
-         vth_mod_cas(l)= vth_prof_cas(nlev_cas)                        !jyg
-         dq_mod_cas(l)= dq_prof_cas(nlev_cas)*fact 
-         hq_mod_cas(l)= hq_prof_cas(nlev_cas)*fact                     !jyg
-         vq_mod_cas(l)= vq_prof_cas(nlev_cas)*fact                     !jyg
-         dtrad_mod_cas(l)= dtrad_prof_cas(nlev_cas)*fact               !jyg
- 
-        endif ! play
- 
-       enddo ! l
-
-          return
-          end
+        enddo
+
+        if (k1==0 .or. k2==0) then
+          write(*, *) 'PB! k1, k2 = ', k1, k2
+          write(*, *) 'l,play(l) = ', l, play(l) / 100
+          do k = 1, nlev_cas - 1
+            write(*, *) 'k,plev_prof_cas(k) = ', k, plev_prof_cas(k) / 100
+          enddo
+        endif
+
+        frac = (plev_prof_cas(k2) - play(l)) / (plev_prof_cas(k2) - plev_prof_cas(k1))
+        t_mod_cas(l) = t_prof_cas(k2) - frac * (t_prof_cas(k2) - t_prof_cas(k1))
+        theta_mod_cas(l) = th_prof_cas(k2) - frac * (th_prof_cas(k2) - th_prof_cas(k1))
+        if(theta_mod_cas(l)/=0) t_mod_cas(l) = theta_mod_cas(l) * (play(l) / 100000.)**(RD / RCPD)
+        thv_mod_cas(l) = thv_prof_cas(k2) - frac * (thv_prof_cas(k2) - thv_prof_cas(k1))
+        thl_mod_cas(l) = thl_prof_cas(k2) - frac * (thl_prof_cas(k2) - thl_prof_cas(k1))
+        qv_mod_cas(l) = qv_prof_cas(k2) - frac * (qv_prof_cas(k2) - qv_prof_cas(k1))
+        ql_mod_cas(l) = ql_prof_cas(k2) - frac * (ql_prof_cas(k2) - ql_prof_cas(k1))
+        qi_mod_cas(l) = qi_prof_cas(k2) - frac * (qi_prof_cas(k2) - qi_prof_cas(k1))
+        u_mod_cas(l) = u_prof_cas(k2) - frac * (u_prof_cas(k2) - u_prof_cas(k1))
+        v_mod_cas(l) = v_prof_cas(k2) - frac * (v_prof_cas(k2) - v_prof_cas(k1))
+        ug_mod_cas(l) = ug_prof_cas(k2) - frac * (ug_prof_cas(k2) - ug_prof_cas(k1))
+        vg_mod_cas(l) = vg_prof_cas(k2) - frac * (vg_prof_cas(k2) - vg_prof_cas(k1))
+        w_mod_cas(l) = vitw_prof_cas(k2) - frac * (vitw_prof_cas(k2) - vitw_prof_cas(k1))
+        omega_mod_cas(l) = omega_prof_cas(k2) - frac * (omega_prof_cas(k2) - omega_prof_cas(k1))
+        du_mod_cas(l) = du_prof_cas(k2) - frac * (du_prof_cas(k2) - du_prof_cas(k1))
+        hu_mod_cas(l) = hu_prof_cas(k2) - frac * (hu_prof_cas(k2) - hu_prof_cas(k1))
+        vu_mod_cas(l) = vu_prof_cas(k2) - frac * (vu_prof_cas(k2) - vu_prof_cas(k1))
+        dv_mod_cas(l) = dv_prof_cas(k2) - frac * (dv_prof_cas(k2) - dv_prof_cas(k1))
+        hv_mod_cas(l) = hv_prof_cas(k2) - frac * (hv_prof_cas(k2) - hv_prof_cas(k1))
+        vv_mod_cas(l) = vv_prof_cas(k2) - frac * (vv_prof_cas(k2) - vv_prof_cas(k1))
+        dt_mod_cas(l) = dt_prof_cas(k2) - frac * (dt_prof_cas(k2) - dt_prof_cas(k1))
+        ht_mod_cas(l) = ht_prof_cas(k2) - frac * (ht_prof_cas(k2) - ht_prof_cas(k1))
+        vt_mod_cas(l) = vt_prof_cas(k2) - frac * (vt_prof_cas(k2) - vt_prof_cas(k1))
+        dth_mod_cas(l) = dth_prof_cas(k2) - frac * (dth_prof_cas(k2) - dth_prof_cas(k1))
+        hth_mod_cas(l) = hth_prof_cas(k2) - frac * (hth_prof_cas(k2) - hth_prof_cas(k1))
+        vth_mod_cas(l) = vth_prof_cas(k2) - frac * (vth_prof_cas(k2) - vth_prof_cas(k1))
+        dq_mod_cas(l) = dq_prof_cas(k2) - frac * (dq_prof_cas(k2) - dq_prof_cas(k1))
+        hq_mod_cas(l) = hq_prof_cas(k2) - frac * (hq_prof_cas(k2) - hq_prof_cas(k1))
+        vq_mod_cas(l) = vq_prof_cas(k2) - frac * (vq_prof_cas(k2) - vq_prof_cas(k1))
+        dtrad_mod_cas(l) = dtrad_prof_cas(k2) - frac * (dtrad_prof_cas(k2) - dtrad_prof_cas(k1))
+
+      else !play>plev_prof_cas(1)
+
+        k1 = 1
+        k2 = 2
+        print *, 'interp2_vert, k1,k2=', plev_prof_cas(k1), plev_prof_cas(k2)
+        frac1 = (play(l) - plev_prof_cas(k2)) / (plev_prof_cas(k1) - plev_prof_cas(k2))
+        frac2 = (play(l) - plev_prof_cas(k1)) / (plev_prof_cas(k1) - plev_prof_cas(k2))
+        t_mod_cas(l) = frac1 * t_prof_cas(k1) - frac2 * t_prof_cas(k2)
+        theta_mod_cas(l) = frac1 * th_prof_cas(k1) - frac2 * th_prof_cas(k2)
+        if(theta_mod_cas(l)/=0) t_mod_cas(l) = theta_mod_cas(l) * (play(l) / 100000.)**(RD / RCPD)
+        thv_mod_cas(l) = frac1 * thv_prof_cas(k1) - frac2 * thv_prof_cas(k2)
+        thl_mod_cas(l) = frac1 * thl_prof_cas(k1) - frac2 * thl_prof_cas(k2)
+        qv_mod_cas(l) = frac1 * qv_prof_cas(k1) - frac2 * qv_prof_cas(k2)
+        ql_mod_cas(l) = frac1 * ql_prof_cas(k1) - frac2 * ql_prof_cas(k2)
+        qi_mod_cas(l) = frac1 * qi_prof_cas(k1) - frac2 * qi_prof_cas(k2)
+        u_mod_cas(l) = frac1 * u_prof_cas(k1) - frac2 * u_prof_cas(k2)
+        v_mod_cas(l) = frac1 * v_prof_cas(k1) - frac2 * v_prof_cas(k2)
+        ug_mod_cas(l) = frac1 * ug_prof_cas(k1) - frac2 * ug_prof_cas(k2)
+        vg_mod_cas(l) = frac1 * vg_prof_cas(k1) - frac2 * vg_prof_cas(k2)
+        w_mod_cas(l) = frac1 * vitw_prof_cas(k1) - frac2 * vitw_prof_cas(k2)
+        omega_mod_cas(l) = frac1 * omega_prof_cas(k1) - frac2 * omega_prof_cas(k2)
+        du_mod_cas(l) = frac1 * du_prof_cas(k1) - frac2 * du_prof_cas(k2)
+        hu_mod_cas(l) = frac1 * hu_prof_cas(k1) - frac2 * hu_prof_cas(k2)
+        vu_mod_cas(l) = frac1 * vu_prof_cas(k1) - frac2 * vu_prof_cas(k2)
+        dv_mod_cas(l) = frac1 * dv_prof_cas(k1) - frac2 * dv_prof_cas(k2)
+        hv_mod_cas(l) = frac1 * hv_prof_cas(k1) - frac2 * hv_prof_cas(k2)
+        vv_mod_cas(l) = frac1 * vv_prof_cas(k1) - frac2 * vv_prof_cas(k2)
+        dt_mod_cas(l) = frac1 * dt_prof_cas(k1) - frac2 * dt_prof_cas(k2)
+        ht_mod_cas(l) = frac1 * ht_prof_cas(k1) - frac2 * ht_prof_cas(k2)
+        vt_mod_cas(l) = frac1 * vt_prof_cas(k1) - frac2 * vt_prof_cas(k2)
+        dth_mod_cas(l) = frac1 * dth_prof_cas(k1) - frac2 * dth_prof_cas(k2)
+        hth_mod_cas(l) = frac1 * hth_prof_cas(k1) - frac2 * hth_prof_cas(k2)
+        vth_mod_cas(l) = frac1 * vth_prof_cas(k1) - frac2 * vth_prof_cas(k2)
+        dq_mod_cas(l) = frac1 * dq_prof_cas(k1) - frac2 * dq_prof_cas(k2)
+        hq_mod_cas(l) = frac1 * hq_prof_cas(k1) - frac2 * hq_prof_cas(k2)
+        vq_mod_cas(l) = frac1 * vq_prof_cas(k1) - frac2 * vq_prof_cas(k2)
+        dtrad_mod_cas(l) = frac1 * dtrad_prof_cas(k1) - frac2 * dtrad_prof_cas(k2)
+
+      endif ! play.le.plev_prof_cas(1)
+
+    else ! above max altitude of forcing file
+
+      !jyg
+      fact = 20. * (plev_prof_cas(nlev_cas) - play(l)) / plev_prof_cas(nlev_cas) !jyg
+      fact = max(fact, 0.)                                           !jyg
+      fact = exp(-fact)                                             !jyg
+      t_mod_cas(l) = t_prof_cas(nlev_cas)                            !jyg
+      theta_mod_cas(l) = th_prof_cas(nlev_cas)                       !jyg
+      thv_mod_cas(l) = thv_prof_cas(nlev_cas)                        !jyg
+      thl_mod_cas(l) = thl_prof_cas(nlev_cas)                        !jyg
+      qv_mod_cas(l) = qv_prof_cas(nlev_cas) * fact                     !jyg
+      ql_mod_cas(l) = ql_prof_cas(nlev_cas) * fact                     !jyg
+      qi_mod_cas(l) = qi_prof_cas(nlev_cas) * fact                     !jyg
+      u_mod_cas(l) = u_prof_cas(nlev_cas) * fact                       !jyg
+      v_mod_cas(l) = v_prof_cas(nlev_cas) * fact                       !jyg
+      ug_mod_cas(l) = ug_prof_cas(nlev_cas) * fact                     !jyg
+      vg_mod_cas(l) = vg_prof_cas(nlev_cas) * fact                     !jyg
+      w_mod_cas(l) = 0.0                                             !jyg
+      omega_mod_cas(l) = 0.0                                         !jyg
+      du_mod_cas(l) = du_prof_cas(nlev_cas) * fact
+      hu_mod_cas(l) = hu_prof_cas(nlev_cas) * fact                     !jyg
+      vu_mod_cas(l) = vu_prof_cas(nlev_cas) * fact                     !jyg
+      dv_mod_cas(l) = dv_prof_cas(nlev_cas) * fact
+      hv_mod_cas(l) = hv_prof_cas(nlev_cas) * fact                     !jyg
+      vv_mod_cas(l) = vv_prof_cas(nlev_cas) * fact                     !jyg
+      dt_mod_cas(l) = dt_prof_cas(nlev_cas)
+      ht_mod_cas(l) = ht_prof_cas(nlev_cas)                          !jyg
+      vt_mod_cas(l) = vt_prof_cas(nlev_cas)                          !jyg
+      dth_mod_cas(l) = dth_prof_cas(nlev_cas)
+      hth_mod_cas(l) = hth_prof_cas(nlev_cas)                        !jyg
+      vth_mod_cas(l) = vth_prof_cas(nlev_cas)                        !jyg
+      dq_mod_cas(l) = dq_prof_cas(nlev_cas) * fact
+      hq_mod_cas(l) = hq_prof_cas(nlev_cas) * fact                     !jyg
+      vq_mod_cas(l) = vq_prof_cas(nlev_cas) * fact                     !jyg
+      dtrad_mod_cas(l) = dtrad_prof_cas(nlev_cas) * fact               !jyg
+
+    endif ! play
+
+  enddo ! l
+
+  return
+end
 !***************************************************************************** 
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1D_decl_cases.h
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1D_decl_cases.h	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1D_decl_cases.h	(revision 5103)
@@ -229,5 +229,5 @@
         parameter (day_ini_sandu=15)  ! 196 = 15 juillet 2006
         real dt_sandu, tau_sandu
-        logical  :: trouve_700=.true.
+        logical  :: trouve_700=.TRUE.
         parameter (dt_sandu=6.*3600.)   ! forcages donnes ttes les 6 heures par ifa_sandu.txt
         parameter (tau_sandu=30000*3600.)  ! temps de relaxation u,v,thetal,qt vers profil init et au dessus 700hPa
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1D_interp_cases.h
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1D_interp_cases.h	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1D_interp_cases.h	(revision 5103)
@@ -1,5 +1,5 @@
 
-        print*,'FORCING CASE forcing_case2'
-!       print*,                                                             &
+        PRINT*,'FORCING CASE forcing_case2'
+!       PRINT*,                                                             &
 !    & '#### ITAP,day,day1,(day-day1)*86400,(day-day1)*86400/pdt_cas=',     &
 !    &    daytime,day1,(daytime-day1)*86400.,                               &
@@ -118,6 +118,6 @@
       do l = 1, llm
 ! Modif w_mod_cas -> omega_mod_cas (MM+MPL 20170309)
-	print*, l, llm
-	print*, play(l), temp(l)
+	PRINT*, l, llm
+	PRINT*, play(l), temp(l)
        omega(l) = -w_mod_cas(l)*play(l)*rg/(rd*temp(l))
       enddo
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1D_nudge_sandu_astex.h
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1D_nudge_sandu_astex.h	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1D_nudge_sandu_astex.h	(revision 5103)
@@ -1,42 +1,0 @@
-      do l = 1, llm
-
-! au dessus de 700hPa, on relaxe vers profil init
-!      on fait l'hypothese que dans ce cas, il n'y a plus d'eau liq. au dessus 700hpa
-!      donc la relaxation en thetal et qt devient relaxation en tempe et qv
-       relax_u(l)=(u(l)-u_mod(l))/tau_sandu  ! pour u et v on relaxe sur tte la colonne
-       relax_v(l)=(v(l)-v_mod(l))/tau_sandu
-       relax_q(l,1)=0.
-       relax_q(l,2)=0.
-       relax_thl(l)=0.
-!      print *,'nudge: l tau_sandu u u_mod',l,tau_sandu,u(l),u_mod(l)
-
-       if (l.ge.llm700) then 
-         relax_q(l,1)=(q(l,1)-q_mod(l))/tau_sandu
-         relax_q(l,2)=0.
-         relax_thl(l)=(temp(l)-t_mod(l))/tau_sandu
-       endif
-!     print *,'l dq1 relax dqadv',l,dq(l,1),relax_q(l,1),d_q_adv(l,1)
-!     print *,'l dq2 relax dqadv',l,dq(l,2),relax_q(l,2),d_q_adv(l,2)
-!     print *,'l dt  relax dtadv',l,dt_phys(l),relax_thl(l),d_t_adv(l)
-      enddo
-
-        u(1:mxcalc)=u(1:mxcalc) + timestep*( du_age(1:mxcalc)+             &          
-     &              du_phys(1:mxcalc) - relax_u(1:mxcalc))
-        v(1:mxcalc)=v(1:mxcalc) + timestep*( dv_age(1:mxcalc)+              &
-     &               dv_phys(1:mxcalc) - relax_v(1:mxcalc))
-        q(1:mxcalc,1)=q(1:mxcalc,1)+timestep*(                              &
-     &      dq(1:mxcalc,1) - relax_q(1:mxcalc,1)+d_q_adv(1:mxcalc,1))
-        q(1:mxcalc,2)=q(1:mxcalc,2)+timestep*(                              &
-     &      dq(1:mxcalc,2) - relax_q(1:mxcalc,2)+d_q_adv(1:mxcalc,2))
-        temp(1:mxcalc)=temp(1:mxcalc)+timestep*(                            &
-     &      dt_phys(1:mxcalc)-relax_thl(1:mxcalc)+d_t_adv(1:mxcalc))
-
-
-      !	print*,'OLDLMDZ1D IOPH'
-      !      CALL iophys_ecrit('relax_thl',klev,'relax_thl','m/s',relax_thl)
-      !      CALL iophys_ecrit('d_t_adv',klev,'d_t_adv','m/s',d_t_adv)
-      !      CALL iophys_ecrit('temp',klev,'temp','m/s',temp)
-      !      CALL iophys_ecrit('q',klev,'q','m/s',q(:,1))
-      !      CALL iophys_ecrit('relax_q',klev,'relax_q','m/s',relax_q(:,1))
-      !      CALL iophys_ecrit('d_q_adv',klev,'d_q_adv','m/s',d_q_adv(:,1))
-
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 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1D_read_forc_cases.h	(revision 5103)
@@ -11,5 +11,5 @@
       nq2=0
 
-      print*,'FORCING ,forcing_SCM',forcing_SCM
+      PRINT*,'FORCING ,forcing_SCM',forcing_SCM
       if (forcing_SCM) then
 
@@ -17,5 +17,5 @@
          CALL read_SCM_cas
          write(*,*) 'Forcing read' 
-	 print*,'PS ps_cas',ps_cas
+	 PRINT*,'PS ps_cas',ps_cas
 
 !Time interpolation for initial conditions using interpolation routine
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1Dconv.h
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1Dconv.h	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1Dconv.h	(revision 5103)
@@ -146,5 +146,5 @@
         external rdgrads    !lire en iterant dans forcing.dat
 !---------------------------------------------------------------------
-               print*,'le pas itap est:',itap
+               PRINT*,'le pas itap est:',itap
 !*** on determine le pas du meso_NH correspondant au nouvel itap ***
 !*** pour aller chercher les champs dans rdgrads                 ***
@@ -155,5 +155,5 @@
         temps = 1 + int((dt + 2*time)/(2*dt))
         pas=min(temps,pasmax-1)
-             print*,'le pas Meso est:',pas
+             PRINT*,'le pas Meso est:',pas
 
 
@@ -182,5 +182,5 @@
          print *, 'imp_fcg,ts_fcg,Turb_fcg,pas,nblvlm,icompt'
          print *, imp_fcg,ts_fcg,Turb_fcg,pas,nblvlm,icompt
-                       print*,'le pas pas est:',pas
+                       PRINT*,'le pas pas est:',pas
 !*** on va chercher les nouveaux champs after dans toga.dat     ***
 !*** champs en format meso_NH                                   ***
@@ -203,16 +203,16 @@
         endif  ! Turb_fcg
 
-               print*,'ht_mes ',(ht_mes(i),i=1,nblvlm)
-               print*,'hq_mes ',(hq_mes(i),i=1,nblvlm)
-               print*,'hw_mes ',(hw_mes(i),i=1,nblvlm)
+               PRINT*,'ht_mes ',(ht_mes(i),i=1,nblvlm)
+               PRINT*,'hq_mes ',(hq_mes(i),i=1,nblvlm)
+               PRINT*,'hw_mes ',(hw_mes(i),i=1,nblvlm)
                   if(imp_fcg) then
-               print*,'hu_mes ',(hu_mes(i),i=1,nblvlm)
-               print*,'hv_mes ',(hv_mes(i),i=1,nblvlm)
+               PRINT*,'hu_mes ',(hu_mes(i),i=1,nblvlm)
+               PRINT*,'hv_mes ',(hv_mes(i),i=1,nblvlm)
                   endif
                   if(Turb_fcg) then
-               print*,'hThTurb_mes ',(hThTurb_mes(i),i=1,nblvlm)
-               print*,'hqTurb_mes ',(hqTurb_mes(i),i=1,nblvlm)
+               PRINT*,'hThTurb_mes ',(hThTurb_mes(i),i=1,nblvlm)
+               PRINT*,'hqTurb_mes ',(hqTurb_mes(i),i=1,nblvlm)
                   endif
-          IF (ts_fcg) print*,'ts_subr', ts_subr
+          IF (ts_fcg) PRINT*,'ts_subr', ts_subr
 !*** on interpole les champs meso_NH sur les niveaux de pression***
 !*** gcm . on obtient le nouveau champ after                    ***
@@ -249,5 +249,5 @@
             pasprev=pas
          else ! pas.gt.pasprev
-            print*,'timebef est:',timebef
+            PRINT*,'timebef est:',timebef
          endif ! pas.gt.pasprev    fin du bloc relatif au passage au pas
                                   !de temps (meso) suivant
@@ -310,5 +310,5 @@
      &           ht,hq,hw,hu,hv,hThTurb,hqTurb,ts,                          &
      &           imp_fcg,ts_fcg,Tp_fcg,Turb_fcg)
-             print*,'le pas itap est:',itap
+             PRINT*,'le pas itap est:',itap
 
 !===================================================================
@@ -330,19 +330,19 @@
       read(97,2000) aaa
  2000  format (a80)
-         print*,'aaa est',aaa
+         PRINT*,'aaa est',aaa
       aaa=spaces(aaa,1)
-         print*,'aaa',aaa
+         PRINT*,'aaa',aaa
       CALL getsch(aaa,' ',' ',5,atemps,nch)
-         print*,'atemps est',atemps
+         PRINT*,'atemps est',atemps
         atemps=atemps(1:nch-2)
-         print*,'atemps',atemps
+         PRINT*,'atemps',atemps
         read(atemps,*) imn
         dt=imn*60
-         print*,'le pas de temps dt',dt
+         PRINT*,'le pas de temps dt',dt
       CALL getsch(aaa,' ',' ',2,apasmax,nch)
         apasmax=apasmax(1:nch)
         read(apasmax,*) ipa
         pasmax=ipa
-         print*,'pasmax est',pasmax
+         PRINT*,'pasmax est',pasmax
       CLOSE(97)
 !------------------------------------------------------------------
@@ -379,15 +379,15 @@
           enddo
                endif ! Tp_fcg
-           print*,'ht_mes ',(ht_mes(i),i=1,nblvlm)
-           print*,'hq_mes ',(hq_mes(i),i=1,nblvlm)
-           print*,'hw_mes ',(hw_mes(i),i=1,nblvlm)
+           PRINT*,'ht_mes ',(ht_mes(i),i=1,nblvlm)
+           PRINT*,'hq_mes ',(hq_mes(i),i=1,nblvlm)
+           PRINT*,'hw_mes ',(hw_mes(i),i=1,nblvlm)
               if(imp_fcg) then
-           print*,'hu_mes ',(hu_mes(i),i=1,nblvlm)
-           print*,'hv_mes ',(hv_mes(i),i=1,nblvlm)
-           print*,'t',ts_subr
+           PRINT*,'hu_mes ',(hu_mes(i),i=1,nblvlm)
+           PRINT*,'hv_mes ',(hv_mes(i),i=1,nblvlm)
+           PRINT*,'t',ts_subr
               endif ! imp_fcg
               if(Turb_fcg) then
-                 print*,'hThTurb_mes ',(hThTurb_mes(i),i=1,nblvlm)
-                 print*,'hqTurb ',     (hqTurb_mes(i),i=1,nblvlm)
+                 PRINT*,'hThTurb_mes ',(hThTurb_mes(i),i=1,nblvlm)
+                 PRINT*,'hqTurb ',     (hqTurb_mes(i),i=1,nblvlm)
               endif ! Turb_fcg
 !----------------------------------------------------------------------
@@ -523,5 +523,5 @@
        do k = 1, klev
         play(k) = playgcm(k)
-        print*,'la pression gcm est:',play(k)
+        PRINT*,'la pression gcm est:',play(k)
        enddo
 
@@ -534,5 +534,5 @@
       CALL mesolupbis(file_forctl)
 
-      print*,'la valeur de nblvlm est:',nblvlm
+      PRINT*,'la valeur de nblvlm est:',nblvlm
 
 !----------------------------------------------------------------------
@@ -597,6 +597,6 @@
 
  100  backspace(lu)
-      print*,'  DESCRIPTION DES 2 MODELES : '
-      print*,' '
+      PRINT*,'  DESCRIPTION DES 2 MODELES : '
+      PRINT*,' '
 
       read(lu,2000) aaa
@@ -606,7 +606,7 @@
          read(anblvl,*) nblvlm
 
-      print*,'nbre de niveaux de pression Meso-NH :',nblvlm
-      print*,' '
-      print*,'pression en Pa de chaque couche du meso-NH :'
+      PRINT*,'nbre de niveaux de pression Meso-NH :',nblvlm
+      PRINT*,' '
+      PRINT*,'pression en Pa de chaque couche du meso-NH :'
 
       read(lu,*) (playm(mlz),mlz=1,nblvlm)
@@ -617,16 +617,16 @@
         enddo
       endif
-      print*,(playm(mlz),mlz=1,nblvlm)
+      PRINT*,(playm(mlz),mlz=1,nblvlm)
 
  1000 format (a4)
  1001 format(5x,i2)
 
-      print*,' '
+      PRINT*,' '
       do mlzh=1,nblvlm
       hplaym(mlzh)=playm(mlzh)/100.
       enddo
 
-      print*,'pression en hPa de chaque couche du meso-NH: '
-      print*,(hplaym(mlzh),mlzh=1,nblvlm)
+      PRINT*,'pression en hPa de chaque couche du meso-NH: '
+      PRINT*,(hplaym(mlzh),mlzh=1,nblvlm)
 
       close (lu)
@@ -659,5 +659,5 @@
             icomp=icomp+1
             read(itape,rec=icomp)hT(k)
-             print*, hT(k), k
+             PRINT*, hT(k), k
          enddo
          do k=1,nl
@@ -764,17 +764,17 @@
 !c      endif
 
-      print*,' '
-      print*,'         INTERPOLATION  : '
-      print*,' '
-      print*,'correspondance de 9 niveaux du GCM sur les 53 du meso-NH:'
-      print*,(JM(k),k=1,klev)
-      print*,'correspondance de 9 niveaux du GCM sur les 53 du meso-NH:'
-      print*,(JM(k),k=1,klev)
-      print*,' '
-      print*,'vals du premier coef d"interpolation pour les 9 niveaux: '
-      print*,(coef1(k),k=1,klev)
-      print*,' '
-      print*,'valeurs du deuxieme coef d"interpolation pour les 9 niveaux:'
-      print*,(coef2(k),k=1,klev)
+      PRINT*,' '
+      PRINT*,'         INTERPOLATION  : '
+      PRINT*,' '
+      PRINT*,'correspondance de 9 niveaux du GCM sur les 53 du meso-NH:'
+      PRINT*,(JM(k),k=1,klev)
+      PRINT*,'correspondance de 9 niveaux du GCM sur les 53 du meso-NH:'
+      PRINT*,(JM(k),k=1,klev)
+      PRINT*,' '
+      PRINT*,'vals du premier coef d"interpolation pour les 9 niveaux: '
+      PRINT*,(coef1(k),k=1,klev)
+      PRINT*,' '
+      PRINT*,'valeurs du deuxieme coef d"interpolation pour les 9 niveaux:'
+      PRINT*,(coef2(k),k=1,klev)
 
       return
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/conf_gcm.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/conf_gcm.F90	(revision 5102)
+++ 	(revision )
@@ -1,1 +1,0 @@
-link ../../dyn3d/conf_gcm.F90
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/conf_gcm.f90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/conf_gcm.f90	(revision 5103)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/conf_gcm.f90	(revision 5103)
@@ -0,0 +1,1 @@
+link ../../dyn3d/conf_gcm.f90
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/fcg_racmo.h
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/fcg_racmo.h	(revision 5103)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/fcg_racmo.h	(revision 5103)
@@ -0,0 +1,45 @@
+
+! $Id: fcg_racmo.h 2011-02-16 17:02:56Z cheruy $
+
+      real   :: a_guide 
+      logical :: ok_invertp 
+      integer :: forc_trb
+      character*31 :: fich_racmo
+
+      common /fcg_racmo/forc_trb,ok_invertp,a_guide,fich_racmo
+
+!$OMP THREADPRIVATE(/fcg_racmo/)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/lmdz1d.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/lmdz1d.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/lmdz1d.F90	(revision 5103)
@@ -1,3 +1,2 @@
-
 ! $Id$
 
@@ -8,25 +7,25 @@
 
 
-   PROGRAM lmdz1d
+PROGRAM lmdz1d
+  USE ioipsl, ONLY: getin
+  IMPLICIT NONE
 
-   USE ioipsl, only: getin
+  INTEGER forcing_type
 
-   INTEGER forcing_type
+  CALL getin('forcing_type', forcing_type)
 
-   CALL getin('forcing_type',forcing_type)
+  IF (forcing_type==1000) THEN
+    CALL scm
+  ELSE
+    CALL old_lmdz1d
+  ENDIF
 
-   IF (forcing_type==1000) THEN
-           CALL scm
-   ELSE
-           CALL old_lmdz1d
-   ENDIF
-
-   END
+END
 
 
-#include "1DUTILS.h"
-#include "1Dconv.h"
-
-!#endif
+include "1DUTILS.h"
+include "1Dconv.h"
 
 
+
+
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/mod_1D_amma_read.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/mod_1D_amma_read.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/mod_1D_amma_read.F90	(revision 5103)
@@ -62,7 +62,7 @@
 
       fich_amma='amma.nc'
-      print*,'fich_amma ',fich_amma
+      PRINT*,'fich_amma ',fich_amma
       ierr = nf90_open(fich_amma,nf90_nowrite,nid)
-      print*,'fich_amma,nf90_nowrite,nid ',fich_amma,nf90_nowrite,nid
+      PRINT*,'fich_amma,nf90_nowrite,nid ',fich_amma,nf90_nowrite,nid
       if (ierr/=nf90_noerr) then
          write(*,*) 'ERROR: GROS Pb opening forcings nc file '
@@ -73,11 +73,11 @@
       ierr=nf90_inq_dimid(nid,'lev',rid)
       IF (ierr/=nf90_noerr) THEN
-         print*, 'Oh probleme lecture dimension zz'
+         PRINT*, 'Oh probleme lecture dimension zz'
       ENDIF
       ierr=nf90_inquire_dimension(nid,rid,len=nlev_amma)
-      print*,'OK nid,rid,nlev_amma',nid,rid,nlev_amma
+      PRINT*,'OK nid,rid,nlev_amma',nid,rid,nlev_amma
 !.......................................................................
       ierr=nf90_inq_dimid(nid,'time',rid)
-      print*,'nid,rid',nid,rid
+      PRINT*,'nid,rid',nid,rid
       nt_amma=0
       IF (ierr/=nf90_noerr) THEN
@@ -85,5 +85,5 @@
       ENDIF
       ierr=nf90_inquire_dimension(nid,rid,len=nt_amma)
-      print*,'nid,rid,nlev_amma',nid,rid,nt_amma
+      PRINT*,'nid,rid,nlev_amma',nid,rid,nt_amma
 
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -123,6 +123,6 @@
         allocate(v_profamma(nlev_amma))
 
-        print*,'Allocations OK'
-        call read_amma(nid,nlev_amma,nt_amma                                  &
+        PRINT*,'Allocations OK'
+        CALL read_amma(nid,nlev_amma,nt_amma                                  &
        ,z_amma,plev_amma,th_amma,q_amma,u_amma,v_amma,vitw_amma         &
        ,ht_amma,hq_amma,sens_amma,lat_amma)
@@ -171,5 +171,5 @@
 
 !=====================================================================
-      subroutine read_amma(nid,nlevel,ntime                          &
+      SUBROUTINE read_amma(nid,nlevel,ntime                          &
        ,zz,pp,temp,qv,u,v,dw                   &
        ,dt,dq,sens,flat)
@@ -262,5 +262,5 @@
 
 !dimensions lecture
-!      call catchaxis(nid,ntime,nlevel,time,z,ierr)
+!      CALL catchaxis(nid,ntime,nlevel,time,z,ierr)
  
          ierr = nf90_get_var(nid,var3didin(1),zz)
@@ -342,5 +342,5 @@
 
          return 
-         end subroutine read_amma
+         END SUBROUTINE  read_amma
 !======================================================================
         SUBROUTINE interp_amma_time(day,day1,annee_ref                     &
@@ -384,16 +384,16 @@
 ! Check that initial day of the simulation consistent with AMMA case:
        if (annee_ref/=2006) then
-        print*,'Pour AMMA, annee_ref doit etre 2006'
-        print*,'Changer annee_ref dans run.def'
+        PRINT*,'Pour AMMA, annee_ref doit etre 2006'
+        PRINT*,'Changer annee_ref dans run.def'
         stop
        endif
        if (annee_ref==2006 .and. day1<day_ini_amma) then
-        print*,'AMMA a débuté le 10 juillet 2006',day1,day_ini_amma
-        print*,'Changer dayref dans run.def'
+        PRINT*,'AMMA a débuté le 10 juillet 2006',day1,day_ini_amma
+        PRINT*,'Changer dayref dans run.def'
         stop
        endif
        if (annee_ref==2006 .and. day1>day_ini_amma+1) then
-        print*,'AMMA a fini le 11 juillet'
-        print*,'Changer dayref ou nday dans run.def'
+        PRINT*,'AMMA a fini le 11 juillet'
+        PRINT*,'Changer dayref ou nday dans run.def'
         stop
        endif
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/mod_1D_cases_read.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/mod_1D_cases_read.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/mod_1D_cases_read.F90	(revision 5103)
@@ -92,7 +92,7 @@
 
       fich_cas='setup/cas.nc'
-      print*,'fich_cas ',fich_cas
+      PRINT*,'fich_cas ',fich_cas
       ierr = nf90_open(fich_cas,nf90_nowrite,nid)
-      print*,'fich_cas,nf90_nowrite,nid ',fich_cas,nf90_nowrite,nid
+      PRINT*,'fich_cas,nf90_nowrite,nid ',fich_cas,nf90_nowrite,nid
       if (ierr/=nf90_noerr) then
          write(*,*) 'ERROR: GROS Pb opening forcings nc file '
@@ -103,25 +103,25 @@
       ierr=nf90_inq_dimid(nid,'lat',rid)
       IF (ierr/=nf90_noerr) THEN
-         print*, 'Oh probleme lecture dimension lat'
+         PRINT*, 'Oh probleme lecture dimension lat'
       ENDIF
       ierr=nf90_inquire_dimension(nid,rid,len=ii)
-      print*,'OK1 nid,rid,lat',nid,rid,ii
+      PRINT*,'OK1 nid,rid,lat',nid,rid,ii
 !.......................................................................
       ierr=nf90_inq_dimid(nid,'lon',rid)
       IF (ierr/=nf90_noerr) THEN
-         print*, 'Oh probleme lecture dimension lon'
+         PRINT*, 'Oh probleme lecture dimension lon'
       ENDIF
       ierr=nf90_inquire_dimension(nid,rid,len=jj)
-      print*,'OK2 nid,rid,lat',nid,rid,jj
+      PRINT*,'OK2 nid,rid,lat',nid,rid,jj
 !.......................................................................
       ierr=nf90_inq_dimid(nid,'lev',rid)
       IF (ierr/=nf90_noerr) THEN
-         print*, 'Oh probleme lecture dimension zz'
+         PRINT*, 'Oh probleme lecture dimension zz'
       ENDIF
       ierr=nf90_inquire_dimension(nid,rid,len=nlev_cas)
-      print*,'OK3 nid,rid,nlev_cas',nid,rid,nlev_cas
+      PRINT*,'OK3 nid,rid,nlev_cas',nid,rid,nlev_cas
 !.......................................................................
       ierr=nf90_inq_dimid(nid,'time',rid)
-      print*,'nid,rid',nid,rid
+      PRINT*,'nid,rid',nid,rid
       nt_cas=0
       IF (ierr/=nf90_noerr) THEN
@@ -129,5 +129,5 @@
       ENDIF
       ierr=nf90_inquire_dimension(nid,rid,len=nt_cas)
-      print*,'OK4 nid,rid,nt_cas',nid,rid,nt_cas
+      PRINT*,'OK4 nid,rid,nt_cas',nid,rid,nt_cas
 
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -182,6 +182,6 @@
         allocate(q2_prof_cas(nlev_cas))
 
-        print*,'Allocations OK'
-        call read_cas(nid,nlev_cas,nt_cas                                       &
+        PRINT*,'Allocations OK'
+        CALL read_cas(nid,nlev_cas,nt_cas                                       &
        ,z_cas,plev_cas,t_cas,q_cas,rh_cas,th_cas,rv_cas,u_cas,v_cas         &
        ,ug_cas,vg_cas,vitw_cas,du_cas,hu_cas,vu_cas,dv_cas,hv_cas,vv_cas    &
@@ -189,5 +189,5 @@
        ,dth_cas,hth_cas,vth_cas,dr_cas,hr_cas,vr_cas,sens_cas,lat_cas,ts_cas&
        ,ustar_cas,uw_cas,vw_cas,q1_cas,q2_cas)
-        print*,'Read cas OK'
+        PRINT*,'Read cas OK'
 
 
@@ -254,5 +254,5 @@
 
   !=====================================================================
-      subroutine read_cas(nid,nlevel,ntime                          &
+      SUBROUTINE read_cas(nid,nlevel,ntime                          &
        ,zz,pp,temp,qv,rh,theta,rv,u,v,ug,vg,w,                   &
        du,hu,vu,dv,hv,vv,dt,dtrad,ht,vt,dq,hq,vq,                     &
@@ -800,5 +800,5 @@
 
          return
-         end subroutine read_cas
+         END SUBROUTINE  read_cas
 !======================================================================
         SUBROUTINE interp_case_time(day,day1,annee_ref                &
@@ -871,5 +871,5 @@
 
 
-        print*,'Check time',day1,day_ju_ini_cas,day_deb+1,pdt_cas
+        PRINT*,'Check time',day1,day_ju_ini_cas,day_deb+1,pdt_cas
 
 ! On teste si la date du cas AMMA est correcte.
@@ -880,16 +880,16 @@
 ! Check that initial day of the simulation consistent with AMMA case:
 !      if (annee_ref.ne.2006) then
-!       print*,'Pour AMMA, annee_ref doit etre 2006'
-!       print*,'Changer annee_ref dans run.def'
+!       PRINT*,'Pour AMMA, annee_ref doit etre 2006'
+!       PRINT*,'Changer annee_ref dans run.def'
 !       stop
 !      endif
 !      if (annee_ref.eq.2006 .and. day1.lt.day_cas) then
-!       print*,'AMMA a debute le 10 juillet 2006',day1,day_cas
-!       print*,'Changer dayref dans run.def'
+!       PRINT*,'AMMA a debute le 10 juillet 2006',day1,day_cas
+!       PRINT*,'Changer dayref dans run.def'
 !       stop
 !      endif
 !      if (annee_ref.eq.2006 .and. day1.gt.day_cas+1) then
-!       print*,'AMMA a fini le 11 juillet'
-!       print*,'Changer dayref ou nday dans run.def'
+!       PRINT*,'AMMA a fini le 11 juillet'
+!       PRINT*,'Changer dayref ou nday dans run.def'
 !       stop
 !      endif
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/mod_1D_cases_read2.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/mod_1D_cases_read2.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/mod_1D_cases_read2.F90	(revision 5103)
@@ -86,7 +86,7 @@
 
     fich_cas='setup/cas.nc'
-    print*,'fich_cas ',fich_cas
+    PRINT*,'fich_cas ',fich_cas
     ierr = nf90_open(fich_cas,nf90_nowrite,nid)
-    print*,'fich_cas,nf90_nowrite,nid ',fich_cas,nf90_nowrite,nid
+    PRINT*,'fich_cas,nf90_nowrite,nid ',fich_cas,nf90_nowrite,nid
     if (ierr/=nf90_noerr) then
        write(*,*) 'ERROR: GROS Pb opening forcings nc file '
@@ -97,25 +97,25 @@
     ierr=nf90_inq_dimid(nid,'lat',rid)
     IF (ierr/=nf90_noerr) THEN
-       print*, 'Oh probleme lecture dimension lat'
+       PRINT*, 'Oh probleme lecture dimension lat'
     ENDIF
     ierr=nf90_inquire_dimension(nid,rid,len=ii)
-    print*,'OK1 nid,rid,lat',nid,rid,ii
+    PRINT*,'OK1 nid,rid,lat',nid,rid,ii
     !.......................................................................
     ierr=nf90_inq_dimid(nid,'lon',rid)
     IF (ierr/=nf90_noerr) THEN
-       print*, 'Oh probleme lecture dimension lon'
+       PRINT*, 'Oh probleme lecture dimension lon'
     ENDIF
     ierr=nf90_inquire_dimension(nid,rid,len=jj)
-    print*,'OK2 nid,rid,lat',nid,rid,jj
+    PRINT*,'OK2 nid,rid,lat',nid,rid,jj
     !.......................................................................
     ierr=nf90_inq_dimid(nid,'lev',rid)
     IF (ierr/=nf90_noerr) THEN
-       print*, 'Oh probleme lecture dimension zz'
+       PRINT*, 'Oh probleme lecture dimension zz'
     ENDIF
     ierr=nf90_inquire_dimension(nid,rid,len=nlev_cas)
-    print*,'OK3 nid,rid,nlev_cas',nid,rid,nlev_cas
+    PRINT*,'OK3 nid,rid,nlev_cas',nid,rid,nlev_cas
     !.......................................................................
     ierr=nf90_inq_dimid(nid,'time',rid)
-    print*,'nid,rid',nid,rid
+    PRINT*,'nid,rid',nid,rid
     nt_cas=0
     IF (ierr/=nf90_noerr) THEN
@@ -123,5 +123,5 @@
     ENDIF
     ierr=nf90_inquire_dimension(nid,rid,len=nt_cas)
-    print*,'OK4 nid,rid,nt_cas',nid,rid,nt_cas
+    PRINT*,'OK4 nid,rid,nt_cas',nid,rid,nt_cas
 
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -176,6 +176,6 @@
     allocate(q2_prof_cas(nlev_cas))
 
-    print*,'Allocations OK'
-    call read_cas2(nid,nlev_cas,nt_cas                                       &
+    PRINT*,'Allocations OK'
+    CALL read_cas2(nid,nlev_cas,nt_cas                                       &
          ,z_cas,plev_cas,t_cas,q_cas,rh_cas,th_cas,rv_cas,u_cas,v_cas         &
          ,ug_cas,vg_cas,vitw_cas,du_cas,hu_cas,vu_cas,dv_cas,hv_cas,vv_cas    &
@@ -183,5 +183,5 @@
          ,dth_cas,hth_cas,vth_cas,dr_cas,hr_cas,vr_cas,sens_cas,lat_cas,ts_cas&
          ,ustar_cas,uw_cas,vw_cas,q1_cas,q2_cas)
-    print*,'Read cas OK'
+    PRINT*,'Read cas OK'
 
 
@@ -195,7 +195,7 @@
 
     fich_cas='setup/cas.nc'
-    print*,'fich_cas ',fich_cas
+    PRINT*,'fich_cas ',fich_cas
     ierr = nf90_open(fich_cas,nf90_nowrite,nid)
-    print*,'fich_cas,nf90_nowrite,nid ',fich_cas,nf90_nowrite,nid
+    PRINT*,'fich_cas,nf90_nowrite,nid ',fich_cas,nf90_nowrite,nid
     if (ierr/=nf90_noerr) then
        write(*,*) 'ERROR: GROS Pb opening forcings nc file '
@@ -206,22 +206,22 @@
     ierr=nf90_inq_dimid(nid,'lat',rid)
     IF (ierr/=nf90_noerr) THEN
-       print*, 'Oh probleme lecture dimension lat'
+       PRINT*, 'Oh probleme lecture dimension lat'
     ENDIF
     ierr=nf90_inquire_dimension(nid,rid,len=ii)
-    print*,'OK1 read2: nid,rid,lat',nid,rid,ii
+    PRINT*,'OK1 read2: nid,rid,lat',nid,rid,ii
     !.......................................................................
     ierr=nf90_inq_dimid(nid,'lon',rid)
     IF (ierr/=nf90_noerr) THEN
-       print*, 'Oh probleme lecture dimension lon'
+       PRINT*, 'Oh probleme lecture dimension lon'
     ENDIF
     ierr=nf90_inquire_dimension(nid,rid,len=jj)
-    print*,'OK2 read2: nid,rid,lat',nid,rid,jj
+    PRINT*,'OK2 read2: nid,rid,lat',nid,rid,jj
     !.......................................................................
     ierr=nf90_inq_dimid(nid,'nlev',rid)
     IF (ierr/=nf90_noerr) THEN
-       print*, 'Oh probleme lecture dimension nlev'
+       PRINT*, 'Oh probleme lecture dimension nlev'
     ENDIF
     ierr=nf90_inquire_dimension(nid,rid,len=nlev_cas)
-    print*,'OK3 read2: nid,rid,nlev_cas',nid,rid,nlev_cas
+    PRINT*,'OK3 read2: nid,rid,nlev_cas',nid,rid,nlev_cas
     !.......................................................................
     ierr=nf90_inq_dimid(nid,'time',rid)
@@ -231,5 +231,5 @@
     ENDIF
     ierr=nf90_inquire_dimension(nid,rid,len=nt_cas)
-    print*,'OK4 read2: nid,rid,nt_cas',nid,rid,nt_cas
+    PRINT*,'OK4 read2: nid,rid,nt_cas',nid,rid,nt_cas
 
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -296,6 +296,6 @@
     allocate(q2_prof_cas(nlev_cas))
 
-    print*,'Allocations OK'
-    call read2_cas (nid,nlev_cas,nt_cas,                                                                     &
+    PRINT*,'Allocations OK'
+    CALL read2_cas (nid,nlev_cas,nt_cas,                                                                     &
          ap_cas,bp_cas,z_cas,plev_cas,zh_cas,plevh_cas,t_cas,th_cas,thv_cas,thl_cas,qv_cas,                    &
          ql_cas,qi_cas,rh_cas,rv_cas,u_cas,v_cas,vitw_cas,omega_cas,ug_cas,vg_cas,du_cas,hu_cas,vu_cas,        &
@@ -304,7 +304,7 @@
          uw_cas,vw_cas,q1_cas,q2_cas,orog_cas,albedo_cas,emiss_cas,t_skin_cas,q_skin_cas,mom_rough,heat_rough, &
          o3_cas,rugos_cas,clay_cas,sand_cas)
-    print*,'Read2 cas OK'
+    PRINT*,'Read2 cas OK'
     do ii=1,nlev_cas
-       print*,'apres read2_cas, plev_cas=',ii,plev_cas(ii,1)
+       PRINT*,'apres read2_cas, plev_cas=',ii,plev_cas(ii,1)
     enddo
 
@@ -323,7 +323,7 @@
 
     fich_cas='cas.nc'
-    print*,'fich_cas ',fich_cas
+    PRINT*,'fich_cas ',fich_cas
     ierr = nf90_open(fich_cas,nf90_nowrite,nid)
-    print*,'fich_cas,nf90_nowrite,nid ',fich_cas,nf90_nowrite,nid
+    PRINT*,'fich_cas,nf90_nowrite,nid ',fich_cas,nf90_nowrite,nid
     if (ierr/=nf90_noerr) then
        write(*,*) 'ERROR: GROS Pb opening forcings nc file '
@@ -334,24 +334,24 @@
     ierr=nf90_inq_dimid(nid,'lat',rid)
     IF (ierr/=nf90_noerr) THEN
-       print*, 'Oh probleme lecture dimension lat'
+       PRINT*, 'Oh probleme lecture dimension lat'
     ENDIF
     ierr=nf90_inquire_dimension(nid,rid,len=ii)
-    print*,'OK1 read2: nid,rid,lat',nid,rid,ii
+    PRINT*,'OK1 read2: nid,rid,lat',nid,rid,ii
     !.......................................................................
     ierr=nf90_inq_dimid(nid,'lon',rid)
     IF (ierr/=nf90_noerr) THEN
-       print*, 'Oh probleme lecture dimension lon'
+       PRINT*, 'Oh probleme lecture dimension lon'
     ENDIF
     ierr=nf90_inquire_dimension(nid,rid,len=jj)
-    print*,'OK2 read2: nid,rid,lat',nid,rid,jj
+    PRINT*,'OK2 read2: nid,rid,lat',nid,rid,jj
     !.......................................................................
     ierr=nf90_inq_dimid(nid,'lev',rid)
     IF (ierr/=nf90_noerr) THEN
-       print*, 'Oh probleme lecture dimension nlev'
+       PRINT*, 'Oh probleme lecture dimension nlev'
     ENDIF
     ierr=nf90_inquire_dimension(nid,rid,len=nlev_cas)
-    print*,'OK3 read2: nid,rid,nlev_cas',nid,rid,nlev_cas
+    PRINT*,'OK3 read2: nid,rid,nlev_cas',nid,rid,nlev_cas
     IF ( .NOT. ( nlev_cas > 10 .AND. nlev_cas < 1000 )) THEN
-       print*,'Valeur de nlev_cas peu probable'
+       PRINT*,'Valeur de nlev_cas peu probable'
        STOP
     ENDIF
@@ -363,7 +363,7 @@
     ENDIF
     ierr=nf90_inquire_dimension(nid,rid,len=nt_cas)
-    print*,'OK4 read2: nid,rid,nt_cas',nid,rid,nt_cas
+    PRINT*,'OK4 read2: nid,rid,nt_cas',nid,rid,nt_cas
     ! Lecture de l'axe des temps
-    print*,'LECTURE DU TEMPS'
+    PRINT*,'LECTURE DU TEMPS'
     ierr=nf90_inq_varid(nid,'time',timeid)
     if(ierr/=nf90_noerr) then
@@ -447,6 +447,6 @@
     allocate(q2_prof_cas(nlev_cas))
 
-    print*,'Allocations OK'
-    call old_read_SCM (nid,nlev_cas,nt_cas,                                                                     &
+    PRINT*,'Allocations OK'
+    CALL old_read_SCM (nid,nlev_cas,nt_cas,                                                                     &
          ap_cas,bp_cas,z_cas,plev_cas,zh_cas,plevh_cas,t_cas,th_cas,thv_cas,thl_cas,qv_cas,                    &
          ql_cas,qi_cas,rh_cas,rv_cas,u_cas,v_cas,vitw_cas,omega_cas,ug_cas,vg_cas,du_cas,hu_cas,vu_cas,        &
@@ -455,7 +455,7 @@
          uw_cas,vw_cas,q1_cas,q2_cas,orog_cas,albedo_cas,emiss_cas,t_skin_cas,q_skin_cas,mom_rough,heat_rough, &
          o3_cas,rugos_cas,clay_cas,sand_cas)
-    print*,'Read2 cas OK'
+    PRINT*,'Read2 cas OK'
     do ii=1,nlev_cas
-       print*,'apres read2_cas, plev_cas=',ii,plev_cas(ii,1)
+       PRINT*,'apres read2_cas, plev_cas=',ii,plev_cas(ii,1)
     enddo
 
@@ -529,5 +529,5 @@
 
 !=====================================================================
-subroutine read_cas2(nid,nlevel,ntime                          &
+SUBROUTINE read_cas2(nid,nlevel,ntime                          &
      ,zz,pp,temp,qv,rh,theta,rv,u,v,ug,vg,w,                   &
      du,hu,vu,dv,hv,vv,dt,dtrad,ht,vt,dq,hq,vq,                     &
@@ -640,7 +640,7 @@
 
   return 
-end subroutine read_cas2
+END SUBROUTINE  read_cas2
 !======================================================================
-subroutine read2_cas(nid,nlevel,ntime,                                       &
+SUBROUTINE read2_cas(nid,nlevel,ntime,                                       &
      ap,bp,zz,pp,zzh,pph,temp,theta,thv,thl,qv,ql,qi,rh,rv,u,v,vitw,omega,ug,vg,&
      du,hu,vu,dv,hv,vv,dt,ht,vt,dq,hq,vq,                                    &
@@ -808,8 +808,8 @@
 
   return 
-end subroutine read2_cas
+END SUBROUTINE  read2_cas
 
 !======================================================================
-subroutine old_read_SCM(nid,nlevel,ntime,                                       &
+SUBROUTINE old_read_SCM(nid,nlevel,ntime,                                       &
      ap,bp,zz,pp,zzh,pph,temp,theta,thv,thl,qv,ql,qi,rh,rv,u,v,vitw,omega,ug,vg,&
      du,hu,vu,dv,hv,vv,dt,ht,vt,dq,hq,vq,                                    &
@@ -867,5 +867,5 @@
   !-----------------------------------------------------------------------
 
-  print*,'ON EST LA'
+  PRINT*,'ON EST LA'
   do i=1,nbvar3d
      ierr=nf90_inq_varid(nid,name_var(i),var3didin(i))
@@ -891,5 +891,5 @@
               stop "getvarup"
            endif
-           print*,'Lecture de la variable #i ',i,name_var(i),minval(resul1),maxval(resul1)
+           PRINT*,'Lecture de la variable #i ',i,name_var(i),minval(resul1),maxval(resul1)
            !-----------------------------------------------------------------------
         else if(i>12.and.i<=54) then   ! Lecture des variables en (time,nlevel,lat,lon)
@@ -900,5 +900,5 @@
               stop "getvarup"
            endif
-           print*,'Lecture de la variable #i ',i,name_var(i),minval(resul),maxval(resul)
+           PRINT*,'Lecture de la variable #i ',i,name_var(i),minval(resul),maxval(resul)
            !-----------------------------------------------------------------------
         else if (i>54.and.i<=65) then   ! Lecture des variables en (time,lat,lon)
@@ -909,5 +909,5 @@
               stop "getvarup"
            endif
-           print*,'Lecture de la variable #i  ',i,name_var(i),minval(resul2),maxval(resul2)
+           PRINT*,'Lecture de la variable #i  ',i,name_var(i),minval(resul2),maxval(resul2)
            !-----------------------------------------------------------------------
         else     ! Lecture des constantes (lat,lon)
@@ -918,5 +918,5 @@
               stop "getvarup"
            endif
-           print*,'Lecture de la variable #i ',i,name_var(i),resul3
+           PRINT*,'Lecture de la variable #i ',i,name_var(i),resul3
         endif
      endif
@@ -999,6 +999,6 @@
      resul3=0.
   enddo
-  print*,'Lecture de la variable APRES ,sens ',minval(sens),maxval(sens)
-  print*,'Lecture de la variable APRES ,flat ',minval(flat),maxval(flat)
+  PRINT*,'Lecture de la variable APRES ,sens ',minval(sens),maxval(sens)
+  PRINT*,'Lecture de la variable APRES ,flat ',minval(flat),maxval(flat)
 
   !CR:ATTENTION EN ATTENTE DE REGLER LA QUESTION DU PAS DE TEMPS INITIAL
@@ -1017,5 +1017,5 @@
 
   return 
-end subroutine old_read_SCM
+END SUBROUTINE  old_read_SCM
 !======================================================================
 
@@ -1090,5 +1090,5 @@
 
 
-  print*,'Check time',day1,day_ju_ini_cas,day_deb+1,pdt_cas
+  PRINT*,'Check time',day1,day_ju_ini_cas,day_deb+1,pdt_cas
 
   ! On teste si la date du cas AMMA est correcte.
@@ -1099,16 +1099,16 @@
   ! Check that initial day of the simulation consistent with AMMA case:
   !      if (annee_ref.ne.2006) then
-  !       print*,'Pour AMMA, annee_ref doit etre 2006'
-  !       print*,'Changer annee_ref dans run.def'
+  !       PRINT*,'Pour AMMA, annee_ref doit etre 2006'
+  !       PRINT*,'Changer annee_ref dans run.def'
   !       stop
   !      endif
   !      if (annee_ref.eq.2006 .and. day1.lt.day_cas) then
-  !       print*,'AMMA a debute le 10 juillet 2006',day1,day_cas
-  !       print*,'Changer dayref dans run.def'
+  !       PRINT*,'AMMA a debute le 10 juillet 2006',day1,day_cas
+  !       PRINT*,'Changer dayref dans run.def'
   !       stop
   !      endif
   !      if (annee_ref.eq.2006 .and. day1.gt.day_cas+1) then
-  !       print*,'AMMA a fini le 11 juillet'
-  !       print*,'Changer dayref ou nday dans run.def'
+  !       PRINT*,'AMMA a fini le 11 juillet'
+  !       PRINT*,'Changer dayref ou nday dans run.def'
   !       stop
   !      endif
@@ -1302,7 +1302,7 @@
 
 
-  print*,'Check time',day1,day_ju_ini_cas,day_deb+1,pdt_cas
+  PRINT*,'Check time',day1,day_ju_ini_cas,day_deb+1,pdt_cas
   !       do k=1,nlev_cas
-  !       print*,'debut de interp2_case_time, plev_cas=',k,plev_cas(k,1)
+  !       PRINT*,'debut de interp2_case_time, plev_cas=',k,plev_cas(k,1)
   !       enddo
 
@@ -1314,16 +1314,16 @@
   ! Check that initial day of the simulation consistent with AMMA case:
   !      if (annee_ref.ne.2006) then
-  !       print*,'Pour AMMA, annee_ref doit etre 2006'
-  !       print*,'Changer annee_ref dans run.def'
+  !       PRINT*,'Pour AMMA, annee_ref doit etre 2006'
+  !       PRINT*,'Changer annee_ref dans run.def'
   !       stop
   !      endif
   !      if (annee_ref.eq.2006 .and. day1.lt.day_cas) then
-  !       print*,'AMMA a debute le 10 juillet 2006',day1,day_cas
-  !       print*,'Changer dayref dans run.def'
+  !       PRINT*,'AMMA a debute le 10 juillet 2006',day1,day_cas
+  !       PRINT*,'Changer dayref dans run.def'
   !       stop
   !      endif
   !      if (annee_ref.eq.2006 .and. day1.gt.day_cas+1) then
-  !       print*,'AMMA a fini le 11 juillet'
-  !       print*,'Changer dayref ou nday dans run.def'
+  !       PRINT*,'AMMA a fini le 11 juillet'
+  !       PRINT*,'Changer dayref ou nday dans run.def'
   !       stop
   !      endif
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/mod_1D_cases_read_std.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/mod_1D_cases_read_std.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/mod_1D_cases_read_std.F90	(revision 5103)
@@ -98,7 +98,7 @@
 
     fich_cas='cas.nc'
-    print*,'fich_cas ',fich_cas
+    PRINT*,'fich_cas ',fich_cas
     ierr = nf90_open(fich_cas,nf90_nowrite,nid)
-    print*,'fich_cas,nf90_nowrite,nid ',fich_cas,nf90_nowrite,nid
+    PRINT*,'fich_cas,nf90_nowrite,nid ',fich_cas,nf90_nowrite,nid
     if (ierr/=nf90_noerr) then
        write(*,*) 'ERROR: GROS Pb opening forcings nc file '
@@ -109,24 +109,24 @@
     ierr=nf90_inq_dimid(nid,'lat',rid)
     IF (ierr/=nf90_noerr) THEN
-       print*, 'Oh probleme lecture dimension lat'
+       PRINT*, 'Oh probleme lecture dimension lat'
     ENDIF
     ierr=nf90_inquire_dimension(nid,rid,len=ii)
-    print*,'OK1 read_SCM_cas: nid,rid,lat',nid,rid,ii
+    PRINT*,'OK1 read_SCM_cas: nid,rid,lat',nid,rid,ii
     !.......................................................................
     ierr=nf90_inq_dimid(nid,'lon',rid)
     IF (ierr/=nf90_noerr) THEN
-       print*, 'Oh probleme lecture dimension lon'
+       PRINT*, 'Oh probleme lecture dimension lon'
     ENDIF
     ierr=nf90_inquire_dimension(nid,rid,len=jj)
-    print*,'OK2 read_SCM_cas: nid,rid,lat',nid,rid,jj
+    PRINT*,'OK2 read_SCM_cas: nid,rid,lat',nid,rid,jj
     !.......................................................................
     ierr=nf90_inq_dimid(nid,'lev',rid)
     IF (ierr/=nf90_noerr) THEN
-       print*, 'Oh probleme lecture dimension nlev'
+       PRINT*, 'Oh probleme lecture dimension nlev'
     ENDIF
     ierr=nf90_inquire_dimension(nid,rid,len=nlev_cas)
-    print*,'OK3 read_SCM_cas: nid,rid,nlev_cas',nid,rid,nlev_cas
+    PRINT*,'OK3 read_SCM_cas: nid,rid,nlev_cas',nid,rid,nlev_cas
     IF ( .NOT. ( nlev_cas > 10 .AND. nlev_cas < 200000 )) THEN
-       print*,'Valeur de nlev_cas peu probable'
+       PRINT*,'Valeur de nlev_cas peu probable'
        STOP
     ENDIF
@@ -138,7 +138,7 @@
     ENDIF
     ierr=nf90_inquire_dimension(nid,rid,len=nt_cas)
-    print*,'OK4 read_SCM_cas: nid,rid,nt_cas',nid,rid,nt_cas
+    PRINT*,'OK4 read_SCM_cas: nid,rid,nt_cas',nid,rid,nt_cas
     ! Lecture de l'axe des temps
-    print*,'LECTURE DU TEMPS'
+    PRINT*,'LECTURE DU TEMPS'
     ierr=nf90_inq_varid(nid,'time',timeid)
     if(ierr/=nf90_noerr) then
@@ -230,5 +230,5 @@
     allocate(q2_prof_cas(nlev_cas))
 
-    print*,'Allocations OK'
+    PRINT*,'Allocations OK'
     CALL read_SCM (nid,nlev_cas,nt_cas,                                                                     &
          ap_cas,bp_cas,z_cas,plev_cas,zh_cas,plevh_cas,t_cas,th_cas,thv_cas,thl_cas,qv_cas,                   &
@@ -241,8 +241,8 @@
          uw_cas,vw_cas,q1_cas,q2_cas,orog_cas,albedo_cas,emiss_cas,q_skin_cas,mom_rough,heat_rough, &
          o3_cas,rugos_cas,clay_cas,sand_cas)
-    print*,'read_SCM cas OK'
+    PRINT*,'read_SCM cas OK'
     do ii=1,nlev_cas
-       print*,'apres read_SCM_cas, plev_cas=',ii,plev_cas(ii,1)
-       !print*,'apres read_SCM, plev_cas=',ii,omega_cas(ii,nt_cas/2+1)
+       PRINT*,'apres read_SCM_cas, plev_cas=',ii,plev_cas(ii,1)
+       !PRINT*,'apres read_SCM, plev_cas=',ii,omega_cas(ii,nt_cas/2+1)
     enddo
 
@@ -414,9 +414,9 @@
     ierr=nf90_inq_varid(nid,'ta',int_test)
     if(ierr/=nf90_noerr) then
-       print*, '++++++++++++++++++++++++++++++'
-       print*, 'variable ta missing in cas.nc '
-       print*, 'You are probably using an obsolete version of the 1D cases'
-       print*, 'please dowload the last version of the 1D archive from https://lmdz.lmd.jussieu.fr/pub/'
-       print*, '++++++++++++++++++++++++++++++'
+       PRINT*, '++++++++++++++++++++++++++++++'
+       PRINT*, 'variable ta missing in cas.nc '
+       PRINT*, 'You are probably using an obsolete version of the 1D cases'
+       PRINT*, 'please dowload the last version of the 1D archive from https://lmdz.lmd.jussieu.fr/pub/'
+       PRINT*, '++++++++++++++++++++++++++++++'
        CALL abort_gcm ('mod_1D_cases_read_std','bad version of 1D directory',0)
     endif
@@ -430,5 +430,5 @@
        missing_var(i)=0.
        ierr=nf90_inq_varid(nid,name_var(i),var3didin(i))
-       print*, 'name_var(i)', name_var(i), var3didin(i)
+       PRINT*, 'name_var(i)', name_var(i), var3didin(i)
        if(ierr/=nf90_noerr) then
           print *,'Variable manquante dans cas.nc:',i,name_var(i)
@@ -447,5 +447,5 @@
              if ( name_var(i) == 'va_nud' .and. nint(nudging_v)==0) stop 'Nudging inconsistency v'
           ELSE
-             print*,'GUIDAGE : CONSISTENCY CHECK DEACTIVATED FOR TESTS of SANDU/REF'
+             PRINT*,'GUIDAGE : CONSISTENCY CHECK DEACTIVATED FOR TESTS of SANDU/REF'
           ENDIF
 
@@ -471,5 +471,5 @@
                 stop "getvarup"
              endif
-             print*,'Lecture de la variable #i ',i,name_var(i),minval(resul1),maxval(resul1)
+             PRINT*,'Lecture de la variable #i ',i,name_var(i),minval(resul1),maxval(resul1)
 
              !-----------------------------------------------------------------------
@@ -484,5 +484,5 @@
                 stop "getvarup"
              endif
-             print*,'Lecture de la variable #i ',i,name_var(i),minval(resul),maxval(resul)
+             PRINT*,'Lecture de la variable #i ',i,name_var(i),minval(resul),maxval(resul)
 
              !-----------------------------------------------------------------------
@@ -496,5 +496,5 @@
                 stop "getvarup"
              endif
-             print*,'Lecture de la variable #i  ',i,name_var(i),minval(resul2),maxval(resul2)
+             PRINT*,'Lecture de la variable #i  ',i,name_var(i),minval(resul2),maxval(resul2)
 
              !-----------------------------------------------------------------------
@@ -508,5 +508,5 @@
                 stop "getvarup"
              endif
-             print*,'Lecture de la variable #i ',i,name_var(i),resul3
+             PRINT*,'Lecture de la variable #i ',i,name_var(i),resul3
           endif
        endif
@@ -600,6 +600,6 @@
        resul3=0.
     enddo
-    print*,'Lecture de la variable APRES ,sens ',minval(sens),maxval(sens)
-    print*,'Lecture de la variable APRES ,flat ',minval(flat),maxval(flat)
+    PRINT*,'Lecture de la variable APRES ,sens ',minval(sens),maxval(sens)
+    PRINT*,'Lecture de la variable APRES ,flat ',minval(flat),maxval(flat)
 
     !CR:ATTENTION EN ATTENTE DE REGLER LA QUESTION DU PAS DE TEMPS INITIAL
@@ -726,7 +726,7 @@
 
 
-    print*,'Check time',day1,day_ju_ini_cas,day_deb+1,pdt_cas
+    PRINT*,'Check time',day1,day_ju_ini_cas,day_deb+1,pdt_cas
     !       do k=1,nlev_cas
-    !       print*,'debut de interp2_case_time, plev_cas=',k,plev_cas(k,1)
+    !       PRINT*,'debut de interp2_case_time, plev_cas=',k,plev_cas(k,1)
     !       enddo
 
@@ -738,16 +738,16 @@
     ! Check that initial day of the simulation consistent with AMMA case:
     !      if (annee_ref.ne.2006) then
-    !       print*,'Pour AMMA, annee_ref doit etre 2006'
-    !       print*,'Changer annee_ref dans run.def'
+    !       PRINT*,'Pour AMMA, annee_ref doit etre 2006'
+    !       PRINT*,'Changer annee_ref dans run.def'
     !       stop
     !      endif
     !      if (annee_ref.eq.2006 .and. day1.lt.day_cas) then
-    !       print*,'AMMA a debute le 10 juillet 2006',day1,day_cas
-    !       print*,'Changer dayref dans run.def'
+    !       PRINT*,'AMMA a debute le 10 juillet 2006',day1,day_cas
+    !       PRINT*,'Changer dayref dans run.def'
     !       stop
     !      endif
     !      if (annee_ref.eq.2006 .and. day1.gt.day_cas+1) then
-    !       print*,'AMMA a fini le 11 juillet'
-    !       print*,'Changer dayref ou nday dans run.def'
+    !       PRINT*,'AMMA a fini le 11 juillet'
+    !       PRINT*,'Changer dayref ou nday dans run.def'
     !       stop
     !      endif
@@ -1208,5 +1208,5 @@
 
     return
-  end SUBROUTINE interp2_case_vertical_std
+  END SUBROUTINE  interp2_case_vertical_std
   !***************************************************************************** 
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/old_1DUTILS_read_interp.h
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/old_1DUTILS_read_interp.h	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/old_1DUTILS_read_interp.h	(revision 5103)
@@ -80,5 +80,5 @@
       real plev_min
 
-      print*,'nlev_sandu',nlev_sandu
+      PRINT*,'nlev_sandu',nlev_sandu
       plev_min = 55000.  ! pas de tendance de vap. d eau au-dessus de 55 hPa
 
@@ -118,5 +118,5 @@
        real plev_min
 
-      print*,'nlev_astex',nlev_astex
+      PRINT*,'nlev_astex',nlev_astex
        plev_min = 55000.  ! pas de tendance de vap. d eau au-dessus de 55 hPa
 
@@ -305,5 +305,5 @@
 
 !dimensions lecture
-      call catchaxis(nid,ntime,nlevel,time,lev,ierr)
+      CALL catchaxis(nid,ntime,nlevel,time,lev,ierr)
 
 !pressure 
@@ -803,5 +803,5 @@
 
       
-      print*,fich_rico
+      PRINT*,fich_rico
       open(21,file=trim(fich_rico),form='formatted')
         do k=1,llm
@@ -829,5 +829,5 @@
           endif
         enddo
-        print*,k,zlay(k)
+        PRINT*,k,zlay(k)
         ! U
         if(0 < zlay(k) .and. zlay(k) < 4000) then
@@ -962,11 +962,11 @@
 ! Check that initial day of the simulation consistent with SANDU period:
        if (annee_ref.ne.2006 ) then
-        print*,'Pour SANDUREF, annee_ref doit etre 2006 '
-        print*,'Changer annee_ref dans run.def'
+        PRINT*,'Pour SANDUREF, annee_ref doit etre 2006 '
+        PRINT*,'Changer annee_ref dans run.def'
         stop
        endif
 !      if (annee_ref.eq.2006 .and. day1.lt.day_ini_sandu) then
-!       print*,'SANDUREF debute le 15 Juillet 2006 (jour julien=196)'
-!       print*,'Changer dayref dans run.def'
+!       PRINT*,'SANDUREF debute le 15 Juillet 2006 (jour julien=196)'
+!       PRINT*,'Changer dayref dans run.def'
 !       stop
 !      endif
@@ -1003,5 +1003,5 @@
      &          -frac*(ts_sandu(it_sandu2)-ts_sandu(it_sandu1))
 
-         print*,                                                           &
+         PRINT*,                                                           &
      &'day,annee_ref,day_ini_sandu,timeit,it_sandu1,it_sandu2,SST:',       &
      &day,annee_ref,day_ini_sandu,timeit/86400.,it_sandu1,                  &
@@ -1029,5 +1029,5 @@
       integer iy,im,id,ih,in
 
-      print*,'nlev_armcu',nlev_armcu
+      PRINT*,'nlev_armcu',nlev_armcu
 
       open(21,file=trim(fich_armcu),form='formatted')
@@ -1484,11 +1484,11 @@
 ! Check that initial day of the simulation consistent with ASTEX period:
        if (annee_ref.ne.1992 ) then
-        print*,'Pour Astex, annee_ref doit etre 1992 '
-        print*,'Changer annee_ref dans run.def'
+        PRINT*,'Pour Astex, annee_ref doit etre 1992 '
+        PRINT*,'Changer annee_ref dans run.def'
         stop
        endif
        if (annee_ref.eq.1992 .and. day1.lt.day_ini_astex) then
-        print*,'Astex debute le 13 Juin 1992 (jour julien=165)'
-        print*,'Changer dayref dans run.def'
+        PRINT*,'Astex debute le 13 Juin 1992 (jour julien=165)'
+        PRINT*,'Changer dayref dans run.def'
         stop
        endif
@@ -1535,5 +1535,5 @@
      &          -frac*(vfa_astex(it_astex2)-vfa_astex(it_astex1))
 
-         print*,                                                           &
+         PRINT*,                                                           &
      &'day,annee_ref,day_ini_astex,timeit,it_astex1,it_astex2,SST:',       &
      &day,annee_ref,day_ini_astex,timeit/86400.,it_astex1,                 &
@@ -1589,16 +1589,16 @@
 ! Check that initial day of the simulation consistent with TOGA-COARE period:
        if (annee_ref.ne.1992 .and. annee_ref.ne.1993) then
-        print*,'Pour TOGA-COARE, annee_ref doit etre 1992 ou 1993'
-        print*,'Changer annee_ref dans run.def'
+        PRINT*,'Pour TOGA-COARE, annee_ref doit etre 1992 ou 1993'
+        PRINT*,'Changer annee_ref dans run.def'
         stop
        endif
        if (annee_ref.eq.1992 .and. day1.lt.day_ini_toga) then
-        print*,'TOGA-COARE a debute le 1er Nov 1992 (jour julien=306)'
-        print*,'Changer dayref dans run.def'
+        PRINT*,'TOGA-COARE a debute le 1er Nov 1992 (jour julien=306)'
+        PRINT*,'Changer dayref dans run.def'
         stop
        endif
        if (annee_ref.eq.1993 .and. day1.gt.day_ini_toga+119) then
-        print*,'TOGA-COARE a fini le 28 Feb 1993 (jour julien=59)'
-        print*,'Changer dayref ou nday dans run.def'
+        PRINT*,'TOGA-COARE a fini le 28 Feb 1993 (jour julien=59)'
+        PRINT*,'Changer dayref ou nday dans run.def'
         stop
        endif
@@ -1608,16 +1608,16 @@
 ! Check that initial day of the simulation consistent with TWP-ICE period:
        if (annee_ref.ne.2006) then
-        print*,'Pour TWP-ICE, annee_ref doit etre 2006'
-        print*,'Changer annee_ref dans run.def'
+        PRINT*,'Pour TWP-ICE, annee_ref doit etre 2006'
+        PRINT*,'Changer annee_ref dans run.def'
         stop
        endif
        if (annee_ref.eq.2006 .and. day1.lt.day_ini_toga) then
-        print*,'TWP-ICE a debute le 17 Jan 2006 (jour julien=17)'
-        print*,'Changer dayref dans run.def'
+        PRINT*,'TWP-ICE a debute le 17 Jan 2006 (jour julien=17)'
+        PRINT*,'Changer dayref dans run.def'
         stop
        endif
        if (annee_ref.eq.2006 .and. day1.gt.day_ini_toga+26) then
-        print*,'TWP-ICE a fini le 12 Feb 2006 (jour julien=43)'
-        print*,'Changer dayref ou nday dans run.def'
+        PRINT*,'TWP-ICE a fini le 12 Feb 2006 (jour julien=43)'
+        PRINT*,'Changer dayref ou nday dans run.def'
         stop
        endif
@@ -1653,5 +1653,5 @@
      &          -frac*(ts_toga(it_toga2)-ts_toga(it_toga1))
 
-!        print*,
+!        PRINT*,
 !     :'day,annee_ref,day_ini_toga,timeit,it_toga1,it_toga2,SST:',
 !     :day,annee_ref,day_ini_toga,timeit/86400.,it_toga1,it_toga2,ts_prof
@@ -1733,16 +1733,16 @@
        print *,'day_ini_dice=',day_ini_dice
        if (annee_ref.ne.1999) then
-        print*,'Pour Dice, annee_ref doit etre 1999'
-        print*,'Changer annee_ref dans run.def'
+        PRINT*,'Pour Dice, annee_ref doit etre 1999'
+        PRINT*,'Changer annee_ref dans run.def'
         stop
        endif
        if (annee_ref.eq.1999 .and. day1.gt.day_ini_dice) then
-        print*,'Dice a debute le 23 Oct 1999 (jour julien=296)'
-        print*,'Changer dayref dans run.def',day1,day_ini_dice
+        PRINT*,'Dice a debute le 23 Oct 1999 (jour julien=296)'
+        PRINT*,'Changer dayref dans run.def',day1,day_ini_dice
         stop
        endif
        if (annee_ref.eq.1999 .and. day1.gt.day_ini_dice+2) then
-        print*,'Dice a fini le 25 Oct 1999 (jour julien=298)'
-        print*,'Changer dayref ou nday dans run.def',day1,day_ini_dice
+        PRINT*,'Dice a fini le 25 Oct 1999 (jour julien=298)'
+        PRINT*,'Changer dayref ou nday dans run.def',day1,day_ini_dice
         stop
        endif
@@ -1784,5 +1784,5 @@
        vg_prof = vg_dice(it_dice2)-frac*(vg_dice(it_dice2)-vg_dice(it_dice1))
 
-!        print*,
+!        PRINT*,
 !     :'day,annee_ref,day_ini_dice,timeit,it_dice1,it_dice2,SST:',
 !     :day,annee_ref,day_ini_dice,timeit/86400.,it_dice1,it_dice2,ts_prof
@@ -1841,16 +1841,16 @@
        print *,'day_ini_gabls4=',day_ini_gabls4
        if (annee_ref.ne.2009) then
-        print*,'Pour gabls4, annee_ref doit etre 2009'
-        print*,'Changer annee_ref dans run.def'
+        PRINT*,'Pour gabls4, annee_ref doit etre 2009'
+        PRINT*,'Changer annee_ref dans run.def'
         stop
        endif
        if (annee_ref.eq.2009 .and. day1.gt.day_ini_gabls4) then
-        print*,'gabls4 a debute le 11 dec 2009 (jour julien=345)'
-        print*,'Changer dayref dans run.def',day1,day_ini_gabls4
+        PRINT*,'gabls4 a debute le 11 dec 2009 (jour julien=345)'
+        PRINT*,'Changer dayref dans run.def',day1,day_ini_gabls4
         stop
        endif
        if (annee_ref.eq.2009 .and. day1.gt.day_ini_gabls4+2) then
-        print*,'gabls4 a fini le 12 dec 2009 (jour julien=346)'
-        print*,'Changer dayref ou nday dans run.def',day1,day_ini_gabls4
+        PRINT*,'gabls4 a fini le 12 dec 2009 (jour julien=346)'
+        PRINT*,'Changer dayref ou nday dans run.def',day1,day_ini_gabls4
         stop
        endif
@@ -1921,6 +1921,6 @@
 ! Check that initial day of the simulation consistent with ARMCU period:
        if (annee_ref.ne.1997 ) then
-        print*,'Pour ARMCU, annee_ref doit etre 1997 '
-        print*,'Changer annee_ref dans run.def'
+        PRINT*,'Pour ARMCU, annee_ref doit etre 1997 '
+        PRINT*,'Changer annee_ref dans run.def'
         stop
        endif
@@ -1958,5 +1958,5 @@
      &          -frac*(aqt_armcu(it_armcu2)-aqt_armcu(it_armcu1))
 
-         print*,                                                           &
+         PRINT*,                                                           &
      &'day,annee_ref,day_ini_armcu,timeit,it_armcu1,it_armcu2,SST:',       &
      &day,annee_ref,day_ini_armcu,timeit/86400.,it_armcu1,                 &
@@ -1975,5 +1975,5 @@
 
         integer nlev_max,kmax,kmax2,ntrac
-        logical :: llesread = .true.
+        logical :: llesread = .TRUE.
 
         real height(nlev_max),thlprof(nlev_max),qtprof(nlev_max),          &
@@ -2022,5 +2022,5 @@
        open(ilesfile,file='trac.inp.001',status='old',iostat=ierr)
         if (ierr /= 0) then
-            print*,'WARNING : trac.inp does not exist'
+            PRINT*,'WARNING : trac.inp does not exist'
         else
         read (ilesfile,*) kmax2,nt1,nt2
@@ -2048,5 +2048,5 @@
 
         integer nlev_max,kmax
-        logical :: llesread = .true.
+        logical :: llesread = .TRUE.
 
         real height(nlev_max),pprof(nlev_max),tprof(nlev_max)
@@ -2080,5 +2080,5 @@
 
         integer nlev_max,kmax
-        logical :: llesread = .true.
+        logical :: llesread = .TRUE.
 
         real height(nlev_max),pprof(nlev_max),tprof(nlev_max),             &
@@ -2114,5 +2114,5 @@
 
         integer nlev_max,kmax
-        logical :: llesread = .true.
+        logical :: llesread = .TRUE.
 
         real height(nlev_max),pprof(nlev_max),tprof(nlev_max)
@@ -2277,5 +2277,5 @@
       endif
 !dimensions lecture
-!      call catchaxis(nid,ntime,nlevel,time,z,ierr)
+!      CALL catchaxis(nid,ntime,nlevel,time,z,ierr)
  
          ierr = nf90_get_var(nid,var3didin(1),zz)
@@ -2547,5 +2547,5 @@
       endif
 !dimensions lecture
-!      call catchaxis(nid,ntime,nlevel,time,z,ierr)
+!      CALL catchaxis(nid,ntime,nlevel,time,z,ierr)
  
          ierr = nf90_get_var(nid,var3didin(1),zz)
@@ -2842,5 +2842,5 @@
 
 !dimensions lecture
-!      call catchaxis(nid,ntime,nlevel,time,z,ierr)
+!      CALL catchaxis(nid,ntime,nlevel,time,z,ierr)
  
          ierr = nf90_get_var(nid,var3didin(1),zz_i)
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/old_1D_decl_cases.h
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/old_1D_decl_cases.h	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/old_1D_decl_cases.h	(revision 5103)
@@ -225,5 +225,5 @@
         parameter (day_ini_sandu=15)  ! 196 = 15 juillet 2006
         real dt_sandu, tau_sandu
-        logical  :: trouve_700=.true.
+        logical  :: trouve_700=.TRUE.
         parameter (dt_sandu=6.*3600.)   ! forcages donnes ttes les 6 heures par ifa_sandu.txt
         parameter (tau_sandu=30000*3600.)  ! temps de relaxation u,v,thetal,qt vers profil init et au dessus 700hPa
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/old_1D_interp_cases.h
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/old_1D_interp_cases.h	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/old_1D_interp_cases.h	(revision 5103)
@@ -16,5 +16,5 @@
       if (forcing_GCSSold) then
 
-       call get_uvd(it,timestep,fich_gcssold_ctl,fich_gcssold_dat,              &
+       CALL get_uvd(it,timestep,fich_gcssold_ctl,fich_gcssold_dat,              &
      &               ht_gcssold,hq_gcssold,hw_gcssold,                          &
      &               hu_gcssold,hv_gcssold,                                     &
@@ -50,5 +50,5 @@
 
        if (prt_level.ge.1) then
-        print*,                                                             &
+        PRINT*,                                                             &
      & '#### ITAP,day,day1,(day-day1)*86400,(day-day1)*86400/dt_toga=',     &
      &    day,day1,(day-day1)*86400.,(day-day1)*86400/dt_toga
@@ -96,5 +96,5 @@
 
        if (prt_level.ge.1) then
-        print*,'#### ITAP,day,day1,(day-day1)*86400,(day-day1)*86400/dt_dice=',&
+        PRINT*,'#### ITAP,day,day1,(day-day1)*86400,(day-day1)*86400/dt_dice=',&
      &    day,day1,(day-day1)*86400.,(day-day1)*86400/dt_dice
        endif
@@ -197,5 +197,5 @@
 
        if (prt_level.ge.1) then
-        print*,'#### ITAP,day,day1,(day-day1)*86400,(day-day1)*86400/dt_gabls4=',&
+        PRINT*,'#### ITAP,day,day1,(day-day1)*86400,(day-day1)*86400/dt_gabls4=',&
      &    day,day1,(day-day1)*86400.,(day-day1)*86400/dt_gabls4
        endif
@@ -238,5 +238,5 @@
       if (forcing_twpice) then
 
-        print*,                                                             &
+        PRINT*,                                                             &
      & '#### ITAP,day,day1,(day-day1)*86400,(day-day1)*86400/dt_twpi=',     &
      &    daytime,day1,(daytime-day1)*86400.,                               &
@@ -316,7 +316,7 @@
         if (cptadvw) then
         d_t_adv(l) = alpha*omega(l)/rcpd+ht_mod(l)-d_t_dyn_z(l)
-!        print*,'temp vert adv',l,ht_mod(l),vt_mod(l),-d_t_dyn_z(l)
+!        PRINT*,'temp vert adv',l,ht_mod(l),vt_mod(l),-d_t_dyn_z(l)
         d_q_adv(l,1) = hq_mod(l)-d_q_dyn_z(l)
-!        print*,'q vert adv',l,hq_mod(l),vq_mod(l),-d_q_dyn_z(l)
+!        PRINT*,'q vert adv',l,hq_mod(l),vq_mod(l),-d_q_dyn_z(l)
         else
         d_t_adv(l) = alpha*omega(l)/rcpd+(ht_mod(l)+vt_mod(l))
@@ -335,5 +335,5 @@
        if (forcing_amma) then
 
-        print*,                                                             &
+        PRINT*,                                                             &
      & '#### ITAP,day,day1,(day-day1)*86400,(day-day1)*86400/dt_amma=',     &
      &    daytime,day1,(daytime-day1)*86400.,                               &
@@ -347,5 +347,5 @@
      &       ,sens_profamma)
 
-      print*,'apres interpolation temporelle AMMA'
+      PRINT*,'apres interpolation temporelle AMMA'
 
       do k=1,nlev_amma
@@ -397,8 +397,8 @@
      &         ht_mod(l)*(play(l)/pzero)**rkappa-omega(l)*d_t_z(l)
 !        d_t_adv(l) = 0.
-!        print*,'temp vert adv',l,ht_mod(l),vt_mod(l),-d_t_dyn_z(l)
+!        PRINT*,'temp vert adv',l,ht_mod(l),vt_mod(l),-d_t_dyn_z(l)
         d_q_adv(l,1) = hq_mod(l)-omega(l)*d_q_z(l)
 !        d_q_adv(l,1) = 0.
-!        print*,'q vert adv',l,hq_mod(l),vq_mod(l),-d_q_dyn_z(l)
+!        PRINT*,'q vert adv',l,hq_mod(l),vq_mod(l),-d_q_dyn_z(l)
    
        dt_cooling(l) = 0.0
@@ -406,5 +406,5 @@
 
 
-!     ok_flux_surf=.false.
+!     ok_flux_surf=.FALSE.
       fsens=-1.*sens_profamma
       flat=-1.*lat_profamma
@@ -417,6 +417,6 @@
 !---------------------------------------------------------------------
       if (forcing_rico) then
-!      call lstendH(llm,omega,dt_dyn,dq_dyn,du_dyn, dv_dyn,q,temp,u,v,play)
-       call lstendH(llm,nqtot,omega,dt_dyn,dq_dyn,q,temp,u,v,play)
+!      CALL lstendH(llm,omega,dt_dyn,dq_dyn,du_dyn, dv_dyn,q,temp,u,v,play)
+       CALL lstendH(llm,nqtot,omega,dt_dyn,dq_dyn,q,temp,u,v,play)
 
         do l=1,llm
@@ -432,5 +432,5 @@
       if (forcing_armcu) then
 
-        print*,                                                             &
+        PRINT*,                                                             &
      & '#### ITAP,day,day1,(day-day1)*86400,(day-day1)*86400/dt_armcu=',    &
      &    day,day1,(day-day1)*86400.,(day-day1)*86400/dt_armcu
@@ -488,5 +488,5 @@
       if (forcing_sandu) then
 
-        print*,                                                             &
+        PRINT*,                                                             &
      & '#### ITAP,day,day1,(day-day1)*86400,(day-day1)*86400/dt_sandu=',    &
      &    day,day1,(day-day1)*86400.,(day-day1)*86400/dt_sandu 
@@ -558,7 +558,7 @@
 !calcul de l'advection verticale
         d_t_adv(l) = alpha*omega(l)/rcpd-d_t_dyn_z(l)
-!        print*,'temp adv',l,-d_t_dyn_z(l)
+!        PRINT*,'temp adv',l,-d_t_dyn_z(l)
         d_q_adv(l,1) = -d_q_dyn_z(l)
-!        print*,'q adv',l,-d_q_dyn_z(l)
+!        PRINT*,'q adv',l,-d_q_dyn_z(l)
        dt_cooling(l) = 0.0
       enddo
@@ -570,5 +570,5 @@
       if (forcing_astex) then
 
-        print*,                                                             &
+        PRINT*,                                                             &
      & '#### ITAP,day,day1,(day-day1)*86400,(day-day1)*86400/dt_astex=',    &
      &    day,day1,(day-day1)*86400.,(day-day1)*86400/dt_astex
@@ -640,7 +640,7 @@
 !calcul de l'advection verticale
         d_t_adv(l) = alpha*omega(l)/rcpd-d_t_dyn_z(l)
-!        print*,'temp adv',l,-d_t_dyn_z(l)
+!        PRINT*,'temp adv',l,-d_t_dyn_z(l)
         d_q_adv(l,1) = -d_q_dyn_z(l)
-!        print*,'q adv',l,-d_q_dyn_z(l)
+!        PRINT*,'q adv',l,-d_q_dyn_z(l)
        dt_cooling(l) = 0.0
       enddo
@@ -653,7 +653,7 @@
       if (forcing_case) then
 
-         print*,'FORCING CASE forcing_case'
-
-        print*,                                                             &
+         PRINT*,'FORCING CASE forcing_case'
+
+        PRINT*,                                                             &
      & '#### ITAP,day,day1,(day-day1)*86400,(day-day1)*86400/pdt_cas=',     &
      &    daytime,day1,(daytime-day1)*86400.,                               &
@@ -826,6 +826,6 @@
       if (forcing_case2 .OR. forcing_SCM) then
 
-         print*,'FORCING CASE forcing_case2'
-        print*,                                                             &
+         PRINT*,'FORCING CASE forcing_case2'
+        PRINT*,                                                             &
      & '#### ITAP,day,day1,(day-day1)*86400,(day-day1)*86400/pdt_cas=',     &
      &    daytime,day1,(daytime-day1)*86400.,                               &
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/old_1D_read_forc_cases.h
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/old_1D_read_forc_cases.h	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/old_1D_read_forc_cases.h	(revision 5103)
@@ -19,5 +19,5 @@
 !----------------------------------------------------------------------
       fich_fire='fire.nc'
-      call read_fire(fich_fire,nlev_fire,nt_fire                                &
+      CALL read_fire(fich_fire,nlev_fire,nt_fire                                &
      &     ,height,tttprof,qtprof,uprof,vprof,e12prof                           &
      &     ,ugprof,vgprof,wfls,dqtdxls                                          &
@@ -31,5 +31,5 @@
 !----------------------------------------------------------------------
 
-      call readprofiles(nlev_max,kmax,nqtot,height,                             &
+      CALL readprofiles(nlev_max,kmax,nqtot,height,                             &
      &           tttprof,qtprof,uprof,vprof,                                    &
      &           e12prof,ugprof,vgprof,                                         &
@@ -78,5 +78,5 @@
           print *,'k l height(k) height(k-1) zlay(l) frac=',k,l,height(k),height(k-1),zlay(l),frac
           frac = (height(k)-zlay(l))/(height(k)-height(k-1))
-          if(l==1) print*,'k, height, tttprof',k,height(k),tttprof(k)
+          if(l==1) PRINT*,'k, height, tttprof',k,height(k),tttprof(k)
           if(zlay(l)>height(k-1).and.zlay(l)<height(k)) then
             ttt =tttprof(k)-frac*(tttprof(k)-tttprof(k-1))
@@ -145,6 +145,6 @@
        fich_gcssold_ctl = './forcing.ctl'
        fich_gcssold_dat = './forcing8.dat'
-       call copie(llm,play,psurf,fich_gcssold_ctl)
-       call get_uvd2(it,timestep,fich_gcssold_ctl,fich_gcssold_dat,         &
+       CALL copie(llm,play,psurf,fich_gcssold_ctl)
+       CALL get_uvd2(it,timestep,fich_gcssold_ctl,fich_gcssold_dat,         &
      &               ht_gcssold,hq_gcssold,hw_gcssold,                      &
      &               hu_gcssold,hv_gcssold,                                 &
@@ -160,10 +160,10 @@
       if (forcing_rico) then
 
-!       call writefield_phy('omega', omega,llm+1)
+!       CALL writefield_phy('omega', omega,llm+1)
       fich_rico = 'rico.txt'
-       call read_rico(fich_rico,nlev_rico,ps_rico,play                      &
+       CALL read_rico(fich_rico,nlev_rico,ps_rico,play                      &
      &             ,ts_rico,t_rico,q_rico,u_rico,v_rico,w_rico              &
      &             ,dth_rico,dqh_rico)
-        print*, ' on a lu et prepare RICO'
+        PRINT*, ' on a lu et prepare RICO'
 
        mxcalc=llm
@@ -242,5 +242,5 @@
 !read TWP-ICE forcings
      fich_twpice='d_twpi/twp180iopsndgvarana_v2.1_C3.c1.20060117.000000.cdf'
-      call read_twpice(fich_twpice,nlev_twpi,nt_twpi                        &
+      CALL read_twpice(fich_twpice,nlev_twpi,nt_twpi                        &
      &     ,ts_twpi,plev_twpi,t_twpi,q_twpi,u_twpi,v_twpi,w_twpi            &
      &     ,ht_twpi,vt_twpi,hq_twpi,vq_twpi)
@@ -295,5 +295,5 @@
       if (forcing_amma) then
 
-      call read_1D_cases
+      CALL read_1D_cases
 
       write(*,*) 'Forcing AMMA lu'
@@ -352,5 +352,5 @@
       
 
-!     ok_flux_surf=.false.
+!     ok_flux_surf=.FALSE.
       fsens=-1.*sens_amma(12)
       flat=-1.*lat_amma(12)
@@ -367,5 +367,5 @@
 !read DICE forcings
       fich_dice='dice_driver.nc'
-      call read_dice(fich_dice,nlev_dice,nt_dice                    &
+      CALL read_dice(fich_dice,nlev_dice,nt_dice                    &
      &     ,zz_dice,plev_dice,t_dice,qv_dice,u_dice,v_dice,o3_dice &
      &     ,shf_dice,lhf_dice,lwup_dice,swup_dice,tg_dice,ustar_dice& 
@@ -453,5 +453,5 @@
       
 
-!     ok_flux_surf=.false.
+!     ok_flux_surf=.FALSE.
       fsens=-1.*shf_dice(1)
       flat=-1.*lhf_dice(1)
@@ -485,5 +485,5 @@
       
        	
-      call read_gabls4(fich_gabls4,nlev_gabls4,nt_gabls4,nsol_gabls4,zz_gabls4,depth_sn_gabls4,ug_gabls4,vg_gabls4 &
+      CALL read_gabls4(fich_gabls4,nlev_gabls4,nt_gabls4,nsol_gabls4,zz_gabls4,depth_sn_gabls4,ug_gabls4,vg_gabls4 &
      & ,plev_gabls4,th_gabls4,t_gabls4,qv_gabls4,u_gabls4,v_gabls4,ht_gabls4,hq_gabls4,tg_gabls4,tsnow_gabls4,snow_dens_gabls4)
 
@@ -611,5 +611,5 @@
 !----------------------------------------------------------------------
 
-      call readprofile_armcu(nlev_max,kmax,height,play_mod,u_mod,           &
+      CALL readprofile_armcu(nlev_max,kmax,height,play_mod,u_mod,           &
      &           v_mod,theta_mod,t_mod,qv_mod,rv_mod,ap,bp)
 
@@ -702,5 +702,5 @@
 !----------------------------------------------------------------------
 
-      call readprofile_sandu(nlev_max,kmax,height,plev_profs,t_profs,       &
+      CALL readprofile_sandu(nlev_max,kmax,height,plev_profs,t_profs,       &
      &           thl_profs,q_profs,u_profs,v_profs,                         &
      &           w_profs,omega_profs,o3mmr_profs)
@@ -777,5 +777,5 @@
 !----------------------------------------------------------------------
 
-      call readprofile_astex(nlev_max,kmax,height,plev_profa,t_profa,       &
+      CALL readprofile_astex(nlev_max,kmax,height,plev_profa,t_profa,       &
      &           thl_profa,qv_profa,ql_profa,qt_profa,u_profa,v_profa,      &
      &           w_profa,tke_profa,o3mmr_profa)
@@ -841,6 +841,6 @@
       if (forcing_case) then
 
-         write(*,*) 'avant call read_1D_cas'
-         call read_1D_cas
+         write(*,*) 'avant CALL read_1D_cas'
+         CALL read_1D_cas
          write(*,*) 'Forcing read'
 
@@ -916,6 +916,6 @@
       if (forcing_case2) then
 
-         write(*,*) 'avant call read2_1D_cas'
-         call read2_1D_cas
+         write(*,*) 'avant CALL read2_1D_cas'
+         CALL read2_1D_cas
          write(*,*) 'Forcing read'
 
@@ -1015,6 +1015,6 @@
       if (forcing_SCM) then
 
-         write(*,*) 'avant call old_read_SCM_cas'
-         call old_read_SCM_cas
+         write(*,*) 'avant CALL old_read_SCM_cas'
+         CALL old_read_SCM_cas
          write(*,*) 'Forcing read' 
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/old_lmdz1d.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/old_lmdz1d.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/old_lmdz1d.F90	(revision 5103)
@@ -1,737 +1,734 @@
-
 ! $Id: lmdz1d.F90 3540 2019-06-25 14:50:13Z fairhead $
 
-      SUBROUTINE old_lmdz1d
-
-   USE ioipsl, only: ju2ymds, ymds2ju, ioconf_calendar,getin
-   USE phys_state_var_mod, ONLY: phys_state_var_init, phys_state_var_end, &
-       clwcon, detr_therm, &
-       qsol, fevap, z0m, z0h, agesno, &
-       du_gwd_rando, du_gwd_front, entr_therm, f0, fm_therm, &
-       falb_dir, falb_dif, &
-       ftsol, beta_aridity, pbl_tke, pctsrf, radsol, rain_fall, snow_fall, ratqs, &
-       rnebcon, rugoro, sig1, w01, solaire_etat0, sollw, sollwdown, &
-       solsw, solswfdiff, t_ancien, q_ancien, u_ancien, v_ancien, rneb_ancien, &
-       wake_delta_pbl_TKE, delta_tsurf, wake_fip, wake_pe, &
-       wake_deltaq, wake_deltat, wake_s, awake_s, wake_dens, &
-       awake_dens, cv_gen, wake_cstar, &
-       zgam, zmax0, zmea, zpic, zsig, &
-       zstd, zthe, zval, ale_bl, ale_bl_trig, alp_bl, ql_ancien, qs_ancien, &
-       prlw_ancien, prsw_ancien, prw_ancien, &
-       u10m,v10m,ale_wake,ale_bl_stat
-
-  
-   USE dimphy
-   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 infotrac ! new
-   USE control_mod
-   USE indice_sol_mod
-   USE phyaqua_mod
-!  USE mod_1D_cases_read
-   USE mod_1D_cases_read2
-   USE mod_1D_amma_read
-   USE print_control_mod, ONLY: lunout, prt_level
-   USE iniphysiq_mod, ONLY: iniphysiq
-   USE mod_const_mpi, ONLY: comm_lmdz
-   USE physiq_mod, ONLY: physiq
-   USE comvert_mod, ONLY: presnivs, ap, bp, dpres,nivsig, nivsigs, pa, &
-                          preff, aps, bps, pseudoalt, scaleheight
-   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 mod_1D_cases_read, ONLY: interp_case_time ! used in included old_1D_read_forc_cases.h
-
-
-      implicit none
-      INCLUDE "dimensions.h"
-      INCLUDE "YOMCST.h"
-!!      INCLUDE "control.h"
-      INCLUDE "clesphys.h"
-      INCLUDE "dimsoil.h"
-!      INCLUDE "indicesol.h"
-
-      INCLUDE "compar1d.h"
-      INCLUDE "flux_arp.h"
-      INCLUDE "date_cas.h"
-      INCLUDE "tsoilnudge.h"
-      INCLUDE "fcg_gcssold.h"
-!!!      INCLUDE "fbforcing.h"
-      INCLUDE "compbl.h"
-
-!=====================================================================
-! DECLARATIONS
-!=====================================================================
-
-!---------------------------------------------------------------------
-!  Externals
-!---------------------------------------------------------------------
-      external fq_sat
-      real fq_sat
-
-!---------------------------------------------------------------------
-!  Arguments d' initialisations de la physique (USER DEFINE)
-!---------------------------------------------------------------------
-
-      integer, parameter :: ngrid=1
-      real :: zcufi    = 1.
-      real :: zcvfi    = 1.
-
-!-      real :: nat_surf
-!-      logical :: ok_flux_surf
-!-      real :: fsens
-!-      real :: flat
-!-      real :: tsurf
-!-      real :: rugos
-!-      real :: qsol(1:2)
-!-      real :: qsurf
-!-      real :: psurf
-!-      real :: zsurf
-!-      real :: albedo
-!-
-!-      real :: time     = 0.
-!-      real :: time_ini
-!-      real :: xlat 
-!-      real :: xlon 
-!-      real :: wtsurf 
-!-      real :: wqsurf 
-!-      real :: restart_runoff 
-!-      real :: xagesno 
-!-      real :: qsolinp 
-!-      real :: zpicinp 
-!-
-      real :: fnday 
-      real :: day, daytime 
-      real :: day1
-      real :: heure
-      integer :: jour
-      integer :: mois
-      integer :: an
- 
-!---------------------------------------------------------------------
-!  Declarations related to forcing and initial profiles 
-!---------------------------------------------------------------------
-
-        integer :: kmax = llm
-        integer llm700,nq1,nq2
-        INTEGER, PARAMETER :: nlev_max=1000, nqmx=1000
-        real timestep, frac
-        real height(nlev_max),tttprof(nlev_max),qtprof(nlev_max)
-        real  uprof(nlev_max),vprof(nlev_max),e12prof(nlev_max)
-        real  ugprof(nlev_max),vgprof(nlev_max),wfls(nlev_max)
-        real  dqtdxls(nlev_max),dqtdyls(nlev_max)
-        real  dqtdtls(nlev_max),thlpcar(nlev_max)
-        real  qprof(nlev_max,nqmx)
-
-!        integer :: forcing_type
-        logical :: forcing_les     = .false.
-        logical :: forcing_armcu   = .false.
-        logical :: forcing_rico    = .false.
-        logical :: forcing_radconv = .false.
-        logical :: forcing_toga    = .false.
-        logical :: forcing_twpice  = .false.
-        logical :: forcing_amma    = .false.
-        logical :: forcing_dice    = .false.
-        logical :: forcing_gabls4  = .false.
-
-        logical :: forcing_GCM2SCM = .false.
-        logical :: forcing_GCSSold = .false.
-        logical :: forcing_sandu   = .false.
-        logical :: forcing_astex   = .false.
-        logical :: forcing_fire    = .false.
-        logical :: forcing_case    = .false.
-        logical :: forcing_case2   = .false.
-        logical :: forcing_SCM   = .false.
-        integer :: type_ts_forcing ! 0 = SST constant; 1 = SST read from a file
-!                                                            (cf read_tsurf1d.F)
-
-real wwww
-!vertical advection computation
-!       real d_t_z(llm), d_q_z(llm)
-!       real d_t_dyn_z(llm), dq_dyn_z(llm)
-!       real zz(llm)
-!       real zfact
-
-!flag forcings
-        logical :: nudge_wind=.true.
-        logical :: nudge_thermo=.false.
-        logical :: cptadvw=.true.
-!=====================================================================
-! DECLARATIONS FOR EACH CASE
-!=====================================================================
-
-      INCLUDE "old_1D_decl_cases.h"
-
-!---------------------------------------------------------------------
-!  Declarations related to nudging
-!---------------------------------------------------------------------
-     integer :: nudge_max
-     parameter (nudge_max=9)
-     integer :: inudge_RHT=1
-     integer :: inudge_UV=2
-     logical :: nudge(nudge_max)
-     real :: t_targ(llm)
-     real :: rh_targ(llm)
-     real :: u_targ(llm)
-     real :: v_targ(llm)
-
-!---------------------------------------------------------------------
-!  Declarations related to vertical discretization:
-!---------------------------------------------------------------------
-      real :: pzero=1.e5
-      real :: play (llm),zlay (llm),sig_s(llm),plev(llm+1)
-      real :: playd(llm),zlayd(llm),ap_amma(llm+1),bp_amma(llm+1)
-
-!---------------------------------------------------------------------
-!  Declarations related to variables
-!---------------------------------------------------------------------
-
-      real :: phi(llm)
-      real :: teta(llm),tetal(llm),temp(llm),u(llm),v(llm),w(llm)
-      REAL rot(1, llm) ! relative vorticity, in s-1
-      real :: rlat_rad(1),rlon_rad(1)
-      real :: omega(llm+1),omega2(llm),rho(llm+1)
-      real :: ug(llm),vg(llm),fcoriolis
-      real :: sfdt, cfdt
-      real :: du_phys(llm),dv_phys(llm),dt_phys(llm)
-      real :: dt_dyn(llm)
-      real :: dt_cooling(llm),d_t_adv(llm),d_t_nudge(llm)
-      real :: d_u_nudge(llm),d_v_nudge(llm)
-      real :: du_adv(llm),dv_adv(llm)
-      real :: du_age(llm),dv_age(llm)
-      real :: alpha
-      real :: ttt
-
-      REAL, ALLOCATABLE, DIMENSION(:,:):: q
-      REAL, ALLOCATABLE, DIMENSION(:,:):: dq
-      REAL, ALLOCATABLE, DIMENSION(:,:):: dq_dyn
-      REAL, ALLOCATABLE, DIMENSION(:,:):: d_q_adv
-      REAL, ALLOCATABLE, DIMENSION(:,:):: d_q_nudge
-!      REAL, ALLOCATABLE, DIMENSION(:):: d_th_adv
-
-!---------------------------------------------------------------------
-!  Initialization of surface variables
-!---------------------------------------------------------------------
-      real :: run_off_lic_0(1)
-      real :: fder(1),snsrf(1,nbsrf),qsurfsrf(1,nbsrf)
-      real :: tsoil(1,nsoilmx,nbsrf)
-!     real :: agesno(1,nbsrf)
-
-!---------------------------------------------------------------------
-!  Call to phyredem
-!---------------------------------------------------------------------
-      logical :: ok_writedem =.true.
-      real :: sollw_in = 0.
-      real :: solsw_in = 0.
-      
-!---------------------------------------------------------------------
-!  Call to physiq
-!---------------------------------------------------------------------
-      logical :: firstcall=.true.
-      logical :: lastcall=.false.
-      real :: phis(1)    = 0.0
-      real :: dpsrf(1)
-
-!---------------------------------------------------------------------
-!  Initializations of boundary conditions 
-!---------------------------------------------------------------------
-      real, allocatable :: phy_nat (:)  ! 0=ocean libre,1=land,2=glacier,3=banquise
-      real, allocatable :: phy_alb (:)  ! Albedo land only (old value condsurf_jyg=0.3)
-      real, allocatable :: phy_sst (:)  ! SST (will not be used; cf read_tsurf1d.F)
-      real, allocatable :: phy_bil (:)  ! Ne sert que pour les slab_ocean
-      real, allocatable :: phy_rug (:) ! Longueur rugosite utilisee sur land only
-      real, allocatable :: phy_ice (:) ! Fraction de glace
-      real, allocatable :: phy_fter(:) ! Fraction de terre
-      real, allocatable :: phy_foce(:) ! Fraction de ocean
-      real, allocatable :: phy_fsic(:) ! Fraction de glace
-      real, allocatable :: phy_flic(:) ! Fraction de glace
-
-!---------------------------------------------------------------------
-!  Fichiers et d'autres variables
-!---------------------------------------------------------------------
-      integer :: k,l,i,it=1,mxcalc
-      integer :: nsrf
-      integer jcode
-      INTEGER read_climoz 
-
-      integer :: it_end ! iteration number of the last call
-!Al1
-      integer ecrit_slab_oc !1=ecrit,-1=lit,0=no file
-      data ecrit_slab_oc/-1/
-
-!     if flag_inhib_forcing = 0, tendencies of forcing are added
-!                           <> 0, tendencies of forcing are not added
-      INTEGER :: flag_inhib_forcing = 0
-
-!=====================================================================
-! INITIALIZATIONS 
-!=====================================================================
-      du_phys(:)=0.
-      dv_phys(:)=0.
-      dt_phys(:)=0.
-      dt_dyn(:)=0.
-      dt_cooling(:)=0.
-      d_t_adv(:)=0.
-      d_t_nudge(:)=0.
-      d_u_nudge(:)=0.
-      d_v_nudge(:)=0.
-      du_adv(:)=0.
-      dv_adv(:)=0.
-      du_age(:)=0.
-      dv_age(:)=0.
-      
-! Initialization of Common turb_forcing
-       dtime_frcg = 0.
-       Turb_fcg_gcssold=.false.
-       hthturb_gcssold = 0.
-       hqturb_gcssold = 0.
-
-
-
-
-!---------------------------------------------------------------------
-! OPTIONS OF THE 1D SIMULATION (lmdz1d.def => unicol.def)
-!---------------------------------------------------------------------
-!Al1
-        call conf_unicol
-!Al1 moves this gcssold var from common fcg_gcssold to 
-        Turb_fcg_gcssold = xTurb_fcg_gcssold
-! --------------------------------------------------------------------
-        close(1)
-!Al1
-        write(*,*) 'lmdz1d.def lu => unicol.def'
-
-! forcing_type defines the way the SCM is forced:
-!forcing_type = 0 ==> forcing_les = .true.
-!             initial profiles from file prof.inp.001
-!             no forcing by LS convergence ; 
-!             surface temperature imposed ;
-!             radiative cooling may be imposed (iflag_radia=0 in physiq.def)
-!forcing_type = 1 ==> forcing_radconv = .true.
-!             idem forcing_type = 0, but the imposed radiative cooling 
-!             is set to 0 (hence, if iflag_radia=0 in physiq.def, 
-!             then there is no radiative cooling at all)
-!forcing_type = 2 ==> forcing_toga = .true.
-!             initial profiles from TOGA-COARE IFA files 
-!             LS convergence and SST imposed from TOGA-COARE IFA files 
-!forcing_type = 3 ==> forcing_GCM2SCM = .true.
-!             initial profiles from the GCM output
-!             LS convergence imposed from the GCM output
-!forcing_type = 4 ==> forcing_twpice = .true.
-!             initial profiles from TWP-ICE cdf file 
-!             LS convergence, omega and SST imposed from TWP-ICE files 
-!forcing_type = 5 ==> forcing_rico = .true.
-!             initial profiles from RICO files 
-!             LS convergence imposed from RICO files 
-!forcing_type = 6 ==> forcing_amma = .true.
-!             initial profiles from AMMA nc file 
-!             LS convergence, omega and surface fluxes imposed from AMMA file  
-!forcing_type = 7 ==> forcing_dice = .true.
-!             initial profiles and large scale forcings in dice_driver.nc
-!             Different stages: soil model alone, atm. model alone
-!             then both models coupled
-!forcing_type = 8 ==> forcing_gabls4 = .true.
-!             initial profiles and large scale forcings in gabls4_driver.nc
-!forcing_type >= 100 ==> forcing_case = .true.
-!             initial profiles and large scale forcings in cas.nc
-!             LS convergence, omega and SST imposed from CINDY-DYNAMO files 
-!             101=cindynamo
-!             102=bomex
-!forcing_type >= 100 ==> forcing_case2 = .true.
-!             temporary flag while all the 1D cases are not whith the same cas.nc forcing file
-!             103=arm_cu2 ie arm_cu with new forcing format
-!             104=rico2 ie rico with new forcing format
-!forcing_type = 40 ==> forcing_GCSSold = .true.
-!             initial profile from GCSS file
-!             LS convergence imposed from GCSS file
-!forcing_type = 50 ==> forcing_fire = .true.
-!             forcing from fire.nc
-!forcing_type = 59 ==> forcing_sandu = .true.
-!             initial profiles from sanduref file: see prof.inp.001
-!             SST varying with time and divergence constante: see ifa_sanduref.txt file
-!             Radiation has to be computed interactively
-!forcing_type = 60 ==> forcing_astex = .true.
-!             initial profiles from file: see prof.inp.001 
-!             SST,divergence,ug,vg,ufa,vfa varying with time : see ifa_astex.txt file
-!             Radiation has to be computed interactively
-!forcing_type = 61 ==> forcing_armcu = .true.
-!             initial profiles from file: see prof.inp.001 
-!             sensible and latent heat flux imposed: see ifa_arm_cu_1.txt
-!             large scale advective forcing & radiative tendencies applied below 1000m: see ifa_arm_cu_2.txt
-!             use geostrophic wind ug=10m/s vg=0m/s. Duration of the case 53100s 
-!             Radiation to be switched off
-
-      if (forcing_type <=0) THEN
-       forcing_les = .true.
-      elseif (forcing_type ==1) THEN
-       forcing_radconv = .true.
-      elseif (forcing_type ==2) THEN
-       forcing_toga    = .true.
-      elseif (forcing_type ==3) THEN
-       forcing_GCM2SCM = .true.
-      elseif (forcing_type ==4) THEN
-       forcing_twpice = .true.
-      elseif (forcing_type ==5) THEN
-       forcing_rico = .true.
-      elseif (forcing_type ==6) THEN
-       forcing_amma = .true.
-      elseif (forcing_type ==7) THEN
-       forcing_dice = .true.
-      elseif (forcing_type ==8) THEN
-       forcing_gabls4 = .true.
-      elseif (forcing_type ==101) THEN ! Cindynamo starts 1-10-2011 0h
-       forcing_case = .true.
-       year_ini_cas=2011
-       mth_ini_cas=10
-       day_deb=1
-       heure_ini_cas=0.
-       pdt_cas=3*3600.         ! forcing frequency
-      elseif (forcing_type ==102) THEN ! Bomex starts 24-6-1969 0h
-       forcing_case = .true.
-       year_ini_cas=1969
-       mth_ini_cas=6
-       day_deb=24
-       heure_ini_cas=0.
-       pdt_cas=1800.         ! forcing frequency
-      elseif (forcing_type ==103) THEN ! Arm_cu starts 21-6-1997 11h30
-       forcing_case2 = .true.
-       year_ini_cas=1997
-       mth_ini_cas=6
-       day_deb=21
-       heure_ini_cas=11.5
-       pdt_cas=1800.         ! forcing frequency
-      elseif (forcing_type ==104) THEN ! rico starts 16-12-2004 0h
-       forcing_case2 = .true.
-       year_ini_cas=2004
-       mth_ini_cas=12
-       day_deb=16
-       heure_ini_cas=0.
-       pdt_cas=1800.         ! forcing frequency
-      elseif (forcing_type ==105) THEN ! bomex starts 16-12-2004 0h
-       forcing_case2 = .true.
-       year_ini_cas=1969
-       mth_ini_cas=6
-       day_deb=24
-       heure_ini_cas=0.
-       pdt_cas=1800.         ! forcing frequency
-      elseif (forcing_type ==106) THEN ! ayotte_24SC starts 6-11-1992 0h
-       forcing_case2 = .true.
-       year_ini_cas=1992
-       mth_ini_cas=11
-       day_deb=6
-       heure_ini_cas=10.
-       pdt_cas=86400.        ! forcing frequency
-      elseif (forcing_type ==113) THEN ! Arm_cu starts 21-6-1997 11h30
-       forcing_SCM = .true.
-       year_ini_cas=1997
-       ! It is possible that those parameters are run twice.
-       call getin('anneeref',year_ini_cas)
-       call getin('dayref',day_deb)
-       mth_ini_cas=1 ! pour le moment on compte depuis le debut de l'annee
-       call getin('time_ini',heure_ini_cas)
-      elseif (forcing_type ==40) THEN
-       forcing_GCSSold = .true.
-      elseif (forcing_type ==50) THEN
-       forcing_fire = .true.
-      elseif (forcing_type ==59) THEN
-       forcing_sandu   = .true.
-      elseif (forcing_type ==60) THEN
-       forcing_astex   = .true.
-      elseif (forcing_type ==61) THEN
-       forcing_armcu = .true.
-       IF(llm/=19.AND.llm/=40) stop 'Erreur nombre de niveaux !!'
-      else
-       write (*,*) 'ERROR : unknown forcing_type ', forcing_type
-       stop 'Forcing_type should be 0,1,2,3,4,5,6 or 40,59,60,61'
-      ENDIF
-      print*,"forcing type=",forcing_type
-
-! if type_ts_forcing=0, the surface temp of 1D simulation is constant in time
-! (specified by tsurf in lmdz1d.def); if type_ts_forcing=1, the surface temperature
-! varies in time according to a forcing (e.g. forcing_toga) and is passed to read_tsurf1d.F
-! through the common sst_forcing.
-
-        type_ts_forcing = 0
-        if (forcing_toga.or.forcing_sandu.or.forcing_astex .or. forcing_dice)                 &
-      type_ts_forcing = 1
-
-! Initialization of the logical switch for nudging
-     jcode = iflag_nudge
-     do i = 1,nudge_max
-       nudge(i) = mod(jcode,10) >= 1
-       jcode = jcode/10
-     enddo
-!---------------------------------------------------------------------
-!  Definition of the run
-!---------------------------------------------------------------------
-
-      call conf_gcm( 99, .TRUE. )
-      
-!-----------------------------------------------------------------------
-      allocate( phy_nat (year_len))  ! 0=ocean libre,1=land,2=glacier,3=banquise
-      phy_nat(:)=0.0
-      allocate( phy_alb (year_len))  ! Albedo land only (old value condsurf_jyg=0.3)
-      allocate( phy_sst (year_len))  ! SST (will not be used; cf read_tsurf1d.F)
-      allocate( phy_bil (year_len))  ! Ne sert que pour les slab_ocean
-      phy_bil(:)=1.0
-      allocate( phy_rug (year_len)) ! Longueur rugosite utilisee sur land only
-      allocate( phy_ice (year_len)) ! Fraction de glace
-      phy_ice(:)=0.0
-      allocate( phy_fter(year_len)) ! Fraction de terre
-      phy_fter(:)=0.0
-      allocate( phy_foce(year_len)) ! Fraction de ocean
-      phy_foce(:)=0.0
-      allocate( phy_fsic(year_len)) ! Fraction de glace
-      phy_fsic(:)=0.0
-      allocate( phy_flic(year_len)) ! Fraction de glace
-      phy_flic(:)=0.0
-!-----------------------------------------------------------------------
-!   Choix du calendrier
-!   -------------------
-
-!      calend = 'earth_365d'
-      if (calend == 'earth_360d') then
-        call ioconf_calendar('360_day')
-        write(*,*)'CALENDRIER CHOISI: Terrestre a 360 jours/an'
-      else if (calend == 'earth_365d') then
-        call ioconf_calendar('noleap')
-        write(*,*)'CALENDRIER CHOISI: Terrestre a 365 jours/an'
-      else if (calend == 'earth_366d') then
-        call ioconf_calendar('all_leap')
-        write(*,*)'CALENDRIER CHOISI: Terrestre bissextile'
-      else if (calend == 'gregorian') then
-        stop 'gregorian calend should not be used by normal user'
-        call ioconf_calendar('gregorian') ! not to be used by normal users
-        write(*,*)'CALENDRIER CHOISI: Gregorien'
-      else
-        write (*,*) 'ERROR : unknown calendar ', calend
-        stop 'calend should be 360d,earth_365d,earth_366d,gregorian'
+SUBROUTINE old_lmdz1d
+
+  USE ioipsl, only: ju2ymds, ymds2ju, ioconf_calendar, getin
+  USE phys_state_var_mod, ONLY: phys_state_var_init, phys_state_var_end, &
+          clwcon, detr_therm, &
+          qsol, fevap, z0m, z0h, agesno, &
+          du_gwd_rando, du_gwd_front, entr_therm, f0, fm_therm, &
+          falb_dir, falb_dif, &
+          ftsol, beta_aridity, pbl_tke, pctsrf, radsol, rain_fall, snow_fall, ratqs, &
+          rnebcon, rugoro, sig1, w01, solaire_etat0, sollw, sollwdown, &
+          solsw, solswfdiff, t_ancien, q_ancien, u_ancien, v_ancien, rneb_ancien, &
+          wake_delta_pbl_TKE, delta_tsurf, wake_fip, wake_pe, &
+          wake_deltaq, wake_deltat, wake_s, awake_s, wake_dens, &
+          awake_dens, cv_gen, wake_cstar, &
+          zgam, zmax0, zmea, zpic, zsig, &
+          zstd, zthe, zval, ale_bl, ale_bl_trig, alp_bl, ql_ancien, qs_ancien, &
+          prlw_ancien, prsw_ancien, prw_ancien, &
+          u10m, v10m, ale_wake, ale_bl_stat
+
+  USE dimphy
+  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 infotrac ! new
+  USE control_mod
+  USE indice_sol_mod
+  USE phyaqua_mod
+  !  USE mod_1D_cases_read
+  USE mod_1D_cases_read2
+  USE mod_1D_amma_read
+  USE print_control_mod, ONLY: lunout, prt_level
+  USE iniphysiq_mod, ONLY: iniphysiq
+  USE mod_const_mpi, ONLY: comm_lmdz
+  USE physiq_mod, ONLY: physiq
+  USE comvert_mod, ONLY: presnivs, ap, bp, dpres, nivsig, nivsigs, pa, &
+          preff, aps, bps, pseudoalt, scaleheight
+  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 mod_1D_cases_read, ONLY: interp_case_time ! used in included old_1D_read_forc_cases.h
+  USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_OUTPUTPHYSSCM
+
+  implicit none
+  INCLUDE "dimensions.h"
+  INCLUDE "YOMCST.h"
+  !!      INCLUDE "control.h"
+  INCLUDE "clesphys.h"
+  INCLUDE "dimsoil.h"
+  !      INCLUDE "indicesol.h"
+
+  INCLUDE "compar1d.h"
+  INCLUDE "flux_arp.h"
+  INCLUDE "date_cas.h"
+  INCLUDE "tsoilnudge.h"
+  INCLUDE "fcg_gcssold.h"
+  !!!      INCLUDE "fbforcing.h"
+  INCLUDE "compbl.h"
+
+  !=====================================================================
+  ! DECLARATIONS
+  !=====================================================================
+
+  !---------------------------------------------------------------------
+  !  Externals
+  !---------------------------------------------------------------------
+  external fq_sat
+  real fq_sat
+
+  !---------------------------------------------------------------------
+  !  Arguments d' initialisations de la physique (USER DEFINE)
+  !---------------------------------------------------------------------
+
+  integer, parameter :: ngrid = 1
+  real :: zcufi = 1.
+  real :: zcvfi = 1.
+
+  !-      real :: nat_surf
+  !-      logical :: ok_flux_surf
+  !-      real :: fsens
+  !-      real :: flat
+  !-      real :: tsurf
+  !-      real :: rugos
+  !-      real :: qsol(1:2)
+  !-      real :: qsurf
+  !-      real :: psurf
+  !-      real :: zsurf
+  !-      real :: albedo
+  !-
+  !-      real :: time     = 0.
+  !-      real :: time_ini
+  !-      real :: xlat
+  !-      real :: xlon
+  !-      real :: wtsurf
+  !-      real :: wqsurf
+  !-      real :: restart_runoff
+  !-      real :: xagesno
+  !-      real :: qsolinp
+  !-      real :: zpicinp
+  !-
+  real :: fnday
+  real :: day, daytime
+  real :: day1
+  real :: heure
+  integer :: jour
+  integer :: mois
+  integer :: an
+
+  !---------------------------------------------------------------------
+  !  Declarations related to forcing and initial profiles
+  !---------------------------------------------------------------------
+
+  integer :: kmax = llm
+  integer llm700, nq1, nq2
+  INTEGER, PARAMETER :: nlev_max = 1000, nqmx = 1000
+  real timestep, frac
+  real height(nlev_max), tttprof(nlev_max), qtprof(nlev_max)
+  real  uprof(nlev_max), vprof(nlev_max), e12prof(nlev_max)
+  real  ugprof(nlev_max), vgprof(nlev_max), wfls(nlev_max)
+  real  dqtdxls(nlev_max), dqtdyls(nlev_max)
+  real  dqtdtls(nlev_max), thlpcar(nlev_max)
+  real  qprof(nlev_max, nqmx)
+
+  !        integer :: forcing_type
+  logical :: forcing_les = .FALSE.
+  logical :: forcing_armcu = .FALSE.
+  logical :: forcing_rico = .FALSE.
+  logical :: forcing_radconv = .FALSE.
+  logical :: forcing_toga = .FALSE.
+  logical :: forcing_twpice = .FALSE.
+  logical :: forcing_amma = .FALSE.
+  logical :: forcing_dice = .FALSE.
+  logical :: forcing_gabls4 = .FALSE.
+
+  logical :: forcing_GCM2SCM = .FALSE.
+  logical :: forcing_GCSSold = .FALSE.
+  logical :: forcing_sandu = .FALSE.
+  logical :: forcing_astex = .FALSE.
+  logical :: forcing_fire = .FALSE.
+  logical :: forcing_case = .FALSE.
+  logical :: forcing_case2 = .FALSE.
+  logical :: forcing_SCM = .FALSE.
+  integer :: type_ts_forcing ! 0 = SST constant; 1 = SST read from a file
+  !                                                            (cf read_tsurf1d.F)
+
+  real wwww
+  !vertical advection computation
+  !       real d_t_z(llm), d_q_z(llm)
+  !       real d_t_dyn_z(llm), dq_dyn_z(llm)
+  !       real zz(llm)
+  !       real zfact
+
+  !flag forcings
+  logical :: nudge_wind = .TRUE.
+  logical :: nudge_thermo = .FALSE.
+  logical :: cptadvw = .TRUE.
+  !=====================================================================
+  ! DECLARATIONS FOR EACH CASE
+  !=====================================================================
+
+  INCLUDE "old_1D_decl_cases.h"
+
+  !---------------------------------------------------------------------
+  !  Declarations related to nudging
+  !---------------------------------------------------------------------
+  integer :: nudge_max
+  parameter (nudge_max = 9)
+  integer :: inudge_RHT = 1
+  integer :: inudge_UV = 2
+  logical :: nudge(nudge_max)
+  real :: t_targ(llm)
+  real :: rh_targ(llm)
+  real :: u_targ(llm)
+  real :: v_targ(llm)
+
+  !---------------------------------------------------------------------
+  !  Declarations related to vertical discretization:
+  !---------------------------------------------------------------------
+  real :: pzero = 1.e5
+  real :: play (llm), zlay (llm), sig_s(llm), plev(llm + 1)
+  real :: playd(llm), zlayd(llm), ap_amma(llm + 1), bp_amma(llm + 1)
+
+  !---------------------------------------------------------------------
+  !  Declarations related to variables
+  !---------------------------------------------------------------------
+
+  real :: phi(llm)
+  real :: teta(llm), tetal(llm), temp(llm), u(llm), v(llm), w(llm)
+  REAL rot(1, llm) ! relative vorticity, in s-1
+  real :: rlat_rad(1), rlon_rad(1)
+  real :: omega(llm + 1), omega2(llm), rho(llm + 1)
+  real :: ug(llm), vg(llm), fcoriolis
+  real :: sfdt, cfdt
+  real :: du_phys(llm), dv_phys(llm), dt_phys(llm)
+  real :: dt_dyn(llm)
+  real :: dt_cooling(llm), d_t_adv(llm), d_t_nudge(llm)
+  real :: d_u_nudge(llm), d_v_nudge(llm)
+  real :: du_adv(llm), dv_adv(llm)
+  real :: du_age(llm), dv_age(llm)
+  real :: alpha
+  real :: ttt
+
+  REAL, ALLOCATABLE, DIMENSION(:, :) :: q
+  REAL, ALLOCATABLE, DIMENSION(:, :) :: dq
+  REAL, ALLOCATABLE, DIMENSION(:, :) :: dq_dyn
+  REAL, ALLOCATABLE, DIMENSION(:, :) :: d_q_adv
+  REAL, ALLOCATABLE, DIMENSION(:, :) :: d_q_nudge
+  !      REAL, ALLOCATABLE, DIMENSION(:):: d_th_adv
+
+  !---------------------------------------------------------------------
+  !  Initialization of surface variables
+  !---------------------------------------------------------------------
+  real :: run_off_lic_0(1)
+  real :: fder(1), snsrf(1, nbsrf), qsurfsrf(1, nbsrf)
+  real :: tsoil(1, nsoilmx, nbsrf)
+  !     real :: agesno(1,nbsrf)
+
+  !---------------------------------------------------------------------
+  !  Call to phyredem
+  !---------------------------------------------------------------------
+  logical :: ok_writedem = .TRUE.
+  real :: sollw_in = 0.
+  real :: solsw_in = 0.
+
+  !---------------------------------------------------------------------
+  !  Call to physiq
+  !---------------------------------------------------------------------
+  logical :: firstcall = .TRUE.
+  logical :: lastcall = .FALSE.
+  real :: phis(1) = 0.0
+  real :: dpsrf(1)
+
+  !---------------------------------------------------------------------
+  !  Initializations of boundary conditions
+  !---------------------------------------------------------------------
+  real, allocatable :: phy_nat (:)  ! 0=ocean libre,1=land,2=glacier,3=banquise
+  real, allocatable :: phy_alb (:)  ! Albedo land only (old value condsurf_jyg=0.3)
+  real, allocatable :: phy_sst (:)  ! SST (will not be used; cf read_tsurf1d.F)
+  real, allocatable :: phy_bil (:)  ! Ne sert que pour les slab_ocean
+  real, allocatable :: phy_rug (:) ! Longueur rugosite utilisee sur land only
+  real, allocatable :: phy_ice (:) ! Fraction de glace
+  real, allocatable :: phy_fter(:) ! Fraction de terre
+  real, allocatable :: phy_foce(:) ! Fraction de ocean
+  real, allocatable :: phy_fsic(:) ! Fraction de glace
+  real, allocatable :: phy_flic(:) ! Fraction de glace
+
+  !---------------------------------------------------------------------
+  !  Fichiers et d'autres variables
+  !---------------------------------------------------------------------
+  integer :: k, l, i, it = 1, mxcalc
+  integer :: nsrf
+  integer jcode
+  INTEGER read_climoz
+
+  integer :: it_end ! iteration number of the last call
+  !Al1
+  integer ecrit_slab_oc !1=ecrit,-1=lit,0=no file
+  data ecrit_slab_oc/-1/
+
+  !     if flag_inhib_forcing = 0, tendencies of forcing are added
+  !                           <> 0, tendencies of forcing are not added
+  INTEGER :: flag_inhib_forcing = 0
+
+  !=====================================================================
+  ! INITIALIZATIONS
+  !=====================================================================
+  du_phys(:) = 0.
+  dv_phys(:) = 0.
+  dt_phys(:) = 0.
+  dt_dyn(:) = 0.
+  dt_cooling(:) = 0.
+  d_t_adv(:) = 0.
+  d_t_nudge(:) = 0.
+  d_u_nudge(:) = 0.
+  d_v_nudge(:) = 0.
+  du_adv(:) = 0.
+  dv_adv(:) = 0.
+  du_age(:) = 0.
+  dv_age(:) = 0.
+
+  ! Initialization of Common turb_forcing
+  dtime_frcg = 0.
+  Turb_fcg_gcssold = .FALSE.
+  hthturb_gcssold = 0.
+  hqturb_gcssold = 0.
+
+
+
+
+  !---------------------------------------------------------------------
+  ! OPTIONS OF THE 1D SIMULATION (lmdz1d.def => unicol.def)
+  !---------------------------------------------------------------------
+  !Al1
+  CALL conf_unicol
+  !Al1 moves this gcssold var from common fcg_gcssold to
+  Turb_fcg_gcssold = xTurb_fcg_gcssold
+  ! --------------------------------------------------------------------
+  close(1)
+  !Al1
+  write(*, *) 'lmdz1d.def lu => unicol.def'
+
+  ! forcing_type defines the way the SCM is forced:
+  !forcing_type = 0 ==> forcing_les = .TRUE.
+  !             initial profiles from file prof.inp.001
+  !             no forcing by LS convergence ;
+  !             surface temperature imposed ;
+  !             radiative cooling may be imposed (iflag_radia=0 in physiq.def)
+  !forcing_type = 1 ==> forcing_radconv = .TRUE.
+  !             idem forcing_type = 0, but the imposed radiative cooling
+  !             is set to 0 (hence, if iflag_radia=0 in physiq.def,
+  !             then there is no radiative cooling at all)
+  !forcing_type = 2 ==> forcing_toga = .TRUE.
+  !             initial profiles from TOGA-COARE IFA files
+  !             LS convergence and SST imposed from TOGA-COARE IFA files
+  !forcing_type = 3 ==> forcing_GCM2SCM = .TRUE.
+  !             initial profiles from the GCM output
+  !             LS convergence imposed from the GCM output
+  !forcing_type = 4 ==> forcing_twpice = .TRUE.
+  !             initial profiles from TWP-ICE cdf file
+  !             LS convergence, omega and SST imposed from TWP-ICE files
+  !forcing_type = 5 ==> forcing_rico = .TRUE.
+  !             initial profiles from RICO files
+  !             LS convergence imposed from RICO files
+  !forcing_type = 6 ==> forcing_amma = .TRUE.
+  !             initial profiles from AMMA nc file
+  !             LS convergence, omega and surface fluxes imposed from AMMA file
+  !forcing_type = 7 ==> forcing_dice = .TRUE.
+  !             initial profiles and large scale forcings in dice_driver.nc
+  !             Different stages: soil model alone, atm. model alone
+  !             then both models coupled
+  !forcing_type = 8 ==> forcing_gabls4 = .TRUE.
+  !             initial profiles and large scale forcings in gabls4_driver.nc
+  !forcing_type >= 100 ==> forcing_case = .TRUE.
+  !             initial profiles and large scale forcings in cas.nc
+  !             LS convergence, omega and SST imposed from CINDY-DYNAMO files
+  !             101=cindynamo
+  !             102=bomex
+  !forcing_type >= 100 ==> forcing_case2 = .TRUE.
+  !             temporary flag while all the 1D cases are not whith the same cas.nc forcing file
+  !             103=arm_cu2 ie arm_cu with new forcing format
+  !             104=rico2 ie rico with new forcing format
+  !forcing_type = 40 ==> forcing_GCSSold = .TRUE.
+  !             initial profile from GCSS file
+  !             LS convergence imposed from GCSS file
+  !forcing_type = 50 ==> forcing_fire = .TRUE.
+  !             forcing from fire.nc
+  !forcing_type = 59 ==> forcing_sandu = .TRUE.
+  !             initial profiles from sanduref file: see prof.inp.001
+  !             SST varying with time and divergence constante: see ifa_sanduref.txt file
+  !             Radiation has to be computed interactively
+  !forcing_type = 60 ==> forcing_astex = .TRUE.
+  !             initial profiles from file: see prof.inp.001
+  !             SST,divergence,ug,vg,ufa,vfa varying with time : see ifa_astex.txt file
+  !             Radiation has to be computed interactively
+  !forcing_type = 61 ==> forcing_armcu = .TRUE.
+  !             initial profiles from file: see prof.inp.001
+  !             sensible and latent heat flux imposed: see ifa_arm_cu_1.txt
+  !             large scale advective forcing & radiative tendencies applied below 1000m: see ifa_arm_cu_2.txt
+  !             use geostrophic wind ug=10m/s vg=0m/s. Duration of the case 53100s
+  !             Radiation to be switched off
+
+  if (forcing_type <=0) THEN
+    forcing_les = .TRUE.
+  elseif (forcing_type ==1) THEN
+    forcing_radconv = .TRUE.
+  elseif (forcing_type ==2) THEN
+    forcing_toga = .TRUE.
+  elseif (forcing_type ==3) THEN
+    forcing_GCM2SCM = .TRUE.
+  elseif (forcing_type ==4) THEN
+    forcing_twpice = .TRUE.
+  elseif (forcing_type ==5) THEN
+    forcing_rico = .TRUE.
+  elseif (forcing_type ==6) THEN
+    forcing_amma = .TRUE.
+  elseif (forcing_type ==7) THEN
+    forcing_dice = .TRUE.
+  elseif (forcing_type ==8) THEN
+    forcing_gabls4 = .TRUE.
+  elseif (forcing_type ==101) THEN ! Cindynamo starts 1-10-2011 0h
+    forcing_case = .TRUE.
+    year_ini_cas = 2011
+    mth_ini_cas = 10
+    day_deb = 1
+    heure_ini_cas = 0.
+    pdt_cas = 3 * 3600.         ! forcing frequency
+  elseif (forcing_type ==102) THEN ! Bomex starts 24-6-1969 0h
+    forcing_case = .TRUE.
+    year_ini_cas = 1969
+    mth_ini_cas = 6
+    day_deb = 24
+    heure_ini_cas = 0.
+    pdt_cas = 1800.         ! forcing frequency
+  elseif (forcing_type ==103) THEN ! Arm_cu starts 21-6-1997 11h30
+    forcing_case2 = .TRUE.
+    year_ini_cas = 1997
+    mth_ini_cas = 6
+    day_deb = 21
+    heure_ini_cas = 11.5
+    pdt_cas = 1800.         ! forcing frequency
+  elseif (forcing_type ==104) THEN ! rico starts 16-12-2004 0h
+    forcing_case2 = .TRUE.
+    year_ini_cas = 2004
+    mth_ini_cas = 12
+    day_deb = 16
+    heure_ini_cas = 0.
+    pdt_cas = 1800.         ! forcing frequency
+  elseif (forcing_type ==105) THEN ! bomex starts 16-12-2004 0h
+    forcing_case2 = .TRUE.
+    year_ini_cas = 1969
+    mth_ini_cas = 6
+    day_deb = 24
+    heure_ini_cas = 0.
+    pdt_cas = 1800.         ! forcing frequency
+  elseif (forcing_type ==106) THEN ! ayotte_24SC starts 6-11-1992 0h
+    forcing_case2 = .TRUE.
+    year_ini_cas = 1992
+    mth_ini_cas = 11
+    day_deb = 6
+    heure_ini_cas = 10.
+    pdt_cas = 86400.        ! forcing frequency
+  elseif (forcing_type ==113) THEN ! Arm_cu starts 21-6-1997 11h30
+    forcing_SCM = .TRUE.
+    year_ini_cas = 1997
+    ! It is possible that those parameters are run twice.
+    CALL getin('anneeref', year_ini_cas)
+    CALL getin('dayref', day_deb)
+    mth_ini_cas = 1 ! pour le moment on compte depuis le debut de l'annee
+    CALL getin('time_ini', heure_ini_cas)
+  elseif (forcing_type ==40) THEN
+    forcing_GCSSold = .TRUE.
+  elseif (forcing_type ==50) THEN
+    forcing_fire = .TRUE.
+  elseif (forcing_type ==59) THEN
+    forcing_sandu = .TRUE.
+  elseif (forcing_type ==60) THEN
+    forcing_astex = .TRUE.
+  elseif (forcing_type ==61) THEN
+    forcing_armcu = .TRUE.
+    IF(llm/=19.AND.llm/=40) stop 'Erreur nombre de niveaux !!'
+  else
+    write (*, *) 'ERROR : unknown forcing_type ', forcing_type
+    stop 'Forcing_type should be 0,1,2,3,4,5,6 or 40,59,60,61'
+  ENDIF
+  PRINT*, "forcing type=", forcing_type
+
+  ! if type_ts_forcing=0, the surface temp of 1D simulation is constant in time
+  ! (specified by tsurf in lmdz1d.def); if type_ts_forcing=1, the surface temperature
+  ! varies in time according to a forcing (e.g. forcing_toga) and is passed to read_tsurf1d.F
+  ! through the common sst_forcing.
+
+  type_ts_forcing = 0
+  if (forcing_toga.or.forcing_sandu.or.forcing_astex .or. forcing_dice)                 &
+          type_ts_forcing = 1
+
+  ! Initialization of the logical switch for nudging
+  jcode = iflag_nudge
+  do i = 1, nudge_max
+    nudge(i) = mod(jcode, 10) >= 1
+    jcode = jcode / 10
+  enddo
+  !---------------------------------------------------------------------
+  !  Definition of the run
+  !---------------------------------------------------------------------
+
+  CALL conf_gcm(99, .TRUE.)
+
+  !-----------------------------------------------------------------------
+  allocate(phy_nat (year_len))  ! 0=ocean libre,1=land,2=glacier,3=banquise
+  phy_nat(:) = 0.0
+  allocate(phy_alb (year_len))  ! Albedo land only (old value condsurf_jyg=0.3)
+  allocate(phy_sst (year_len))  ! SST (will not be used; cf read_tsurf1d.F)
+  allocate(phy_bil (year_len))  ! Ne sert que pour les slab_ocean
+  phy_bil(:) = 1.0
+  allocate(phy_rug (year_len)) ! Longueur rugosite utilisee sur land only
+  allocate(phy_ice (year_len)) ! Fraction de glace
+  phy_ice(:) = 0.0
+  allocate(phy_fter(year_len)) ! Fraction de terre
+  phy_fter(:) = 0.0
+  allocate(phy_foce(year_len)) ! Fraction de ocean
+  phy_foce(:) = 0.0
+  allocate(phy_fsic(year_len)) ! Fraction de glace
+  phy_fsic(:) = 0.0
+  allocate(phy_flic(year_len)) ! Fraction de glace
+  phy_flic(:) = 0.0
+  !-----------------------------------------------------------------------
+  !   Choix du calendrier
+  !   -------------------
+
+  !      calend = 'earth_365d'
+  if (calend == 'earth_360d') then
+    CALL ioconf_calendar('360_day')
+    write(*, *)'CALENDRIER CHOISI: Terrestre a 360 jours/an'
+  else if (calend == 'earth_365d') then
+    CALL ioconf_calendar('noleap')
+    write(*, *)'CALENDRIER CHOISI: Terrestre a 365 jours/an'
+  else if (calend == 'earth_366d') then
+    CALL ioconf_calendar('all_leap')
+    write(*, *)'CALENDRIER CHOISI: Terrestre bissextile'
+  else if (calend == 'gregorian') then
+    stop 'gregorian calend should not be used by normal user'
+    CALL ioconf_calendar('gregorian') ! not to be used by normal users
+    write(*, *)'CALENDRIER CHOISI: Gregorien'
+  else
+    write (*, *) 'ERROR : unknown calendar ', calend
+    stop 'calend should be 360d,earth_365d,earth_366d,gregorian'
+  endif
+  !-----------------------------------------------------------------------
+
+  !c Date :
+  !      La date est supposee donnee sous la forme [annee, numero du jour dans
+  !      l annee] ; l heure est donnee dans time_ini, lu dans lmdz1d.def.
+  !      On appelle ymds2ju pour convertir [annee, jour] en [jour Julien].
+  !      Le numero du jour est dans "day". L heure est traitee separement.
+  !      La date complete est dans "daytime" (l'unite est le jour).
+  if (nday>0) then
+    fnday = nday
+  else
+    fnday = -nday / float(day_step)
+  endif
+  print *, 'fnday=', fnday
+  !     start_time doit etre en FRACTION DE JOUR
+  start_time = time_ini / 24.
+
+  ! Special case for arm_cu which lasts less than one day : 53100s !! (MPL 20111026)
+  IF(forcing_type == 61) fnday = 53100. / 86400.
+  IF(forcing_type == 103) fnday = 53100. / 86400.
+  ! Special case for amma which lasts less than one day : 64800s !! (MPL 20120216)
+  IF(forcing_type == 6) fnday = 64800. / 86400.
+  !     IF(forcing_type .EQ. 6) fnday=50400./86400.
+  IF(forcing_type == 8) fnday = 129600. / 86400.
+  annee_ref = anneeref
+  mois = 1
+  day_ref = dayref
+  heure = 0.
+  itau_dyn = 0
+  itau_phy = 0
+  CALL ymds2ju(annee_ref, mois, day_ref, heure, day)
+  day_ini = int(day)
+  day_end = day_ini + int(fnday)
+
+  IF (forcing_type ==2) THEN
+    ! Convert the initial date of Toga-Coare to Julian day
+    CALL ymds2ju                                                          &
+            (year_ini_toga, mth_ini_toga, day_ini_toga, heure, day_ju_ini_toga)
+
+  ELSEIF (forcing_type ==4) THEN
+    ! Convert the initial date of TWPICE to Julian day
+    CALL ymds2ju                                                          &
+            (year_ini_twpi, mth_ini_twpi, day_ini_twpi, heure_ini_twpi              &
+            , day_ju_ini_twpi)
+  ELSEIF (forcing_type ==6) THEN
+    ! Convert the initial date of AMMA to Julian day
+    CALL ymds2ju                                                          &
+            (year_ini_amma, mth_ini_amma, day_ini_amma, heure_ini_amma              &
+            , day_ju_ini_amma)
+  ELSEIF (forcing_type ==7) THEN
+    ! Convert the initial date of DICE to Julian day
+    CALL ymds2ju                                                         &
+            (year_ini_dice, mth_ini_dice, day_ini_dice, heure_ini_dice             &
+            , day_ju_ini_dice)
+  ELSEIF (forcing_type ==8) THEN
+    ! Convert the initial date of GABLS4 to Julian day
+    CALL ymds2ju                                                         &
+            (year_ini_gabls4, mth_ini_gabls4, day_ini_gabls4, heure_ini_gabls4     &
+            , day_ju_ini_gabls4)
+  ELSEIF (forcing_type >100) THEN
+    ! Convert the initial date to Julian day
+    day_ini_cas = day_deb
+    PRINT*, 'time case', year_ini_cas, mth_ini_cas, day_ini_cas
+    CALL ymds2ju                                                         &
+            (year_ini_cas, mth_ini_cas, day_ini_cas, heure_ini_cas * 3600            &
+            , day_ju_ini_cas)
+    PRINT*, 'time case 2', day_ini_cas, day_ju_ini_cas
+  ELSEIF (forcing_type ==59) THEN
+    ! Convert the initial date of Sandu case to Julian day
+    CALL ymds2ju                                                          &
+            (year_ini_sandu, mth_ini_sandu, day_ini_sandu, &
+            time_ini * 3600., day_ju_ini_sandu)
+
+  ELSEIF (forcing_type ==60) THEN
+    ! Convert the initial date of Astex case to Julian day
+    CALL ymds2ju                                                          &
+            (year_ini_astex, mth_ini_astex, day_ini_astex, &
+            time_ini * 3600., day_ju_ini_astex)
+
+  ELSEIF (forcing_type ==61) THEN
+    ! Convert the initial date of Arm_cu case to Julian day
+    CALL ymds2ju                                                          &
+            (year_ini_armcu, mth_ini_armcu, day_ini_armcu, heure_ini_armcu          &
+            , day_ju_ini_armcu)
+  ENDIF
+
+  IF (forcing_type >100) THEN
+    daytime = day + heure_ini_cas / 24. ! 1st day and initial time of the simulation
+  ELSE
+    daytime = day + time_ini / 24. ! 1st day and initial time of the simulation
+  ENDIF
+  ! Print out the actual date of the beginning of the simulation :
+  CALL ju2ymds(daytime, year_print, month_print, day_print, sec_print)
+  print *, ' Time of beginning : ', &
+          year_print, month_print, day_print, sec_print
+
+  !---------------------------------------------------------------------
+  ! Initialization of dimensions, geometry and initial state
+  !---------------------------------------------------------------------
+  !      CALL init_phys_lmdz(1,1,llm,1,(/1/)) ! job now done via iniphysiq
+  !     but we still need to initialize dimphy module (klon,klev,etc.)  here.
+  CALL init_dimphy1D(1, llm)
+  CALL suphel
+  CALL init_infotrac
+
+  if (nqtot>nqmx) STOP 'Augmenter nqmx dans lmdz1d.F'
+  allocate(q(llm, nqtot)) ; q(:, :) = 0.
+  allocate(dq(llm, nqtot))
+  allocate(dq_dyn(llm, nqtot))
+  allocate(d_q_adv(llm, nqtot))
+  allocate(d_q_nudge(llm, nqtot))
+  !      allocate(d_th_adv(llm))
+
+  q(:, :) = 0.
+  dq(:, :) = 0.
+  dq_dyn(:, :) = 0.
+  d_q_adv(:, :) = 0.
+  d_q_nudge(:, :) = 0.
+
+  !   No ozone climatology need be read in this pre-initialization
+  !          (phys_state_var_init is called again in physiq)
+  read_climoz = 0
+  nsw = 6          ! EV et LF: sinon, falb_dir et falb_dif ne peuvent etre alloues
+
+  CALL phys_state_var_init(read_climoz)
+
+  if (ngrid/=klon) then
+    PRINT*, 'stop in inifis'
+    PRINT*, 'Probleme de dimensions :'
+    PRINT*, 'ngrid = ', ngrid
+    PRINT*, 'klon  = ', klon
+    stop
+  endif
+  !!!=====================================================================
+  !!! Feedback forcing values for Gateaux differentiation (al1)
+  !!!=====================================================================
+  !!! Surface Planck forcing bracketing CALL radiation
+  !!      surf_Planck = 0.
+  !!      surf_Conv   = 0.
+  !!      write(*,*) 'Gateaux-dif Planck,Conv:',surf_Planck,surf_Conv
+  !!! a mettre dans le lmdz1d.def ou autre
+  !!
+  !!
+  qsol = qsolinp
+  qsurf = fq_sat(tsurf, psurf / 100.)
+  beta_surf = 1.
+  beta_aridity(:, :) = beta_surf
+  day1 = day_ini
+  time = daytime - day
+  ts_toga(1) = tsurf ! needed by read_tsurf1d.F
+  rho(1) = psurf / (rd * tsurf * (1. + (rv / rd - 1.) * qsurf))
+
+  !! mpl et jyg le 22/08/2012 :
+  !!  pour que les cas a flux de surface imposes marchent
+  IF(.NOT.ok_flux_surf.or.max(abs(wtsurf), abs(wqsurf))>0.) THEN
+    fsens = -wtsurf * rcpd * rho(1)
+    flat = -wqsurf * rlvtt * rho(1)
+    print *, 'Flux: ok_flux wtsurf wqsurf', ok_flux_surf, wtsurf, wqsurf
+  ENDIF
+  PRINT*, 'Flux sol ', fsens, flat
+  !!      ok_flux_surf=.FALSE.
+  !!      fsens=-wtsurf*rcpd*rho(1)
+  !!      flat=-wqsurf*rlvtt*rho(1)
+  !!!!
+
+  ! Vertical discretization and pressure levels at half and mid levels:
+
+  pa = 5e4
+  !!      preff= 1.01325e5
+  preff = psurf
+  IF (ok_old_disvert) THEN
+    CALL disvert0(pa, preff, ap, bp, dpres, presnivs, nivsigs, nivsig)
+    print *, 'On utilise disvert0'
+    aps(1:llm) = 0.5 * (ap(1:llm) + ap(2:llm + 1))
+    bps(1:llm) = 0.5 * (bp(1:llm) + bp(2:llm + 1))
+    scaleheight = 8.
+    pseudoalt(1:llm) = -scaleheight * log(presnivs(1:llm) / preff)
+  ELSE
+    CALL disvert()
+    print *, 'On utilise disvert'
+    !       Nouvelle version disvert permettant d imposer ap,bp (modif L.Guez) MPL 18092012
+    !       Dans ce cas, on lit ap,bp dans le fichier hybrid.txt
+  ENDIF
+
+  sig_s = presnivs / preff
+  plev = ap + bp * psurf
+  play = 0.5 * (plev(1:llm) + plev(2:llm + 1))
+  zlay = -rd * 300. * log(play / psurf) / rg ! moved after reading profiles
+
+  IF (forcing_type == 59) THEN
+    ! pour forcing_sandu, on cherche l'indice le plus proche de 700hpa#3000m
+    write(*, *) '***********************'
+    do l = 1, llm
+      write(*, *) 'l,play(l),presnivs(l): ', l, play(l), presnivs(l)
+      if (trouve_700 .and. play(l)<=70000) then
+        llm700 = l
+        print *, 'llm700,play=', llm700, play(l) / 100.
+        trouve_700 = .FALSE.
       endif
-!-----------------------------------------------------------------------
-
-!c Date :
-!      La date est supposee donnee sous la forme [annee, numero du jour dans 
-!      l annee] ; l heure est donnee dans time_ini, lu dans lmdz1d.def.
-!      On appelle ymds2ju pour convertir [annee, jour] en [jour Julien].
-!      Le numero du jour est dans "day". L heure est traitee separement.
-!      La date complete est dans "daytime" (l'unite est le jour).
-      if (nday>0) then
-         fnday=nday
-      else
-         fnday=-nday/float(day_step)
-      endif
-      print *,'fnday=',fnday
-!     start_time doit etre en FRACTION DE JOUR
-      start_time=time_ini/24.
-
-! Special case for arm_cu which lasts less than one day : 53100s !! (MPL 20111026)
-      IF(forcing_type == 61) fnday=53100./86400.
-      IF(forcing_type == 103) fnday=53100./86400.
-! Special case for amma which lasts less than one day : 64800s !! (MPL 20120216)
-      IF(forcing_type == 6) fnday=64800./86400.
-!     IF(forcing_type .EQ. 6) fnday=50400./86400.
- IF(forcing_type == 8 ) fnday=129600./86400.
-      annee_ref = anneeref
-      mois = 1
-      day_ref = dayref
-      heure = 0.
-      itau_dyn = 0
-      itau_phy = 0
-      call ymds2ju(annee_ref,mois,day_ref,heure,day)
-      day_ini = int(day)
-      day_end = day_ini + int(fnday)
-
-      IF (forcing_type ==2) THEN
-! Convert the initial date of Toga-Coare to Julian day
-      call ymds2ju                                                          &
-   (year_ini_toga,mth_ini_toga,day_ini_toga,heure,day_ju_ini_toga)
-
-      ELSEIF (forcing_type ==4) THEN
-! Convert the initial date of TWPICE to Julian day
-      call ymds2ju                                                          &
-   (year_ini_twpi,mth_ini_twpi,day_ini_twpi,heure_ini_twpi              &
-   ,day_ju_ini_twpi)
-      ELSEIF (forcing_type ==6) THEN
-! Convert the initial date of AMMA to Julian day
-      call ymds2ju                                                          &
-   (year_ini_amma,mth_ini_amma,day_ini_amma,heure_ini_amma              &
-   ,day_ju_ini_amma)
-      ELSEIF (forcing_type ==7) THEN
-! Convert the initial date of DICE to Julian day
-      call ymds2ju                                                         &
-   (year_ini_dice,mth_ini_dice,day_ini_dice,heure_ini_dice             &
-   ,day_ju_ini_dice)
- ELSEIF (forcing_type ==8 ) THEN
-! Convert the initial date of GABLS4 to Julian day
-      call ymds2ju                                                         &
-   (year_ini_gabls4,mth_ini_gabls4,day_ini_gabls4,heure_ini_gabls4     &
-   ,day_ju_ini_gabls4)
-      ELSEIF (forcing_type >100) THEN
-! Convert the initial date to Julian day
-      day_ini_cas=day_deb
-      print*,'time case',year_ini_cas,mth_ini_cas,day_ini_cas
-      call ymds2ju                                                         &
-   (year_ini_cas,mth_ini_cas,day_ini_cas,heure_ini_cas*3600            &
-   ,day_ju_ini_cas)
-      print*,'time case 2',day_ini_cas,day_ju_ini_cas
-      ELSEIF (forcing_type ==59) THEN
-! Convert the initial date of Sandu case to Julian day
-      call ymds2ju                                                          &
-     (year_ini_sandu,mth_ini_sandu,day_ini_sandu,                       &
-      time_ini*3600.,day_ju_ini_sandu)
-
-      ELSEIF (forcing_type ==60) THEN
-! Convert the initial date of Astex case to Julian day
-      call ymds2ju                                                          &
-     (year_ini_astex,mth_ini_astex,day_ini_astex,                        &
-      time_ini*3600.,day_ju_ini_astex)
-
-      ELSEIF (forcing_type ==61) THEN
-! Convert the initial date of Arm_cu case to Julian day
-      call ymds2ju                                                          &
-   (year_ini_armcu,mth_ini_armcu,day_ini_armcu,heure_ini_armcu          &
-   ,day_ju_ini_armcu)
-      ENDIF
-
-      IF (forcing_type >100) THEN
-      daytime = day + heure_ini_cas/24. ! 1st day and initial time of the simulation 
-      ELSE
-      daytime = day + time_ini/24. ! 1st day and initial time of the simulation 
-      ENDIF
-! Print out the actual date of the beginning of the simulation :
-      call ju2ymds(daytime,year_print, month_print,day_print,sec_print)
-      print *,' Time of beginning : ',                                      &
-          year_print, month_print, day_print, sec_print
-
-!---------------------------------------------------------------------
-! Initialization of dimensions, geometry and initial state
-!---------------------------------------------------------------------
-!      call init_phys_lmdz(1,1,llm,1,(/1/)) ! job now done via iniphysiq
-!     but we still need to initialize dimphy module (klon,klev,etc.)  here.
-      call init_dimphy1D(1,llm)
-      call suphel
-      call init_infotrac
-
-      if (nqtot>nqmx) STOP 'Augmenter nqmx dans lmdz1d.F'
-      allocate(q(llm,nqtot)) ; q(:,:)=0.
-      allocate(dq(llm,nqtot)) 
-      allocate(dq_dyn(llm,nqtot)) 
-      allocate(d_q_adv(llm,nqtot)) 
-      allocate(d_q_nudge(llm,nqtot)) 
-!      allocate(d_th_adv(llm)) 
-
-      q(:,:) = 0.
-      dq(:,:) = 0.
-      dq_dyn(:,:) = 0.
-      d_q_adv(:,:) = 0.
-      d_q_nudge(:,:) = 0.
-
-!   No ozone climatology need be read in this pre-initialization
-!          (phys_state_var_init is called again in physiq)
-      read_climoz = 0
-      nsw=6          ! EV et LF: sinon, falb_dir et falb_dif ne peuvent etre alloues
-
-
-      call phys_state_var_init(read_climoz)
-
-      if (ngrid/=klon) then
-         print*,'stop in inifis'
-         print*,'Probleme de dimensions :'
-         print*,'ngrid = ',ngrid
-         print*,'klon  = ',klon
-         stop
-      endif
-!!!=====================================================================
-!!! Feedback forcing values for Gateaux differentiation (al1)
-!!!=====================================================================
-!!! Surface Planck forcing bracketing call radiation
-!!      surf_Planck = 0.
-!!      surf_Conv   = 0.
-!!      write(*,*) 'Gateaux-dif Planck,Conv:',surf_Planck,surf_Conv
-!!! a mettre dans le lmdz1d.def ou autre
-!!
-!!
-      qsol = qsolinp
-      qsurf = fq_sat(tsurf,psurf/100.)
-      beta_surf = 1.
-      beta_aridity(:,:) = beta_surf
-      day1= day_ini
-      time=daytime-day
-      ts_toga(1)=tsurf ! needed by read_tsurf1d.F
-      rho(1)=psurf/(rd*tsurf*(1.+(rv/rd-1.)*qsurf)) 
-
-!! mpl et jyg le 22/08/2012 : 
-!!  pour que les cas a flux de surface imposes marchent
-      IF(.NOT.ok_flux_surf.or.max(abs(wtsurf),abs(wqsurf))>0.) THEN
-       fsens=-wtsurf*rcpd*rho(1)
-       flat=-wqsurf*rlvtt*rho(1)
-       print *,'Flux: ok_flux wtsurf wqsurf',ok_flux_surf,wtsurf,wqsurf
-      ENDIF
-      print*,'Flux sol ',fsens,flat
-!!      ok_flux_surf=.false.
-!!      fsens=-wtsurf*rcpd*rho(1)
-!!      flat=-wqsurf*rlvtt*rho(1)
-!!!!
-
-! Vertical discretization and pressure levels at half and mid levels:
-
-      pa   = 5e4
-!!      preff= 1.01325e5
-      preff = psurf
-      IF (ok_old_disvert) THEN
-        call disvert0(pa,preff,ap,bp,dpres,presnivs,nivsigs,nivsig)
-        print *,'On utilise disvert0'
-        aps(1:llm)=0.5*(ap(1:llm)+ap(2:llm+1))
-        bps(1:llm)=0.5*(bp(1:llm)+bp(2:llm+1))
-        scaleheight=8.
-        pseudoalt(1:llm)=-scaleheight*log(presnivs(1:llm)/preff)
-      ELSE
-        call disvert()
-        print *,'On utilise disvert'
-!       Nouvelle version disvert permettant d imposer ap,bp (modif L.Guez) MPL 18092012
-!       Dans ce cas, on lit ap,bp dans le fichier hybrid.txt
-      ENDIF
-
-      sig_s=presnivs/preff
-      plev =ap+bp*psurf
-      play = 0.5*(plev(1:llm)+plev(2:llm+1))
-      zlay=-rd*300.*log(play/psurf)/rg ! moved after reading profiles
-
-      IF (forcing_type == 59) THEN
-! pour forcing_sandu, on cherche l'indice le plus proche de 700hpa#3000m
-      write(*,*) '***********************'
-      do l = 1, llm
-       write(*,*) 'l,play(l),presnivs(l): ',l,play(l),presnivs(l)
-       if (trouve_700 .and. play(l)<=70000) then
-         llm700=l
-         print *,'llm700,play=',llm700,play(l)/100.
-         trouve_700= .false.
-       endif
-      enddo
-      write(*,*) '***********************'
-      ENDIF
-
-!=====================================================================
-! EVENTUALLY, READ FORCING DATA :
-!=====================================================================
-
-      INCLUDE "old_1D_read_forc_cases.h"
-
-      if (forcing_GCM2SCM) then
-        write (*,*) 'forcing_GCM2SCM not yet implemented'
-        stop 'in initialization'
-      endif ! forcing_GCM2SCM
-
-      print*,'mxcalc=',mxcalc
-!     print*,'zlay=',zlay(mxcalc)
-      print*,'play=',play(mxcalc)
+    enddo
+    write(*, *) '***********************'
+  ENDIF
+
+  !=====================================================================
+  ! EVENTUALLY, READ FORCING DATA :
+  !=====================================================================
+
+  INCLUDE "old_1D_read_forc_cases.h"
+
+IF (forcing_GCM2SCM) then
+  write (*, *) 'forcing_GCM2SCM not yet implemented'
+  stop 'in initialization'
+END IF ! forcing_GCM2SCM
+
+PRINT*, 'mxcalc=', mxcalc
+!     PRINT*,'zlay=',zlay(mxcalc)
+PRINT*, 'play=', play(mxcalc)
 
 !Al1 pour SST forced, appell?? depuis ocean_forced_noice
 ! EV tg instead of ts_cur
 
-      tg = tsurf ! SST used in read_tsurf1d
+tg = tsurf ! SST used in read_tsurf1d
 !=====================================================================
 ! Initialisation de la physique : 
@@ -749,329 +746,328 @@
 ! airefi,zcufi,zcvfi initialises au debut de ce programme
 ! rday,ra,rg,rd,rcpd declares dans YOMCST.h et calcules dans suphel.F
-      day_step = float(nsplit_phys)*day_step/float(iphysiq)
-      write (*,*) 'Time step divided by nsplit_phys (=',nsplit_phys,')'
-      timestep =rday/day_step
-      dtime_frcg = timestep
-
-      zcufi=airefi
-      zcvfi=airefi
-
-      rlat_rad(1)=xlat*rpi/180.
-      rlon_rad(1)=xlon*rpi/180.
-
-     ! iniphysiq will call iniaqua who needs year_len from phys_cal_mod
-     year_len_phys_cal_mod=year_len
-           
-     ! Ehouarn: iniphysiq requires arrays related to (3D) dynamics grid,
-     ! e.g. for cell boundaries, which are meaningless in 1D; so pad these 
-     ! with '0.' when necessary
-      call iniphysiq(iim,jjm,llm, &
-           1,comm_lmdz, &
-           rday,day_ini,timestep,  &
-           (/rlat_rad(1),0./),(/0./), &
-           (/0.,0./),(/rlon_rad(1),0./),  &
-           (/ (/airefi,0./),(/0.,0./) /), &
-           (/zcufi,0.,0.,0./), &
-           (/zcvfi,0./), &
-           ra,rg,rd,rcpd,1)
-      print*,'apres iniphysiq'
+day_step = float(nsplit_phys) * day_step / float(iphysiq)
+write (*, *) 'Time step divided by nsplit_phys (=', nsplit_phys, ')'
+timestep = rday / day_step
+dtime_frcg = timestep
+
+zcufi = airefi
+zcvfi = airefi
+
+rlat_rad(1) = xlat * rpi / 180.
+rlon_rad(1) = xlon * rpi / 180.
+
+! iniphysiq will CALL iniaqua who needs year_len from phys_cal_mod
+year_len_phys_cal_mod = year_len
+
+! Ehouarn: iniphysiq requires arrays related to (3D) dynamics grid,
+! e.g. for cell boundaries, which are meaningless in 1D; so pad these
+! with '0.' when necessary
+CALL iniphysiq(iim, jjm, llm, &
+        1, comm_lmdz, &
+        rday, day_ini, timestep, &
+        (/rlat_rad(1), 0./), (/0./), &
+        (/0., 0./), (/rlon_rad(1), 0./), &
+        (/ (/airefi, 0./), (/0., 0./) /), &
+        (/zcufi, 0., 0., 0./), &
+        (/zcvfi, 0./), &
+        ra, rg, rd, rcpd, 1)
+PRINT*, 'apres iniphysiq'
 
 ! 2 PARAMETRES QUI DEVRAIENT ETRE LUS DANS run.def MAIS NE LE SONT PAS ICI:
-      co2_ppm= 330.0
-      solaire=1370.0
+co2_ppm = 330.0
+solaire = 1370.0
 
 ! Ecriture du startphy avant le premier appel a la physique.
 ! On le met juste avant pour avoir acces a tous les champs
 
-      if (ok_writedem) then
-
-!--------------------------------------------------------------------------
-! pbl_surface_init (called here) and pbl_surface_final (called by phyredem)
-! need : qsol fder snow qsurf evap rugos agesno ftsoil
-!--------------------------------------------------------------------------
-
-        type_ocean = "force"
-        run_off_lic_0(1) = restart_runoff 
-        call fonte_neige_init(run_off_lic_0)
-
-        fder=0.
-        snsrf(1,:)=snowmass ! masse de neige des sous surface
-        print *, 'snsrf', snsrf
-        qsurfsrf(1,:)=qsurf ! humidite de l'air des sous surface
-        fevap=0.
-        z0m(1,:)=rugos     ! couverture de neige des sous surface
-        z0h(1,:)=rugosh    ! couverture de neige des sous surface
-        agesno  = xagesno
-        tsoil(:,:,:)=tsurf
-!------ AMMA 2e run avec modele sol et rayonnement actif (MPL 23052012)
-!       tsoil(1,1,1)=299.18
-!       tsoil(1,2,1)=300.08
-!       tsoil(1,3,1)=301.88
-!       tsoil(1,4,1)=305.48
-!       tsoil(1,5,1)=308.00
-!       tsoil(1,6,1)=308.00
-!       tsoil(1,7,1)=308.00
-!       tsoil(1,8,1)=308.00
-!       tsoil(1,9,1)=308.00
-!       tsoil(1,10,1)=308.00
-!       tsoil(1,11,1)=308.00
-!-----------------------------------------------------------------------
-        call pbl_surface_init(fder, snsrf, qsurfsrf, tsoil)
-
-!------------------ prepare limit conditions for limit.nc -----------------
-!--   Ocean force
-
-        print*,'avant phyredem'
-        pctsrf(1,:)=0.
-          if (nat_surf==0.) then
-          pctsrf(1,is_oce)=1.
-          pctsrf(1,is_ter)=0.
-          pctsrf(1,is_lic)=0.
-          pctsrf(1,is_sic)=0.
-        else if (nat_surf == 1) then
-          pctsrf(1,is_oce)=0.
-          pctsrf(1,is_ter)=1.
-          pctsrf(1,is_lic)=0.
-          pctsrf(1,is_sic)=0.
-        else if (nat_surf == 2) then
-          pctsrf(1,is_oce)=0.
-          pctsrf(1,is_ter)=0.
-          pctsrf(1,is_lic)=1.
-          pctsrf(1,is_sic)=0.
-        else if (nat_surf == 3) then
-          pctsrf(1,is_oce)=0.
-          pctsrf(1,is_ter)=0.
-          pctsrf(1,is_lic)=0.
-          pctsrf(1,is_sic)=1.
-
-     end if
-
-        print*,'nat_surf,pctsrf(1,is_oce),pctsrf(1,is_ter)',nat_surf         &
-          ,pctsrf(1,is_oce),pctsrf(1,is_ter)
-
-        zmasq=pctsrf(1,is_ter)+pctsrf(1,is_lic)
-        zpic = zpicinp
-        ftsol=tsurf
-        falb_dir=albedo
-        falb_dif=albedo
-        rugoro=rugos 
-        t_ancien(1,:)=temp(:)
-        q_ancien(1,:)=q(:,1)
-        ql_ancien = 0.
-        qs_ancien = 0.
-        prlw_ancien = 0.
-        prsw_ancien = 0.
-        prw_ancien = 0.
-!jyg<
-!!        pbl_tke(:,:,:)=1.e-8
-        pbl_tke(:,:,:)=0.
-        pbl_tke(:,2,:)=1.e-2
-        PRINT *, ' pbl_tke dans lmdz1d '
-        if (prt_level >= 5) then
-         DO nsrf = 1,4
-           PRINT *,'pbl_tke(1,:,',nsrf,') ',pbl_tke(1,:,nsrf)
-         ENDDO
-        end if
-
-!>jyg
-
-        rain_fall=0.
-        snow_fall=0.
-        solsw=0.
-        solswfdiff=0.
-        sollw=0.
-        sollwdown=rsigma*tsurf**4
-        radsol=0.
-        rnebcon=0.
-        ratqs=0.
-        clwcon=0.
-        zmax0 = 0.
-        zmea=zsurf
-        zstd=0.
-        zsig=0.
-        zgam=0.
-        zval=0. 
-        zthe=0. 
-        sig1=0.
-        w01=0.
-
-        wake_deltaq = 0.
-        wake_deltat = 0.
-        wake_delta_pbl_TKE(:,:,:) = 0.
-        delta_tsurf = 0.
-        wake_fip = 0.
-        wake_pe = 0.
-        wake_s = 0.
-        awake_s = 0.
-        wake_dens = 0.
-        awake_dens = 0.
-        cv_gen = 0.
-        wake_cstar = 0.
-        ale_bl = 0.
-        ale_bl_trig = 0.
-        alp_bl = 0.
-        IF (ALLOCATED(du_gwd_rando)) du_gwd_rando = 0.
-        IF (ALLOCATED(du_gwd_front)) du_gwd_front = 0.
-        entr_therm = 0.
-        detr_therm = 0.
-        f0 = 0.
-        fm_therm = 0.
-        u_ancien(1,:)=u(:)
-        v_ancien(1,:)=v(:)
-        rneb_ancien(1,:)=0.
-
-        u10m=0.
-        v10m=0.
-        ale_wake=0.
-        ale_bl_stat=0.
- 
-!------------------------------------------------------------------------
-! Make file containing restart for the physics (startphy.nc)
-
-! NB: List of the variables to be written by phyredem (via put_field):
-! rlon,rlat,zmasq,pctsrf(:,is_ter),pctsrf(:,is_lic),pctsrf(:,is_oce)
-! pctsrf(:,is_sic),ftsol(:,nsrf),tsoil(:,isoil,nsrf),qsurf(:,nsrf)
-! qsol,falb_dir(:,nsrf),falb_dif(:,nsrf),evap(:,nsrf),snow(:,nsrf)
-! radsol,solsw,solswfdiff,sollw, sollwdown,fder,rain_fall,snow_fall,frugs(:,nsrf)
-! agesno(:,nsrf),zmea,zstd,zsig,zgam,zthe,zpic,zval,rugoro
-! t_ancien,q_ancien,,frugs(:,is_oce),clwcon(:,1),rnebcon(:,1),ratqs(:,1)
-! run_off_lic_0,pbl_tke(:,1:klev,nsrf), zmax0,f0,sig1,w01
-! wake_deltat,wake_deltaq,wake_s,awake_s,wake_dens,awake_dens,cv_gen,wake_cstar,
-! wake_fip,wake_delta_pbl_tke(:,1:klev,nsrf)
-
-! NB2: The content of the startphy.nc file depends on some flags defined in
-! the ".def" files. However, since conf_phys is not called in lmdz1d.F90, these flags have 
-! to be set at some arbitratry convenient values.
-!------------------------------------------------------------------------
-!Al1 =============== restart option ==========================
-        iflag_physiq=0
-        call getin('iflag_physiq',iflag_physiq)
-
-        if (.not.restart) then
-          iflag_pbl = 5
-          call phyredem ("startphy.nc")
-        else
-! (desallocations)
-        print*,'callin surf final'
-          call pbl_surface_final( fder, snsrf, qsurfsrf, tsoil)
-        print*,'after surf final'
-          CALL fonte_neige_final(run_off_lic_0)
-        endif
-
-        ok_writedem=.false.
-        print*,'apres phyredem'
-
-      endif ! ok_writedem
-      
+IF (ok_writedem) then
+
+  !--------------------------------------------------------------------------
+  ! pbl_surface_init (called here) and pbl_surface_final (called by phyredem)
+  ! need : qsol fder snow qsurf evap rugos agesno ftsoil
+  !--------------------------------------------------------------------------
+
+  type_ocean = "force"
+  run_off_lic_0(1) = restart_runoff
+  CALL fonte_neige_init(run_off_lic_0)
+
+  fder = 0.
+  snsrf(1, :) = snowmass ! masse de neige des sous surface
+  print *, 'snsrf', snsrf
+  qsurfsrf(1, :) = qsurf ! humidite de l'air des sous surface
+  fevap = 0.
+  z0m(1, :) = rugos     ! couverture de neige des sous surface
+  z0h(1, :) = rugosh    ! couverture de neige des sous surface
+  agesno = xagesno
+  tsoil(:, :, :) = tsurf
+  !------ AMMA 2e run avec modele sol et rayonnement actif (MPL 23052012)
+  !       tsoil(1,1,1)=299.18
+  !       tsoil(1,2,1)=300.08
+  !       tsoil(1,3,1)=301.88
+  !       tsoil(1,4,1)=305.48
+  !       tsoil(1,5,1)=308.00
+  !       tsoil(1,6,1)=308.00
+  !       tsoil(1,7,1)=308.00
+  !       tsoil(1,8,1)=308.00
+  !       tsoil(1,9,1)=308.00
+  !       tsoil(1,10,1)=308.00
+  !       tsoil(1,11,1)=308.00
+  !-----------------------------------------------------------------------
+  CALL pbl_surface_init(fder, snsrf, qsurfsrf, tsoil)
+
+  !------------------ prepare limit conditions for limit.nc -----------------
+  !--   Ocean force
+
+  PRINT*, 'avant phyredem'
+  pctsrf(1, :) = 0.
+  if (nat_surf==0.) then
+    pctsrf(1, is_oce) = 1.
+    pctsrf(1, is_ter) = 0.
+    pctsrf(1, is_lic) = 0.
+    pctsrf(1, is_sic) = 0.
+  else if (nat_surf == 1) then
+    pctsrf(1, is_oce) = 0.
+    pctsrf(1, is_ter) = 1.
+    pctsrf(1, is_lic) = 0.
+    pctsrf(1, is_sic) = 0.
+  else if (nat_surf == 2) then
+    pctsrf(1, is_oce) = 0.
+    pctsrf(1, is_ter) = 0.
+    pctsrf(1, is_lic) = 1.
+    pctsrf(1, is_sic) = 0.
+  else if (nat_surf == 3) then
+    pctsrf(1, is_oce) = 0.
+    pctsrf(1, is_ter) = 0.
+    pctsrf(1, is_lic) = 0.
+    pctsrf(1, is_sic) = 1.
+
+  end if
+
+  PRINT*, 'nat_surf,pctsrf(1,is_oce),pctsrf(1,is_ter)', nat_surf         &
+          , pctsrf(1, is_oce), pctsrf(1, is_ter)
+
+  zmasq = pctsrf(1, is_ter) + pctsrf(1, is_lic)
+  zpic = zpicinp
+  ftsol = tsurf
+  falb_dir = albedo
+  falb_dif = albedo
+  rugoro = rugos
+  t_ancien(1, :) = temp(:)
+  q_ancien(1, :) = q(:, 1)
+  ql_ancien = 0.
+  qs_ancien = 0.
+  prlw_ancien = 0.
+  prsw_ancien = 0.
+  prw_ancien = 0.
+  !jyg<
+  !!        pbl_tke(:,:,:)=1.e-8
+  pbl_tke(:, :, :) = 0.
+  pbl_tke(:, 2, :) = 1.e-2
+  PRINT *, ' pbl_tke dans lmdz1d '
+  if (prt_level >= 5) then
+    DO nsrf = 1, 4
+      PRINT *, 'pbl_tke(1,:,', nsrf, ') ', pbl_tke(1, :, nsrf)
+    ENDDO
+  end if
+
+  !>jyg
+
+  rain_fall = 0.
+  snow_fall = 0.
+  solsw = 0.
+  solswfdiff = 0.
+  sollw = 0.
+  sollwdown = rsigma * tsurf**4
+  radsol = 0.
+  rnebcon = 0.
+  ratqs = 0.
+  clwcon = 0.
+  zmax0 = 0.
+  zmea = zsurf
+  zstd = 0.
+  zsig = 0.
+  zgam = 0.
+  zval = 0.
+  zthe = 0.
+  sig1 = 0.
+  w01 = 0.
+
+  wake_deltaq = 0.
+  wake_deltat = 0.
+  wake_delta_pbl_TKE(:, :, :) = 0.
+  delta_tsurf = 0.
+  wake_fip = 0.
+  wake_pe = 0.
+  wake_s = 0.
+  awake_s = 0.
+  wake_dens = 0.
+  awake_dens = 0.
+  cv_gen = 0.
+  wake_cstar = 0.
+  ale_bl = 0.
+  ale_bl_trig = 0.
+  alp_bl = 0.
+  IF (ALLOCATED(du_gwd_rando)) du_gwd_rando = 0.
+  IF (ALLOCATED(du_gwd_front)) du_gwd_front = 0.
+  entr_therm = 0.
+  detr_therm = 0.
+  f0 = 0.
+  fm_therm = 0.
+  u_ancien(1, :) = u(:)
+  v_ancien(1, :) = v(:)
+  rneb_ancien(1, :) = 0.
+
+  u10m = 0.
+  v10m = 0.
+  ale_wake = 0.
+  ale_bl_stat = 0.
+
+  !------------------------------------------------------------------------
+  ! Make file containing restart for the physics (startphy.nc)
+
+  ! NB: List of the variables to be written by phyredem (via put_field):
+  ! rlon,rlat,zmasq,pctsrf(:,is_ter),pctsrf(:,is_lic),pctsrf(:,is_oce)
+  ! pctsrf(:,is_sic),ftsol(:,nsrf),tsoil(:,isoil,nsrf),qsurf(:,nsrf)
+  ! qsol,falb_dir(:,nsrf),falb_dif(:,nsrf),evap(:,nsrf),snow(:,nsrf)
+  ! radsol,solsw,solswfdiff,sollw, sollwdown,fder,rain_fall,snow_fall,frugs(:,nsrf)
+  ! agesno(:,nsrf),zmea,zstd,zsig,zgam,zthe,zpic,zval,rugoro
+  ! t_ancien,q_ancien,,frugs(:,is_oce),clwcon(:,1),rnebcon(:,1),ratqs(:,1)
+  ! run_off_lic_0,pbl_tke(:,1:klev,nsrf), zmax0,f0,sig1,w01
+  ! wake_deltat,wake_deltaq,wake_s,awake_s,wake_dens,awake_dens,cv_gen,wake_cstar,
+  ! wake_fip,wake_delta_pbl_tke(:,1:klev,nsrf)
+
+  ! NB2: The content of the startphy.nc file depends on some flags defined in
+  ! the ".def" files. However, since conf_phys is not called in lmdz1d.F90, these flags have
+  ! to be set at some arbitratry convenient values.
+  !------------------------------------------------------------------------
+  !Al1 =============== restart option ==========================
+  iflag_physiq = 0
+  CALL getin('iflag_physiq', iflag_physiq)
+
+  if (.not.restart) then
+    iflag_pbl = 5
+    CALL phyredem ("startphy.nc")
+  else
+    ! (desallocations)
+    PRINT*, 'callin surf final'
+    CALL pbl_surface_final(fder, snsrf, qsurfsrf, tsoil)
+    PRINT*, 'after surf final'
+    CALL fonte_neige_final(run_off_lic_0)
+  endif
+
+  ok_writedem = .FALSE.
+  PRINT*, 'apres phyredem'
+
+END IF ! ok_writedem
+
 !------------------------------------------------------------------------
 ! Make file containing boundary conditions (limit.nc) **Al1->restartdyn***
 ! --------------------------------------------------
 ! NB: List of the variables to be written in limit.nc 
-!     (by writelim.F, subroutine of 1DUTILS.h):
+!     (by writelim.F, SUBROUTINE of 1DUTILS.h):
 !        phy_nat,phy_alb,phy_sst,phy_bil,phy_rug,phy_ice,
 !        phy_fter,phy_foce,phy_flic,phy_fsic)
 !------------------------------------------------------------------------
-      do i=1,year_len
-        phy_nat(i)  = nat_surf
-        phy_alb(i)  = albedo
-        phy_sst(i)  = tsurf ! read_tsurf1d will be used instead
-        phy_rug(i)  = rugos
-        phy_fter(i) = pctsrf(1,is_ter)
-        phy_foce(i) = pctsrf(1,is_oce)
-        phy_fsic(i) = pctsrf(1,is_sic)
-        phy_flic(i) = pctsrf(1,is_lic)
-      enddo
+DO i = 1, year_len
+  phy_nat(i) = nat_surf
+  phy_alb(i) = albedo
+  phy_sst(i) = tsurf ! read_tsurf1d will be used instead
+  phy_rug(i) = rugos
+  phy_fter(i) = pctsrf(1, is_ter)
+  phy_foce(i) = pctsrf(1, is_oce)
+  phy_fsic(i) = pctsrf(1, is_sic)
+  phy_flic(i) = pctsrf(1, is_lic)
+END DO
 
 ! fabrication de limit.nc
-      call writelim (1,phy_nat,phy_alb,phy_sst,phy_bil,phy_rug,             &
-                 phy_ice,phy_fter,phy_foce,phy_flic,phy_fsic)
-
-
-      call phys_state_var_end
+CALL writelim (1, phy_nat, phy_alb, phy_sst, phy_bil, phy_rug, &
+        phy_ice, phy_fter, phy_foce, phy_flic, phy_fsic)
+
+CALL phys_state_var_end
 !Al1
-      if (restart) then
-        print*,'call to restart dyn 1d'
-        Call dyn1deta0("start1dyn.nc",plev,play,phi,phis,presnivs,          &
-                u,v,temp,q,omega2)
-
-       print*,'fnday,annee_ref,day_ref,day_ini',                            &
-       fnday,annee_ref,day_ref,day_ini
-!**      call ymds2ju(annee_ref,mois,day_ini,heure,day)
-       day = day_ini
-       day_end = day_ini + nday
-       daytime = day + time_ini/24. ! 1st day and initial time of the simulation 
-
-! Print out the actual date of the beginning of the simulation :
-       call ju2ymds(daytime, an, mois, jour, heure)
-       print *,' Time of beginning : y m d h',an, mois,jour,heure/3600.
-
-       day = int(daytime)
-       time=daytime-day
-  
-       print*,'****** intialised fields from restart1dyn *******'
-       print*,'plev,play,phi,phis,presnivs,u,v,temp,q,omega2'
-       print*,'temp(1),q(1,1),u(1),v(1),plev(1),phis :'
-       print*,temp(1),q(1,1),u(1),v(1),plev(1),phis
-! raz for safety
-       do l=1,llm
-         dq_dyn(l,1) = 0.
-       enddo
-      endif
+IF (restart) then
+  PRINT*, 'CALL to restart dyn 1d'
+  Call dyn1deta0("start1dyn.nc", plev, play, phi, phis, presnivs, &
+          u, v, temp, q, omega2)
+
+  PRINT*, 'fnday,annee_ref,day_ref,day_ini', &
+          fnday, annee_ref, day_ref, day_ini
+  !**      CALL ymds2ju(annee_ref,mois,day_ini,heure,day)
+  day = day_ini
+  day_end = day_ini + nday
+  daytime = day + time_ini / 24. ! 1st day and initial time of the simulation
+
+  ! Print out the actual date of the beginning of the simulation :
+  CALL ju2ymds(daytime, an, mois, jour, heure)
+  print *, ' Time of beginning : y m d h', an, mois, jour, heure / 3600.
+
+  day = int(daytime)
+  time = daytime - day
+
+  PRINT*, '****** intialised fields from restart1dyn *******'
+  PRINT*, 'plev,play,phi,phis,presnivs,u,v,temp,q,omega2'
+  PRINT*, 'temp(1),q(1,1),u(1),v(1),plev(1),phis :'
+  PRINT*, temp(1), q(1, 1), u(1), v(1), plev(1), phis
+  ! raz for safety
+  do l = 1, llm
+    dq_dyn(l, 1) = 0.
+  enddo
+END IF
 !Al1 ================  end restart =================================
-      IF (ecrit_slab_oc==1) then
-         open(97,file='div_slab.dat',STATUS='UNKNOWN')
-       elseif (ecrit_slab_oc==0) then
-         open(97,file='div_slab.dat',STATUS='OLD')
-       endif
+IF (ecrit_slab_oc==1) then
+  open(97, file = 'div_slab.dat', STATUS = 'UNKNOWN')
+elseif (ecrit_slab_oc==0) then
+  open(97, file = 'div_slab.dat', STATUS = 'OLD')
+END IF
 
 !---------------------------------------------------------------------
 !    Initialize target profile for RHT nudging if needed
 !---------------------------------------------------------------------
-      if (nudge(inudge_RHT)) then
-        call nudge_RHT_init(plev,play,temp,q(:,1),t_targ,rh_targ)
-      endif
-      if (nudge(inudge_UV)) then
-        call nudge_UV_init(plev,play,u,v,u_targ,v_targ)
-      endif
+IF (nudge(inudge_RHT)) then
+  CALL nudge_RHT_init(plev, play, temp, q(:, 1), t_targ, rh_targ)
+END IF
+IF (nudge(inudge_UV)) then
+  CALL nudge_UV_init(plev, play, u, v, u_targ, v_targ)
+END IF
 
 !=====================================================================
-#ifdef OUTPUT_PHYS_SCM
-       CALL iophys_ini(timestep)
-#endif
+IF (CPPKEY_OUTPUTPHYSSCM)
+  CALL iophys_ini(timestep)
+END IF
 ! START OF THE TEMPORAL LOOP :
 !=====================================================================
-           
-      it_end = nint(fnday*day_step)
+
+it_end = nint(fnday * day_step)
 !test JLD     it_end = 10
-      do while(it<=it_end)
-
-       if (prt_level>=1) then
-         print*,'XXXXXXXXXXXXXXXXXXX ITAP,day,time=',                       &
-               it,day,time,it_end,day_step
-         print*,'PAS DE TEMPS ',timestep
-       endif
-!Al1 demande de restartphy.nc
-       if (it==it_end) lastcall=.True.
-
-!---------------------------------------------------------------------
-!  Geopotential :
-!---------------------------------------------------------------------
-
-        phi(1)=RD*temp(1)*(plev(1)-play(1))/(.5*(plev(1)+play(1)))
-        do l = 1, llm-1
-          phi(l+1)=phi(l)+RD*(temp(l)+temp(l+1))*                           &
-      (play(l)-play(l+1))/(play(l)+play(l+1))
-        enddo
-
-!---------------------------------------------------------------------
-! Interpolation of forcings in time and onto model levels
-!---------------------------------------------------------------------
-
-      INCLUDE "old_1D_interp_cases.h"
-
-      if (forcing_GCM2SCM) then
-        write (*,*) 'forcing_GCM2SCM not yet implemented'
-        stop 'in time loop'
-      endif ! forcing_GCM2SCM
+DO while(it<=it_end)
+
+  if (prt_level>=1) then
+    PRINT*, 'XXXXXXXXXXXXXXXXXXX ITAP,day,time=', &
+            it, day, time, it_end, day_step
+    PRINT*, 'PAS DE TEMPS ', timestep
+  endif
+  !Al1 demande de restartphy.nc
+  if (it==it_end) lastcall = .True.
+
+  !---------------------------------------------------------------------
+  !  Geopotential :
+  !---------------------------------------------------------------------
+
+  phi(1) = RD * temp(1) * (plev(1) - play(1)) / (.5 * (plev(1) + play(1)))
+  do l = 1, llm - 1
+    phi(l + 1) = phi(l) + RD * (temp(l) + temp(l + 1)) * &
+            (play(l) - play(l + 1)) / (play(l) + play(l + 1))
+  enddo
+
+  !---------------------------------------------------------------------
+  ! Interpolation of forcings in time and onto model levels
+  !---------------------------------------------------------------------
+
+  INCLUDE "old_1D_interp_cases.h"
+
+IF (forcing_GCM2SCM) then
+  write (*, *) 'forcing_GCM2SCM not yet implemented'
+  stop 'in time loop'
+END IF ! forcing_GCM2SCM
 
 !!!!---------------------------------------------------------------------
@@ -1088,96 +1084,96 @@
 ! Listing output for debug prt_level>=1
 !---------------------------------------------------------------------
-       if (prt_level>=1) then
-         print *,' avant physiq : -------- day time ',day,time
-         write(*,*) 'firstcall,lastcall,phis',                               &
-                 firstcall,lastcall,phis
-       end if
-       if (prt_level>=5) then
-         write(*,'(a10,2a4,4a13)') 'BEFOR1 IT=','it','l',                   &
-          'presniv','plev','play','phi'
-         write(*,'(a10,2i4,4f13.2)') ('BEFOR1 IT= ',it,l,                   &
-           presnivs(l),plev(l),play(l),phi(l),l=1,llm)
-         write(*,'(a11,2a4,a11,6a8)') 'BEFOR2','it','l',                    &
-           'presniv','u','v','temp','q1','q2','omega2'
-         write(*,'(a11,2i4,f11.2,5f8.2,e10.2)') ('BEFOR2 IT= ',it,l,         &
-     presnivs(l),u(l),v(l),temp(l),q(l,1),q(l,2),omega2(l),l=1,llm)
-       endif
+IF (prt_level>=1) then
+  print *, ' avant physiq : -------- day time ', day, time
+  write(*, *) 'firstcall,lastcall,phis', &
+          firstcall, lastcall, phis
+end if
+IF (prt_level>=5) then
+  write(*, '(a10,2a4,4a13)') 'BEFOR1 IT=', 'it', 'l', &
+          'presniv', 'plev', 'play', 'phi'
+  write(*, '(a10,2i4,4f13.2)') ('BEFOR1 IT= ', it, l, &
+          presnivs(l), plev(l), play(l), phi(l), l = 1, llm)
+  write(*, '(a11,2a4,a11,6a8)') 'BEFOR2', 'it', 'l', &
+          'presniv', 'u', 'v', 'temp', 'q1', 'q2', 'omega2'
+  write(*, '(a11,2i4,f11.2,5f8.2,e10.2)') ('BEFOR2 IT= ', it, l, &
+          presnivs(l), u(l), v(l), temp(l), q(l, 1), q(l, 2), omega2(l), l = 1, llm)
+END IF
 
 !---------------------------------------------------------------------
 !   Call physiq :
 !---------------------------------------------------------------------
-       call physiq(ngrid,llm, &
-                    firstcall,lastcall,timestep, &
-                    plev,play,phi,phis,presnivs, &
-                    u,v, rot, temp,q,omega2, &
-                    du_phys,dv_phys,dt_phys,dq,dpsrf)
-                firstcall=.false.
+CALL physiq(ngrid, llm, &
+        firstcall, lastcall, timestep, &
+        plev, play, phi, phis, presnivs, &
+        u, v, rot, temp, q, omega2, &
+        du_phys, dv_phys, dt_phys, dq, dpsrf)
+firstcall = .FALSE.
 
 !---------------------------------------------------------------------
 ! Listing output for debug
 !---------------------------------------------------------------------
-        if (prt_level>=5) then
-          write(*,'(a11,2a4,4a13)') 'AFTER1 IT=','it','l',                  &
-          'presniv','plev','play','phi'
-          write(*,'(a11,2i4,4f13.2)') ('AFTER1 it= ',it,l,                  &
-      presnivs(l),plev(l),play(l),phi(l),l=1,llm)
-          write(*,'(a11,2a4,a11,6a8)') 'AFTER2','it','l',                   &
-           'presniv','u','v','temp','q1','q2','omega2'
-          write(*,'(a11,2i4,f11.2,5f8.2,e10.2)') ('AFTER2 it= ',it,l,       &
-      presnivs(l),u(l),v(l),temp(l),q(l,1),q(l,2),omega2(l),l=1,llm)
-          write(*,'(a11,2a4,a11,5a8)') 'AFTER3','it','l',                   &
-           'presniv','du_phys','dv_phys','dt_phys','dq1','dq2'
-           write(*,'(a11,2i4,f11.2,5f8.2)') ('AFTER3 it= ',it,l,            &
-        presnivs(l),86400*du_phys(l),86400*dv_phys(l),                   &
-         86400*dt_phys(l),86400*dq(l,1),dq(l,2),l=1,llm)
-          write(*,*) 'dpsrf',dpsrf
-        endif
+IF (prt_level>=5) then
+  write(*, '(a11,2a4,4a13)') 'AFTER1 IT=', 'it', 'l', &
+          'presniv', 'plev', 'play', 'phi'
+  write(*, '(a11,2i4,4f13.2)') ('AFTER1 it= ', it, l, &
+          presnivs(l), plev(l), play(l), phi(l), l = 1, llm)
+  write(*, '(a11,2a4,a11,6a8)') 'AFTER2', 'it', 'l', &
+          'presniv', 'u', 'v', 'temp', 'q1', 'q2', 'omega2'
+  write(*, '(a11,2i4,f11.2,5f8.2,e10.2)') ('AFTER2 it= ', it, l, &
+          presnivs(l), u(l), v(l), temp(l), q(l, 1), q(l, 2), omega2(l), l = 1, llm)
+  write(*, '(a11,2a4,a11,5a8)') 'AFTER3', 'it', 'l', &
+          'presniv', 'du_phys', 'dv_phys', 'dt_phys', 'dq1', 'dq2'
+  write(*, '(a11,2i4,f11.2,5f8.2)') ('AFTER3 it= ', it, l, &
+          presnivs(l), 86400 * du_phys(l), 86400 * dv_phys(l), &
+          86400 * dt_phys(l), 86400 * dq(l, 1), dq(l, 2), l = 1, llm)
+  write(*, *) 'dpsrf', dpsrf
+END IF
 !---------------------------------------------------------------------
 !   Add physical tendencies :
 !---------------------------------------------------------------------
 
-       fcoriolis=2.*sin(rpi*xlat/180.)*romega
-       if (forcing_radconv .or. forcing_fire) then
-         fcoriolis=0.0
-         dt_cooling=0.0
-         d_t_adv=0.0
-         d_q_adv=0.0
-       endif
-!      print*, 'calcul de fcoriolis ', fcoriolis
-
-       if (forcing_toga .or. forcing_GCSSold .or. forcing_twpice            &
-      .or.forcing_amma .or. forcing_type==101) then
-         fcoriolis=0.0 ; ug=0. ; vg=0.
-       endif
-
-       if(forcing_rico) then
-          dt_cooling=0.
-       endif
+fcoriolis = 2. * sin(rpi * xlat / 180.) * romega
+IF (forcing_radconv .or. forcing_fire) then
+  fcoriolis = 0.0
+  dt_cooling = 0.0
+  d_t_adv = 0.0
+  d_q_adv = 0.0
+END IF
+!      PRINT*, 'calcul de fcoriolis ', fcoriolis
+
+IF (forcing_toga .or. forcing_GCSSold .or. forcing_twpice            &
+        .or.forcing_amma .or. forcing_type==101) then
+  fcoriolis = 0.0 ; ug = 0. ; vg = 0.
+END IF
+
+IF(forcing_rico) then
+  dt_cooling = 0.
+END IF
 
 !CRio:Attention modif sp??cifique cas de Caroline
-      if (forcing_type==-1) then
-         fcoriolis=0.
-!Nudging
-        
-!on calcule dt_cooling
-        do l=1,llm
-        if (play(l)>=20000.) then
-            dt_cooling(l)=-1.5/86400.
-        elseif ((play(l)>=10000.).and.((play(l)<20000.))) then
-            dt_cooling(l)=-1.5/86400.*(play(l)-10000.)/(10000.)-1./86400.*(20000.-play(l))/10000.*(temp(l)-200.)
-        else
-            dt_cooling(l)=-1.*(temp(l)-200.)/86400.
-        endif
-        enddo
-
-      endif     
+IF (forcing_type==-1) then
+  fcoriolis = 0.
+  !Nudging
+
+  !on calcule dt_cooling
+  do l = 1, llm
+    if (play(l)>=20000.) then
+      dt_cooling(l) = -1.5 / 86400.
+    elseif ((play(l)>=10000.).and.((play(l)<20000.))) then
+      dt_cooling(l) = -1.5 / 86400. * (play(l) - 10000.) / (10000.) - 1. / 86400. * (20000. - play(l)) / 10000. * (temp(l) - 200.)
+    else
+      dt_cooling(l) = -1. * (temp(l) - 200.) / 86400.
+    endif
+  enddo
+
+END IF
 !RC
-      if (forcing_sandu) then
-         ug(1:llm)=u_mod(1:llm)
-         vg(1:llm)=v_mod(1:llm)
-      endif
-
-      IF (prt_level >= 5) print*, 'fcoriolis, xlat,mxcalc ', &
-                                   fcoriolis, xlat,mxcalc
+IF (forcing_sandu) then
+  ug(1:llm) = u_mod(1:llm)
+  vg(1:llm) = v_mod(1:llm)
+END IF
+
+IF (prt_level >= 5) PRINT*, 'fcoriolis, xlat,mxcalc ', &
+        fcoriolis, xlat, mxcalc
 
 !       print *,'u-ug=',u-ug
@@ -1189,16 +1185,16 @@
 !      dv_age(1:mxcalc)=-fcoriolis*(u(1:mxcalc)-ug(1:mxcalc))
 !!!!!!!!!!!!!!!!!!!!!!!!
-       sfdt = sin(0.5*fcoriolis*timestep)
-       cfdt = cos(0.5*fcoriolis*timestep)
+sfdt = sin(0.5 * fcoriolis * timestep)
+cfdt = cos(0.5 * fcoriolis * timestep)
 !       print *,'fcoriolis,sfdt,cfdt,timestep',fcoriolis,sfdt,cfdt,timestep
 
-        du_age(1:mxcalc)= -2.*sfdt/timestep*                                &
-            (sfdt*(u(1:mxcalc)-ug(1:mxcalc)) -                          &
-             cfdt*(v(1:mxcalc)-vg(1:mxcalc))  )
+du_age(1:mxcalc) = -2. * sfdt / timestep * &
+        (sfdt * (u(1:mxcalc) - ug(1:mxcalc)) - &
+                cfdt * (v(1:mxcalc) - vg(1:mxcalc)))
 !!     : fcoriolis*(v(1:mxcalc)-vg(1:mxcalc))
 
-       dv_age(1:mxcalc)= -2.*sfdt/timestep*                                 &
-            (cfdt*(u(1:mxcalc)-ug(1:mxcalc)) +                           &
-             sfdt*(v(1:mxcalc)-vg(1:mxcalc))  )
+dv_age(1:mxcalc) = -2. * sfdt / timestep * &
+        (cfdt * (u(1:mxcalc) - ug(1:mxcalc)) + &
+                sfdt * (v(1:mxcalc) - vg(1:mxcalc)))
 !!     : -fcoriolis*(u(1:mxcalc)-ug(1:mxcalc))
 
@@ -1206,38 +1202,38 @@
 !  Nudging
 !!!!!!!!!!!!!!!!!!!!!!!!
-      d_t_nudge(:) = 0.
-      d_q_nudge(:,:) = 0.
-      d_u_nudge(:) = 0.
-      d_v_nudge(:) = 0.
-      if (nudge(inudge_RHT)) then
-        call nudge_RHT(timestep,plev,play,t_targ,rh_targ,temp,q(:,1),     &
-                    d_t_nudge,d_q_nudge(:,1))
-      endif
-      if (nudge(inudge_UV)) then
-        call nudge_UV(timestep,plev,play,u_targ,v_targ,u,v,     &
-                    d_u_nudge,d_v_nudge)
-      endif
-
-       if (forcing_fire) THEN
-
-!let ww=if ( alt le 1100 ) then alt*-0.00001 else 0
-!let wt=if ( alt le 1100 ) then min( -3.75e-5 , -7.5e-8*alt)  else 0
-!let wq=if ( alt le 1100 ) then max( 1.5e-8 , 3e-11*alt)  else 0
-           d_t_adv=0.
-           d_q_adv=0.
-           teta=temp*(pzero/play)**rkappa
-           d_t_adv=0.
-           d_q_adv=0.
-           do l=2,llm-1
-              if (zlay(l)<=1100) then
-                  wwww=-0.00001*zlay(l)
-                  d_t_adv(l)=-wwww*(teta(l)-teta(l+1))/(zlay(l)-zlay(l+1)) /(pzero/play(l))**rkappa
-                  d_q_adv(l,1:2)=-wwww*(q(l,1:2)-q(l+1,1:2))/(zlay(l)-zlay(l+1))
-                  d_t_adv(l)=d_t_adv(l)+min(-3.75e-5 , -7.5e-8*zlay(l))
-                  d_q_adv(l,1)=d_q_adv(l,1)+max( 1.5e-8 , 3e-11*zlay(l))
-              endif
-           enddo
-
-        endif
+d_t_nudge(:) = 0.
+d_q_nudge(:, :) = 0.
+d_u_nudge(:) = 0.
+d_v_nudge(:) = 0.
+IF (nudge(inudge_RHT)) then
+  CALL nudge_RHT(timestep, plev, play, t_targ, rh_targ, temp, q(:, 1), &
+          d_t_nudge, d_q_nudge(:, 1))
+END IF
+IF (nudge(inudge_UV)) then
+  CALL nudge_UV(timestep, plev, play, u_targ, v_targ, u, v, &
+          d_u_nudge, d_v_nudge)
+END IF
+
+IF (forcing_fire) THEN
+
+  !let ww=if ( alt le 1100 ) then alt*-0.00001 else 0
+  !let wt=if ( alt le 1100 ) then min( -3.75e-5 , -7.5e-8*alt)  else 0
+  !let wq=if ( alt le 1100 ) then max( 1.5e-8 , 3e-11*alt)  else 0
+  d_t_adv = 0.
+  d_q_adv = 0.
+  teta = temp * (pzero / play)**rkappa
+  d_t_adv = 0.
+  d_q_adv = 0.
+  do l = 2, llm - 1
+    if (zlay(l)<=1100) then
+      wwww = -0.00001 * zlay(l)
+      d_t_adv(l) = -wwww * (teta(l) - teta(l + 1)) / (zlay(l) - zlay(l + 1)) / (pzero / play(l))**rkappa
+      d_q_adv(l, 1:2) = -wwww * (q(l, 1:2) - q(l + 1, 1:2)) / (zlay(l) - zlay(l + 1))
+      d_t_adv(l) = d_t_adv(l) + min(-3.75e-5, -7.5e-8 * zlay(l))
+      d_q_adv(l, 1) = d_q_adv(l, 1) + max(1.5e-8, 3e-11 * zlay(l))
+    endif
+  enddo
+
+END IF
 
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -1251,113 +1247,113 @@
 !! Increment state variables
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-    IF (flag_inhib_forcing == 0) then ! if tendency of forcings should be added
-
-! pour les cas sandu et astex, on reclacule u,v,q,temp et teta dans 1D_nudge_sandu_astex.h
-! au dessus de 700hpa, on relaxe vers les profils initiaux
-      if (forcing_sandu .OR. forcing_astex) then
-      INCLUDE "1D_nudge_sandu_astex.h"
-      else
-        u(1:mxcalc)=u(1:mxcalc) + timestep*(                                &
-                du_phys(1:mxcalc)                                       &
-               +du_age(1:mxcalc)+du_adv(1:mxcalc)                       &
-               +d_u_nudge(1:mxcalc) )
-        v(1:mxcalc)=v(1:mxcalc) + timestep*(                                 &
-                dv_phys(1:mxcalc)                                       &
-               +dv_age(1:mxcalc)+dv_adv(1:mxcalc)                       &
-               +d_v_nudge(1:mxcalc) )
-        q(1:mxcalc,:)=q(1:mxcalc,:)+timestep*(                              &
-                  dq(1:mxcalc,:)                                        &
-                 +d_q_adv(1:mxcalc,:)                                   &
-                 +d_q_nudge(1:mxcalc,:) )
-
-        if (prt_level>=3) then
-          print *,                                                          &
-      'physiq-> temp(1),dt_phys(1),d_t_adv(1),dt_cooling(1) ',         &
-                temp(1),dt_phys(1),d_t_adv(1),dt_cooling(1)
-           print* ,'dv_phys=',dv_phys
-           print* ,'dv_age=',dv_age
-           print* ,'dv_adv=',dv_adv
-           print* ,'d_v_nudge=',d_v_nudge
-           print*, v
-           print*, vg
-        endif
-
-        temp(1:mxcalc)=temp(1:mxcalc)+timestep*(                            &
-                dt_phys(1:mxcalc)                                       &
-               +d_t_adv(1:mxcalc)                                      &
-               +d_t_nudge(1:mxcalc)                                      &
-               +dt_cooling(1:mxcalc))  ! Taux de chauffage ou refroid.
-
-#ifdef OUTPUT_PHYS_SCM
-      CALL iophys_ecrit('d_t_adv',klev,'d_t_adv','m/s',d_t_adv)
-      CALL iophys_ecrit('d_t_nudge',klev,'d_t_nudge','m/s',d_t_nudge)
-#endif
-
-      endif  ! forcing_sandu or forcing_astex
-
-        teta=temp*(pzero/play)**rkappa
-
-!---------------------------------------------------------------------
-!   Nudge soil temperature if requested
-!---------------------------------------------------------------------
-
-      IF (nudge_tsoil .AND. .NOT. lastcall) THEN
-       ftsoil(1,isoil_nudge,:) = ftsoil(1,isoil_nudge,:)                     &
-    -timestep/tau_soil_nudge*(ftsoil(1,isoil_nudge,:)-Tsoil_nudge)
-      ENDIF
-
-!---------------------------------------------------------------------
-!   Add large-scale tendencies (advection, etc) :
-!---------------------------------------------------------------------
-
-!cc nrlmd
-!cc        tmpvar=teta
-!cc        call advect_vert(llm,omega,timestep,tmpvar,plev)
-!cc
-!cc        teta(1:mxcalc)=tmpvar(1:mxcalc)
-!cc        tmpvar(:)=q(:,1)
-!cc        call advect_vert(llm,omega,timestep,tmpvar,plev)
-!cc        q(1:mxcalc,1)=tmpvar(1:mxcalc)
-!cc        tmpvar(:)=q(:,2)
-!cc        call advect_vert(llm,omega,timestep,tmpvar,plev)
-!cc        q(1:mxcalc,2)=tmpvar(1:mxcalc)
-
-   END IF ! end if tendency of tendency should be added
+IF (flag_inhib_forcing == 0) then ! if tendency of forcings should be added
+
+  ! pour les cas sandu et astex, on reclacule u,v,q,temp et teta dans 1D_nudge_sandu_astex.h
+  ! au dessus de 700hpa, on relaxe vers les profils initiaux
+  if (forcing_sandu .OR. forcing_astex) then
+    INCLUDE "1D_nudge_sandu_astex.h"
+  else
+    u(1:mxcalc) = u(1:mxcalc) + timestep * (&
+            du_phys(1:mxcalc)                                       &
+                    + du_age(1:mxcalc) + du_adv(1:mxcalc)                       &
+                    + d_u_nudge(1:mxcalc))
+    v(1:mxcalc) = v(1:mxcalc) + timestep * (&
+            dv_phys(1:mxcalc)                                       &
+                    + dv_age(1:mxcalc) + dv_adv(1:mxcalc)                       &
+                    + d_v_nudge(1:mxcalc))
+    q(1:mxcalc, :) = q(1:mxcalc, :) + timestep * (&
+            dq(1:mxcalc, :)                                        &
+                    + d_q_adv(1:mxcalc, :)                                   &
+                    + d_q_nudge(1:mxcalc, :))
+
+    if (prt_level>=3) then
+      print *, &
+              'physiq-> temp(1),dt_phys(1),d_t_adv(1),dt_cooling(1) ', &
+              temp(1), dt_phys(1), d_t_adv(1), dt_cooling(1)
+      PRINT*, 'dv_phys=', dv_phys
+      PRINT*, 'dv_age=', dv_age
+      PRINT*, 'dv_adv=', dv_adv
+      PRINT*, 'd_v_nudge=', d_v_nudge
+      PRINT*, v
+      PRINT*, vg
+    endif
+
+    temp(1:mxcalc) = temp(1:mxcalc) + timestep * (&
+            dt_phys(1:mxcalc)                                       &
+                    + d_t_adv(1:mxcalc)                                      &
+                    + d_t_nudge(1:mxcalc)                                      &
+                    + dt_cooling(1:mxcalc))  ! Taux de chauffage ou refroid.
+
+    IF (CPPKEY_OUTPUTPHYSSCM)
+      CALL iophys_ecrit('d_t_adv', klev, 'd_t_adv', 'm/s', d_t_adv)
+      CALL iophys_ecrit('d_t_nudge', klev, 'd_t_nudge', 'm/s', d_t_nudge)
+    END IF
+
+  endif  ! forcing_sandu or forcing_astex
+
+  teta = temp * (pzero / play)**rkappa
+
+  !---------------------------------------------------------------------
+  !   Nudge soil temperature if requested
+  !---------------------------------------------------------------------
+
+  IF (nudge_tsoil .AND. .NOT. lastcall) THEN
+    ftsoil(1, isoil_nudge, :) = ftsoil(1, isoil_nudge, :)                     &
+            - timestep / tau_soil_nudge * (ftsoil(1, isoil_nudge, :) - Tsoil_nudge)
+  ENDIF
+
+  !---------------------------------------------------------------------
+  !   Add large-scale tendencies (advection, etc) :
+  !---------------------------------------------------------------------
+
+  !cc nrlmd
+  !cc        tmpvar=teta
+  !cc        CALL advect_vert(llm,omega,timestep,tmpvar,plev)
+  !cc
+  !cc        teta(1:mxcalc)=tmpvar(1:mxcalc)
+  !cc        tmpvar(:)=q(:,1)
+  !cc        CALL advect_vert(llm,omega,timestep,tmpvar,plev)
+  !cc        q(1:mxcalc,1)=tmpvar(1:mxcalc)
+  !cc        tmpvar(:)=q(:,2)
+  !cc        CALL advect_vert(llm,omega,timestep,tmpvar,plev)
+  !cc        q(1:mxcalc,2)=tmpvar(1:mxcalc)
+
+END IF ! end if tendency of tendency should be added
 
 !---------------------------------------------------------------------
 !   Air temperature :
 !---------------------------------------------------------------------        
-        if (lastcall) then
-          print*,'Pas de temps final ',it
-          call ju2ymds(daytime, an, mois, jour, heure)
-          print*,'a la date : a m j h',an, mois, jour ,heure/3600.
-        endif
+IF (lastcall) then
+  PRINT*, 'Pas de temps final ', it
+  CALL ju2ymds(daytime, an, mois, jour, heure)
+  PRINT*, 'a la date : a m j h', an, mois, jour, heure / 3600.
+END IF
 
 !  incremente day time
-!        print*,'daytime bef',daytime,1./day_step
-        daytime = daytime+1./day_step
+!        PRINT*,'daytime bef',daytime,1./day_step
+daytime = daytime + 1. / day_step
 !Al1dbg
-        day = int(daytime+0.1/day_step)
+day = int(daytime + 0.1 / day_step)
 !        time = max(daytime-day,0.0)
 !Al1&jyg: correction de bug
 !cc        time = real(mod(it,day_step))/day_step
-        time = time_ini/24.+real(mod(it,day_step))/day_step
-!        print*,'daytime nxt time',daytime,time
-        it=it+1
-
-      enddo
+time = time_ini / 24. + real(mod(it, day_step)) / day_step
+!        PRINT*,'daytime nxt time',daytime,time
+it = it + 1
+
+END DO
 
 !Al1
-      if (ecrit_slab_oc/=-1) close(97)
+IF (ecrit_slab_oc/=-1) close(97)
 
 !Al1 Call to 1D equivalent of dynredem (an,mois,jour,heure ?)
 ! -------------------------------------
-       call dyn1dredem("restart1dyn.nc",                                    &
-                plev,play,phi,phis,presnivs,                            &
-                u,v,temp,q,omega2)
-
-        CALL abort_gcm ('lmdz1d   ','The End  ',0)
-
-        END SUBROUTINE old_lmdz1d
+CALL dyn1dredem("restart1dyn.nc", &
+        plev, play, phi, phis, presnivs, &
+        u, v, temp, q, omega2)
+
+CALL abort_gcm ('lmdz1d   ', 'The End  ', 0)
+
+END SUBROUTINE old_lmdz1d
 
         INCLUDE "old_1DUTILS_read_interp.h"
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/replay1d.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/replay1d.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/replay1d.F90	(revision 5103)
@@ -51,10 +51,10 @@
 dayref=1
 anneeref=2000
-call getin('dayref',dayref)
-call getin('anneeref',anneeref)
-call getin('calend',calend)
-call getin('day_step',day_step)
+CALL getin('dayref',dayref)
+CALL getin('anneeref',anneeref)
+CALL getin('calend',calend)
+CALL getin('day_step',day_step)
 calendrier=calend
-if ( calendrier == "earth_360d" ) calendrier="360_day"
+IF ( calendrier == "earth_360d" ) calendrier="360_day"
 
 
@@ -64,10 +64,10 @@
 an0=anneeref
 
-!print*,"REPLAY1D jour0,mois0,an0",jour0,mois0,an0
+!PRINT*,"REPLAY1D jour0,mois0,an0",jour0,mois0,an0
 
 
 klon=1
 klev=llm
-call iotd_ini('phys.nc',1,1,klev,0.,0.,presnivs,jour0,mois0,an0,0.,86400./day_step,calendrier)
+CALL iotd_ini('phys.nc',1,1,klev,0.,0.,presnivs,jour0,mois0,an0,0.,86400./day_step,calendrier)
 ! Consistent with ... CALL iophys_ini(600.)
 
@@ -75,10 +75,10 @@
 ! Initialisation de la parametrisation
 !---------------------------------------------------------------------
-call call_ini_replay
+CALL call_ini_replay
 
 !---------------------------------------------------------------------
 ! Boucle en temps sur l'appel à la parametrisation
 !---------------------------------------------------------------------
-call call_param_replay(klon,klev)
+CALL call_param_replay(klon,klev)
 
 end
@@ -108,9 +108,9 @@
  
       write(*,*) 'in abort_gcm'
-      call histclo
+      CALL histclo
       write(*,*) 'out of histclo'
       write(*,*) 'Stopping in ', modname
       write(*,*) 'Reason = ',message
-      call getin_dump
+      CALL getin_dump
 
       if (ierr == 0) then
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/scm.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/scm.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/scm.F90	(revision 5103)
@@ -100,27 +100,27 @@
 
 !        integer :: forcing_type
-        logical :: forcing_les     = .false.
-        logical :: forcing_armcu   = .false.
-        logical :: forcing_rico    = .false.
-        logical :: forcing_radconv = .false.
-        logical :: forcing_toga    = .false.
-        logical :: forcing_twpice  = .false.
-        logical :: forcing_amma    = .false.
-        logical :: forcing_dice    = .false.
-        logical :: forcing_gabls4  = .false.
-
-        logical :: forcing_GCM2SCM = .false.
-        logical :: forcing_GCSSold = .false.
-        logical :: forcing_sandu   = .false.
-        logical :: forcing_astex   = .false.
-        logical :: forcing_fire    = .false.
-        logical :: forcing_case    = .false.
-        logical :: forcing_case2   = .false.
-        logical :: forcing_SCM   = .false.
+        logical :: forcing_les     = .FALSE.
+        logical :: forcing_armcu   = .FALSE.
+        logical :: forcing_rico    = .FALSE.
+        logical :: forcing_radconv = .FALSE.
+        logical :: forcing_toga    = .FALSE.
+        logical :: forcing_twpice  = .FALSE.
+        logical :: forcing_amma    = .FALSE.
+        logical :: forcing_dice    = .FALSE.
+        logical :: forcing_gabls4  = .FALSE.
+
+        logical :: forcing_GCM2SCM = .FALSE.
+        logical :: forcing_GCSSold = .FALSE.
+        logical :: forcing_sandu   = .FALSE.
+        logical :: forcing_astex   = .FALSE.
+        logical :: forcing_fire    = .FALSE.
+        logical :: forcing_case    = .FALSE.
+        logical :: forcing_case2   = .FALSE.
+        logical :: forcing_SCM   = .FALSE.
 
 !flag forcings
-        logical :: nudge_wind=.true.
-        logical :: nudge_thermo=.false.
-        logical :: cptadvw=.true.
+        logical :: nudge_wind=.TRUE.
+        logical :: nudge_thermo=.FALSE.
+        logical :: cptadvw=.TRUE.
 
 
@@ -190,5 +190,5 @@
 !  Call to phyredem
 !---------------------------------------------------------------------
-      logical :: ok_writedem =.true.
+      logical :: ok_writedem =.TRUE.
       real :: sollw_in = 0.
       real :: solsw_in = 0.
@@ -197,6 +197,6 @@
 !  Call to physiq
 !---------------------------------------------------------------------
-      logical :: firstcall=.true.
-      logical :: lastcall=.false.
+      logical :: firstcall=.TRUE.
+      logical :: lastcall=.FALSE.
       real :: phis(1)    = 0.0
       real :: dpsrf(1)
@@ -234,5 +234,5 @@
 
 
-      print*,'VOUS ENTREZ DANS LE 1D FORMAT STANDARD'
+      PRINT*,'VOUS ENTREZ DANS LE 1D FORMAT STANDARD'
 
 !=====================================================================
@@ -258,5 +258,5 @@
 ! Initialization of Common turb_forcing
        dtime_frcg = 0.
-       Turb_fcg_gcssold=.false.
+       Turb_fcg_gcssold=.FALSE.
        hthturb_gcssold = 0.
        hqturb_gcssold = 0.
@@ -268,5 +268,5 @@
 ! OPTIONS OF THE 1D SIMULATION (lmdz1d.def => unicol.def)
 !---------------------------------------------------------------------
-        call conf_unicol
+        CALL conf_unicol
 !Al1 moves this gcssold var from common fcg_gcssold to 
         Turb_fcg_gcssold = xTurb_fcg_gcssold
@@ -275,5 +275,5 @@
         write(*,*) 'lmdz1d.def lu => unicol.def'
 
-       forcing_SCM = .true.
+       forcing_SCM = .TRUE.
        year_ini_cas=1997
        ! It is possible that those parameters are run twice.
@@ -281,10 +281,10 @@
 
 
-       call getin('anneeref',year_ini_cas)
-       call getin('dayref',day_deb)
+       CALL getin('anneeref',year_ini_cas)
+       CALL getin('dayref',day_deb)
        mth_ini_cas=1 ! pour le moment on compte depuis le debut de l'annee
-       call getin('time_ini',heure_ini_cas)
-
-      print*,'NATURE DE LA SURFACE ',nat_surf
+       CALL getin('time_ini',heure_ini_cas)
+
+      PRINT*,'NATURE DE LA SURFACE ',nat_surf
 
 ! Initialization of the logical switch for nudging
@@ -299,5 +299,5 @@
 !-----------------------------------------------------------------------
 
-      call conf_gcm( 99, .TRUE. )
+      CALL conf_gcm( 99, .TRUE. )
       
 !-----------------------------------------------------------------------
@@ -327,15 +327,15 @@
 !      calend = 'earth_365d'
       if (calend == 'earth_360d') then
-        call ioconf_calendar('360_day')
+        CALL ioconf_calendar('360_day')
         write(*,*)'CALENDRIER CHOISI: Terrestre a 360 jours/an'
       else if (calend == 'earth_365d') then
-        call ioconf_calendar('noleap')
+        CALL ioconf_calendar('noleap')
         write(*,*)'CALENDRIER CHOISI: Terrestre a 365 jours/an'
       else if (calend == 'earth_366d') then
-        call ioconf_calendar('all_leap')
+        CALL ioconf_calendar('all_leap')
         write(*,*)'CALENDRIER CHOISI: Terrestre bissextile'
       else if (calend == 'gregorian') then
         stop 'gregorian calend should not be used by normal user'
-        call ioconf_calendar('gregorian') ! not to be used by normal users
+        CALL ioconf_calendar('gregorian') ! not to be used by normal users
         write(*,*)'CALENDRIER CHOISI: Gregorien'
       else
@@ -368,5 +368,5 @@
       itau_dyn = 0
       itau_phy = 0
-      call ymds2ju(annee_ref,mois,day_ref,heure,day)
+      CALL ymds2ju(annee_ref,mois,day_ref,heure,day)
       day_ini = int(day)
       day_end = day_ini + int(fnday)
@@ -374,13 +374,13 @@
 ! Convert the initial date to Julian day
       day_ini_cas=day_deb
-      print*,'time case',year_ini_cas,mth_ini_cas,day_ini_cas
-      call ymds2ju                                                         &
+      PRINT*,'time case',year_ini_cas,mth_ini_cas,day_ini_cas
+      CALL ymds2ju                                                         &
    (year_ini_cas,mth_ini_cas,day_ini_cas,heure_ini_cas*3600            &
    ,day_ju_ini_cas)
-      print*,'time case 2',day_ini_cas,day_ju_ini_cas
+      PRINT*,'time case 2',day_ini_cas,day_ju_ini_cas
       daytime = day + heure_ini_cas/24. ! 1st day and initial time of the simulation 
 
 ! Print out the actual date of the beginning of the simulation :
-      call ju2ymds(daytime,year_print, month_print,day_print,sec_print)
+      CALL ju2ymds(daytime,year_print, month_print,day_print,sec_print)
       print *,' Time of beginning : ',                                      &
           year_print, month_print, day_print, sec_print
@@ -389,9 +389,9 @@
 ! Initialization of dimensions, geometry and initial state
 !---------------------------------------------------------------------
-!     call init_phys_lmdz(1,1,llm,1,(/1/)) ! job now done via iniphysiq
+!     CALL init_phys_lmdz(1,1,llm,1,(/1/)) ! job now done via iniphysiq
 !     but we still need to initialize dimphy module (klon,klev,etc.)  here.
-      call init_dimphy1D(1,llm)
-      call suphel
-      call init_infotrac
+      CALL init_dimphy1D(1,llm)
+      CALL suphel
+      CALL init_infotrac
 
       if (nqtot>nqmx) STOP 'Augmenter nqmx dans lmdz1d.F'
@@ -414,11 +414,11 @@
       nsw=6
 
-      call phys_state_var_init(read_climoz)
+      CALL phys_state_var_init(read_climoz)
 
       if (ngrid/=klon) then
-         print*,'stop in inifis'
-         print*,'Probleme de dimensions :'
-         print*,'ngrid = ',ngrid
-         print*,'klon  = ',klon
+         PRINT*,'stop in inifis'
+         PRINT*,'Probleme de dimensions :'
+         PRINT*,'ngrid = ',ngrid
+         PRINT*,'klon  = ',klon
          stop
       endif
@@ -442,5 +442,5 @@
        print *,'Flux: ok_flux wtsurf wqsurf',ok_flux_surf,wtsurf,wqsurf
       ENDIF
-      print*,'Flux sol ',fsens,flat
+      PRINT*,'Flux sol ',fsens,flat
 
 ! Vertical discretization and pressure levels at half and mid levels:
@@ -450,5 +450,5 @@
       preff = psurf
       IF (ok_old_disvert) THEN
-        call disvert0(pa,preff,ap,bp,dpres,presnivs,nivsigs,nivsig)
+        CALL disvert0(pa,preff,ap,bp,dpres,presnivs,nivsigs,nivsig)
         print *,'On utilise disvert0'
         aps(1:llm)=0.5*(ap(1:llm)+ap(2:llm+1))
@@ -457,5 +457,5 @@
         pseudoalt(1:llm)=-scaleheight*log(presnivs(1:llm)/preff)
       ELSE
-        call disvert()
+        CALL disvert()
         print *,'On utilise disvert'
 !       Nouvelle version disvert permettant d imposer ap,bp (modif L.Guez) MPL 18092012
@@ -476,5 +476,5 @@
          llm700=l
          print *,'llm700,play=',llm700,play(l)/100.
-         trouve_700= .false.
+         trouve_700= .FALSE.
        endif
       enddo
@@ -487,5 +487,5 @@
 
       INCLUDE "1D_read_forc_cases.h"
-   print*,'A d_t_adv ',d_t_adv(1:20)*86400
+   PRINT*,'A d_t_adv ',d_t_adv(1:20)*86400
 
       if (forcing_GCM2SCM) then
@@ -523,5 +523,5 @@
       rlon_rad(1)=xlon*rpi/180.
 
-     ! iniphysiq will call iniaqua who needs year_len from phys_cal_mod
+     ! iniphysiq will CALL iniaqua who needs year_len from phys_cal_mod
      year_len_phys_cal_mod=year_len
            
@@ -530,5 +530,5 @@
      ! with '0.' when necessary
 
-      call iniphysiq(iim,jjm,llm, &
+      CALL iniphysiq(iim,jjm,llm, &
            1,comm_lmdz, &
            rday,day_ini,timestep,  &
@@ -539,5 +539,5 @@
            (/zcvfi,0./), &
            ra,rg,rd,rcpd,1)
-      print*,'apres iniphysiq'
+      PRINT*,'apres iniphysiq'
 
 ! 2 PARAMETRES QUI DEVRAIENT ETRE LUS DANS run.def MAIS NE LE SONT PAS ICI:
@@ -557,5 +557,5 @@
         type_ocean = "force"
         run_off_lic_0(1) = restart_runoff 
-        call fonte_neige_init(run_off_lic_0)
+        CALL fonte_neige_init(run_off_lic_0)
 
         fder=0.
@@ -580,10 +580,10 @@
 !       tsoil(1,11,1)=308.00
 !-----------------------------------------------------------------------
-        call pbl_surface_init(fder, snsrf, qsurfsrf, tsoil)
+        CALL pbl_surface_init(fder, snsrf, qsurfsrf, tsoil)
 
 !------------------ prepare limit conditions for limit.nc -----------------
 !--   Ocean force
 
-        print*,'avant phyredem'
+        PRINT*,'avant phyredem'
         pctsrf(1,:)=0.
           if (nat_surf==0.) then
@@ -611,5 +611,5 @@
 
 
-        print*,'nat_surf,pctsrf(1,is_oce),pctsrf(1,is_ter)',nat_surf         &
+        PRINT*,'nat_surf,pctsrf(1,is_oce),pctsrf(1,is_ter)',nat_surf         &
           ,pctsrf(1,is_oce),pctsrf(1,is_ter)
 
@@ -704,19 +704,19 @@
 !Al1 =============== restart option ======================================
         iflag_physiq=0
-        call getin('iflag_physiq',iflag_physiq)
+        CALL getin('iflag_physiq',iflag_physiq)
 
         if (.not.restart) then
           iflag_pbl = 5
-          call phyredem ("startphy.nc")
+          CALL phyredem ("startphy.nc")
         else
 ! (desallocations)
-        print*,'callin surf final'
-          call pbl_surface_final( fder, snsrf, qsurfsrf, tsoil)
-        print*,'after surf final'
+        PRINT*,'callin surf final'
+          CALL pbl_surface_final( fder, snsrf, qsurfsrf, tsoil)
+        PRINT*,'after surf final'
           CALL fonte_neige_final(run_off_lic_0)
         endif
 
-        ok_writedem=.false.
-        print*,'apres phyredem'
+        ok_writedem=.FALSE.
+        PRINT*,'apres phyredem'
 
       endif ! ok_writedem
@@ -726,5 +726,5 @@
 ! --------------------------------------------------
 ! NB: List of the variables to be written in limit.nc 
-!     (by writelim.F, subroutine of 1DUTILS.h):
+!     (by writelim.F, SUBROUTINE of 1DUTILS.h):
 !        phy_nat,phy_alb,phy_sst,phy_bil,phy_rug,phy_ice,
 !        phy_fter,phy_foce,phy_flic,phy_fsic)
@@ -742,18 +742,18 @@
 
 ! fabrication de limit.nc
-      call writelim (1,phy_nat,phy_alb,phy_sst,phy_bil,phy_rug,             &
+      CALL writelim (1,phy_nat,phy_alb,phy_sst,phy_bil,phy_rug,             &
                  phy_ice,phy_fter,phy_foce,phy_flic,phy_fsic)
 
 
-      call phys_state_var_end
+      CALL phys_state_var_end
 !Al1
       if (restart) then
-        print*,'call to restart dyn 1d'
+        PRINT*,'CALL to restart dyn 1d'
         Call dyn1deta0("start1dyn.nc",plev,play,phi,phis,presnivs,          &
                 u,v,temp,q,omega2)
 
-       print*,'fnday,annee_ref,day_ref,day_ini',                            &
+       PRINT*,'fnday,annee_ref,day_ref,day_ini',                            &
        fnday,annee_ref,day_ref,day_ini
-!**      call ymds2ju(annee_ref,mois,day_ini,heure,day)
+!**      CALL ymds2ju(annee_ref,mois,day_ini,heure,day)
        day = day_ini
        day_end = day_ini + nday
@@ -761,5 +761,5 @@
 
 ! Print out the actual date of the beginning of the simulation :
-       call ju2ymds(daytime, an, mois, jour, heure)
+       CALL ju2ymds(daytime, an, mois, jour, heure)
        print *,' Time of beginning : y m d h',an, mois,jour,heure/3600.
 
@@ -767,8 +767,8 @@
        time=daytime-day
   
-       print*,'****** intialised fields from restart1dyn *******'
-       print*,'plev,play,phi,phis,presnivs,u,v,temp,q,omega2'
-       print*,'temp(1),q(1,1),u(1),v(1),plev(1),phis :'
-       print*,temp(1),q(1,1),u(1),v(1),plev(1),phis(1)
+       PRINT*,'****** intialised fields from restart1dyn *******'
+       PRINT*,'plev,play,phi,phis,presnivs,u,v,temp,q,omega2'
+       PRINT*,'temp(1),q(1,1),u(1),v(1),plev(1),phis :'
+       PRINT*,temp(1),q(1,1),u(1),v(1),plev(1),phis(1)
 ! raz for safety
        do l=1,llm
@@ -784,7 +784,7 @@
 
 !=====================================================================
-#ifdef OUTPUT_PHYS_SCM
+IF (CPP_OUTPUTPHYSSCM) THEN
        CALL iophys_ini(timestep)
-#endif
+END IF
 
 !=====================================================================
@@ -796,7 +796,7 @@
 
        if (prt_level>=1) then
-         print*,'XXXXXXXXXXXXXXXXXXX ITAP,day,time=',                       &
+         PRINT*,'XXXXXXXXXXXXXXXXXXX ITAP,day,time=',                       &
                it,day,time,it_end,day_step
-         print*,'PAS DE TEMPS ',timestep
+         PRINT*,'PAS DE TEMPS ',timestep
        endif
        if (it==it_end) lastcall=.True.
@@ -874,10 +874,10 @@
 !   Call physiq :
 !---------------------------------------------------------------------
-       call physiq(ngrid,llm, &
+       CALL physiq(ngrid,llm, &
                     firstcall,lastcall,timestep, &
                     plev,play,phi,phis,presnivs, &
                     u,v, rot, temp,q,omega2, &
                     du_phys,dv_phys,dt_phys,dq,dpsrf)
-                firstcall=.false.
+                firstcall=.FALSE.
 
 !---------------------------------------------------------------------
@@ -906,5 +906,5 @@
        fcoriolis=2.*sin(rpi*xlat/180.)*romega
 
-      IF (prt_level >= 5) print*, 'fcoriolis, xlat,mxcalc ', &
+      IF (prt_level >= 5) PRINT*, 'fcoriolis, xlat,mxcalc ', &
                                    fcoriolis, xlat,mxcalc
 
@@ -998,5 +998,5 @@
 !---------------------------------------------------------------------
 
-#ifdef OUTPUT_PHYS_SCM
+IF (CPP_OUTPUTPHYSSCM) THEN
       CALL iophys_ecrit('w_adv',klev,'w_adv','K/day',w_adv)
       CALL iophys_ecrit('z_adv',klev,'z_adv','K/day',z_adv)
@@ -1013,5 +1013,5 @@
       CALL iophys_ecrit('dtnud',klev,'dtnud','K/day',86400*d_t_nudge)
       CALL iophys_ecrit('dqnud',klev,'dqnud','K/day',1000*86400*d_q_nudge(:,1))
-#endif
+END IF
 
     IF (flag_inhib_forcing == 0) then ! if tendency of forcings should be added
@@ -1034,10 +1034,10 @@
       'physiq-> temp(1),dt_phys(1),d_t_adv(1),dt_cooling(1) ',         &
                 temp(1),dt_phys(1),d_t_adv(1),dt_cooling(1)
-           print* ,'dv_phys=',dv_phys
-           print* ,'d_v_age=',d_v_age
-           print* ,'d_v_adv=',d_v_adv
-           print* ,'d_v_nudge=',d_v_nudge
-           print*, v
-           print*, vg
+           PRINT* ,'dv_phys=',dv_phys
+           PRINT* ,'d_v_age=',d_v_age
+           PRINT* ,'d_v_adv=',d_v_adv
+           PRINT* ,'d_v_nudge=',d_v_nudge
+           PRINT*, v
+           PRINT*, vg
         endif
 
@@ -1070,12 +1070,12 @@
 !cc nrlmd
 !cc        tmpvar=teta
-!cc        call advect_vert(llm,omega,timestep,tmpvar,plev)
+!cc        CALL advect_vert(llm,omega,timestep,tmpvar,plev)
 !cc
 !cc        teta(1:mxcalc)=tmpvar(1:mxcalc)
 !cc        tmpvar(:)=q(:,1)
-!cc        call advect_vert(llm,omega,timestep,tmpvar,plev)
+!cc        CALL advect_vert(llm,omega,timestep,tmpvar,plev)
 !cc        q(1:mxcalc,1)=tmpvar(1:mxcalc)
 !cc        tmpvar(:)=q(:,2)
-!cc        call advect_vert(llm,omega,timestep,tmpvar,plev)
+!cc        CALL advect_vert(llm,omega,timestep,tmpvar,plev)
 !cc        q(1:mxcalc,2)=tmpvar(1:mxcalc)
 
@@ -1086,7 +1086,7 @@
 !---------------------------------------------------------------------        
         if (lastcall) then
-          print*,'Pas de temps final ',it
-          call ju2ymds(daytime, an, mois, jour, heure)
-          print*,'a la date : a m j h',an, mois, jour ,heure/3600.
+          PRINT*,'Pas de temps final ',it
+          CALL ju2ymds(daytime, an, mois, jour, heure)
+          PRINT*,'a la date : a m j h',an, mois, jour ,heure/3600.
         endif
 
@@ -1106,5 +1106,5 @@
 !Al1 Call to 1D equivalent of dynredem (an,mois,jour,heure ?)
 ! ---------------------------------------------------------------------------
-       call dyn1dredem("restart1dyn.nc",                                    &
+       CALL dyn1dredem("restart1dyn.nc",                                    &
                 plev,play,phi,phis,presnivs,                            &
                 u,v,temp,q,omega2)
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/ener_conserv.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/ener_conserv.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/ener_conserv.F90	(revision 5103)
@@ -1,3 +1,3 @@
-subroutine ener_conserv(klon,klev,pdtphys, &
+SUBROUTINE ener_conserv(klon,klev,pdtphys, &
                         puo,pvo,pto,qx,ivap,iliq,isol, &
                         pun,pvn,ptn,pqn,pqln,pqsn,dtke,masse,exner,d_t_ec)
@@ -89,5 +89,5 @@
 
    IF (iflag_ener_conserv<=2) THEN
-!     print*,'ener_conserv pbl=',iflag_pbl
+!     PRINT*,'ener_conserv pbl=',iflag_pbl
       IF (iflag_pbl>=20 .AND. iflag_pbl<=27) THEN !d_t_diss accounts for conserv
          d_t(:,:)=d_t_ajs(:,:)   ! d_t_ajs = adjust + thermals
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/fcg_racmo.h
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/fcg_racmo.h	(revision 5102)
+++ 	(revision )
@@ -1,45 +1,0 @@
-
-! $Id: fcg_racmo.h 2011-02-16 17:02:56Z cheruy $
-
-      real   :: a_guide 
-      logical :: ok_invertp 
-      integer :: forc_trb
-      character*31 :: fich_racmo
-
-      common /fcg_racmo/forc_trb,ok_invertp,a_guide,fich_racmo
-
-!$OMP THREADPRIVATE(/fcg_racmo/)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/flott_gwd_rando_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/flott_gwd_rando_m.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/flott_gwd_rando_m.F90	(revision 5103)
@@ -117,5 +117,5 @@
     REAL, DIMENSION(klev+1) ::HREF
 
-    LOGICAL, SAVE :: gwd_reproductibilite_mpiomp=.true.
+    LOGICAL, SAVE :: gwd_reproductibilite_mpiomp=.TRUE.
     LOGICAL, SAVE :: firstcall = .TRUE.
   !$OMP THREADPRIVATE(firstcall,gwd_reproductibilite_mpiomp)
@@ -131,5 +131,5 @@
        CALL abort_physic (modname,abort_message,1)
     ENDIF
-    firstcall=.false.
+    firstcall=.FALSE.
   ENDIF
 
@@ -186,10 +186,10 @@
 IF (1==0) THEN
     !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(zustr), size(zvstr), size(d_u, 1), &
          size(d_v, 1), &
          size(east_gwstress, 1), size(west_gwstress, 1) /), &
          "FLOTT_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) /), &
@@ -240,5 +240,5 @@
     ENDDO
     !LAUNCH=22 ; LTROP=33
-!   print*,'LAUNCH=',LAUNCH,'LTROP=',LTROP
+!   PRINT*,'LAUNCH=',LAUNCH,'LTROP=',LTROP
 
     ! Log pressure vert. coordinate
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/fonte_neige_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/fonte_neige_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/fonte_neige_mod.F90	(revision 5103)
@@ -57,5 +57,5 @@
   SUBROUTINE fonte_neige_init(restart_runoff)
 
-! This subroutine allocates and initialize variables in the module. 
+! This SUBROUTINE allocates and initialize variables in the module.
 ! The variable run_off_lic_0 is initialized to the field read from
 ! restart file. The other variables are initialized to zero.
@@ -141,5 +141,5 @@
   SUBROUTINE fonte_neige_init_iso(xtrestart_runoff)
 
-! This subroutine allocates and initialize variables in the module. 
+! This SUBROUTINE allocates and initialize variables in the module.
 ! The variable run_off_lic_0 is initialized to the field read from
 ! restart file. The other variables are initialized to zero.
@@ -474,5 +474,5 @@
                           )
 
-! This subroutine returns run_off_lic_0 for later writing to restart file.
+! This SUBROUTINE returns run_off_lic_0 for later writing to restart file.
 
 #ifdef ISO
@@ -611,5 +611,5 @@
 
 !#ifdef ISO
-!  subroutine fonte_neige_export_xtrun_off_lic_0(knon,xtrun_off_lic_0_diag)
+!  SUBROUTINE fonte_neige_export_xtrun_off_lic_0(knon,xtrun_off_lic_0_diag)
 !    use infotrac_phy, ONLY: niso
 
@@ -620,5 +620,5 @@
 !    xtrun_off_lic_0(:,:)=xtrun_off_lic_0_diag(:,:)
 
-!  end subroutine fonte_neige_export_xtrun_off_lic_0
+!  END SUBROUTINE  fonte_neige_export_xtrun_off_lic_0
 !#endif 
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/freinage.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/freinage.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/freinage.F90	(revision 5103)
@@ -72,5 +72,5 @@
       drag_pro(:,:) =0.
       sumveg(:,:) =0.
-!!        print*, "Cd_frein" , Cd_frein
+!!        PRINT*, "Cd_frein" , Cd_frein
       
        wind(:,:)= sqrt(uu(:,:)*uu(:,:)+vv(:,:)*vv(:,:))
@@ -86,5 +86,5 @@
 
 !    verifier les indexes ..... 
-!!       print*, " calcul de drag_pro FC "
+!!       PRINT*, " calcul de drag_pro FC "
    
       do k= 1,klev
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/global_mean.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/global_mean.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/global_mean.F90	(revision 5103)
@@ -1,3 +1,3 @@
-  subroutine global_mean(field,airephy,laire,mfield)
+  SUBROUTINE global_mean(field,airephy,laire,mfield)
 
 ! I.Musat: 05.2011
@@ -44,5 +44,5 @@
   if (is_mpi_root) THEN
   if (laire) THEN
-!  print*,'gmean airetot=',airetot
+!  PRINT*,'gmean airetot=',airetot
    if(airetot/=0.) THEN
     mfield=sumtmp/airetot
@@ -54,5 +54,5 @@
   endif
 
-! print*,'gmean sumtmp mfield=',sumtmp,mfield
+! PRINT*,'gmean sumtmp mfield=',sumtmp,mfield
 
   endif !(is_mpi_root) THEN
@@ -61,3 +61,3 @@
   endif
 
-  end subroutine global_mean
+  END SUBROUTINE  global_mean
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/grid_index.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/grid_index.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/grid_index.F90	(revision 5103)
@@ -12,10 +12,10 @@
 integer i
 grid_index=0
-do i=1,klon
+DO i=1,klon
    if ( abs(lon_deg-longitude_deg(i)) < 0.02 .and.  abs(lat_deg-latitude_deg(i)) < 0.02 ) then
         grid_index=i
         exit
    endif
-enddo
+END DO
 return
 end
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/grid_noro_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/grid_noro_m.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/grid_noro_m.F90	(revision 5103)
@@ -307,5 +307,5 @@
 !===============================================================================
 ! Purpose: Extracted from grid_noro to provide geopotential height for dynamics
-!          without any call to physics subroutines.
+!          without any CALL to physics subroutines.
 !===============================================================================
   IMPLICIT NONE 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/hbtm2l.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/hbtm2l.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/hbtm2l.F90	(revision 5103)
@@ -690,5 +690,5 @@
           omegafl(i) = .FALSE.
           ! diag
-          ! print*,'Tv2-Tv1 (k): ',i,(dTv21(i,j),j=1,k)
+          ! PRINT*,'Tv2-Tv1 (k): ',i,(dTv21(i,j),j=1,k)
         END IF
         ! CC         EndIf !plcl
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/hbtm_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/hbtm_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/hbtm_mod.F90	(revision 5103)
@@ -641,5 +641,5 @@
              ! debug
              ! if (i.EQ.1864) then
-             ! print*,'i,pblh(1864),obklen(1864)',i,pblh(i),obklen(i)
+             ! PRINT*,'i,pblh(1864),obklen(1864)',i,pblh(i),obklen(i)
              ! endif
 
@@ -659,5 +659,5 @@
           END IF
        END DO
-       ! print*,'fin calcul niveaux'
+       ! PRINT*,'fin calcul niveaux'
 
        ! Stable and neutral points; set diffusivities; counter-gradient
@@ -700,5 +700,5 @@
           END IF
        END DO
-       ! print*,'fin counter-gradient terms zero'
+       ! PRINT*,'fin counter-gradient terms zero'
 
        ! Unstable for outer layer; counter-gradient terms non-zero:
@@ -713,5 +713,5 @@
           END IF
        END DO
-       ! print*,'fin counter-gradient terms non zero'
+       ! PRINT*,'fin counter-gradient terms non zero'
 
        ! For all unstable layers, compute diffusivities and ctrgrad ter m
@@ -756,5 +756,5 @@
              ! amn ???? cette ligne a deja ete faite normalement ?
           END IF
-          ! print*,'hbtm2 i,k=',i,k
+          ! PRINT*,'hbtm2 i,k=',i,k
        END DO
     END DO ! end of level loop
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/infotrac_phy.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/infotrac_phy.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/infotrac_phy.F90	(revision 5103)
@@ -216,5 +216,5 @@
       SELECT CASE(type_trac)
       CASE('inca', 'inco')
-        IF (CPPKEY_INCA) THEN
+        IF (.NOT. CPPKEY_INCA) THEN
           CALL abort_physic(modname, 'You must add cpp key INCA and compile with INCA code', 1)
         END IF
@@ -259,5 +259,4 @@
     IF(fType == 1 .AND. ANY(['inca', 'inco']==type_trac) .AND. lInit) THEN  !=== FOUND OLD STYLE INCA "traceur.def"
       !---------------------------------------------------------------------------------------------------------------------------
-      IF (CPPKEY_INCA) THEN
         nqo = SIZE(tracers) - nqCO2
         CALL Init_chem_inca_trac(nqINCA)                               !--- Get nqINCA from INCA
@@ -290,5 +289,4 @@
         IF(setGeneration(tracers)) CALL abort_physic(modname, 'See below', 1) !- SET FIELDS %iGeneration, %gen0Name
         DEALLOCATE(had, hadv_inca, vad, vadv_inca, conv_flg_inca, pbl_flg_inca, solsym_inca)
-      END IF
       !---------------------------------------------------------------------------------------------------------------------------
     ELSE                                                              !=== OTHER CASES (OLD OR NEW FORMAT, NO INCA MODULE)
@@ -299,7 +297,5 @@
       nbtr = nqtrue - COUNT(delPhase(tracers(:)%gen0Name) == 'H2O' &
               .AND. tracers(:)%component == 'lmdz') !--- Number of tracers passed to phytrac
-      IF (CPPKEY_INCA) THEN
         nqINCA = COUNT(tracers(:)%component == 'inca')
-      END IF
       lerr = getKey('hadv', hadv, ky = tracers(:)%keys)
       lerr = getKey('vadv', vadv, ky = tracers(:)%keys)
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/ini_COSP.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/ini_COSP.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/ini_COSP.F90	(revision 5103)
@@ -1,5 +1,5 @@
 !  A.I avril 2023
 
-  subroutine ini_COSP(ref_liq_cosp0,ref_ice_cosp0,pctsrf_cosp0,zu10m_cosp0,zv10m_cosp0, &
+  SUBROUTINE ini_COSP(ref_liq_cosp0,ref_ice_cosp0,pctsrf_cosp0,zu10m_cosp0,zv10m_cosp0, &
                       zxtsol_cosp0,zx_rh_cosp0,cldfra_cosp0,rnebcon_cosp0,flwc_cosp0, &
                       fiwc_cosp0,prfl_cosp0,psfl_cosp0,pmflxr_cosp0,pmflxs_cosp0, &
@@ -34,3 +34,3 @@
         JrNt_cosp0=0.
 
-     end subroutine ini_COSP
+     END SUBROUTINE  ini_COSP
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/ini_bilKP_ins.h
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/ini_bilKP_ins.h	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/ini_bilKP_ins.h	(revision 5103)
@@ -39,7 +39,7 @@
 cym          enddo
 c
-          print*,'On stoke le fichier bilKP instantanne sur ',
+          PRINT*,'On stoke le fichier bilKP instantanne sur ',
      s   imin_ins,imax_ins,jmin_ins,jmax_ins
-          print*,'On stoke le fichier bilKP instantanne sur ',
+          PRINT*,'On stoke le fichier bilKP instantanne sur ',
      s   zx_lon(imin_ins,1),zx_lon(imax_ins,1),
      s   zx_lat(1,jmin_ins),zx_lat(1,jmax_ins)
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/ini_histREGDYN.h
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/ini_histREGDYN.h	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/ini_histREGDYN.h	(revision 5103)
@@ -30,5 +30,5 @@
 c        zout = dtime * REAL(NINT(86400./dtime*ecrit_regdyn))
 c        zsto = zout
-c        print*,'zout,zsto=',zout,zsto
+c        PRINT*,'zout,zsto=',zout,zsto
 c
 c stockage a chaque pas de temps de la physique
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/ini_histday_seri.h
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/ini_histday_seri.h	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/ini_histday_seri.h	(revision 5103)
@@ -103,5 +103,5 @@
                       "ave(X)", zstophy,zout)
 
-!          call histdef(nid_day_seri, 
+!          CALL histdef(nid_day_seri,
 !    .         "SnowFrac", 
 !    .         "Snow-covered area ", "%",  
@@ -116,5 +116,5 @@
 !    .               "ave(X)", zstophy,zout)
 
-           call histdef(nid_day_seri,  &
+           CALL histdef(nid_day_seri,  &
                "tsol_"//clnsurf(is_oce),  &
                "SST over open (ice-free) ocean ", "K",   &
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/ini_undefSTD.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/ini_undefSTD.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/ini_undefSTD.F90	(revision 5103)
@@ -56,5 +56,5 @@
     IF (n==1 .AND. itap-itapm1==1 .OR. n>1 .AND. mod(itap,nint( &
         freq_outnmc(n)/phys_tstep))==1) THEN
-      ! print*,'ini_undefSTD n itap',n,itap
+      ! PRINT*,'ini_undefSTD n itap',n,itap
       DO k = 1, nlevstd
         DO i = 1, klon
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/iniradia.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/iniradia.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/iniradia.F90	(revision 5103)
@@ -22,5 +22,5 @@
 
   ! CALL suphel     ! initialiser constantes et parametres phys.
-  ! print*,'Physiq: apres suphel '
+  ! PRINT*,'Physiq: apres suphel '
 #if CPP_RRTM
   if (iflag_rrtm == 1) then
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/VARdSV.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/VARdSV.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/VARdSV.F90	(revision 5103)
@@ -9,5 +9,5 @@
 ! +  =======================
 
-      LOGICAL           ::   INI_SV=.false.          ! Initialisation Switch     
+      LOGICAL           ::   INI_SV=.FALSE.          ! Initialisation Switch
       REAL,PARAMETER    ::   eps_21=1.e-21           ! Arbitrary  very small value
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/inlandsis.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/inlandsis.F	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/inlandsis.F	(revision 5103)
@@ -1,3 +1,3 @@
-      subroutine INLANDSIS(SnoMod,BloMod,jjtime,debut)
+      SUBROUTINE INLANDSIS(SnoMod,BloMod,jjtime,debut)
 
       USE dimphy
@@ -415,8 +415,8 @@
      .         eta_SV(1,max(1,isnoSV(1)))<epsi) then
 C +                       **********
-                     call SISVAT_BSn
+                     CALL SISVAT_BSn
           endif
          else
-                     call SISVAT_BSn
+                     CALL SISVAT_BSn
 C +                       **********
         endif
@@ -659,6 +659,6 @@
  
 !          C.Agosta option for snow density, same as for BS i.e.
-!          is_ok_density_kotlyakov=.false.
-c #BS       density_kotlyakov = .false.  !C.Amory BS 2018
+!          is_ok_density_kotlyakov=.FALSE.
+c #BS       density_kotlyakov = .FALSE.  !C.Amory BS 2018
 C + ...     Fallen Snow Density, Adapted for Antarctica
             if (is_ok_density_kotlyakov) then
@@ -898,15 +898,15 @@
        if(isnoSV(1)>=1.or.NLaysv(1)>=1) then
 C +          **********
-         call SISVAT_zSn
+         CALL SISVAT_zSn
 C +          **********
        endif
       else
 C +          **********
-        call SISVAT_zSn
+        CALL SISVAT_zSn
 C +          **********
       endif
  
 C +          **********
-! #ve   call SISVAT_wEq('_zSn  ',0)
+! #ve   CALL SISVAT_wEq('_zSn  ',0)
 C +          **********
 
@@ -981,5 +981,5 @@
 
 !            ******
-        call SnOptP(jjtime)
+        CALL SnOptP(jjtime)
 !            ******
 
@@ -996,5 +996,5 @@
 ! Soil optical properties
 ! =============================
-!Etienne: as in inlandis we do not call vgopt, we need to define
+!Etienne: as in inlandis we do not CALL vgopt, we need to define
 !the albedo alb_SV and to calculate the
 !absorbed Solar Radiation by Surfac (Normaliz)[-] SoSosv
@@ -1025,5 +1025,5 @@
  
 !            **********
-! #ve   call SISVAT_wEq('SnOptP',0)
+! #ve   CALL SISVAT_wEq('SnOptP',0)
 !            **********
 
@@ -1083,5 +1083,5 @@
       if (iflag_temp_inlandsis == 0) then
 
-       call SISVAT_TSo
+       CALL SISVAT_TSo
 
       else
@@ -1090,5 +1090,5 @@
         END DO
 
-       call SISVAT_TS2
+       CALL SISVAT_TS2
 
       end if
@@ -1096,5 +1096,5 @@
 
 !            **********
-! #ve   call SISVAT_wEq('_TSo  ',0)
+! #ve   CALL SISVAT_wEq('_TSo  ',0)
 !            **********
 
@@ -1127,9 +1127,9 @@
 
 !            **********
-        call SISVAT_qSn
+        CALL SISVAT_qSn
 !            **********
 
 !            **********
-! #ve   call SISVAT_wEq('_qSn  ',0)
+! #ve   CALL SISVAT_wEq('_qSn  ',0)
 !            **********
 
@@ -1168,5 +1168,5 @@
 
 !            **********
-        call SISVAT_qSo
+        CALL SISVAT_qSo
 ! #m0.                 (Wats_0,Wats_1,Wats_d)
 !            **********
@@ -1239,10 +1239,10 @@
       if(isnoSV(1)>=1) then
 C +          **********
-      call SISVAT_GSn
+      CALL SISVAT_GSn
 C +          **********
       endif
       else
 C +          **********
-        call SISVAT_GSn
+        CALL SISVAT_GSn
 C +          **********
       endif
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_bsn.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_bsn.F	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_bsn.F	(revision 5103)
@@ -1,5 +1,5 @@
  
  
-      subroutine SISVAT_BSn
+      SUBROUTINE SISVAT_BSn
  
 C +------------------------------------------------------------------------+
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_gsn.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_gsn.F	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_gsn.F	(revision 5103)
@@ -1,4 +1,4 @@
   
-      subroutine SISVAT_GSn
+      SUBROUTINE SISVAT_GSn
  
 C +------------------------------------------------------------------------+
@@ -296,5 +296,5 @@
 C +  ====
  
-      data       vector/.true./               ! Vectorization  Switch
+      data       vector/.TRUE./               ! Vectorization  Switch
       data       vdent1/ 0.5e8/               ! Wet Snow Metamorphism
 cXF                      tuned for Greenland (2.e8=old value)
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_qsn.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_qsn.F	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_qsn.F	(revision 5103)
@@ -1,5 +1,5 @@
  
  
-      subroutine SISVAT_qSn
+      SUBROUTINE SISVAT_qSn
      .                     (
 ! #e1.                      EqSn_0,EqSn_1,EqSn_d
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_qso.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_qso.F	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_qso.F	(revision 5103)
@@ -1,5 +1,5 @@
  
  
-      subroutine SISVAT_qSo
+      SUBROUTINE SISVAT_qSo
 ! #m0.                     (Wats_0,Wats_1,Wats_d)
  
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_sno_albedo.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_sno_albedo.F	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_sno_albedo.F	(revision 5103)
@@ -1,3 +1,3 @@
-      subroutine SnOptP(jjtime)
+      SUBROUTINE SnOptP(jjtime)
  
 C +------------------------------------------------------------------------+
@@ -464,5 +464,5 @@
         ! prescription for each time step with NEMO values 
 	
-c #AO      if (LSmask(ikl) .eq. 0 .and. coupling_ao .eq. .true.) then 
+c #AO      if (LSmask(ikl) .eq. 0 .and. coupling_ao .eq. .TRUE.) then
 c #AO       if (AOmask(ikl) .eq. 0) then  
 c #AO       albisv(ikl) =  (1.-AOmask(ikl))* albAOsisv(ikl)
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_ts2.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_ts2.F	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_ts2.F	(revision 5103)
@@ -1,3 +1,3 @@
-      subroutine SISVAT_TS2                                                     
+      SUBROUTINE SISVAT_TS2
 c #ES.                     (ETSo_0,ETSo_1,ETSo_d)                               
                                                                                 
@@ -475,3 +475,3 @@
       ENDDO
 
-      end ! subroutine SISVAT_TS2  
+      end ! SUBROUTINE SISVAT_TS2
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_tso.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_tso.F	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_tso.F	(revision 5103)
@@ -3,5 +3,5 @@
  
  
-      subroutine SISVAT_TSo
+      SUBROUTINE SISVAT_TSo
 ! #e1.                     (ETSo_0,ETSo_1,ETSo_d)
  
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_weq.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_weq.F	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_weq.F	(revision 5103)
@@ -1,5 +1,5 @@
  
  
-      subroutine SISVAT_wEq( labWEq ,istart)
+      SUBROUTINE SISVAT_wEq( labWEq ,istart)
  
 C +------------------------------------------------------------------------+
@@ -48,5 +48,5 @@
  
       IF (.NOT.logWEq)                                              THEN
-               logWEq = .true.
+               logWEq = .TRUE.
                open(unit=45,status='unknown',file='SISVAT_wEq.ve')
                rewind    45
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_zag.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_zag.F	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_zag.F	(revision 5103)
@@ -1,5 +1,5 @@
  
  
-      subroutine SISVAT_zAg
+      SUBROUTINE SISVAT_zAg
      .                     (isagra,isagrb,WEagra
      .                     ,dzagra,dzagrb,T_agra,T_agrb
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_zcr.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_zcr.F	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_zcr.F	(revision 5103)
@@ -1,5 +1,5 @@
  
  
-      subroutine SISVAT_zCr
+      SUBROUTINE SISVAT_zCr
 C +
 C +------------------------------------------------------------------------+
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_zsn.F
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_zsn.F	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/sisvat_zsn.F	(revision 5103)
@@ -1,5 +1,5 @@
  
  
-      subroutine SISVAT_zSn
+      SUBROUTINE SISVAT_zSn
  
 C +------------------------------------------------------------------------+
@@ -231,5 +231,5 @@
  
 C +   ***************
-      call SISVAT_zCr
+      CALL SISVAT_zCr
 C +   ***************
  
@@ -287,5 +287,5 @@
  
 C +     ***************
-        call SISVAT_zAg
+        CALL SISVAT_zAg
      .                 (isagr1,isagr2,WEagre
      .                 ,dzagr1,dzagr2,T_agr1,T_agr2
@@ -563,5 +563,5 @@
  
 C +   ***************
-      call SISVAT_zCr
+      CALL SISVAT_zCr
 C +   ***************
  
@@ -629,5 +629,5 @@
  
 C +     ***************
-        call SISVAT_zAg
+        CALL SISVAT_zAg
      .                 (isagr1,isagr2,WEagre
      .                 ,dzagr1,dzagr2,T_agr1,T_agr2
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/surf_inlandsis_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/surf_inlandsis_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/surf_inlandsis_mod.F90	(revision 5103)
@@ -206,8 +206,8 @@
         IF (debut) THEN
             firstcall = .TRUE.
-            INI_SV = .false.
+            INI_SV = .FALSE.
         ELSE
-            firstcall = .false.
-            INI_SV = .true.
+            firstcall = .FALSE.
+            INI_SV = .TRUE.
         END IF
 
@@ -1047,9 +1047,5 @@
         ! Objet: Lecture du fichier de conditions initiales pour SISVAT
         !======================================================================
-        !    include "indicesol.h"
-
-        !    include "dimsoil.h"
         include "clesphys.h"
-        include "thermcell.h"
         include "compbl.h"
 
@@ -1284,8 +1280,5 @@
         IMPLICIT none
 
-        !    include "indicesol.h"
-        !    include "dimsoil.h"
         include "clesphys.h"
-        include "thermcell.h"
         include "compbl.h"
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/iophy.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/iophy.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/iophy.F90	(revision 5103)
@@ -12,5 +12,5 @@
   INTEGER, ALLOCATABLE, DIMENSION(:), SAVE :: nptabij
   INTEGER, SAVE :: itau_iophy
-  LOGICAL :: check_dim = .false.
+  LOGICAL :: check_dim = .FALSE.
 
 !$OMP THREADPRIVATE(itau_iophy)
@@ -43,7 +43,5 @@
   USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, klon_glo, grid_type, unstructured
   USE print_control_mod, ONLY: prt_level,lunout 
-#ifdef CPP_IOIPSL
     USE ioipsl, ONLY: flio_dom_set
-#endif
   use wxios, ONLY: wxios_domain_param, wxios_domain_param_unstructured, wxios_context_init, using_xios
     IMPLICIT NONE
@@ -200,5 +198,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
@@ -324,5 +322,5 @@
     DO i=1,pim
 
-!    print*,'CFMIP_iophy i tabij lon lat',i,tabij(i),plon(i),plat(i)
+!    PRINT*,'CFMIP_iophy i tabij lon lat',i,tabij(i),plon(i),plat(i)
 
      plon_bounds(i,1)=rlon_glo(tabij(i)-1)
@@ -346,6 +344,6 @@
      plat_bounds(i,2)=rlat_glo(tabij(i)+nbp_lon)
 
-!    print*,'CFMIP_iophy point i lon lon_bds',i,plon_bounds(i,1),rlon_glo(tabij(i)),plon_bounds(i,2) 
-!    print*,'CFMIP_iophy point i lat lat_bds',i,plat_bounds(i,1),rlat_glo(tabij(i)),plat_bounds(i,2) 
+!    PRINT*,'CFMIP_iophy point i lon lon_bds',i,plon_bounds(i,1),rlon_glo(tabij(i)),plon_bounds(i,2)
+!    PRINT*,'CFMIP_iophy point i lat lat_bds',i,plat_bounds(i,1),rlat_glo(tabij(i)),plat_bounds(i,2)
 
     ENDDO
@@ -370,5 +368,5 @@
 
     DO i=1,pim
-!    print*,'CFMIP_iophy i tabij lon lat',i,tabij(i),plon(i),plat(i)
+!    PRINT*,'CFMIP_iophy i tabij lon lat',i,tabij(i),plon(i),plat(i)
 
      plon_bounds(i,1)=zx_lon(ipt(i)-1,jpt(i))
@@ -397,6 +395,6 @@
      ENDIF
 
-!    print*,'CFMIP_iophy point i lon lon_bds',i,plon_bounds(i,1),rlon(tabij(i)),plon_bounds(i,2) 
-!    print*,'CFMIP_iophy point i lat lat_bds',i,plat_bounds(i,1),rlat(tabij(i)),plat_bounds(i,2) 
+!    PRINT*,'CFMIP_iophy point i lon lon_bds',i,plon_bounds(i,1),rlon(tabij(i)),plon_bounds(i,2)
+!    PRINT*,'CFMIP_iophy point i lat lat_bds',i,plat_bounds(i,1),rlat(tabij(i)),plat_bounds(i,2)
 
     ENDDO
@@ -417,5 +415,5 @@
       ENDIF 
      ENDDO
-!    print*,'CFMIP_iophy mpi_rank npstn',mpi_rank,npstn
+!    PRINT*,'CFMIP_iophy mpi_rank npstn',mpi_rank,npstn
      IF(.NOT. ALLOCATED(nptabij)) THEN
       ALLOCATE(nptabij(npstn))
@@ -428,5 +426,5 @@
        npproc=npproc+1
        nptabij(npproc)=tabij(ip)
-!      print*,'mpi_rank npproc ip plon plat tabij=',mpi_rank,npproc,ip, &
+!      PRINT*,'mpi_rank npproc ip plon plat tabij=',mpi_rank,npproc,ip, &
 !      plon(ip),plat(ip),tabij(ip)
        npplon(npproc)=plon(ip)
@@ -439,5 +437,5 @@
 !!! print qui sert a reordonner les points stations selon l'ordre CFMIP
 !!! ne pas enlever
-        print*,'iophy_mpi rank ip lon lat',mpi_rank,ip,plon(ip),plat(ip)
+        PRINT*,'iophy_mpi rank ip lon lat',mpi_rank,ip,plon(ip),plat(ip)
 !!!
       ENDIF
@@ -638,5 +636,5 @@
             var%description, var%unit, var%flag(iff), typeecrit)
             IF (prt_level >= 10) THEN
-              WRITE(lunout,*) 'histdef2d: call wxios_add_field_to_file var%name iff: ', &
+              WRITE(lunout,*) 'histdef2d: CALL wxios_add_field_to_file var%name iff: ', &
                               trim(var%name),iff
             ENDIF
@@ -753,5 +751,5 @@
           var%description, var%unit, var%flag(iff), typeecrit)
             IF (prt_level >= 10) THEN
-              WRITE(lunout,*) 'histdef3d: call wxios_add_field_to_file var%name iff: ', &
+              WRITE(lunout,*) 'histdef3d: CALL wxios_add_field_to_file var%name iff: ', &
                               trim(var%name),iff
             ENDIF
@@ -851,5 +849,5 @@
      ELSE
       DO ip=1, npstn
-!     print*,'histwrite2d is_sequential npstn ip name nptabij',npstn,ip,name,nptabij(ip)
+!     PRINT*,'histwrite2d is_sequential npstn ip name nptabij',npstn,ip,name,nptabij(ip)
        IF(nptabij(ip)>=klon_mpi_begin.AND. &
           nptabij(ip)<=klon_mpi_end) THEN
@@ -975,5 +973,5 @@
   INTEGER :: ip
   REAL, ALLOCATABLE, DIMENSION(:) :: fieldok
-  logical, save :: is_active = .true.
+  logical, save :: is_active = .TRUE.
 
   IF (check_dim .AND. is_master) WRITE(lunout,*)'histwrite2d_phy for ',trim(var%name)
@@ -1019,5 +1017,5 @@
         !$omp barrier
         !$omp master
-        is_active = xios_field_is_active(var%name, at_current_timestep_arg=.false.)
+        is_active = xios_field_is_active(var%name, at_current_timestep_arg=.FALSE.)
         !$omp end master
         !$omp barrier
@@ -1044,5 +1042,5 @@
 
 ! La boucle sur les fichiers:
-      firstx=.true.
+      firstx=.TRUE.
 
       IF (ok_all_xml) THEN
@@ -1082,5 +1080,5 @@
                       write(lunout,*)'Dans iophy histwrite2D,iff,var%name ',&
                                      iff,trim(var%name)                       
-                      write(lunout,*)"histwrite2d_phy:.NOT.clef_stations(iff)and iff==iff_beg, call xios_send_field"
+                      write(lunout,*)"histwrite2d_phy:.NOT.clef_stations(iff)and iff==iff_beg, CALL xios_send_field"
                    ENDIF
                    IF (grid_type==regular_lonlat) THEN
@@ -1098,5 +1096,5 @@
                    ENDIF
 
-                   firstx=.false.
+                   firstx=.FALSE.
                 ENDIF
               ENDIF
@@ -1111,5 +1109,5 @@
 !                        IF (iff == iff_beg) THEN
 !                          IF (prt_level >= 10) THEN
-!                            write(lunout,*)"histwrite2d_phy: .NOT.clef_stations(iff) and iff==iff_beg, call xios_send_field"
+!                            write(lunout,*)"histwrite2d_phy: .NOT.clef_stations(iff) and iff==iff_beg, CALL xios_send_field"
 !                          ENDIF
 !                          CALL xios_send_field(var%name, Field2d)
@@ -1135,5 +1133,5 @@
 #ifndef CPP_IOIPSL_NO_OUTPUT 
                        IF (prt_level >= 10) THEN
-                         write(lunout,*)"histwrite2d_phy: clef_stations(iff) and iff==iff_beg, call wxios_write_2D"
+                         write(lunout,*)"histwrite2d_phy: clef_stations(iff) and iff==iff_beg, CALL wxios_write_2D"
                        ENDIF
                        CALL histwrite(nid_files(iff),var%name,itau_iophy,fieldok,npstn,index2d)
@@ -1185,5 +1183,5 @@
   INTEGER, ALLOCATABLE, DIMENSION(:) :: index3d
   REAL,ALLOCATABLE, DIMENSION(:,:) :: fieldok
-  logical, save :: is_active = .true.
+  logical, save :: is_active = .TRUE.
 
   IF (check_dim .AND. is_master) WRITE(lunout,*)'histwrite3d_phy for ', trim(var%name)
@@ -1217,5 +1215,5 @@
         !$omp barrier
         !$omp master
-        is_active = xios_field_is_active(var%name, at_current_timestep_arg=.false.)
+        is_active = xios_field_is_active(var%name, at_current_timestep_arg=.FALSE.)
         !$omp end master
         !$omp barrier
@@ -1247,5 +1245,5 @@
 
 ! BOUCLE SUR LES FICHIERS
-    firstx=.true.
+    firstx=.TRUE.
 
     IF (ok_all_xml) THEN
@@ -1281,5 +1279,5 @@
                   write(lunout,*)'Dans iophy, histwrite3D iff nlev klev firstx', &
                                   iff,nlev,klev, firstx                       
-                  write(lunout,*)'histwrite3d_phy: call xios_send_field for ', &
+                  write(lunout,*)'histwrite3d_phy: CALL xios_send_field for ', &
                                   trim(var%name), ' with iim jjm nlevx = ', &
                                   nbp_lon,jj_nb,nlevx
@@ -1299,5 +1297,5 @@
                 ENDIF
 
-                firstx=.false.
+                firstx=.FALSE.
               ENDIF
             ENDIF
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/iophys.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/iophys.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/iophys.F90	(revision 5103)
@@ -4,5 +4,5 @@
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-      subroutine iophys_ecrit(nom,lllm,titre,unite,px)
+      SUBROUTINE iophys_ecrit(nom,lllm,titre,unite,px)
 
       USE mod_phys_lmdz_para, ONLY: klon_omp, is_mpi_root
@@ -61,5 +61,5 @@
       IF (is_mpi_root) THEN       
         CALL Grid1Dto2D_glo(xglo,zx)
-        call iotd_ecrit(nom,lllm,titre,unite,zx)
+        CALL iotd_ecrit(nom,lllm,titre,unite,zx)
       ENDIF
 !$OMP END MASTER
@@ -74,5 +74,5 @@
 
 
-    subroutine iophys_ecrit_index(nom,lllm,titre,unite,knon,knindex,px)
+    SUBROUTINE iophys_ecrit_index(nom,lllm,titre,unite,knon,knindex,px)
 
     USE mod_phys_lmdz_para, ONLY: klon_omp
@@ -81,5 +81,5 @@
     IMPLICIT NONE
 
-! This subroutine returns the sea surface temperature already read from limit.nc
+! This SUBROUTINE returns the sea surface temperature already read from limit.nc
 
 ! Arguments on input:
@@ -94,5 +94,5 @@
 
     IF (klon/=klon_omp) THEN
-      print*,'klon, klon_omp',klon,klon_omp
+      PRINT*,'klon, klon_omp',klon,klon_omp
       CALL abort_physic('iophys_ecrit','probleme de dimension parallele',1)
     ENDIF
@@ -160,6 +160,6 @@
 pi=2.*asin(1.)
 
-! print*,'day_ini,annee_ref,day_ref',day_ini,annee_ref,day_ref
-! print*,'jD_ref,jH_ref,start_time, calend',jD_ref,jH_ref,start_time, calend
+! PRINT*,'day_ini,annee_ref,day_ref',day_ini,annee_ref,day_ref
+! PRINT*,'jD_ref,jH_ref,start_time, calend',jD_ref,jH_ref,start_time, calend
 
 ! Attention : les lignes ci dessous supposent un calendrier en 360 jours
@@ -172,10 +172,10 @@
 t0=0.
 calendrier=calend
-if ( calendrier == "earth_360d" ) calendrier="360_day"
-
-print*,'iophys_ini annee_ref day_ref',annee_ref,day_ref,day_ini,calend,t0
-
-
-call iotd_ini('phys.nc', &
+IF ( calendrier == "earth_360d" ) calendrier="360_day"
+
+PRINT*,'iophys_ini annee_ref day_ref',annee_ref,day_ref,day_ini,calend,t0
+
+
+CALL iotd_ini('phys.nc', &
 size(lon_reg),nlat_eff,klev,lon_reg(:)*180./pi,lat_reg*180./pi,presnivs,jour0,mois0,an0,t0,timestep,calendrier)
     ENDIF
@@ -256,5 +256,5 @@
       enddo
 
-      call iotd_ecrit(nom,lllm,titre,unite,zx)
+      CALL iotd_ecrit(nom,lllm,titre,unite,zx)
       deallocate(zx)
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/iotd_ecrit.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/iotd_ecrit.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/iotd_ecrit.F90	(revision 5103)
@@ -1,3 +1,3 @@
-      subroutine iotd_ecrit(nom,llm,titre,unite,px)
+      SUBROUTINE iotd_ecrit(nom,llm,titre,unite,px)
 
 
@@ -69,5 +69,5 @@
 ! Initialisation of 'firstnom' and create/open the "diagfi.nc" NetCDF file
 ! ------------------------------------------------------------------------
-! (Au tout premier appel de la subroutine durant le run.)
+! (Au tout premier appel de la SUBROUTINE durant le run.)
 
 
@@ -87,5 +87,5 @@
         endif
 
-       !print*,'nom ',nom,firstnom
+       !PRINT*,'nom ',nom,firstnom
 
 !! Quand on tombe sur la premiere variable on ajoute un pas de temps
@@ -95,7 +95,7 @@
            ntime=ntime+1 ! increment # of stored time steps
 
-!!          print*,'ntime ',ntime
+!!          PRINT*,'ntime ',ntime
            date=iotd_t0+ntime*iotd_ts
-           !print*,'iotd_ecrit ',iotd_ts,ntime, date
+           !PRINT*,'iotd_ecrit ',iotd_ts,ntime, date
 !          date= float (zitau +1)/float (day_step)
 
@@ -111,6 +111,6 @@
            ierr= nf90_put_var(nid,varid,date,[ntime])
 
-!          print*,'date ',date,ierr,nid
-!        print*,'IOTD Date ,varid,nid,ntime,date',varid,nid,ntime,date
+!          PRINT*,'date ',date,ierr,nid
+!        PRINT*,'IOTD Date ,varid,nid,ntime,date',varid,nid,ntime,date
 
            if (ierr/=nf90_noerr) then
@@ -163,9 +163,9 @@
           ierr = nf90_redef (nid)
           ierr = nf90_def_var(nid,nom,nf90_float,dim_cc,varid)
-          !print*,'DEF ',nom,nid,varid
+          !PRINT*,'DEF ',nom,nid,varid
           ierr = nf90_enddef(nid)
       else
          ierr= nf90_inq_varid(nid,nom,varid)
-          !print*,'INQ ',nom,nid,varid
+          !PRINT*,'INQ ',nom,nid,varid
 ! Commandes pour recuperer automatiquement les coordonnees
 !             ierr= nf90_inq_dimid(nid,"longitude",id(1))
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/iotd_ini.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/iotd_ini.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/iotd_ini.F90	(revision 5103)
@@ -51,5 +51,5 @@
       iotd_ts=timestep
       iotd_t0=t0
-      print*,'iotd_ini, ',timestep,iotd_ts
+      PRINT*,'iotd_ini, ',timestep,iotd_ts
       imax=iim
       jmax=jjm
@@ -65,7 +65,7 @@
       ! dans iotd.def
       ! Si iotd.def existe et est non vide,
-      ! seules les variables faisant à la fois l'objet d'un call iotd_ecrit
+      ! seules les variables faisant à la fois l'objet d'un CALL iotd_ecrit
       ! et étant spécifiées dans iotd.def sont sorties.
-      ! Sinon, toutes les variables faisant l'objet d'un call iotd_ecrit
+      ! Sinon, toutes les variables faisant l'objet d'un CALL iotd_ecrit
       ! sont sorties
       !-----------------------------------------------------------------------
@@ -82,5 +82,5 @@
             enddo
          endif
-         print*,n_names_iotd_def,names_iotd_def(1:n_names_iotd_def)
+         PRINT*,n_names_iotd_def,names_iotd_def(1:n_names_iotd_def)
       close(99)
 
@@ -114,5 +114,5 @@
       ierr=nf90_enddef(nid)
       ierr=nf90_put_var(nid,nvarid,rlon)
-       print*,ierr
+       PRINT*,ierr
 
 ! ---- latitude ------------
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/isccp_cloud_types.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/isccp_cloud_types.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/isccp_cloud_types.F90	(revision 5103)
@@ -1291,5 +1291,5 @@
       ! IM
       ! CALL CPU_time(t2)
-      ! print*,'IF tau t2 - t1',t2 - t1
+      ! PRINT*,'IF tau t2 - t1',t2 - t1
 
       ! CALL CPU_time(t1)
@@ -1320,5 +1320,5 @@
       ! IM
       ! CALL CPU_time(t2)
-      ! print*,'IF box_cloudy t2 - t1',t2 - t1
+      ! PRINT*,'IF box_cloudy t2 - t1',t2 - t1
 
       ! CALL CPU_time(t1)
@@ -1446,5 +1446,5 @@
           ! if (ipres(j) .gt. 0.and.itau(j) .gt. 0) then
           ! if (iw(j) .gt. int(wmin).and.iw(j) .le. iwmx) then
-          ! print*,' ISCCP iw=',iw(j),j
+          ! PRINT*,' ISCCP iw=',iw(j),j
           ! fq_dynreg(itau(j),ipres(j),iw(j))=
           ! &          fq_dynreg(itau(j),ipres(j),iw(j))+
@@ -1464,5 +1464,5 @@
       ! IM
       ! CALL CPU_time(t2)
-      ! print*,'IF sunlit boxcloudy t2 - t1',t2 - t1
+      ! PRINT*,'IF sunlit boxcloudy t2 - t1',t2 - t1
       ! IM
     END DO !IM ibox/j
@@ -1473,5 +1473,5 @@
 
     ! if(j.EQ.6722) then
-    ! print*,' ISCCP',w(j),iw(j),ipres(j),itau(j)
+    ! PRINT*,' ISCCP',w(j),iw(j),ipres(j),itau(j)
     ! endif
 
@@ -1513,10 +1513,10 @@
   ! fq_dynreg(k,l,nw) = fq_dynreg(k,l,nw)/nfq_dynreg(k,l,nw)
   ! if(k.EQ.4.AND.l.EQ.2.AND.nw.EQ.10) then
-  ! print*,' isccp APRES',nfq_dynreg(k,l,nw),
+  ! PRINT*,' isccp APRES',nfq_dynreg(k,l,nw),
   ! &   fq_dynreg(k,l,nw)
   ! endif
   ! else
   ! if(fq_dynreg(k,l,nw).NE.0.) then
-  ! print*,'nfq_dynreg = 0 tau,pc,nw',k,l,nw,fq_dynreg(k,l,nw)
+  ! PRINT*,'nfq_dynreg = 0 tau,pc,nw',k,l,nw,fq_dynreg(k,l,nw)
   ! endif
   ! fq_dynreg(k,l,nw) = -1.E+20
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/limit_read_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/limit_read_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/limit_read_mod.F90	(revision 5103)
@@ -7,6 +7,6 @@
 
 ! Module subroutines :
-!  limit_read_frac    : call limit_read_tot and return the fractions
-!  limit_read_rug_alb : return rugosity and albedo, if coupled ocean call limit_read_tot first
+!  limit_read_frac    : CALL limit_read_tot and return the fractions
+!  limit_read_rug_alb : return rugosity and albedo, if coupled ocean CALL limit_read_tot first
 !  limit_read_sst     : return sea ice temperature   
 !  limit_read_tot     : read limit.nc and store the fields in local modules variables
@@ -52,5 +52,5 @@
   SUBROUTINE limit_read_frac(itime, dtime, jour, pctsrf_new, is_modified)
 
-! This subroutine is called from "change_srf_frac" for case of 
+! This SUBROUTINE is called from "change_srf_frac" for case of
 ! ocean=force or from ocean_slab_frac for ocean=slab.
 ! The fraction for all sub-surfaces at actual time step is returned.
@@ -87,7 +87,7 @@
        rugos_out, alb_out)
 
-! This subroutine is called from surf_land_bucket. 
+! This SUBROUTINE is called from surf_land_bucket.
 ! The flag "ok_veget" must can not be true. If coupled run, "ocean=couple"
-! then this routine will call limit_read_tot.
+! then this routine will CALL limit_read_tot.
 
     USE dimphy
@@ -129,5 +129,5 @@
   SUBROUTINE limit_read_sst(knon, knindex, sst_out)
 
-! This subroutine returns the sea surface temperature already read from limit.nc.
+! This SUBROUTINE returns the sea surface temperature already read from limit.nc.
 
     USE dimphy, ONLY: klon
@@ -147,5 +147,5 @@
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 !!
-!! Private subroutine :
+!! Private SUBROUTINE :
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/limit_slab.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/limit_slab.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/limit_slab.F90	(revision 5103)
@@ -56,5 +56,5 @@
 !$OMP MASTER  ! Only master thread
      IF (is_mpi_root) THEN ! Only master processus
-        print*,'in limit_slab time to read, itime=',itime
+        PRINT*,'in limit_slab time to read, itime=',itime
         read_bils=.TRUE.
         read_sst=.TRUE.
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_atke_exchange_coeff.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_atke_exchange_coeff.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_atke_exchange_coeff.F90	(revision 5103)
@@ -5,5 +5,5 @@
 contains 
 
-subroutine atke_compute_km_kh(ngrid,nlay,dtime, &
+SUBROUTINE atke_compute_km_kh(ngrid,nlay,dtime, &
                         wind_u,wind_v,temp,qvap,play,pinterf,cdrag_uv, &
                         tke,eps,tke_shear,tke_buoy,tke_trans,Km_out,Kh_out)
@@ -183,5 +183,5 @@
                                 + Ri(igrid,ilay) * pr_slope
             IF (Ri(igrid,ilay) >= Prandtl(igrid,ilay)) THEN
-                call abort_physic("atke_compute_km_kh", &
+                CALL abort_physic("atke_compute_km_kh", &
                 'Ri>=Pr in stable conditions -> violates energy conservation principles, change pr_neut or slope', 1)
             ENDIF
@@ -356,5 +356,5 @@
 
 ELSE
-    call abort_physic("atke_compute_km_kh", &
+    CALL abort_physic("atke_compute_km_kh", &
         'numerical treatment of TKE not possible yet', 1)
 
@@ -407,8 +407,8 @@
 Kh_out(1:ngrid,2:nlay)=Kh(1:ngrid,2:nlay)
 
-end subroutine atke_compute_km_kh
+END SUBROUTINE  atke_compute_km_kh
 
 !===============================================================================================
-subroutine atke_vdiff_tke(ngrid,nlay,dtime,z_lay,z_interf,temp,play,l_exchange,Sm,tke,tke_trans)
+SUBROUTINE atke_vdiff_tke(ngrid,nlay,dtime,z_lay,z_interf,temp,play,l_exchange,Sm,tke,tke_trans)
 
 ! routine that computes the vertical diffusion of TKE by the turbulence
@@ -506,5 +506,5 @@
 
 
-end subroutine atke_vdiff_tke
+END SUBROUTINE  atke_vdiff_tke
 
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_atke_turbulence_ini.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_atke_turbulence_ini.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_atke_turbulence_ini.F90	(revision 5103)
@@ -81,14 +81,14 @@
 
       if (iflag_atke == 0 .and. iflag_atke_lmix>0) then
-            call abort_physic("atke_turbulence_ini", &
+            CALL abort_physic("atke_turbulence_ini", &
             'stationary scheme must use mixing length formulation not depending on tke', 1)
       endif
 
       ! activate vertical diffusion of TKE or not
-      atke_ok_vdiff=.false.
+      atke_ok_vdiff=.FALSE.
       CALL getin_p('atke_ok_vdiff',atke_ok_vdiff)
 
       ! account for vapor for flottability
-      atke_ok_virtual=.true.
+      atke_ok_virtual=.TRUE.
       CALL getin_p('atke_ok_virtual',atke_ok_virtual)
 
@@ -121,5 +121,5 @@
       cinf=cinffac*cn
       if (cinf <= cn) then
-            call abort_physic("atke_turbulence_ini", &
+            CALL abort_physic("atke_turbulence_ini", &
             'cinf cannot be lower than cn', 1)
       endif
@@ -134,5 +134,5 @@
       CALL getin_p('atke_pr_slope',pr_slope)
       if (pr_slope <= 1) then
-            call abort_physic("atke_turbulence_ini", &
+            CALL abort_physic("atke_turbulence_ini", &
             'pr_slope has to be greater than 1 for consistency of the tke scheme', 1)
       endif
@@ -146,5 +146,5 @@
       CALL getin_p('atke_pr_asym',pr_asym)
       if (pr_asym >= pr_neut) then
-            call abort_physic("atke_turbulence_ini", &
+            CALL abort_physic("atke_turbulence_ini", &
             'pr_asym must be be lower than pr_neut', 1)
       endif
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_blowing_snow_ini.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_blowing_snow_ini.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_blowing_snow_ini.F90	(revision 5103)
@@ -31,5 +31,5 @@
     contains
 
-   subroutine blowing_snow_ini(RCPD_in, RLSTT_in, RLVTT_in, RLMLT_in,&
+   SUBROUTINE blowing_snow_ini(RCPD_in, RLSTT_in, RLVTT_in, RLMLT_in,&
                                   RVTMP2_in, RTT_in,RD_in,RG_in, RV_in, RPI_in)
 
@@ -82,5 +82,5 @@
          CALL getin_p('r_bs',r_bs)
 
-      end subroutine blowing_snow_ini
+      END SUBROUTINE  blowing_snow_ini
 
 end module lmdz_blowing_snow_ini
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 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_blowing_snow_sublim_sedim.F90	(revision 5103)
@@ -2,5 +2,5 @@
 
 contains
-subroutine blowing_snow_sublim_sedim(ngrid,nlay,dtime,temp,qv,qb,pplay,paprs,dtemp_bs,dqv_bs,dqb_bs,bsfl,precip_bs)
+SUBROUTINE blowing_snow_sublim_sedim(ngrid,nlay,dtime,temp,qv,qb,pplay,paprs,dtemp_bs,dqv_bs,dqb_bs,bsfl,precip_bs)
 
 !==============================================================================
@@ -178,5 +178,5 @@
 
    ! calulation saturation specific humidity
-    CALL CALC_QSAT_ECMWF(ngrid,ztemp(:),qzero(:),zpres(:),RTT,2,.false.,qsi(:),dqsi(:))
+    CALL CALC_QSAT_ECMWF(ngrid,ztemp(:),qzero(:),zpres(:),RTT,2,.FALSE.,qsi(:),dqsi(:))
 
 
@@ -292,4 +292,4 @@
 return
 
-end subroutine blowing_snow_sublim_sedim
+END SUBROUTINE  blowing_snow_sublim_sedim
 end module lmdz_blowing_snow_sublim_sedim
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_call_atke.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_call_atke.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_call_atke.F90	(revision 5103)
@@ -8,5 +8,5 @@
 contains
 
-subroutine call_atke(dtime,ngrid,nlay,nsrf,ni,cdrag_uv,cdrag_t,u_surf,v_surf,temp_surf, &
+SUBROUTINE call_atke(dtime,ngrid,nlay,nsrf,ni,cdrag_uv,cdrag_t,u_surf,v_surf,temp_surf, &
                         wind_u,wind_v,temp,qvap,play,pinterf, &
                         tke,eps,Km_out,Kh_out)
@@ -59,5 +59,5 @@
 
 
-call atke_compute_km_kh(ngrid,nlay,dtime,&
+CALL atke_compute_km_kh(ngrid,nlay,dtime,&
                         wind_u,wind_v,temp,qvap,play,pinterf,cdrag_uv,&
                         tke,eps,tke_shear_term,tke_buoy_term,tke_trans_term,Km_out,Kh_out)
@@ -65,5 +65,5 @@
 
                                
-if (iflag_num_atke == 1) then
+IF (iflag_num_atke == 1) then
    !! In this case, we make an explicit prediction of the wind shear to calculate the tke in a
    !! forward backward way
@@ -74,9 +74,9 @@
       wind1(i)=sqrt(wind_u(i,1)**2+wind_v(i,1)**2)
    enddo
-   call atke_explicit_prediction(ngrid,nlay,rg,rd,dtime,pinterf,play,temp,wind1,wind_u,Km_out,u_surf,cdrag_uv,wind_u_predict)  
-   call atke_explicit_prediction(ngrid,nlay,rg,rd,dtime,pinterf,play,temp,wind1,wind_v,Km_out,v_surf,cdrag_uv,wind_v_predict)
+   CALL atke_explicit_prediction(ngrid,nlay,rg,rd,dtime,pinterf,play,temp,wind1,wind_u,Km_out,u_surf,cdrag_uv,wind_u_predict)
+   CALL atke_explicit_prediction(ngrid,nlay,rg,rd,dtime,pinterf,play,temp,wind1,wind_v,Km_out,v_surf,cdrag_uv,wind_v_predict)
 
 
-   call atke_compute_km_kh(ngrid,nlay,dtime,&
+   CALL atke_compute_km_kh(ngrid,nlay,dtime,&
                         wind_u_predict,wind_v_predict,temp,qvap,play,pinterf,cdrag_uv, &
                         tke,eps,tke_shear_term,tke_buoy_term,tke_trans_term,Km_out,Kh_out)
@@ -98,9 +98,9 @@
 
 
-end subroutine call_atke
+END SUBROUTINE  call_atke
 
 !----------------------------------------------------------------------------------------
 
-subroutine atke_explicit_prediction(ngrid,nlay,rg,rd,dtime,pinterf,play,temp,wind1,x_in,K_in,x_surf,cdrag,x_predict)
+SUBROUTINE atke_explicit_prediction(ngrid,nlay,rg,rd,dtime,pinterf,play,temp,wind1,x_in,K_in,x_surf,cdrag,x_predict)
 
 INTEGER, INTENT(IN) :: ngrid ! number of horizontal index (flat grid)
@@ -129,20 +129,20 @@
 
 ! "big K" calculation
-do  k=2,nlay-1
+DO  k=2,nlay-1
    do i=1,ngrid
       rho=pinterf(i,k)/rd/(0.5*(temp(i,k-1)+temp(i,k)))
       K_big(i,k)=rg*K_in(i,k)/(play(i,k)-play(i,k+1))*(rho**2)
    enddo
-enddo
+END DO
 ! speficic treatment for k=nlay
-do i=1,ngrid
+DO i=1,ngrid
    rho=pinterf(i,nlay)/rd/temp(i,nlay)
    K_big(i,nlay)=rg*K_in(i,nlay)/(2*(play(i,nlay)-pinterf(i,nlay+1)))*(rho**2)
-enddo
+END DO
 
 
 
 ! x_predict calculation for 2<=k<=nlay-1
-do  k=2,nlay-1
+DO  k=2,nlay-1
    do i=1,ngrid
       ml=(pinterf(i,k)-pinterf(i,k+1))/rg
@@ -151,22 +151,22 @@
                   - K_big(i,k)*x_in(i,k-1))
    enddo
-enddo
+END DO
 
 ! Specific treatment for k=1 
-do i=1,ngrid
+DO i=1,ngrid
    ml=(pinterf(i,1)-pinterf(i,2))/rg
    F1=-play1(i)/rd/temp1(i)*wind1(i)*cdrag(i)*(x_in(i,1)-x_surf(i)) ! attention convention sens du flux
    x_predict(i,1)=x_in(i,1)-dtime/ml*(-K_big(i,2)*(x_in(i,2) - x_in(i,1))-F1)
-enddo
+END DO
 
 ! Specific treatment for k=nlay
 ! flux at the top of the atmosphere=0
-do i=1,ngrid
+DO i=1,ngrid
    ml=0.5*(pinterf(i,nlay)-pinterf(i,nlay+1))/rg
    x_predict(i,nlay)=x_in(i,nlay)+dtime/ml*(K_big(i,nlay)*(x_in(i,nlay)-x_in(i,nlay-1)))
-enddo
+END DO
 
 
-end subroutine atke_explicit_prediction
+END SUBROUTINE  atke_explicit_prediction
 
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_call_blowing_snow.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_call_blowing_snow.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_call_blowing_snow.F90	(revision 5103)
@@ -3,5 +3,5 @@
 contains
 
-subroutine call_blowing_snow_sublim_sedim(ngrid,nlay,dtime,temp,q,qbs,pplay,paprs, &
+SUBROUTINE call_blowing_snow_sublim_sedim(ngrid,nlay,dtime,temp,q,qbs,pplay,paprs, &
                                   dtemp_bs,dq_bs,dqbs_bs,bsfl,precip_bs)
 
@@ -34,5 +34,5 @@
 
 
-call blowing_snow_sublim_sedim(ngrid,nlay,dtime,temp,q,qbs,pplay,paprs, &
+CALL blowing_snow_sublim_sedim(ngrid,nlay,dtime,temp,q,qbs,pplay,paprs, &
                                   dtemp_bs,dq_bs,dqbs_bs,bsfl,precip_bs)
 
@@ -41,5 +41,5 @@
 
 
-end subroutine call_blowing_snow_sublim_sedim
+END SUBROUTINE  call_blowing_snow_sublim_sedim
 
 end module lmdz_call_blowing_snow
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_cloud_optics_prop.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_cloud_optics_prop.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_cloud_optics_prop.F90	(revision 5103)
@@ -728,5 +728,5 @@
   ENDIF !ok_cdnc
 
-  first=.false. !to be sure
+  first=.FALSE. !to be sure
 
   RETURN
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 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_cloud_optics_prop_ini.F90	(revision 5103)
@@ -78,9 +78,9 @@
     ok_new_lscp = ok_new_lscp_in
     
-    call getin_p('cdnc_min',cdnc_min)
+    CALL getin_p('cdnc_min',cdnc_min)
     cdnc_min_m3=cdnc_min*1.E6
     IF (cdnc_min_m3<0.) cdnc_min_m3=20.E6 ! astuce pour retrocompatibilite
     write(lunout,*)'cdnc_min=', cdnc_min_m3/1.E6
-    call getin_p('cdnc_max',cdnc_max)
+    CALL getin_p('cdnc_max',cdnc_max)
     cdnc_max_m3=cdnc_max*1.E6
     IF (cdnc_max_m3<0.) cdnc_max_m3=1000.E6 ! astuce pour retrocompatibilite
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_cloudth.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_cloudth.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_cloudth.F90	(revision 5103)
@@ -198,5 +198,5 @@
       
           
-!     print*,sth,sigma2s,qlth(ind1,ind2),ctot(ind1,ind2),qltot(ind1,ind2),'verif'
+!     PRINT*,sth,sigma2s,qlth(ind1,ind2),ctot(ind1,ind2),qltot(ind1,ind2),'verif'
 
 
@@ -443,5 +443,5 @@
       qlenv(ind1,ind2)=IntJ+IntI1+IntI2+IntI3
 !      qlenv(ind1,ind2)=IntJ 
-!      print*, qlenv(ind1,ind2),'VERIF EAU'
+!      PRINT*, qlenv(ind1,ind2),'VERIF EAU'
 
 
@@ -454,5 +454,5 @@
       qlth(ind1,ind2)=IntJ+IntI1+IntI2+IntI3
 !      qlth(ind1,ind2)=IntJ
-!      print*, IntJ,IntI1,IntI2,IntI3,qlth(ind1,ind2),'VERIF EAU2'
+!      PRINT*, IntJ,IntI1,IntI2,IntI3,qlth(ind1,ind2),'VERIF EAU2'
       qltot(ind1,ind2)=fraca(ind1,ind2)*qlth(ind1,ind2)+(1.-1.*fraca(ind1,ind2))*qlenv(ind1,ind2)
 
@@ -491,5 +491,5 @@
       qlenv(ind1,ind2)=IntJ+IntI1+IntI2+IntI3
 !      qlenv(ind1,ind2)=IntJ 
-!      print*, qlenv(ind1,ind2),'VERIF EAU'
+!      PRINT*, qlenv(ind1,ind2),'VERIF EAU'
 
       IntJ=0.5*sth*(1-erf(xth2))+(sigma2s/sqrt2pi)*exp(-1.*xth2**2)
@@ -500,5 +500,5 @@
       qlth(ind1,ind2)=IntJ+IntI1+IntI2+IntI3
 !      qlth(ind1,ind2)=IntJ
-!      print*, IntJ,IntI1,IntI2,IntI3,qlth(ind1,ind2),'VERIF EAU2'
+!      PRINT*, IntJ,IntI1,IntI2,IntI3,qlth(ind1,ind2),'VERIF EAU2'
       qltot(ind1,ind2)=fraca(ind1,ind2)*qlth(ind1,ind2)+(1.-1.*fraca(ind1,ind2))*qlenv(ind1,ind2)
       
@@ -525,5 +525,5 @@
       
           
-!     print*,sth,sigma2s,qlth(ind1,ind2),ctot(ind1,ind2),qltot(ind1,ind2),'verif'
+!     PRINT*,sth,sigma2s,qlth(ind1,ind2),ctot(ind1,ind2),qltot(ind1,ind2),'verif'
 
 
@@ -1642,7 +1642,7 @@
 
 ! Calculation of saturation specific humidity
-CALL CALC_QSAT_ECMWF(klon,Tbefenv,qt_env,play,RTT,1,.false.,qslenv,dqsatenv)
-CALL CALC_QSAT_ECMWF(klon,Tbefenv,qt_env,play,RTT,2,.false.,qsienv,dqsatenv)
-CALL CALC_QSAT_ECMWF(klon,Tbefth,qt_th,play,RTT,1,.false.,qslth,dqsatth)
+CALL CALC_QSAT_ECMWF(klon,Tbefenv,qt_env,play,RTT,1,.FALSE.,qslenv,dqsatenv)
+CALL CALC_QSAT_ECMWF(klon,Tbefenv,qt_env,play,RTT,2,.FALSE.,qsienv,dqsatenv)
+CALL CALC_QSAT_ECMWF(klon,Tbefth,qt_th,play,RTT,1,.FALSE.,qslth,dqsatth)
 
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_cloudth_ini.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_cloudth_ini.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_cloudth_ini.F90	(revision 5103)
@@ -10,5 +10,5 @@
 contains
 
-subroutine cloudth_ini(iflag_cloudth_vert_in,iflag_ratqs_in)
+SUBROUTINE cloudth_ini(iflag_cloudth_vert_in,iflag_ratqs_in)
 
 use ioipsl_getin_p_mod, ONLY: getin_p
@@ -49,5 +49,5 @@
         CALL getin_p('Ni', Ni)
 
-end subroutine cloudth_ini
+END SUBROUTINE  cloudth_ini
 
 end module lmdz_cloudth_ini
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp.F90	(revision 5103)
@@ -418,7 +418,7 @@
 
     IF (k<=klev-1) THEN
-       iftop=.false. 
+       iftop=.FALSE.
     ELSE 
-       iftop=.true.
+       iftop=.TRUE.
     ENDIF
 
@@ -510,9 +510,9 @@
         ! Calculation of saturation specific humidity
         ! depending on temperature:
-        CALL calc_qsat_ecmwf(klon,zt(:),qzero(:),pplay(:,k),RTT,0,.false.,zqs(:),zdqs(:))
+        CALL calc_qsat_ecmwf(klon,zt(:),qzero(:),pplay(:,k),RTT,0,.FALSE.,zqs(:),zdqs(:))
         ! wrt liquid water
-        CALL calc_qsat_ecmwf(klon,zt(:),qzero(:),pplay(:,k),RTT,1,.false.,qsl(:),dqsl(:))
+        CALL calc_qsat_ecmwf(klon,zt(:),qzero(:),pplay(:,k),RTT,1,.FALSE.,qsl(:),dqsl(:))
         ! wrt ice
-        CALL calc_qsat_ecmwf(klon,zt(:),qzero(:),pplay(:,k),RTT,2,.false.,qsi(:),dqsi(:))
+        CALL calc_qsat_ecmwf(klon,zt(:),qzero(:),pplay(:,k),RTT,2,.FALSE.,qsi(:),dqsi(:))
 
         DO i = 1, klon
@@ -694,5 +694,5 @@
 
      qtot(:)=zq(:)+zmqc(:)
-     CALL calc_qsat_ecmwf(klon,zt(:),qtot(:),pplay(:,k),RTT,0,.false.,zqs(:),zdqs(:))
+     CALL calc_qsat_ecmwf(klon,zt(:),qtot(:),pplay(:,k),RTT,0,.FALSE.,zqs(:),zdqs(:))
      DO i = 1, klon
             zdelta = MAX(0.,SIGN(1.,RTT-zt(i)))
@@ -813,5 +813,5 @@
                 DO i=1,klon
 
-                    ! keepgoing = .true. while convergence is not satisfied
+                    ! keepgoing = .TRUE. while convergence is not satisfied
                     keepgoing(i)=ABS(DT(i))>DDT0
 
@@ -839,5 +839,5 @@
 
                   ! Calculation of saturation specific humidity and ice fraction
-                  CALL calc_qsat_ecmwf(klon,Tbef(:),qtot(:),pplay(:,k),RTT,0,.false.,zqs(:),zdqs(:))
+                  CALL calc_qsat_ecmwf(klon,Tbef(:),qtot(:),pplay(:,k),RTT,0,.FALSE.,zqs(:),zdqs(:))
                   CALL calc_gammasat(klon,Tbef(:),qtot(:),pplay(:,k),gammasat(:),dgammasatdt(:))
                   ! saturation may occur at a humidity different from qsat (gamma qsat), so gamma correction for dqs
@@ -1242,5 +1242,5 @@
                 ENDIF
 
-                ! c_iso: call isotope_conversion (for readibility) or duplicate 
+                ! c_iso: CALL isotope_conversion (for readibility) or duplicate
 
                 radocond(i,k) = radocond(i,k) + zoliq(i)/REAL(niter_lscp+1)
@@ -1340,6 +1340,6 @@
             ENDIF
         !IF ( ((1-zfice(i))*zoliq(i) .GT. 0.) .AND. (zt(i) .LE. 233.15) ) THEN
-        !print*,'WARNING LEA OLIQ A <-40°C '
-        !print*,'zt,Tbef,oliq,oice,cldfraliq,icefrac,rneb',zt(i),Tbef(i),(1-zfice(i))*zoliq(i),zfice(i)*zoliq(i),cldfraliq(i,k),zfice(i),rneb(i,k)
+        !PRINT*,'WARNING LEA OLIQ A <-40°C '
+        !PRINT*,'zt,Tbef,oliq,oice,cldfraliq,icefrac,rneb',zt(i),Tbef(i),(1-zfice(i))*zoliq(i),zfice(i)*zoliq(i),cldfraliq(i,k),zfice(i),rneb(i,k)
         !ENDIF 
         ENDDO
@@ -1361,5 +1361,5 @@
     ! for ice phase, we take radocondi if we neglect snowfall, otherwise (ok_radocond_snow=true) 
     ! we recalculate radocondi to account for contributions from the precipitation flux
-    ! TODO: for the moment, we deactivate this option when ok_poprecip=.true.
+    ! TODO: for the moment, we deactivate this option when ok_poprecip=.TRUE.
 
     IF ((ok_radocond_snow) .AND. (k < klev) .AND. (.NOT. ok_poprecip)) THEN
@@ -1457,6 +1457,6 @@
    ENDDO
    !q_sat
-   CALL calc_qsat_ecmwf(klon,Tbef(:),qzero(:),pplay(:,k),RTT,1,.false.,qsatl(:,k),zdqs(:))
-   CALL calc_qsat_ecmwf(klon,Tbef(:),qzero(:),pplay(:,k),RTT,2,.false.,qsats(:,k),zdqs(:))
+   CALL calc_qsat_ecmwf(klon,Tbef(:),qzero(:),pplay(:,k),RTT,1,.FALSE.,qsatl(:,k),zdqs(:))
+   CALL calc_qsat_ecmwf(klon,Tbef(:),qzero(:),pplay(:,k),RTT,2,.FALSE.,qsats(:,k),zdqs(:))
 
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp_ini.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp_ini.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp_ini.F90	(revision 5103)
@@ -49,5 +49,5 @@
   !$OMP THREADPRIVATE(min_frac_th_cld)
 
-  LOGICAL, SAVE, PROTECTED :: ok_radocond_snow=.false. ! take into account the mass of ice precip in the cloud ice content seen by radiation
+  LOGICAL, SAVE, PROTECTED :: ok_radocond_snow=.FALSE. ! take into account the mass of ice precip in the cloud ice content seen by radiation
   !$OMP THREADPRIVATE(ok_radocond_snow)
 
@@ -92,5 +92,5 @@
 
 
-  LOGICAL, SAVE, PROTECTED :: reevap_ice=.false.            ! no liquid precip for T< threshold
+  LOGICAL, SAVE, PROTECTED :: reevap_ice=.FALSE.            ! no liquid precip for T< threshold
   !$OMP THREADPRIVATE(reevap_ice)
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp_old.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp_old.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp_old.F90	(revision 5103)
@@ -49,5 +49,5 @@
   !======================================================================
   ! JLD: 
-  ! * Routine probablement fausse (au moins incoherente) si thermcep = .false.
+  ! * Routine probablement fausse (au moins incoherente) si thermcep = .FALSE.
   ! * fl_cor_ebil doit etre > 0 ; 
   !   fl_cor_ebil= 0 pour reproduire anciens bugs
@@ -780,5 +780,5 @@
 
               if (iflag_cloudth_vert<=2) then
-               call cloudth(klon,klev,k,ztv, &
+               CALL cloudth(klon,klev,k,ztv, &
                    zq,zqta,fraca, &
                    qcloud,ctot,zpspsk,paprs,pplay,ztla,zthl, &
@@ -787,5 +787,5 @@
 
               elseif (iflag_cloudth_vert>=3 .and. iflag_cloudth_vert<=5) then
-               call cloudth_v3(klon,klev,k,ztv, &
+               CALL cloudth_v3(klon,klev,k,ztv, &
                    zq,zqta,fraca, &
                    qcloud,ctot,ctot_vol,zpspsk,paprs,pplay,ztla,zthl, &
@@ -796,5 +796,5 @@
               !----------------------------------              
               elseif (iflag_cloudth_vert==6) then
-               call cloudth_v6(klon,klev,k,ztv, &
+               CALL cloudth_v6(klon,klev,k,ztv, &
                    zq,zqta,fraca, &
                    qcloud,ctot,ctot_vol,zpspsk,paprs,pplay,ztla,zthl, &
@@ -812,5 +812,5 @@
 
            if (iflag_cld_th <= 4) then
-              lognormale = .true.
+              lognormale = .TRUE.
            elseif (iflag_cld_th >= 6) then
               ! lognormale en l'absence des thermiques
@@ -819,5 +819,5 @@
               ! Dans le cas iflag_cld_th=5, on prend systématiquement la
               ! bi-gaussienne
-              lognormale = .false.
+              lognormale = .FALSE.
            end if
 
@@ -853,5 +853,5 @@
                do i=1,klon
 !                 do while ((abs(DT(i)).gt.DDT0).or.(n_i(i).eq.0))
-                 ! !! convergence = .true. tant que l'on n'a pas converge !!
+                 ! !! convergence = .TRUE. tant que l'on n'a pas converge !!
                  ! ------------------------------
                  convergence(i)=abs(DT(i))>DDT0
@@ -1154,5 +1154,5 @@
            ENDDO
          endif
-!         print*,zt(i),zrfl(i),zifl(i),'temp1'
+!         PRINT*,zt(i),zrfl(i),zifl(i),'temp1'
        ENDIF
 !>AJ
@@ -1258,5 +1258,5 @@
            zneb(i) = MAX(rneb(i,k), seuil_neb)
      !      zt(i) = zt(i)+zcond(i)*zfice(i)*RLMLT/RCPD/(1.0+RVTMP2*zq(i))  
-!           print*,zt(i),'fractionglace'
+!           PRINT*,zt(i),'fractionglace'
 !>AJ
            radliq(i,k) = zoliq(i)/REAL(ninter+1)
@@ -1490,8 +1490,8 @@
 !           zrfl(i)=zrfl(i)+zmelt*zifl(i)
 !           zifl(i)=zifl(i)*(1.-zmelt)
-!           print*,zt(i),'octavio1'
+!           PRINT*,zt(i),'octavio1'
 !           zt(i)=zt(i)-zifl(i)*zmelt*(RG*dtime)/(paprs(i,k)-paprs(i,k+1)) &
 !                      *RLMLT/RCPD/(1.0+RVTMP2*zq(i))
-!           print*,zt(i),zrfl(i),zifl(i),zmelt,'octavio2'
+!           PRINT*,zt(i),zrfl(i),zifl(i),zmelt,'octavio2'
 !       ENDDO
 !     ENDIF
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp_poprecip.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp_poprecip.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp_poprecip.F90	(revision 5103)
@@ -95,9 +95,9 @@
 !--Calculation of saturation specific humidity
 !--depending on temperature:
-CALL calc_qsat_ecmwf(klon,temp(:),qzero(:),pplay(:),RTT,0,.false.,qsat(:),dqsat(:))
+CALL calc_qsat_ecmwf(klon,temp(:),qzero(:),pplay(:),RTT,0,.FALSE.,qsat(:),dqsat(:))
 !--wrt liquid water
-CALL calc_qsat_ecmwf(klon,temp(:),qzero(:),pplay(:),RTT,1,.false.,qsatl(:),dqsatl(:))
+CALL calc_qsat_ecmwf(klon,temp(:),qzero(:),pplay(:),RTT,1,.FALSE.,qsatl(:),dqsatl(:))
 !--wrt ice
-CALL calc_qsat_ecmwf(klon,temp(:),qzero(:),pplay(:),RTT,2,.false.,qsati(:),dqsati(:))
+CALL calc_qsat_ecmwf(klon,temp(:),qzero(:),pplay(:),RTT,2,.FALSE.,qsati(:),dqsati(:))
 
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp_tools.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp_tools.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp_tools.F90	(revision 5103)
@@ -319,7 +319,7 @@
 
    !--wrt liquid water
-   CALL calc_qsat_ecmwf(klon,temp(:),qzero(:),pplay(:),RTT,1,.false.,qsatl(:),dqsatl(:))
+   CALL calc_qsat_ecmwf(klon,temp(:),qzero(:),pplay(:),RTT,1,.FALSE.,qsatl(:),dqsatl(:))
    !--wrt ice
-   CALL calc_qsat_ecmwf(klon,temp(:),qzero(:),pplay(:),RTT,2,.false.,qsati(:),dqsati(:))
+   CALL calc_qsat_ecmwf(klon,temp(:),qzero(:),pplay(:),RTT,2,.FALSE.,qsati(:),dqsati(:))
 
 
@@ -494,5 +494,5 @@
               icefrac(i)    = qice(i) / ( qice(i) + qliq(i) )
               dicefracdT(i) = 0.
-              !print*,'MPC turb'
+              !PRINT*,'MPC turb'
 
            END IF ! Enough TKE
@@ -596,6 +596,6 @@
     INTEGER i
     
-        CALL CALC_QSAT_ECMWF(klon,temp,qtot,pressure,RTT,1,.false.,qsl,dqsl)
-        CALL CALC_QSAT_ECMWF(klon,temp,qtot,pressure,RTT,2,.false.,qsi,dqsi)
+        CALL CALC_QSAT_ECMWF(klon,temp,qtot,pressure,RTT,1,.FALSE.,qsl,dqsl)
+        CALL CALC_QSAT_ECMWF(klon,temp,qtot,pressure,RTT,2,.FALSE.,qsi,dqsi)
 
     DO i=1,klon
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_ratqs_ini.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_ratqs_ini.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_ratqs_ini.F90	(revision 5103)
@@ -44,10 +44,10 @@
 RTT     =RTT_in
 
-print*,'ratqs_ini'
-if (iflag_thermals==15.or.iflag_thermals==16) then
+PRINT*,'ratqs_ini'
+IF (iflag_thermals==15.or.iflag_thermals==16) then
    dqimpl=-1
 else
    dqimpl=1
-endif
+END IF
 lunout=lunout_in
 
@@ -76,5 +76,5 @@
 !--------------------------------------------------------
 
-if (klon==1) then
+IF (klon==1) then
     do k=1,klev
       do i=1,klon 
@@ -84,6 +84,6 @@
     enddo
 else
-    print*, 'conserver la variance dans les restarts'
-endif
+    PRINT*, 'conserver la variance dans les restarts'
+END IF
 !--------------------------------------------------------
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_ratqs_main.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_ratqs_main.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_ratqs_main.F90	(revision 5103)
@@ -67,5 +67,5 @@
 !-------------------------------------------------------------------------
 
-!      print*,'calcul des ratqs'
+!      PRINT*,'calcul des ratqs'
 !   ratqs convectifs a l'ancienne en fonction de q(z=0)-q / q
 !   ----------------
@@ -87,10 +87,10 @@
 !-----------------------------------------------------------------------
       else if (iflag_cld_th==4) then
-         ptconvth(:,:)=.false.
+         ptconvth(:,:)=.FALSE.
          ratqsc(:,:)=0.
-         if(prt_level>=9) print*,'avant clouds_gno thermique'
-         call clouds_gno &
+         if(prt_level>=9) PRINT*,'avant clouds_gno thermique'
+         CALL clouds_gno &
          (klon,klev,q_seri,zqsat,clwcon0th,ptconvth,ratqsc,rnebcon0th)
-         if(prt_level>=9) print*,' CLOUDS_GNO OK'
+         if(prt_level>=9) PRINT*,' CLOUDS_GNO OK'
        
        endif
@@ -195,5 +195,5 @@
           if (iflag_ratqs == 10) then
              ! interactive ratqs in presence of cold pools     
-             call ratqs_inter(klon,klev,iflag_ratqs,pdtphys,paprs, &
+             CALL ratqs_inter(klon,klev,iflag_ratqs,pdtphys,paprs, &
                        ratqsbas,wake_deltaq,wake_s,q_seri,qtc_cv, sigt_cv, &
                        fm_therm,entr_therm,detr_therm,detrain_cv,fm_cv,fqd,fqcomp,sigd, &
@@ -206,7 +206,7 @@
              ratqss=ratqss+ratqs_inter_
           else if (iflag_ratqs == 11) then
-            print*,'avant ratqs_inter'
+            PRINT*,'avant ratqs_inter'
             ! interactive ratqs with several sources
-             call ratqs_inter(klon,klev,iflag_ratqs,pdtphys,paprs, &
+             CALL ratqs_inter(klon,klev,iflag_ratqs,pdtphys,paprs, &
                        ratqsbas,wake_deltaq,wake_s,q_seri,qtc_cv, sigt_cv, &
                        fm_therm,entr_therm,detr_therm,detrain_cv,fm_cv,fqd,fqcomp,sigd, &
@@ -215,13 +215,13 @@
           else if (iflag_ratqs == 12) then
              ! contribution of surface heterogeneities to ratqs
-             call ratqs_hetero(klon,klev,pctsrf,s_pblh,t2m,q2m,t_seri,q_seri,pplay,paprs,ratqs_hetero_)
+             CALL ratqs_hetero(klon,klev,pctsrf,s_pblh,t2m,q2m,t_seri,q_seri,pplay,paprs,ratqs_hetero_)
              ratqss=ratqss+ratqs_hetero_
           else if (iflag_ratqs == 13) then
              ! contribution of ubgrid orography to ratqs
-             call ratqs_oro(klon,klev,pctsrf,zstd,zqsat,t_seri,pplay,paprs,ratqs_oro_)
+             CALL ratqs_oro(klon,klev,pctsrf,zstd,zqsat,t_seri,pplay,paprs,ratqs_oro_)
              ratqss=ratqss+ratqs_oro_
           else if (iflag_ratqs == 14) then
              ! effect of subgrid-scale TKE on ratqs (in development)
-             call ratqs_tke(klon,klev,pdtphys,t_seri,q_seri,zqsat,pplay,paprs,omega,tke,tke_dissip,lmix,wprime,ratqs_tke_)     
+             CALL ratqs_tke(klon,klev,pdtphys,t_seri,q_seri,zqsat,pplay,paprs,omega,tke,tke_dissip,lmix,wprime,ratqs_tke_)
              ratqss=ratqss+ratqs_tke_
           endif
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_ratqs_multi.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_ratqs_multi.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_ratqs_multi.F90	(revision 5103)
@@ -16,5 +16,4 @@
 IMPLICIT NONE
 
-! Include
 !=============================================
     INCLUDE "YOETHF.h"
@@ -39,6 +38,6 @@
 !========================================================================
 ! L. d'Alen??on, 25/02/2021
-! Cette subroutine calcule une valeur de ratqsbas interactive  
-! Elle est appel??e par la subroutine ratqs lorsque iflag_ratqs = 11. 
+! Cette SUBROUTINE calcule une valeur de ratqsbas interactive
+! Elle est appel??e par la SUBROUTINE ratqs lorsque iflag_ratqs = 11.
 !========================================================================
 
@@ -58,6 +57,6 @@
 
 ! local
-LOGICAL :: klein = .false.
-LOGICAL :: klein_conv = .true.
+LOGICAL :: klein = .FALSE.
+LOGICAL :: klein_conv = .TRUE.
 REAL :: taup0 = 70000
 REAL :: taudp = 500
@@ -74,5 +73,5 @@
 lev_out=0.
 
-print*,'ratqs_inter'
+PRINT*,'ratqs_inter'
 
 !-----------------------------------------------------------------------
@@ -104,5 +103,5 @@
 ! calcul du carr?? de l'humidit?? sp??cifique et circulation dans les thermiques
       po(:,:) = q_seri(:,:)
-      call thermcell_dq(klon,klev,dqimpl,pdtphys,fm0,entr0,zmasse,  &
+      CALL thermcell_dq(klon,klev,dqimpl,pdtphys,fm0,entr0,zmasse,  &
                      po,pdoadj,zoa,lev_out)
       do k=1,klev
@@ -111,5 +110,5 @@
          enddo
       enddo
-      call thermcell_dq(klon,klev,dqimpl,pdtphys,fm0,entr0,zmasse,  &
+      CALL thermcell_dq(klon,klev,dqimpl,pdtphys,fm0,entr0,zmasse,  &
                      pocarre,pdocarreadj,zocarrea,lev_out)
 
@@ -333,5 +332,5 @@
     
     DO nsrf=1,nbsrf
-    CALL CALC_QSAT_ECMWF(klon,t2m(:,nsrf),q2m(:,nsrf),paprs(:,1),RTT,0,.false.,qsat2m,dqsatdT)
+    CALL CALC_QSAT_ECMWF(klon,t2m(:,nsrf),q2m(:,nsrf),paprs(:,1),RTT,0,.FALSE.,qsat2m,dqsatdT)
     ratiom(:)=ratiom(:)+pctsrf(:,nsrf)*(q2m(:,nsrf)/qsat2m(:))
     xsi0(:)=xsi0(:)+pctsrf(:,nsrf)*((q2m(:,nsrf)/qsat2m(:)-ratiom(:))**2)
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_alim.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_alim.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_alim.F90	(revision 5103)
@@ -117,5 +117,5 @@
          alim_star_tot(:)=alim_star_tot(:)+alim_star(:,l)
       ENDDO
-      IF (ngrid==1) print*,'NEW ALIM CALCUL DE ZI ',alim_star_tot,lalim,zi,zh
+      IF (ngrid==1) PRINT*,'NEW ALIM CALCUL DE ZI ',alim_star_tot,lalim,zi,zh
       alim_star_tot(:)=1.
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_alp.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_alp.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_alp.F90	(revision 5103)
@@ -136,6 +136,6 @@
 !------------Test sur le LCL des thermiques
     do ig=1,ngrid
-      ok_lcl(ig)=.false.
-      if ( (pcon(ig) > pplay(ig,nlay-1)) .and. (pcon(ig) < pplay(ig,1)) ) ok_lcl(ig)=.true.
+      ok_lcl(ig)=.FALSE.
+      if ( (pcon(ig) > pplay(ig,nlay-1)) .and. (pcon(ig) < pplay(ig,1)) ) ok_lcl(ig)=.TRUE.
     enddo
 
@@ -199,5 +199,5 @@
 
 !-----Calcul de la TKE transportée par les thermiques : therm_tke_max
-   call thermcell_tke_transport(ngrid,nlay,ptimestep,fm0,entr0,  &  ! in
+   CALL thermcell_tke_transport(ngrid,nlay,ptimestep,fm0,entr0,  &  ! in
              rg,pplev,therm_tke_max)                               ! out
 !   print *,' thermcell_tke_transport -> '   !!jyg
@@ -337,14 +337,14 @@
 !!! fin nrlmd le 10/04/2012
 
-!      print*,'avant calcul ale et alp' 
+!      PRINT*,'avant calcul ale et alp'
 !calcul de ALE et ALP pour la convection
       alp_bl(:)=0.
       ale_bl(:)=0.
-!          print*,'ALE,ALP ,l,zw2(ig,l),ale_bl(ig),alp_bl(ig)'
+!          PRINT*,'ALE,ALP ,l,zw2(ig,l),ale_bl(ig),alp_bl(ig)'
       do l=1,nlay
       do ig=1,ngrid
            alp_bl(ig)=max(alp_bl(ig),0.5*rhobarz(ig,l)*wth3(ig,l) )
            ale_bl(ig)=max(ale_bl(ig),0.5*zw2(ig,l)**2)
-!          print*,'ALE,ALP',l,zw2(ig,l),ale_bl(ig),alp_bl(ig)
+!          PRINT*,'ALE,ALP',l,zw2(ig,l),ale_bl(ig),alp_bl(ig)
       enddo
       enddo
@@ -377,5 +377,5 @@
       enddo
 
-!      print*,'apres wght_th'
+!      PRINT*,'apres wght_th'
 !test pour prolonger la convection
       do ig=1,ngrid
@@ -384,5 +384,5 @@
       lalim_conv(ig)=1
       wght_th(ig,1)=1.
-!      print*,'lalim_conv ok',lalim_conv(ig),wght_th(ig,1)
+!      PRINT*,'lalim_conv ok',lalim_conv(ig),wght_th(ig,1)
       endif
       enddo
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_closure.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_closure.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_closure.F90	(revision 5103)
@@ -36,5 +36,5 @@
 
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!print*,'THERMCELL CLOSURE 26E'
+!PRINT*,'THERMCELL CLOSURE 26E'
 
 alim_star2(:)=0.
@@ -44,12 +44,12 @@
 ! Indice vertical max (max de lalim) atteint par les thermiques sur le domaine
 llmax=1
-do ig=1,ngrid
+DO ig=1,ngrid
    if (lalim(ig)>llmax) llmax=lalim(ig)
-enddo
+END DO
 
 
 ! Calcul des integrales sur la verticale de alim_star et de
 !   alim_star^2/(rho dz)
-do k=1,llmax-1
+DO k=1,llmax-1
    do ig=1,ngrid
       if (k<lalim(ig)) then
@@ -59,13 +59,13 @@
       endif
    enddo
-enddo
+END DO
 
 
-do ig=1,ngrid
+DO ig=1,ngrid
    if (alim_star2(ig)>1.e-10) then
       f(ig)=wmax(ig)*alim_star_tot(ig)/  &
 &     (max(500.,zmax(ig))*r_aspect*alim_star2(ig))
    endif
-enddo
+END DO
 
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_down.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_down.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_down.F90	(revision 5103)
@@ -61,5 +61,5 @@
 
    if ( iflag_thermals_down < 10 ) then
-      call abort_physic("thermcell_updown_dq", &
+      CALL abort_physic("thermcell_updown_dq", &
            'thermcell_down_dq = 0 or >= 10', 1)
    else
@@ -132,5 +132,5 @@
          !!!! tentative de prise en compte d'un flux compensatoire montant  !!!!
          if (fup(ig,ilay)-fdn(ig,ilay) < 0.) then
-            call abort_physic("thermcell_updown_dq", 'flux compensatoire '&
+            CALL abort_physic("thermcell_updown_dq", 'flux compensatoire '&
                  // 'montant, cas non traite par thermcell_updown_dq', 1)
             !fthe(ig,ilay)=(fup(ig,ilay)-fdn(ig,ilay))*trac(ig,ilay-1)
@@ -165,5 +165,5 @@
        do ig=1,ngrid
          if (fup(ig,ilay)-fdn(ig,ilay) < 0.) then
-            call abort_physic("thermcell_updown_dq", 'flux compensatoire ' &
+            CALL abort_physic("thermcell_updown_dq", 'flux compensatoire ' &
                  // 'montant, cas non traite par thermcell_updown_dq', 1)
          else
@@ -195,5 +195,5 @@
          if((fup(ig,ilay)-fdn(ig,ilay)) < 0) then
             write(*,*) 'flux compensatoire montant, cas non traite par thermcell_updown_dq dans le cas d une resolution implicite, ilay : ', ilay
-            call abort_physic("thermcell_updown_dq", "", 1)
+            CALL abort_physic("thermcell_updown_dq", "", 1)
          else
            mstar_inv=ptimestep/masse(ig,ilay)
@@ -209,5 +209,5 @@
 
    else
-      call abort_physic("thermcell_updown_dq", &
+      CALL abort_physic("thermcell_updown_dq", &
            'valeur de iflag_impl non prevue', 1)
    endif
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_dq.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_dq.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_dq.F90	(revision 5103)
@@ -2,5 +2,5 @@
 CONTAINS
 
-      subroutine thermcell_dq(ngrid,nlay,impl,ptimestep,fm,entr,  &
+      SUBROUTINE thermcell_dq(ngrid,nlay,impl,ptimestep,fm,entr,  &
              masse,q,dq,qa,lev_out)
       USE print_control_mod, ONLY: prt_level
@@ -43,7 +43,7 @@
 
 ! Old explicite scheme
-if (impl<=-1) then
-
-         call thermcell_dq_o(ngrid,nlay,impl,ptimestep,fm,entr,  &
+IF (impl<=-1) then
+
+         CALL thermcell_dq_o(ngrid,nlay,impl,ptimestep,fm,entr,  &
              masse,q,dq,qa,lev_out)
 
@@ -58,5 +58,5 @@
             cfl=max(cfl,fm(ig,k)/zzm)
             if (entr(ig,k)>zzm) then
-               print*,'entr*dt>m,1',k,entr(ig,k)*ptimestep,masse(ig,k)
+               PRINT*,'entr*dt>m,1',k,entr(ig,k)*ptimestep,masse(ig,k)
                abort_message = 'entr dt > m, 1st'
                CALL abort_physic (modname,abort_message,1)
@@ -68,5 +68,5 @@
 
 
-      if (prt_level>=1) print*,'Q2 THERMCEL_DQ 0'
+      if (prt_level>=1) PRINT*,'Q2 THERMCEL_DQ 0'
 
 !   calcul du detrainement
@@ -74,17 +74,17 @@
          do ig=1,ngrid
             detr(ig,k)=fm(ig,k)-fm(ig,k+1)+entr(ig,k)
-!           print*,'Q2 DQ ',detr(ig,k),fm(ig,k),entr(ig,k)
+!           PRINT*,'Q2 DQ ',detr(ig,k),fm(ig,k),entr(ig,k)
 !test
             if (detr(ig,k)<0.) then
                entr(ig,k)=entr(ig,k)-detr(ig,k)
                detr(ig,k)=0.
-!               print*,'detr2<0!!!','ig=',ig,'k=',k,'f=',fm(ig,k),
+!               PRINT*,'detr2<0!!!','ig=',ig,'k=',k,'f=',fm(ig,k),
 !     s         'f+1=',fm(ig,k+1),'e=',entr(ig,k),'d=',detr(ig,k)
             endif
             if (fm(ig,k+1)<0.) then
-!               print*,'fm2<0!!!'
+!               PRINT*,'fm2<0!!!'
             endif
             if (entr(ig,k)<0.) then
-!               print*,'entr2<0!!!'
+!               PRINT*,'entr2<0!!!'
             endif
          enddo
@@ -106,8 +106,8 @@
             endif
             if (qa(ig,k)<0.) then
-!               print*,'qa<0!!!'
+!               PRINT*,'qa<0!!!'
             endif
             if (q(ig,k)<0.) then
-!               print*,'q<0!!!'
+!               PRINT*,'q<0!!!'
             endif
          enddo
@@ -148,5 +148,5 @@
       enddo
 
-endif ! impl=-1
+END IF ! impl=-1
 RETURN
 end
@@ -157,5 +157,5 @@
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-      subroutine thermcell_dq_o(ngrid,nlay,impl,ptimestep,fm,entr,  &
+      SUBROUTINE thermcell_dq_o(ngrid,nlay,impl,ptimestep,fm,entr,  &
              masse,q,dq,qa,lev_out)
       USE print_control_mod, ONLY: prt_level
@@ -201,5 +201,5 @@
             cfl=max(cfl,fm(ig,k)/zzm)
             if (entr(ig,k)>zzm) then
-               print*,'entr*dt>m,2',k,entr(ig,k)*ptimestep,masse(ig,k)
+               PRINT*,'entr*dt>m,2',k,entr(ig,k)*ptimestep,masse(ig,k)
                abort_message = 'entr dt > m, 2nd'
                CALL abort_physic (modname,abort_message,1)
@@ -208,5 +208,5 @@
       enddo
 
-!IM 090508     print*,'CFL CFL CFL CFL ',cfl
+!IM 090508     PRINT*,'CFL CFL CFL CFL ',cfl
 
 #undef CFL
@@ -222,6 +222,6 @@
 
 
-do iter=1,niter
-      if (prt_level>=1) print*,'Q2 THERMCEL_DQ 0'
+DO iter=1,niter
+      if (prt_level>=1) PRINT*,'Q2 THERMCEL_DQ 0'
 
 !   calcul du detrainement
@@ -229,17 +229,17 @@
          do ig=1,ngrid
             detr(ig,k)=fm(ig,k)-fm(ig,k+1)+entr(ig,k)
-!           print*,'Q2 DQ ',detr(ig,k),fm(ig,k),entr(ig,k)
+!           PRINT*,'Q2 DQ ',detr(ig,k),fm(ig,k),entr(ig,k)
 !test
             if (detr(ig,k)<0.) then
                entr(ig,k)=entr(ig,k)-detr(ig,k)
                detr(ig,k)=0.
-!               print*,'detr2<0!!!','ig=',ig,'k=',k,'f=',fm(ig,k),
+!               PRINT*,'detr2<0!!!','ig=',ig,'k=',k,'f=',fm(ig,k),
 !     s         'f+1=',fm(ig,k+1),'e=',entr(ig,k),'d=',detr(ig,k)
             endif
             if (fm(ig,k+1)<0.) then
-!               print*,'fm2<0!!!'
+!               PRINT*,'fm2<0!!!'
             endif
             if (entr(ig,k)<0.) then
-!               print*,'entr2<0!!!'
+!               PRINT*,'entr2<0!!!'
             endif
          enddo
@@ -261,8 +261,8 @@
             endif
             if (qa(ig,k)<0.) then
-!               print*,'qa<0!!!'
+!               PRINT*,'qa<0!!!'
             endif
             if (q(ig,k)<0.) then
-!               print*,'q<0!!!'
+!               PRINT*,'q<0!!!'
             endif
          enddo
@@ -293,5 +293,5 @@
 
             if (wqd(ig,k)<0.) then
-!               print*,'wqd<0!!!'
+!               PRINT*,'wqd<0!!!'
             endif
          enddo
@@ -310,5 +310,5 @@
                  *ztimestep/masse(ig,k)
 !            if (dq(ig,k).lt.0.) then
-!               print*,'dq<0!!!'
+!               PRINT*,'dq<0!!!'
 !            endif
          enddo
@@ -316,5 +316,5 @@
 
 
-enddo
+END DO
 
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_dry.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_dry.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_dry.F90	(revision 5103)
@@ -106,5 +106,5 @@
             if (zw2(ig,l+1)>0. .and. zw2(ig,l+1)<1.e-10) then
 !               stop'On tombe sur le cas particulier de thermcell_dry'
-!               print*,'On tombe sur le cas particulier de thermcell_dry'
+!               PRINT*,'On tombe sur le cas particulier de thermcell_dry'
                 zw2(ig,l+1)=0.
                 linter(ig)=l+1
@@ -135,5 +135,5 @@
          enddo
       enddo
-       if (prt_level>=1) print*,'fin calcul zw2'
+       if (prt_level>=1) PRINT*,'fin calcul zw2'
 
 ! Determination de zw2 max
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_dtke.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_dtke.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_dtke.F90	(revision 5103)
@@ -2,5 +2,5 @@
 CONTAINS
 
-      subroutine thermcell_dtke(ngrid,nlay,nsrf,ptimestep,fm0,entr0,  &
+      SUBROUTINE thermcell_dtke(ngrid,nlay,nsrf,ptimestep,fm0,entr0,  &
              rg,pplev,tke)
       USE print_control_mod, ONLY: prt_level
@@ -35,7 +35,7 @@
       lev_out=0
 
-!print*,'thermcell_dtke'
+!PRINT*,'thermcell_dtke'
 
-      if (prt_level>=1) print*,'Q2 THERMCEL_DQ 0'
+      if (prt_level>=1) PRINT*,'Q2 THERMCEL_DQ 0'
 
 !   calcul du detrainement
@@ -61,5 +61,5 @@
 
 
-do isrf=1,nsrf
+DO isrf=1,nsrf
 
    q(:,:)=tke(:,:,isrf)
@@ -81,8 +81,8 @@
             endif
             if (qa(ig,k)<0.) then
-!               print*,'qa<0!!!'
+!               PRINT*,'qa<0!!!'
             endif
             if (q(ig,k)<0.) then
-!               print*,'q<0!!!'
+!               PRINT*,'q<0!!!'
             endif
          enddo
@@ -95,5 +95,5 @@
             wqd(ig,k)=fm(ig,k)*q(ig,k)
             if (wqd(ig,k)<0.) then
-!               print*,'wqd<0!!!'
+!               PRINT*,'wqd<0!!!'
             endif
          enddo
@@ -118,5 +118,5 @@
    tke(:,:,isrf)=q(:,:)
 
-enddo
+END DO
 
       return
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_dv2.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_dv2.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_dv2.F90	(revision 5103)
@@ -2,5 +2,5 @@
 CONTAINS
 
-      subroutine thermcell_dv2(ngrid,nlay,ptimestep,fm,entr,masse  &
+      SUBROUTINE thermcell_dv2(ngrid,nlay,ptimestep,fm,entr,masse  &
       ,fraca,larga  &
       ,u,v,du,dv,ua,va,lev_out)
@@ -49,5 +49,5 @@
 !---------------------------
 
-!      print*,'THERMCELL DV2 OPTIMISE 3'
+!      PRINT*,'THERMCELL DV2 OPTIMISE 3'
 
       nlarga0=0.
@@ -104,5 +104,5 @@
 ! Debut des iterations
 !----------------------
-do iter=1,5
+DO iter=1,5
          do ig=1,ngrid
 ! Pour memoire : calcul prenant en compte la fraction reelle
@@ -129,5 +129,5 @@
                  /(fm(ig,k+1)+detr(ig,k)+entr(ig,k)*zf*zf2  &
                    +gamma(ig,k))
-!                 print*,k,ua(ig,k),va(ig,k),u(ig,k),v(ig,k),dua(ig,k),dva(ig,k)
+!                 PRINT*,k,ua(ig,k),va(ig,k),u(ig,k),v(ig,k),dua(ig,k),dva(ig,k)
                   dua(ig,k)=ua(ig,k)-u(ig,k)
                   dva(ig,k)=va(ig,k)-v(ig,k)
@@ -138,5 +138,5 @@
 ! Fin des iterations
 !--------------------
-enddo
+END DO
 
       enddo ! k=2,nlay
@@ -180,5 +180,5 @@
       do k=1,nlay
          do ig=1,ngrid
-           print*,'th_dv2 ig k gamma entr detr ua ue va ve wud wvd masse',ig,k,gamma(ig,k), &
+           PRINT*,'th_dv2 ig k gamma entr detr ua ue va ve wud wvd masse',ig,k,gamma(ig,k), &
      entr(ig,k),detr(ig,k),ua(ig,k),ue(ig,k),va(ig,k),ve(ig,k),wud(ig,k),wvd(ig,k),wud(ig,k+1),wvd(ig,k+1), &
      masse(ig,k)
@@ -188,7 +188,7 @@
 
      if (nlarga0>0) then
-          print*,'WARNING !!!!!! DANS THERMCELL_DV2 '
-          print*,nlarga0,' points pour lesquels laraga=0. dans un thermique'
-          print*,'Il faudrait decortiquer ces points'
+          PRINT*,'WARNING !!!!!! DANS THERMCELL_DV2 '
+          PRINT*,nlarga0,' points pour lesquels laraga=0. dans un thermique'
+          PRINT*,'Il faudrait decortiquer ces points'
      endif
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_env.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_env.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_env.F90	(revision 5103)
@@ -35,5 +35,5 @@
 !------------------
 
-   mask(:,:)=.true.
+   mask(:,:)=.TRUE.
 
 ! calcul des caracteristiques de l environnement
@@ -50,5 +50,5 @@
 ! Calcul de l'humidite a saturation et de la condensation
 
-   call thermcell_qsat(ngrid*nlay,mask,pplev,pt,po,pqsat)
+   CALL thermcell_qsat(ngrid*nlay,mask,pplev,pt,po,pqsat)
    do ll=1,nlay
       do ig=1,ngrid
@@ -60,5 +60,5 @@
 
 !-----------------------------------------------------------------------
-   if (prt_level>=1) print*,'0 OK convect8'
+   if (prt_level>=1) PRINT*,'0 OK convect8'
 
    do ll=1,nlay
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_flux2.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_flux2.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_flux2.F90	(revision 5103)
@@ -86,5 +86,5 @@
 ! Verification de la nullite des entrainement et detrainement au dessus
 ! de lmax(ig)
-! Active uniquement si check_debug=.true. ou prt_level>=10
+! Active uniquement si check_debug=.TRUE. ou prt_level>=10
 !-------------------------------------------------------------------------
 
@@ -96,17 +96,17 @@
             if (l<=lmax(ig)) then
                if (entr_star(ig,l)>1.) then
-                    print*,'WARNING thermcell_flux 1 ig,l,lmax(ig)',ig,l,lmax(ig)
-                    print*,'entr_star(ig,l)',entr_star(ig,l)
-                    print*,'alim_star(ig,l)',alim_star(ig,l)
-                    print*,'detr_star(ig,l)',detr_star(ig,l)
+                    PRINT*,'WARNING thermcell_flux 1 ig,l,lmax(ig)',ig,l,lmax(ig)
+                    PRINT*,'entr_star(ig,l)',entr_star(ig,l)
+                    PRINT*,'alim_star(ig,l)',alim_star(ig,l)
+                    PRINT*,'detr_star(ig,l)',detr_star(ig,l)
                endif
             else
                if (abs(entr_star(ig,l))+abs(alim_star(ig,l))+abs(detr_star(ig,l))>0.) then
-                    print*,'cas 1 : ig,l,lmax(ig)',ig,l,lmax(ig)
-                    print*,'entr_star(ig,l)',entr_star(ig,l)
-                    print*,'alim_star(ig,l)',alim_star(ig,l)
-                    print*,'detr_star(ig,l)',detr_star(ig,l)
+                    PRINT*,'cas 1 : ig,l,lmax(ig)',ig,l,lmax(ig)
+                    PRINT*,'entr_star(ig,l)',entr_star(ig,l)
+                    PRINT*,'alim_star(ig,l)',alim_star(ig,l)
+                    PRINT*,'detr_star(ig,l)',detr_star(ig,l)
                     abort_message = ''
-                    labort_physic=.true.
+                    labort_physic=.TRUE.
                     CALL abort_physic (modname,abort_message,1)
                endif
@@ -166,5 +166,5 @@
 
 !      if (prt_level.ge.10) &
-!    &    call printflux(ngrid,nlay,lunout1,igout,f,lmax,lalim, &
+!    &    CALL printflux(ngrid,nlay,lunout1,igout,f,lmax,lalim, &
 !    &    ptimestep,masse,entr,detr,fm,'2  ')
 
@@ -201,5 +201,5 @@
          do ig=1,ngrid
             if (fm(ig,l+1)<0.) then
-!              print*,'fm1<0',l+1,lmax(ig),fm(ig,l+1)
+!              PRINT*,'fm1<0',l+1,lmax(ig),fm(ig,l+1)
                 ncorecfm1=ncorecfm1+1
                fm(ig,l+1)=fm(ig,l)
@@ -270,8 +270,8 @@
 
 
-         labort_physic=.false.
+         labort_physic=.FALSE.
          do ig=1,ngrid
             if (entr(ig,l)<0.) then
-               labort_physic=.true.
+               labort_physic=.TRUE.
                igout=ig
                lout=l
@@ -280,5 +280,5 @@
 
          if (labort_physic) then
-            print*,'N1 ig,l,entr',igout,lout,entr(igout,lout)
+            PRINT*,'N1 ig,l,entr',igout,lout,entr(igout,lout)
             abort_message = 'entr negatif'
             CALL abort_physic (modname,abort_message,1)
@@ -310,8 +310,8 @@
          enddo
 
-         labort_physic=.false.
+         labort_physic=.FALSE.
          do ig=1,ngrid
             if (entr(ig,l)<0.) then
-               labort_physic=.true.
+               labort_physic=.TRUE.
                igout=ig
             endif
@@ -319,7 +319,7 @@
          if (labort_physic) then
             ig=igout
-            print*,'ig,l,lmax(ig)',ig,l,lmax(ig)
-            print*,'entr(ig,l)',entr(ig,l)
-            print*,'fm(ig,l)',fm(ig,l)
+            PRINT*,'ig,l,lmax(ig)',ig,l,lmax(ig)
+            PRINT*,'entr(ig,l)',entr(ig,l)
+            PRINT*,'fm(ig,l)',fm(ig,l)
             abort_message = 'probleme dans thermcell flux'
             CALL abort_physic (modname,abort_message,1)
@@ -348,8 +348,8 @@
          enddo
 
-         labort_physic=.false.
+         labort_physic=.FALSE.
          do ig=1,ngrid
             if (detr(ig,l)<0.) then
-               labort_physic=.true.
+               labort_physic=.TRUE.
                igout=ig
             endif
@@ -357,7 +357,7 @@
         if (labort_physic) then
                ig=igout
-               print*,'cas 2 : ig,l,lmax(ig)',ig,l,lmax(ig)
-               print*,'detr(ig,l)',detr(ig,l)
-               print*,'fm(ig,l)',fm(ig,l)
+               PRINT*,'cas 2 : ig,l,lmax(ig)',ig,l,lmax(ig)
+               PRINT*,'detr(ig,l)',detr(ig,l)
+               PRINT*,'fm(ig,l)',fm(ig,l)
                abort_message = 'probleme dans thermcell flux'
                CALL abort_physic (modname,abort_message,1)
@@ -398,5 +398,5 @@
 !             lmax(ig)=l+1
 !             zmax(ig)=zlev(ig,lmax(ig))
-!             print*,'alpha>1',l+1,lmax(ig)
+!             PRINT*,'alpha>1',l+1,lmax(ig)
               ncorecalpha=ncorecalpha+1
            endif
@@ -413,5 +413,5 @@
 
 !      if (prt_level.ge.10) &
-!    &    call printflux(ngrid,nlay,lunout1,igout,f,lmax,lalim, &
+!    &    CALL printflux(ngrid,nlay,lunout1,igout,f,lmax,lalim, &
 !    &    ptimestep,masse,entr,detr,fm,'8  ')
 
@@ -423,5 +423,5 @@
 
       if (1==1) then
-      labort_physic=.false.
+      labort_physic=.FALSE.
       do l=1,nlay-1
          do ig=1,ngrid
@@ -446,5 +446,5 @@
                          igout=ig
                          lout=l
-                         labort_physic=.true.
+                         labort_physic=.TRUE.
                       endif
                       entr(ig,l+1)=entr(ig,l+1)-ddd
@@ -460,18 +460,18 @@
                          ig=igout
                          l=lout
-                         print*,'ig,l',ig,l
-                         print*,'eee0',eee0
-                         print*,'ddd0',ddd0
-                         print*,'eee',eee
-                         print*,'ddd',ddd
-                         print*,'entr',entr(ig,l)
-                         print*,'detr',detr(ig,l)
-                         print*,'masse',masse(ig,l)
-                         print*,'fomass_max',fomass_max
-                         print*,'masse(ig,l)*fomass_max/ptimestep',masse(ig,l)*fomass_max/ptimestep
-                         print*,'ptimestep',ptimestep
-                         print*,'lmax(ig)',lmax(ig)
-                         print*,'fm(ig,l+1)',fm(ig,l+1)
-                         print*,'fm(ig,l)',fm(ig,l)
+                         PRINT*,'ig,l',ig,l
+                         PRINT*,'eee0',eee0
+                         PRINT*,'ddd0',ddd0
+                         PRINT*,'eee',eee
+                         PRINT*,'ddd',ddd
+                         PRINT*,'entr',entr(ig,l)
+                         PRINT*,'detr',detr(ig,l)
+                         PRINT*,'masse',masse(ig,l)
+                         PRINT*,'fomass_max',fomass_max
+                         PRINT*,'masse(ig,l)*fomass_max/ptimestep',masse(ig,l)*fomass_max/ptimestep
+                         PRINT*,'ptimestep',ptimestep
+                         PRINT*,'lmax(ig)',lmax(ig)
+                         PRINT*,'fm(ig,l+1)',fm(ig,l+1)
+                         PRINT*,'fm(ig,l)',fm(ig,l)
                          abort_message = 'probleme dans thermcell_flux'
                          CALL abort_physic (modname,abort_message,1)
@@ -494,5 +494,5 @@
 !     if (ncorecfm1+ncorecfm2+ncorecfm3+ncorecfm4+ncorecfm5+ncorecalpha > 0 ) then
 
-!         print*,'PB thermcell : on a du coriger ',ncorecfm1,'x fm1',&
+!         PRINT*,'PB thermcell : on a du coriger ',ncorecfm1,'x fm1',&
 !   &     ncorecfm2,'x fm2',ncorecfm3,'x fm3 et', &
 !   &     ncorecfm4,'x fm4',ncorecfm5,'x fm5 et', &
@@ -505,5 +505,5 @@
 
 !      if (prt_level.ge.10) &
-!    &    call printflux(ngrid,nlay,lunout1,igout,f,lmax,lalim, &
+!    &    CALL printflux(ngrid,nlay,lunout1,igout,f,lmax,lalim, &
 !    &    ptimestep,masse,entr,detr,fm,'fin')
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_height.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_height.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_height.F90	(revision 5103)
@@ -43,5 +43,5 @@
       do ig=1,ngrid
       if ( zw2(ig,nlay) > 1.e-10 ) then
-          print*,'WARNING !!!!! W2 thermiques non nul derniere couche '
+          PRINT*,'WARNING !!!!! W2 thermiques non nul derniere couche '
           lmax(ig)=nlay
       endif
@@ -66,5 +66,5 @@
             if (l<=lmax(ig)) then
                 if (zw2(ig,l)<0.)then
-                  print*,'pb2 zw2<0'
+                  PRINT*,'pb2 zw2<0'
                 endif
                 zw2(ig,l)=sqrt(zw2(ig,l))
@@ -120,5 +120,5 @@
       -zlev(ig,lcong(ig)))
          zcong(ig)=zlevintercong(ig)-zlev(ig,1)
-!         print*,"calcul zcong",lcong(ig),lintercong(ig),zlevintercong(ig),zcong(ig)
+!         PRINT*,"calcul zcong",lcong(ig),lintercong(ig),zlevintercong(ig),zcong(ig)
       enddo
 
@@ -146,5 +146,5 @@
               else
               zmix(ig)=zlev(ig,lmix(ig))
-              print*,'pb zmix'
+              PRINT*,'pb zmix'
               endif
           else 
@@ -154,5 +154,5 @@
          if ((zmax(ig)-zmix(ig))<=0.) then
             zmix(ig)=0.9*zmax(ig)
-!            print*,'pb zmix>zmax'
+!            PRINT*,'pb zmix>zmax'
          endif
       enddo
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_ini.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_ini.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_ini.F90	(revision 5103)
@@ -55,5 +55,5 @@
 real, intent(in) :: RG_in,RD_in,RCPD_in,RKAPPA_in,RLVTT_in,RETV_in,tau_thermals_in
 
-print*,'thermcell_ini'
+PRINT*,'thermcell_ini'
       if (iflag_thermals==15.or.iflag_thermals==16) then
          dvdq=0
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_main.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_main.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_main.F90	(revision 5103)
@@ -7,5 +7,5 @@
 CONTAINS
 
-      subroutine thermcell_main(itap,ngrid,nlay,ptimestep  &
+      SUBROUTINE thermcell_main(itap,ngrid,nlay,ptimestep  &
                     ,pplay,pplev,pphi,debut  &
                     ,puwind,pvwind,ptemp,p_o,ptemp_env, po_env  &
@@ -185,7 +185,7 @@
    fm=0. ; entr=0. ; detr=0.
 
-      if (prt_level>=1) print*,'thermcell_main V4'
-
-       sorties=.true.
+      if (prt_level>=1) PRINT*,'thermcell_main V4'
+
+       sorties=.TRUE.
       IF(ngrid/=ngrid) THEN
          PRINT*
@@ -195,5 +195,5 @@
       ENDIF
 
-!print*,'thermcell_main debut'
+!PRINT*,'thermcell_main debut'
 !     write(lunout,*)'WARNING thermcell_main f0=max(f0,1.e-2)'
      do ig=1,ngrid
@@ -205,5 +205,5 @@
       if (prt_level>=20) then
        do ig=1,ngrid
-          print*,'th_main ig f0',ig,f0(ig)
+          PRINT*,'th_main ig f0',ig,f0(ig)
        enddo
       endif
@@ -238,5 +238,5 @@
         !    SUBROUTINE thermcell_env(ngrid,nlay,po,pt,pu,pv,pplay,  &
         ! &           pplev,zo,zh,zl,ztv,zthl,zu,zv,zpspsk,pqsat,lev_out)
-        ! contenu thermcell_env : call thermcell_qsat(ngrid*nlay,mask,pplev,pt,po,pqsat)
+        ! contenu thermcell_env : CALL thermcell_qsat(ngrid*nlay,mask,pplev,pt,po,pqsat)
         ! contenu thermcell_env : do ll=1,nlay
         ! contenu thermcell_env :    do ig=1,ngrid
@@ -267,12 +267,12 @@
                  ztv(ig,l)=ztv(ig,l)*(1.+RETV*po_env(ig,l))
                  zthl(ig,l)=ptemp(ig,l)/zpspsk(ig,l)
-                 mask(ig,l)=.true.
+                 mask(ig,l)=.TRUE.
             enddo
         enddo
-        call thermcell_qsat(ngrid*nlay,mask,pplev,ptemp_env,p_o,zqsat)
+        CALL thermcell_qsat(ngrid*nlay,mask,pplev,ptemp_env,p_o,zqsat)
           
       endif
        
-      if (prt_level>=1) print*,'thermcell_main apres thermcell_env'
+      if (prt_level>=1) PRINT*,'thermcell_main apres thermcell_env'
 
 !------------------------------------------------------------------------
@@ -322,5 +322,5 @@
          masse(:,l)=(pplev(:,l)-pplev(:,l+1))/RG
       enddo
-      if (prt_level>=1) print*,'thermcell_main apres initialisation'
+      if (prt_level>=1) PRINT*,'thermcell_main apres initialisation'
 
 !------------------------------------------------------------------
@@ -395,5 +395,5 @@
 !--------------------------------------------------------------------------------
 
-      if (prt_level>=1) print*,'avant thermcell_plume ',lev_out
+      if (prt_level>=1) PRINT*,'avant thermcell_plume ',lev_out
 
 !=====================================================================
@@ -412,5 +412,5 @@
 
       if (iflag_thermals_ed<=9) then
-!         print*,'THERM NOUVELLE/NOUVELLE Arnaud'
+!         PRINT*,'THERM NOUVELLE/NOUVELLE Arnaud'
          CALL thermcell_plume_6A(itap,ngrid,nlay,ptimestep,ztv,zthl,p_o,zl,rhobarz,&
       zlev,pplev,pphi,zpspsk,alim_star,alim_star_tot,  &
@@ -420,5 +420,5 @@
 
       elseif (iflag_thermals_ed<=19) then
-!        print*,'THERM RIO et al 2010, version d Arnaud'
+!        PRINT*,'THERM RIO et al 2010, version d Arnaud'
          CALL thermcell_plume_5B(itap,ngrid,nlay,ptimestep,ztv,zthl,p_o,zl,rhobarz,&
       zlev,pplev,pphi,zpspsk,alim_star,alim_star_tot,  &
@@ -434,10 +434,10 @@
       endif
 
-      if (prt_level>=1) print*,'apres thermcell_plume ',lev_out
-
-      call test_ltherm(ngrid,nlay,pplay,lalim,ztv,p_o,ztva,zqla,f_star,zw2,'thermcell_plum lalim ')
-      call test_ltherm(ngrid,nlay,pplay,lmix ,ztv,p_o,ztva,zqla,f_star,zw2,'thermcell_plum lmix  ')
-
-      if (prt_level>=1) print*,'thermcell_main apres thermcell_plume'
+      if (prt_level>=1) PRINT*,'apres thermcell_plume ',lev_out
+
+      CALL test_ltherm(ngrid,nlay,pplay,lalim,ztv,p_o,ztva,zqla,f_star,zw2,'thermcell_plum lalim ')
+      CALL test_ltherm(ngrid,nlay,pplay,lmix ,ztv,p_o,ztva,zqla,f_star,zw2,'thermcell_plum lmix  ')
+
+      if (prt_level>=1) PRINT*,'thermcell_main apres thermcell_plume'
       if (prt_level>=10) then
          write(lunout1,*) 'Dans thermcell_main 2'
@@ -461,14 +461,14 @@
          wmax_tmp(:)=max(wmax_tmp(:),zw2(:,l))
       enddo
-!     print*,"ZMAX ",lalim,lmin,linter,lmix,lmax,zmax,zmax0,zmix,wmax
-
-
-
-      call test_ltherm(ngrid,nlay,pplay,lalim,ztv,p_o,ztva,zqla,f_star,zw2,'thermcell_heig lalim ')
-      call test_ltherm(ngrid,nlay,pplay,lmin ,ztv,p_o,ztva,zqla,f_star,zw2,'thermcell_heig lmin  ')
-      call test_ltherm(ngrid,nlay,pplay,lmix ,ztv,p_o,ztva,zqla,f_star,zw2,'thermcell_heig lmix  ')
-      call test_ltherm(ngrid,nlay,pplay,lmax ,ztv,p_o,ztva,zqla,f_star,zw2,'thermcell_heig lmax  ')
-
-      if (prt_level>=1) print*,'thermcell_main apres thermcell_height'
+!     PRINT*,"ZMAX ",lalim,lmin,linter,lmix,lmax,zmax,zmax0,zmix,wmax
+
+
+
+      CALL test_ltherm(ngrid,nlay,pplay,lalim,ztv,p_o,ztva,zqla,f_star,zw2,'thermcell_heig lalim ')
+      CALL test_ltherm(ngrid,nlay,pplay,lmin ,ztv,p_o,ztva,zqla,f_star,zw2,'thermcell_heig lmin  ')
+      CALL test_ltherm(ngrid,nlay,pplay,lmix ,ztv,p_o,ztva,zqla,f_star,zw2,'thermcell_heig lmix  ')
+      CALL test_ltherm(ngrid,nlay,pplay,lmax ,ztv,p_o,ztva,zqla,f_star,zw2,'thermcell_heig lmax  ')
+
+      if (prt_level>=1) PRINT*,'thermcell_main apres thermcell_height'
 
 !-------------------------------------------------------------------------------
@@ -481,8 +481,8 @@
 
  
-call test_ltherm(ngrid,nlay,pplay,lmin,ztv,p_o,ztva,zqla,f_star,zw2,'thermcell_dry  lmin  ')
-call test_ltherm(ngrid,nlay,pplay,lalim,ztv,p_o,ztva,zqla,f_star,zw2,'thermcell_dry  lalim ')
-
-      if (prt_level>=1) print*,'thermcell_main apres thermcell_dry'
+CALL test_ltherm(ngrid,nlay,pplay,lmin,ztv,p_o,ztva,zqla,f_star,zw2,'thermcell_dry  lmin  ')
+CALL test_ltherm(ngrid,nlay,pplay,lalim,ztv,p_o,ztva,zqla,f_star,zw2,'thermcell_dry  lalim ')
+
+      if (prt_level>=1) PRINT*,'thermcell_main apres thermcell_dry'
       if (prt_level>=10) then
          write(lunout1,*) 'Dans thermcell_main 1b'
@@ -521,5 +521,5 @@
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-      if(prt_level>=1)print*,'thermcell_closure apres thermcell_closure'
+      if(prt_level>=1)PRINT*,'thermcell_closure apres thermcell_closure'
 
       if (tau_thermals>1.) then
@@ -546,7 +546,7 @@
 !IM 060508    &       detr,zqla,zmax,lev_out,lunout,igout)
 
-      if (prt_level>=1) print*,'thermcell_main apres thermcell_flux'
-      call test_ltherm(ngrid,nlay,pplay,lalim,ztv,p_o,ztva,zqla,f_star,zw2,'thermcell_flux lalim ')
-      call test_ltherm(ngrid,nlay,pplay,lmax ,ztv,p_o,ztva,zqla,f_star,zw2,'thermcell_flux lmax  ')
+      if (prt_level>=1) PRINT*,'thermcell_main apres thermcell_flux'
+      CALL test_ltherm(ngrid,nlay,pplay,lalim,ztv,p_o,ztva,zqla,f_star,zw2,'thermcell_flux lalim ')
+      CALL test_ltherm(ngrid,nlay,pplay,lmax ,ztv,p_o,ztva,zqla,f_star,zw2,'thermcell_flux lmax  ')
 
 !------------------------------------------------------------------
@@ -588,5 +588,5 @@
 !------------------------------------------------------------------
       IF (iflag_thermals_down > 0) THEN
-        if (debut) print*,'WARNING !!! routine thermcell_down en cours de developpement'
+        if (debut) PRINT*,'WARNING !!! routine thermcell_down en cours de developpement'
         entrdn=fact_thermals_down*detr0
         detrdn=fact_thermals_down*entr0 
@@ -605,5 +605,5 @@
            enddo
         enddo
-        call thermcell_dq(ngrid,nlay,dqimpl,ptimestep,fm0,entr0,masse,  &
+        CALL thermcell_dq(ngrid,nlay,dqimpl,ptimestep,fm0,entr0,masse,  &
                       zthl,zdthladj,zta,lev_out)
 
@@ -613,5 +613,5 @@
            enddo
         enddo
-        call thermcell_dq(ngrid,nlay,dqimpl,ptimestep,fm0,entr0,masse,  &
+        CALL thermcell_dq(ngrid,nlay,dqimpl,ptimestep,fm0,entr0,masse,  &
                      z_o,pdoadj,z_oa,lev_out)
 
@@ -625,5 +625,5 @@
             enddo
           enddo
-          call thermcell_dq(ngrid,nlay,dqimpl,ptimestep,fm0,entr0,masse,  &
+          CALL thermcell_dq(ngrid,nlay,dqimpl,ptimestep,fm0,entr0,masse,  &
                      xtpo_tmp,xtpdoadj_tmp,xtzo_tmp,lev_out)
           do ll=1,nlay
@@ -640,11 +640,11 @@
         DO ig=1,ngrid
           if (iso_eau.gt.0) then
-              call iso_verif_egalite(xtpo(iso_eau,ig,ll), &
+              CALL iso_verif_egalite(xtpo(iso_eau,ig,ll), &
             p_o(ig,ll),'thermcell_main 594')
-              call iso_verif_egalite(xtpdoadj(iso_eau,ig,ll), &
+              CALL iso_verif_egalite(xtpdoadj(iso_eau,ig,ll), &
             pdoadj(ig,ll),'thermcell_main 596')
           endif
           if (iso_HDO.gt.0) then
-              call iso_verif_aberrant_encadre(xtpo(iso_hdo,ig,ll) &
+              CALL iso_verif_aberrant_encadre(xtpo(iso_hdo,ig,ll) &
              /p_o(ig,ll),'thermcell_main 610')
           endif
@@ -666,5 +666,5 @@
 ! de pression horizontal avec l'environnement
 
-         call thermcell_dv2(ngrid,nlay,ptimestep,fm0,entr0,masse  &
+         CALL thermcell_dv2(ngrid,nlay,ptimestep,fm0,entr0,masse  &
 !    &    ,fraca*dvdq,zmax &
       ,fraca,zmax &
@@ -674,7 +674,7 @@
 
 ! calcul purement conservatif pour le transport de V
-         call thermcell_dq(ngrid,nlay,dqimpl,ptimestep,fm0,entr0,masse  &
+         CALL thermcell_dq(ngrid,nlay,dqimpl,ptimestep,fm0,entr0,masse  &
       ,zu,pduadj,zua,lev_out)
-         call thermcell_dq(ngrid,nlay,dqimpl,ptimestep,fm0,entr0,masse  &
+         CALL thermcell_dq(ngrid,nlay,dqimpl,ptimestep,fm0,entr0,masse  &
       ,zv,pdvadj,zva,lev_out)
 
@@ -682,5 +682,5 @@
     ENDIF
 
-!     print*,'13 OK convect8'
+!     PRINT*,'13 OK convect8'
       do l=1,nlay
          do ig=1,ngrid
@@ -689,5 +689,5 @@
       enddo
 
-      if (prt_level>=1) print*,'14 OK convect8'
+      if (prt_level>=1) PRINT*,'14 OK convect8'
 !------------------------------------------------------------------
 !   Calculs de diagnostiques pour les sorties
@@ -696,5 +696,5 @@
       
       if (sorties) then
-      if (prt_level>=1) print*,'14a OK convect8'
+      if (prt_level>=1) PRINT*,'14a OK convect8'
 ! calcul du niveau de condensation
 ! initialisation
@@ -731,5 +731,5 @@
 !      endif
 
-      if (prt_level>=1) print*,'14b OK convect8'
+      if (prt_level>=1) PRINT*,'14b OK convect8'
       do k=nlay,1,-1
          do ig=1,ngrid
@@ -740,5 +740,5 @@
          enddo
       enddo
-      if (prt_level>=1) print*,'14c OK convect8'
+      if (prt_level>=1) PRINT*,'14c OK convect8'
 !calcul des moments
 !initialisation
@@ -752,5 +752,5 @@
          enddo
       enddo      
-      if (prt_level>=1) print*,'14d OK convect8'
+      if (prt_level>=1) PRINT*,'14d OK convect8'
       if (prt_level>=10)write(lunout,*)                                &
        'WARNING thermcell_main wth2=0. si zw2 > 1.e-10'
@@ -783,5 +783,5 @@
 
 !calcul du ratqscdiff
-      if (prt_level>=1) print*,'14e OK convect8'
+      if (prt_level>=1) PRINT*,'14e OK convect8'
       var=0.
       vardiff=0.
@@ -796,5 +796,5 @@
       enddo
 
-      if (prt_level>=1) print*,'14f OK convect8'
+      if (prt_level>=1) PRINT*,'14f OK convect8'
 
       do l=1,nlay
@@ -808,5 +808,5 @@
       enddo
 
-      if (prt_level>=1) print*,'14g OK convect8'
+      if (prt_level>=1) PRINT*,'14g OK convect8'
          do l=1,nlay
             do ig=1,ngrid
@@ -816,14 +816,14 @@
       endif
 
-      if (prt_level>=1) print*,'thermcell_main FIN  OK'
-
-!print*,'thermcell_main fin'
+      if (prt_level>=1) PRINT*,'thermcell_main FIN  OK'
+
+!PRINT*,'thermcell_main fin'
  RETURN
-      end subroutine thermcell_main
+      END SUBROUTINE  thermcell_main
 
 !=============================================================================
 !/////////////////////////////////////////////////////////////////////////////
 !=============================================================================
-      subroutine test_ltherm(ngrid,nlay,pplay,long,ztv,p_o,ztva, &  ! in
+      SUBROUTINE test_ltherm(ngrid,nlay,pplay,long,ztv,p_o,ztva, &  ! in
               zqla,f_star,zw2,comment)                          ! in
 !=============================================================================
@@ -841,5 +841,5 @@
 
       if (prt_level>=1) THEN
-       print*,'WARNING !!! TEST ',comment
+       PRINT*,'WARNING !!! TEST ',comment
       endif
       return
@@ -849,6 +849,6 @@
 !IMtemp           if (pplay(i,long(i)).lt.seuil*pplev(i,1)) then
            if (prt_level>=10) then
-               print*,'WARNING ',comment,' au point ',i,' K= ',long(i)
-               print*,'  K  P(MB)  THV(K)     Qenv(g/kg)THVA        QLA(g/kg)   F*        W2'
+               PRINT*,'WARNING ',comment,' au point ',i,' K= ',long(i)
+               PRINT*,'  K  P(MB)  THV(K)     Qenv(g/kg)THVA        QLA(g/kg)   F*        W2'
                do k=1,nlay
                   write(6,'(i3,7f10.3)') k,pplay(i,k),ztv(i,k),1000*p_o(i,k),ztva(i,k),1000*zqla(i,k),f_star(i,k),zw2(i,k)
@@ -863,5 +863,5 @@
 ! nrlmd le 10/04/2012   Transport de la TKE par le thermique moyen pour la fermeture en ALP 
 !                       On transporte pbl_tke pour donner therm_tke
-!                       Copie conforme de la subroutine DTKE dans physiq.F ecrite par Frederic Hourdin
+!                       Copie conforme de la SUBROUTINE DTKE dans physiq.F ecrite par Frederic Hourdin
 
 !=======================================================================
@@ -869,5 +869,5 @@
 !=======================================================================
 
-      subroutine thermcell_tke_transport( &
+      SUBROUTINE thermcell_tke_transport( &
        ngrid,nlay,ptimestep,fm0,entr0,rg,pplev,  &   ! in
        therm_tke_max)                                ! out
@@ -905,5 +905,5 @@
 
 
-      if (prt_level>=1) print*,'Q2 THERMCEL_DQ 0'
+      if (prt_level>=1) PRINT*,'Q2 THERMCEL_DQ 0'
 
 !   calcul du detrainement
@@ -946,8 +946,8 @@
             endif
             if (qa(ig,k)<0.) then
-!               print*,'qa<0!!!'
+!               PRINT*,'qa<0!!!'
             endif
             if (q(ig,k)<0.) then
-!               print*,'q<0!!!'
+!               PRINT*,'q<0!!!'
             endif
          enddo
@@ -960,5 +960,5 @@
             wqd(ig,k)=fm(ig,k)*q(ig,k)
             if (wqd(ig,k)<0.) then
-!               print*,'wqd<0!!!'
+!               PRINT*,'wqd<0!!!'
             endif
          enddo
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_old.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_old.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_old.F90	(revision 5103)
@@ -139,5 +139,5 @@
   ! ---------------------------------------------------
 
-  ! print*,'0 OK convect8'
+  ! PRINT*,'0 OK convect8'
 
   DO l = 1, nlay
@@ -152,5 +152,5 @@
   END DO
 
-  ! print*,'1 OK convect8'
+  ! PRINT*,'1 OK convect8'
   ! --------------------
 
@@ -198,5 +198,5 @@
   END DO
 
-  ! print*,'2 OK convect8'
+  ! PRINT*,'2 OK convect8'
   ! -----------------------------------------------------------------------
   ! Calcul des densites
@@ -223,5 +223,5 @@
   END DO
 
-  ! print*,'3 OK convect8'
+  ! PRINT*,'3 OK convect8'
   ! ------------------------------------------------------------------
   ! Calcul de w2, quarre de w a partir de la cape
@@ -279,5 +279,5 @@
   END DO
 
-  ! print*,'4 OK convect8'
+  ! PRINT*,'4 OK convect8'
   ! Calcul de la couche correspondant a la hauteur du thermique
   DO k = 1, nlay - 1
@@ -292,5 +292,5 @@
   END DO
 
-  ! print*,'5 OK convect8'
+  ! PRINT*,'5 OK convect8'
   ! Calcule du w max du thermique
   DO k = 1, nlay
@@ -320,20 +320,20 @@
   END DO
 
-  ! print*,'6 OK convect8'
+  ! PRINT*,'6 OK convect8'
   ! Longueur caracteristique correspondant a la hauteur des thermiques.
   DO ig = 1, ngrid
     zmax(ig) = 500.
   END DO
-  ! print*,'LMAX LMAX LMAX '
+  ! PRINT*,'LMAX LMAX LMAX '
   DO k = 1, nlay - 1
     DO ig = 1, ngrid
       zmax(ig) = max(zmax(ig), zlev(ig,lmax(ig,k))-zlev(ig,k))
     END DO
-    ! print*,k,lmax(1,k)
-  END DO
-  ! print*,'ZMAX ZMAX ZMAX ',zmax
-  ! call dump2d(iim,jjm-1,zmax(2:ngrid-1),'ZMAX      ')
-
-  ! print*,'OKl336'
+    ! PRINT*,k,lmax(1,k)
+  END DO
+  ! PRINT*,'ZMAX ZMAX ZMAX ',zmax
+  ! CALL dump2d(iim,jjm-1,zmax(2:ngrid-1),'ZMAX      ')
+
+  ! PRINT*,'OKl336'
   ! Calcul de l'entrainement.
   ! Le rapport d'aspect relie la largeur de l'ascendance a l'epaisseur
@@ -354,5 +354,5 @@
 
 
-  ! print*,'7 OK convect8'
+  ! PRINT*,'7 OK convect8'
   DO k = 1, klev + 1
     DO ig = 1, ngrid
@@ -365,5 +365,5 @@
   END DO
 
-  ! print*,'8 OK convect8'
+  ! PRINT*,'8 OK convect8'
   DO ig = 1, ngrid
     lmaxa(ig) = 1
@@ -373,12 +373,12 @@
 
 
-  ! print*,'OKl372'
+  ! PRINT*,'OKl372'
   DO l = 1, nlay - 2
     DO ig = 1, ngrid
       ! if (zw2(ig,l).lt.1.e-10.and.ztv(ig,l).gt.ztv(ig,l+1)) then
-      ! print*,'COUCOU ',l,zw2(ig,l),ztv(ig,l),ztv(ig,l+1)
+      ! PRINT*,'COUCOU ',l,zw2(ig,l),ztv(ig,l),ztv(ig,l+1)
       IF (zw2(ig,l)<1.E-10 .AND. ztv(ig,l)>ztv(ig,l+1) .AND. &
           entr(ig,l)>1.E-10) THEN
-        ! print*,'COUCOU cas 1'
+        ! PRINT*,'COUCOU cas 1'
         ! Initialisation de l'ascendance
         ! lmix(ig)=1
@@ -388,6 +388,6 @@
         zw2(ig, l) = 0.
         ! if (.not.ztv(ig,l+1).gt.150.) then
-        ! print*,'ig,l+1,ztv(ig,l+1)'
-        ! print*, ig,l+1,ztv(ig,l+1)
+        ! PRINT*,'ig,l+1,ztv(ig,l+1)'
+        ! PRINT*, ig,l+1,ztv(ig,l+1)
         ! endif
         zw2(ig, l+1) = 2.*rg*(ztv(ig,l)-ztv(ig,l+1))/ztv(ig, l+1)* &
@@ -398,10 +398,10 @@
         fmc(ig, l+1) = fmc(ig, l) + entr(ig, l)
         ! if (.not.fmc(ig,l+1).gt.1.e-15) then
-        ! print*,'ig,l+1,fmc(ig,l+1)'
-        ! print*, ig,l+1,fmc(ig,l+1)
-        ! print*,'Fmc ',(fmc(ig,ll),ll=1,klev+1)
-        ! print*,'W2 ',(zw2(ig,ll),ll=1,klev+1)
-        ! print*,'Tv ',(ztv(ig,ll),ll=1,klev)
-        ! print*,'Entr ',(entr(ig,ll),ll=1,klev)
+        ! PRINT*,'ig,l+1,fmc(ig,l+1)'
+        ! PRINT*, ig,l+1,fmc(ig,l+1)
+        ! PRINT*,'Fmc ',(fmc(ig,ll),ll=1,klev+1)
+        ! PRINT*,'W2 ',(zw2(ig,ll),ll=1,klev+1)
+        ! PRINT*,'Tv ',(ztv(ig,ll),ll=1,klev)
+        ! PRINT*,'Entr ',(entr(ig,ll),ll=1,klev)
         ! endif
         ztva(ig, l) = (fmc(ig,l)*ztva(ig,l-1)+entr(ig,l)*ztv(ig,l))/ &
@@ -423,10 +423,10 @@
         wmaxa(ig) = wa_moy(ig, l+1)
       END IF
-      ! print*,'COUCOU cas 2 LMIX=',lmix(ig),wa_moy(ig,l+1),wmaxa(ig)
-    END DO
-  END DO
-
-  ! print*,'9 OK convect8'
-  ! print*,'WA1 ',wa_moy
+      ! PRINT*,'COUCOU cas 2 LMIX=',lmix(ig),wa_moy(ig,l+1),wmaxa(ig)
+    END DO
+  END DO
+
+  ! PRINT*,'9 OK convect8'
+  ! PRINT*,'WA1 ',wa_moy
 
   ! determination de l'indice du debut de la mixed layer ou w decroit
@@ -438,5 +438,5 @@
   ! de la vitesse d'entrainement horizontal dans la couche alimentante.
 
-  ! print*,'OKl439'
+  ! PRINT*,'OKl439'
   DO l = 2, nlay
     DO ig = 1, ngrid
@@ -468,6 +468,6 @@
   END DO
 
-  ! print*,'10 OK convect8'
-  ! print*,'WA2 ',wa_moy
+  ! PRINT*,'10 OK convect8'
+  ! PRINT*,'WA2 ',wa_moy
   ! calcul de la fraction de la maille concernée par l'ascendance en tenant
   ! compte de l'epluchage du thermique.
@@ -476,5 +476,5 @@
     DO ig = 1, ngrid
       IF (larg_cons(ig,l)>1.) THEN
-        ! print*,ig,l,lmix(ig),lmaxa(ig),larg_cons(ig,l),'  KKK'
+        ! PRINT*,ig,l,lmix(ig),lmaxa(ig),larg_cons(ig,l),'  KKK'
         fraca(ig, l) = (larg_cons(ig,l)-larg_detr(ig,l))/(r_aspect*zmax(ig))
         IF (l>lmix(ig)) THEN
@@ -490,5 +490,5 @@
           END IF
         END IF
-        ! print*,ig,l,lmix(ig),lmaxa(ig),xxx(ig,l),'LLLLLLL'
+        ! PRINT*,ig,l,lmix(ig),lmaxa(ig),xxx(ig,l),'LLLLLLL'
         fraca(ig, l) = max(fraca(ig,l), 0.)
         fraca(ig, l) = min(fraca(ig,l), 0.5)
@@ -504,6 +504,6 @@
   END DO
 
-  ! print*,'11 OK convect8'
-  ! print*,'Ea3 ',wa_moy
+  ! PRINT*,'11 OK convect8'
+  ! PRINT*,'Ea3 ',wa_moy
   ! ------------------------------------------------------------------
   ! Calcul de fracd, wd
@@ -539,6 +539,6 @@
   END DO
 
-  ! print*,'12 OK convect8'
-  ! print*,'WA4 ',wa_moy
+  ! PRINT*,'12 OK convect8'
+  ! PRINT*,'WA4 ',wa_moy
   ! c------------------------------------------------------------------
   ! calcul du transport vertical
@@ -546,10 +546,10 @@
 
   GO TO 4444
-  ! print*,'XXXXXXXXXXXXXXX ptimestep= ',ptimestep
+  ! PRINT*,'XXXXXXXXXXXXXXX ptimestep= ',ptimestep
   DO l = 2, nlay - 1
     DO ig = 1, ngrid
       IF (fm(ig,l+1)*ptimestep>masse(ig,l) .AND. fm(ig,l+1)*ptimestep>masse( &
           ig,l+1)) THEN
-        ! print*,'WARN!!! FM>M ig=',ig,' l=',l,'  FM='
+        ! PRINT*,'WARN!!! FM>M ig=',ig,' l=',l,'  FM='
         ! s         ,fm(ig,l+1)*ptimestep
         ! s         ,'   M=',masse(ig,l),masse(ig,l+1)
@@ -561,5 +561,5 @@
     DO ig = 1, ngrid
       IF (entr(ig,l)*ptimestep>masse(ig,l)) THEN
-        ! print*,'WARN!!! E>M ig=',ig,' l=',l,'  E=='
+        ! PRINT*,'WARN!!! E>M ig=',ig,' l=',l,'  E=='
         ! s         ,entr(ig,l)*ptimestep
         ! s         ,'   M=',masse(ig,l)
@@ -571,19 +571,19 @@
     DO ig = 1, ngrid
       IF (.NOT. fm(ig,l)>=0. .OR. .NOT. fm(ig,l)<=10.) THEN
-        ! print*,'WARN!!! fm exagere ig=',ig,'   l=',l
+        ! PRINT*,'WARN!!! fm exagere ig=',ig,'   l=',l
         ! s         ,'   FM=',fm(ig,l)
       END IF
       IF (.NOT. masse(ig,l)>=1.E-10 .OR. .NOT. masse(ig,l)<=1.E4) THEN
-        ! print*,'WARN!!! masse exagere ig=',ig,'   l=',l
+        ! PRINT*,'WARN!!! masse exagere ig=',ig,'   l=',l
         ! s         ,'   M=',masse(ig,l)
-        ! print*,'rho(ig,l),pplay(ig,l),zpspsk(ig,l),RD,zh(ig,l)',
+        ! PRINT*,'rho(ig,l),pplay(ig,l),zpspsk(ig,l),RD,zh(ig,l)',
         ! s                 rho(ig,l),pplay(ig,l),zpspsk(ig,l),RD,zh(ig,l)
-        ! print*,'zlev(ig,l+1),zlev(ig,l)'
+        ! PRINT*,'zlev(ig,l+1),zlev(ig,l)'
         ! s                ,zlev(ig,l+1),zlev(ig,l)
-        ! print*,'pphi(ig,l-1),pphi(ig,l),pphi(ig,l+1)'
+        ! PRINT*,'pphi(ig,l-1),pphi(ig,l),pphi(ig,l+1)'
         ! s                ,pphi(ig,l-1),pphi(ig,l),pphi(ig,l+1)
       END IF
       IF (.NOT. entr(ig,l)>=0. .OR. .NOT. entr(ig,l)<=10.) THEN
-        ! print*,'WARN!!! entr exagere ig=',ig,'   l=',l
+        ! PRINT*,'WARN!!! entr exagere ig=',ig,'   l=',l
         ! s         ,'   E=',entr(ig,l)
       END IF
@@ -592,5 +592,5 @@
 
 4444 CONTINUE
-  ! print*,'OK 444 '
+  ! PRINT*,'OK 444 '
 
   IF (w2di==1) THEN
@@ -624,5 +624,5 @@
   PRINT *, 'TH VENT ', dvdq
   IF (dvdq==0) THEN
-    ! print*,'TH VENT OK ',dvdq
+    ! PRINT*,'TH VENT OK ',dvdq
     CALL dqthermcell(ngrid, nlay, ptimestep, fm0, entr0, masse, zu, pduadj, &
       zua)
@@ -655,6 +655,6 @@
 
 
-  ! print*,'13 OK convect8'
-  ! print*,'WA5 ',wa_moy
+  ! PRINT*,'13 OK convect8'
+  ! PRINT*,'WA5 ',wa_moy
   DO l = 1, nlay
     DO ig = 1, ngrid
@@ -667,9 +667,9 @@
   ! do ig=1,ngrid
   ! if(abs(pdtadj(ig,l))*86400..gt.500.) then
-  ! print*,'WARN!!! ig=',ig,'  l=',l
+  ! PRINT*,'WARN!!! ig=',ig,'  l=',l
   ! s         ,'   pdtadj=',pdtadj(ig,l)
   ! endif
   ! if(abs(pdoadj(ig,l))*86400..gt.1.) then
-  ! print*,'WARN!!! ig=',ig,'  l=',l
+  ! PRINT*,'WARN!!! ig=',ig,'  l=',l
   ! s         ,'   pdoadj=',pdoadj(ig,l)
   ! endif
@@ -677,5 +677,5 @@
   ! enddo
 
-  ! print*,'14 OK convect8'
+  ! PRINT*,'14 OK convect8'
   ! ------------------------------------------------------------------
   ! Calculs pour les sorties
@@ -698,5 +698,5 @@
           entr(ig, l) = entr(ig, l) - detr(ig, l)
           detr(ig, l) = 0.
-          ! print*,'WARNING !!! detrainement negatif ',ig,l
+          ! PRINT*,'WARNING !!! detrainement negatif ',ig,l
         END IF
       END DO
@@ -704,10 +704,10 @@
   END IF
 
-  ! print*,'15 OK convect8'
+  ! PRINT*,'15 OK convect8'
 
 
   ! if(wa_moy(1,4).gt.1.e-10) stop
 
-  ! print*,'19 OK convect8'
+  ! PRINT*,'19 OK convect8'
   RETURN
 END SUBROUTINE thermcell_2002
@@ -892,5 +892,5 @@
   LOGICAL, SAVE :: first = .TRUE.
   !$OMP THREADPRIVATE(first)
-  ! data first /.false./
+  ! data first /.FALSE./
   ! save first
   LOGICAL nuage
@@ -934,5 +934,5 @@
 
   sorties = .FALSE.
-  ! print*,'NOUVEAU DETR PLUIE '
+  ! PRINT*,'NOUVEAU DETR PLUIE '
   IF (ngrid/=klon) THEN
     PRINT *
@@ -970,5 +970,5 @@
   END DO
   ! do ig=1,klon
-  ! print*,'test(ig)',test(ig),zmax0(ig)
+  ! PRINT*,'test(ig)',test(ig),zmax0(ig)
   ! enddo
   nuage = .FALSE.
@@ -1051,5 +1051,5 @@
   ! ---------------------------------------------------
 
-  ! print*,'0 OK convect8'
+  ! PRINT*,'0 OK convect8'
 
   DO l = 1, nlay
@@ -1075,5 +1075,5 @@
   END DO
 
-  ! print*,'1 OK convect8'
+  ! PRINT*,'1 OK convect8'
   ! --------------------
 
@@ -1118,5 +1118,5 @@
   END DO
 
-  ! print*,'2 OK convect8'
+  ! PRINT*,'2 OK convect8'
   ! -----------------------------------------------------------------------
   ! Calcul des densites
@@ -1150,5 +1150,5 @@
     END DO
   END DO
-  ! print*,'3 OK convect8'
+  ! PRINT*,'3 OK convect8'
   ! ------------------------------------------------------------------
   ! Calcul de w2, quarre de w a partir de la cape
@@ -1271,5 +1271,5 @@
   END DO
 
-  ! print*,'fin calcul alim_star'
+  ! PRINT*,'fin calcul alim_star'
 
   ! AM:initialisations
@@ -1291,5 +1291,5 @@
     END DO
   END DO
-  ! print*,'7 OK convect8'
+  ! PRINT*,'7 OK convect8'
   DO k = 1, klev + 1
     DO ig = 1, ngrid
@@ -1305,5 +1305,5 @@
   END DO
 
-  ! n     print*,'8 OK convect8'
+  ! n     PRINT*,'8 OK convect8'
   DO ig = 1, ngrid
     linter(ig) = 1.
@@ -1356,8 +1356,8 @@
         w_est(ig, l+1) = zw2(ig, l+1)
         larg_detr(ig, l) = 0.
-        ! print*,'coucou boucle 1'
+        ! PRINT*,'coucou boucle 1'
       ELSE IF ((zw2(ig,l)>=1E-10) .AND. (f_star(ig,l)+alim_star(ig, &
           l))>1.E-10) THEN
-        ! print*,'coucou boucle 2'
+        ! PRINT*,'coucou boucle 2'
         ! estimation du detrainement a partir de la geometrie du pas
         ! precedent
@@ -1365,7 +1365,7 @@
           detr_star(ig, l) = 0.
           entr_star(ig, l) = 0.
-          ! print*,'coucou test(ig)',test(ig),f0(ig),zmax0(ig)
+          ! PRINT*,'coucou test(ig)',test(ig),f0(ig),zmax0(ig)
         ELSE
-          ! print*,'coucou debut detr'
+          ! PRINT*,'coucou debut detr'
           ! tests sur la definition du detr
           IF (zqla(ig,l-1)>1.E-10) THEN
@@ -1420,5 +1420,5 @@
           END IF
 
-          ! print*,'ok detr_star'
+          ! PRINT*,'ok detr_star'
         END IF
         ! prise en compte du detrainement dans le calcul du flux
@@ -1474,5 +1474,5 @@
             ! write(17,*)'DT0=',DT
             DO WHILE (abs(dt)>ddt0)
-              ! print*,'aie'
+              ! PRINT*,'aie'
               tbef(ig) = tbef(ig) + dt
               zdelta = max(0., sign(1.,rtt-tbef(ig)))
@@ -1548,8 +1548,8 @@
           ig,l))
         zw2(ig, l+1) = 0.
-        ! print*,'linter=',linter(ig)
+        ! PRINT*,'linter=',linter(ig)
         ! else if ((zw2(ig,l+1).lt.1.e-10).and.(zw2(ig,l+1).ge.0.)) then
         ! linter(ig)=l+1
-        ! print*,'linter=l',zw2(ig,l),zw2(ig,l+1)
+        ! PRINT*,'linter=l',zw2(ig,l),zw2(ig,l+1)
       ELSE
         wa_moy(ig, l+1) = sqrt(zw2(ig,l+1))
@@ -1694,5 +1694,5 @@
       detr(ig, k) = f(ig)*detr_star(ig, k)
       IF (detr(ig,k)<0.) THEN
-        ! print*,'detr1<0!!!'
+        ! PRINT*,'detr1<0!!!'
       END IF
     END DO
@@ -1700,5 +1700,5 @@
       entr(ig, k) = f(ig)*entr_star(ig, k)
       IF (entr(ig,k)<0.) THEN
-        ! print*,'entr1<0!!!'
+        ! PRINT*,'entr1<0!!!'
       END IF
     END DO
@@ -1709,5 +1709,5 @@
   ! if (((detr(ig,l)+entr(ig,l)+alim(ig,l))*ptimestep).gt.
   ! s          (masse(ig,l))) then
-  ! print*,'d2+e2+a2>m2','ig=',ig,'l=',l,'lmax(ig)=',lmax(ig),'d+e+a='
+  ! PRINT*,'d2+e2+a2>m2','ig=',ig,'l=',l,'lmax(ig)=',lmax(ig),'d+e+a='
   ! s,(detr(ig,l)+entr(ig,l)+alim(ig,l))*ptimestep,'m=',masse(ig,l)
   ! endif
@@ -1721,5 +1721,5 @@
       ! fmc(ig,l+1)=f(ig)*f_star(ig,l+1)
       fmc(ig, l+1) = fmc(ig, l) + alim(ig, l) + entr(ig, l) - detr(ig, l)
-      ! print*,'??!!','ig=',ig,'l=',l,'lmax=',lmax(ig),'lmix=',lmix(ig),
+      ! PRINT*,'??!!','ig=',ig,'l=',l,'lmax=',lmax(ig),'lmix=',lmix(ig),
       ! s  'e=',entr(ig,l),'d=',detr(ig,l),'a=',alim(ig,l),'f=',fmc(ig,l),
       ! s  'f+1=',fmc(ig,l+1)
@@ -1729,5 +1729,5 @@
         detr(ig, l) = alim(ig, l) + entr(ig, l)
         ! fmc(ig,l+1)=0.
-        ! print*,'fmc1<0',l+1,lmax(ig),fmc(ig,l+1)
+        ! PRINT*,'fmc1<0',l+1,lmax(ig),fmc(ig,l+1)
       END IF
       ! if ((fmc(ig,l+1).gt.fmc(ig,l)).and.(l.gt.lentr(ig))) then
@@ -1830,5 +1830,5 @@
       IF ((abs(fmc(ig,l+1)-fmc(ig,l)-alim(ig,l)-entr(ig,l)+ &
           detr(ig,l)))>1.E-4) THEN
-        ! print*,'pbcm!!','ig=',ig,'l=',l,'lmax=',lmax(ig),'lmix=',lmix(ig),
+        ! PRINT*,'pbcm!!','ig=',ig,'l=',l,'lmax=',lmax(ig),'lmix=',lmix(ig),
         ! s  'e=',entr(ig,l),'d=',detr(ig,l),'a=',alim(ig,l),'f=',fmc(ig,l),
         ! s  'f+1=',fmc(ig,l+1)
@@ -1866,5 +1866,5 @@
     IF ((zmax(ig)-zmix(ig))<=0.) THEN
       zmix(ig) = 0.9*zmax(ig)
-      ! print*,'pb zmix>zmax'
+      ! PRINT*,'pb zmix>zmax'
     END IF
   END DO
@@ -1909,6 +1909,6 @@
 
   ! Calcul du detrainement lors du premier passage
-  ! print*,'9 OK convect8'
-  ! print*,'WA1 ',wa_moy
+  ! PRINT*,'9 OK convect8'
+  ! PRINT*,'WA1 ',wa_moy
 
   ! determination de l'indice du debut de la mixed layer ou w decroit
@@ -1958,6 +1958,6 @@
   END DO
 
-  ! print*,'10 OK convect8'
-  ! print*,'WA2 ',wa_moy
+  ! PRINT*,'10 OK convect8'
+  ! PRINT*,'WA2 ',wa_moy
   ! cal1cul de la fraction de la maille concernée par l'ascendance en tenant
   ! compte de l'epluchage du thermique.
@@ -1967,5 +1967,5 @@
     DO ig = 1, ngrid
       IF (larg_cons(ig,l)>1. .AND. (test(ig)==1)) THEN
-        ! print*,ig,l,lmix(ig),lmaxa(ig),larg_cons(ig,l),'  KKK'
+        ! PRINT*,ig,l,lmix(ig),lmaxa(ig),larg_cons(ig,l),'  KKK'
         fraca(ig, l) = (larg_cons(ig,l)-larg_detr(ig,l))/(r_aspect*zmax(ig))
         ! test
@@ -1998,5 +1998,5 @@
           ! test
           IF (zmax(ig)-zmix(ig)<1.E-10) THEN
-            ! print*,'pb xxx'
+            ! PRINT*,'pb xxx'
             xxx(ig, l) = (lmax(ig)+1.-l)/(lmax(ig)+1.-lmix(ig))
           ELSE
@@ -2012,5 +2012,5 @@
             fraca(ig, l) = fracazmix(ig)*xxx(ig, l)**2
           END IF
-          ! print*,ig,l,lmix(ig),lmaxa(ig),xxx(ig,l),'LLLLLLL'
+          ! PRINT*,ig,l,lmix(ig),lmaxa(ig),xxx(ig,l),'LLLLLLL'
           fraca(ig, l) = max(fraca(ig,l), 0.)
           fraca(ig, l) = min(fraca(ig,l), 0.5)
@@ -2023,6 +2023,6 @@
 
   PRINT *, 'fin calcul fraca'
-  ! print*,'11 OK convect8'
-  ! print*,'Ea3 ',wa_moy
+  ! PRINT*,'11 OK convect8'
+  ! PRINT*,'Ea3 ',wa_moy
   ! ------------------------------------------------------------------
   ! Calcul de fracd, wd
@@ -2077,6 +2077,6 @@
   END DO
 
-  ! print*,'12 OK convect8'
-  ! print*,'WA4 ',wa_moy
+  ! PRINT*,'12 OK convect8'
+  ! PRINT*,'WA4 ',wa_moy
   ! c------------------------------------------------------------------
   ! calcul du transport vertical
@@ -2084,5 +2084,5 @@
 
   GO TO 4444
-  ! print*,'XXXXXXXXXXXXXXX ptimestep= ',ptimestep
+  ! PRINT*,'XXXXXXXXXXXXXXX ptimestep= ',ptimestep
   DO l = 2, nlay - 1
     DO ig = 1, ngrid
@@ -2107,19 +2107,19 @@
     DO ig = 1, ngrid
       IF (.NOT. fm(ig,l)>=0. .OR. .NOT. fm(ig,l)<=10.) THEN
-        ! print*,'WARN!!! fm exagere ig=',ig,'   l=',l
+        ! PRINT*,'WARN!!! fm exagere ig=',ig,'   l=',l
         ! s         ,'   FM=',fm(ig,l)
       END IF
       IF (.NOT. masse(ig,l)>=1.E-10 .OR. .NOT. masse(ig,l)<=1.E4) THEN
-        ! print*,'WARN!!! masse exagere ig=',ig,'   l=',l
+        ! PRINT*,'WARN!!! masse exagere ig=',ig,'   l=',l
         ! s         ,'   M=',masse(ig,l)
-        ! print*,'rho(ig,l),pplay(ig,l),zpspsk(ig,l),RD,zh(ig,l)',
+        ! PRINT*,'rho(ig,l),pplay(ig,l),zpspsk(ig,l),RD,zh(ig,l)',
         ! s                 rho(ig,l),pplay(ig,l),zpspsk(ig,l),RD,zh(ig,l)
-        ! print*,'zlev(ig,l+1),zlev(ig,l)'
+        ! PRINT*,'zlev(ig,l+1),zlev(ig,l)'
         ! s                ,zlev(ig,l+1),zlev(ig,l)
-        ! print*,'pphi(ig,l-1),pphi(ig,l),pphi(ig,l+1)'
+        ! PRINT*,'pphi(ig,l-1),pphi(ig,l),pphi(ig,l+1)'
         ! s                ,pphi(ig,l-1),pphi(ig,l),pphi(ig,l+1)
       END IF
       IF (.NOT. alim(ig,l)>=0. .OR. .NOT. alim(ig,l)<=10.) THEN
-        ! print*,'WARN!!! entr exagere ig=',ig,'   l=',l
+        ! PRINT*,'WARN!!! entr exagere ig=',ig,'   l=',l
         ! s         ,'   E=',entr(ig,l)
       END IF
@@ -2140,5 +2140,5 @@
           detr(ig, l) = 0.
           ! write(11,*)'l,ig,entr',l,ig,entr(ig,l)
-          ! print*,'WARNING !!! detrainement negatif ',ig,l
+          ! PRINT*,'WARNING !!! detrainement negatif ',ig,l
         END IF
       END IF
@@ -2160,7 +2160,7 @@
 
   IF (1==1) THEN
-    ! call dqthermcell(ngrid,nlay,ptimestep,fm0,entr0,masse
+    ! CALL dqthermcell(ngrid,nlay,ptimestep,fm0,entr0,masse
     ! .    ,zh,zdhadj,zha)
-    ! call dqthermcell(ngrid,nlay,ptimestep,fm0,entr0,masse
+    ! CALL dqthermcell(ngrid,nlay,ptimestep,fm0,entr0,masse
     ! .    ,zo,pdoadj,zoa)
     CALL dqthermcell(ngrid, nlay, ptimestep, fm0, entr0, masse, zthl, &
@@ -2200,6 +2200,6 @@
 
 
-  ! print*,'13 OK convect8'
-  ! print*,'WA5 ',wa_moy
+  ! PRINT*,'13 OK convect8'
+  ! PRINT*,'WA5 ',wa_moy
   DO l = 1, nlay
     DO ig = 1, ngrid
@@ -2213,9 +2213,9 @@
   ! do ig=1,ngrid
   ! if(abs(pdtadj(ig,l))*86400..gt.500.) then
-  ! print*,'WARN!!! ig=',ig,'  l=',l
+  ! PRINT*,'WARN!!! ig=',ig,'  l=',l
   ! s         ,'   pdtadj=',pdtadj(ig,l)
   ! endif
   ! if(abs(pdoadj(ig,l))*86400..gt.1.) then
-  ! print*,'WARN!!! ig=',ig,'  l=',l
+  ! PRINT*,'WARN!!! ig=',ig,'  l=',l
   ! s         ,'   pdoadj=',pdoadj(ig,l)
   ! endif
@@ -2223,5 +2223,5 @@
   ! enddo
 
-  ! print*,'14 OK convect8'
+  ! PRINT*,'14 OK convect8'
   ! ------------------------------------------------------------------
   ! Calculs pour les sorties
@@ -2259,7 +2259,7 @@
         END IF
         ! if (zcon(ig).gt.1.e-10) then
-        ! nuage=.true.
+        ! nuage=.TRUE.
         ! else
-        ! nuage=.false.
+        ! nuage=.FALSE.
         ! endif
       END DO
@@ -2272,5 +2272,5 @@
         thetath2(ig, l) = zf2*(zha(ig,l)-zh(ig,l)/zpspsk(ig,l))**2
         wth2(ig, l) = zf2*(zw2(ig,l))**2
-        ! print*,'wth2=',wth2(ig,l)
+        ! PRINT*,'wth2=',wth2(ig,l)
         wth3(ig, l) = zf2*(1-2.*fraca(ig,l))/(1-fraca(ig,l))*zw2(ig, l)* &
           zw2(ig, l)*zw2(ig, l)
@@ -2311,5 +2311,5 @@
   END IF
 
-  ! print*,'19 OK convect8'
+  ! PRINT*,'19 OK convect8'
   RETURN
 END SUBROUTINE thermcell_cld
@@ -2555,5 +2555,5 @@
   ! ---------------------------------------------------
 
-  ! print*,'0 OK convect8'
+  ! PRINT*,'0 OK convect8'
 
   DO l = 1, nlay
@@ -2578,5 +2578,5 @@
   END DO
 
-  ! print*,'1 OK convect8'
+  ! PRINT*,'1 OK convect8'
   ! --------------------
 
@@ -2615,5 +2615,5 @@
   END DO
 
-  ! print*,'2 OK convect8'
+  ! PRINT*,'2 OK convect8'
   ! -----------------------------------------------------------------------
   ! Calcul des densites
@@ -2641,5 +2641,5 @@
   END DO
 
-  ! print*,'3 OK convect8'
+  ! PRINT*,'3 OK convect8'
   ! ------------------------------------------------------------------
   ! Calcul de w2, quarre de w a partir de la cape
@@ -2755,5 +2755,5 @@
   END DO
 
-  ! print*,'7 OK convect8'
+  ! PRINT*,'7 OK convect8'
   DO k = 1, klev + 1
     DO ig = 1, ngrid
@@ -2769,5 +2769,5 @@
   END DO
 
-  ! print*,'8 OK convect8'
+  ! PRINT*,'8 OK convect8'
   DO ig = 1, ngrid
     linter(ig) = 1.
@@ -2956,6 +2956,6 @@
 
 
-  ! print*,'9 OK convect8'
-  ! print*,'WA1 ',wa_moy
+  ! PRINT*,'9 OK convect8'
+  ! PRINT*,'WA1 ',wa_moy
 
   ! determination de l'indice du debut de la mixed layer ou w decroit
@@ -2996,6 +2996,6 @@
   END DO
 
-  ! print*,'10 OK convect8'
-  ! print*,'WA2 ',wa_moy
+  ! PRINT*,'10 OK convect8'
+  ! PRINT*,'WA2 ',wa_moy
   ! calcul de la fraction de la maille concernée par l'ascendance en tenant
   ! compte de l'epluchage du thermique.
@@ -3027,5 +3027,5 @@
     DO ig = 1, ngrid
       IF (larg_cons(ig,l)>1.) THEN
-        ! print*,ig,l,lmix(ig),lmaxa(ig),larg_cons(ig,l),'  KKK'
+        ! PRINT*,ig,l,lmix(ig),lmaxa(ig),larg_cons(ig,l),'  KKK'
         fraca(ig, l) = (larg_cons(ig,l)-larg_detr(ig,l))/(r_aspect*zmax(ig))
         ! test
@@ -3064,5 +3064,5 @@
             fraca(ig, l) = fracazmix(ig)*xxx(ig, l)**2
           END IF
-          ! print*,ig,l,lmix(ig),lmaxa(ig),xxx(ig,l),'LLLLLLL'
+          ! PRINT*,ig,l,lmix(ig),lmaxa(ig),xxx(ig,l),'LLLLLLL'
           fraca(ig, l) = max(fraca(ig,l), 0.)
           fraca(ig, l) = min(fraca(ig,l), 0.5)
@@ -3074,6 +3074,6 @@
   END DO
 
-  ! print*,'11 OK convect8'
-  ! print*,'Ea3 ',wa_moy
+  ! PRINT*,'11 OK convect8'
+  ! PRINT*,'Ea3 ',wa_moy
   ! ------------------------------------------------------------------
   ! Calcul de fracd, wd
@@ -3116,6 +3116,6 @@
   END DO
 
-  ! print*,'12 OK convect8'
-  ! print*,'WA4 ',wa_moy
+  ! PRINT*,'12 OK convect8'
+  ! PRINT*,'WA4 ',wa_moy
   ! c------------------------------------------------------------------
   ! calcul du transport vertical
@@ -3123,10 +3123,10 @@
 
   GO TO 4444
-  ! print*,'XXXXXXXXXXXXXXX ptimestep= ',ptimestep
+  ! PRINT*,'XXXXXXXXXXXXXXX ptimestep= ',ptimestep
   DO l = 2, nlay - 1
     DO ig = 1, ngrid
       IF (fm(ig,l+1)*ptimestep>masse(ig,l) .AND. fm(ig,l+1)*ptimestep>masse( &
           ig,l+1)) THEN
-        ! print*,'WARN!!! FM>M ig=',ig,' l=',l,'  FM='
+        ! PRINT*,'WARN!!! FM>M ig=',ig,' l=',l,'  FM='
         ! s         ,fm(ig,l+1)*ptimestep
         ! s         ,'   M=',masse(ig,l),masse(ig,l+1)
@@ -3138,5 +3138,5 @@
     DO ig = 1, ngrid
       IF (entr(ig,l)*ptimestep>masse(ig,l)) THEN
-        ! print*,'WARN!!! E>M ig=',ig,' l=',l,'  E=='
+        ! PRINT*,'WARN!!! E>M ig=',ig,' l=',l,'  E=='
         ! s         ,entr(ig,l)*ptimestep
         ! s         ,'   M=',masse(ig,l)
@@ -3148,19 +3148,19 @@
     DO ig = 1, ngrid
       IF (.NOT. fm(ig,l)>=0. .OR. .NOT. fm(ig,l)<=10.) THEN
-        ! print*,'WARN!!! fm exagere ig=',ig,'   l=',l
+        ! PRINT*,'WARN!!! fm exagere ig=',ig,'   l=',l
         ! s         ,'   FM=',fm(ig,l)
       END IF
       IF (.NOT. masse(ig,l)>=1.E-10 .OR. .NOT. masse(ig,l)<=1.E4) THEN
-        ! print*,'WARN!!! masse exagere ig=',ig,'   l=',l
+        ! PRINT*,'WARN!!! masse exagere ig=',ig,'   l=',l
         ! s         ,'   M=',masse(ig,l)
-        ! print*,'rho(ig,l),pplay(ig,l),zpspsk(ig,l),RD,zh(ig,l)',
+        ! PRINT*,'rho(ig,l),pplay(ig,l),zpspsk(ig,l),RD,zh(ig,l)',
         ! s                 rho(ig,l),pplay(ig,l),zpspsk(ig,l),RD,zh(ig,l)
-        ! print*,'zlev(ig,l+1),zlev(ig,l)'
+        ! PRINT*,'zlev(ig,l+1),zlev(ig,l)'
         ! s                ,zlev(ig,l+1),zlev(ig,l)
-        ! print*,'pphi(ig,l-1),pphi(ig,l),pphi(ig,l+1)'
+        ! PRINT*,'pphi(ig,l-1),pphi(ig,l),pphi(ig,l+1)'
         ! s                ,pphi(ig,l-1),pphi(ig,l),pphi(ig,l+1)
       END IF
       IF (.NOT. entr(ig,l)>=0. .OR. .NOT. entr(ig,l)<=10.) THEN
-        ! print*,'WARN!!! entr exagere ig=',ig,'   l=',l
+        ! PRINT*,'WARN!!! entr exagere ig=',ig,'   l=',l
         ! s         ,'   E=',entr(ig,l)
       END IF
@@ -3179,7 +3179,7 @@
 
   IF (1==1) THEN
-    ! call dqthermcell(ngrid,nlay,ptimestep,fm0,entr0,masse
+    ! CALL dqthermcell(ngrid,nlay,ptimestep,fm0,entr0,masse
     ! .    ,zh,zdhadj,zha)
-    ! call dqthermcell(ngrid,nlay,ptimestep,fm0,entr0,masse
+    ! CALL dqthermcell(ngrid,nlay,ptimestep,fm0,entr0,masse
     ! .    ,zo,pdoadj,zoa)
     CALL dqthermcell(ngrid, nlay, ptimestep, fm0, entr0, masse, zthl, &
@@ -3215,6 +3215,6 @@
 
 
-  ! print*,'13 OK convect8'
-  ! print*,'WA5 ',wa_moy
+  ! PRINT*,'13 OK convect8'
+  ! PRINT*,'WA5 ',wa_moy
   DO l = 1, nlay
     DO ig = 1, ngrid
@@ -3228,9 +3228,9 @@
   ! do ig=1,ngrid
   ! if(abs(pdtadj(ig,l))*86400..gt.500.) then
-  ! print*,'WARN!!! ig=',ig,'  l=',l
+  ! PRINT*,'WARN!!! ig=',ig,'  l=',l
   ! s         ,'   pdtadj=',pdtadj(ig,l)
   ! endif
   ! if(abs(pdoadj(ig,l))*86400..gt.1.) then
-  ! print*,'WARN!!! ig=',ig,'  l=',l
+  ! PRINT*,'WARN!!! ig=',ig,'  l=',l
   ! s         ,'   pdoadj=',pdoadj(ig,l)
   ! endif
@@ -3238,5 +3238,5 @@
   ! enddo
 
-  ! print*,'14 OK convect8'
+  ! PRINT*,'14 OK convect8'
   ! ------------------------------------------------------------------
   ! Calculs pour les sorties
@@ -3397,5 +3397,5 @@
   ! ---------------------------------------------------
 
-  ! print*,'0 OK convect8'
+  ! PRINT*,'0 OK convect8'
 
   DO l = 1, nlay
@@ -3410,5 +3410,5 @@
   END DO
 
-  ! print*,'1 OK convect8'
+  ! PRINT*,'1 OK convect8'
   ! --------------------
 
@@ -3447,5 +3447,5 @@
   END DO
 
-  ! print*,'2 OK convect8'
+  ! PRINT*,'2 OK convect8'
   ! -----------------------------------------------------------------------
   ! Calcul des densites
@@ -3472,5 +3472,5 @@
   END DO
 
-  ! print*,'3 OK convect8'
+  ! PRINT*,'3 OK convect8'
   ! ------------------------------------------------------------------
   ! Calcul de w2, quarre de w a partir de la cape
@@ -3576,5 +3576,5 @@
   END DO
   ! RC
-  ! print*,'7 OK convect8'
+  ! PRINT*,'7 OK convect8'
   DO k = 1, klev + 1
     DO ig = 1, ngrid
@@ -3590,5 +3590,5 @@
   END DO
 
-  ! print*,'8 OK convect8'
+  ! PRINT*,'8 OK convect8'
   DO ig = 1, ngrid
     linter(ig) = 1.
@@ -3714,5 +3714,5 @@
     END IF
     ! f0(ig)=f(ig)
-    ! first=.true.
+    ! first=.TRUE.
   END DO
   PRINT *, 'apres fermeture'
@@ -3734,6 +3734,6 @@
 
 
-  ! print*,'9 OK convect8'
-  ! print*,'WA1 ',wa_moy
+  ! PRINT*,'9 OK convect8'
+  ! PRINT*,'WA1 ',wa_moy
 
   ! determination de l'indice du debut de la mixed layer ou w decroit
@@ -3777,6 +3777,6 @@
   END DO
 
-  ! print*,'10 OK convect8'
-  ! print*,'WA2 ',wa_moy
+  ! PRINT*,'10 OK convect8'
+  ! PRINT*,'WA2 ',wa_moy
   ! calcul de la fraction de la maille concernée par l'ascendance en tenant
   ! compte de l'epluchage du thermique.
@@ -3807,5 +3807,5 @@
     IF ((zmax(ig)-zmix(ig))<0.) THEN
       zmix(ig) = 0.99*zmax(ig)
-      ! print*,'pb zmix>zmax'
+      ! PRINT*,'pb zmix>zmax'
     END IF
   END DO
@@ -3823,5 +3823,5 @@
     DO ig = 1, ngrid
       IF (larg_cons(ig,l)>1.) THEN
-        ! print*,ig,l,lmix(ig),lmaxa(ig),larg_cons(ig,l),'  KKK'
+        ! PRINT*,ig,l,lmix(ig),lmaxa(ig),larg_cons(ig,l),'  KKK'
         fraca(ig, l) = (larg_cons(ig,l)-larg_detr(ig,l))/(r_aspect*zmax(ig))
         ! test
@@ -3852,5 +3852,5 @@
           ! test
           IF (zmax(ig)-zmix(ig)<1.E-10) THEN
-            ! print*,'pb xxx'
+            ! PRINT*,'pb xxx'
             xxx(ig, l) = (lmaxa(ig)+1.-l)/(lmaxa(ig)+1.-lmix(ig))
           ELSE
@@ -3866,5 +3866,5 @@
             fraca(ig, l) = fracazmix(ig)*xxx(ig, l)**2
           END IF
-          ! print*,ig,l,lmix(ig),lmaxa(ig),xxx(ig,l),'LLLLLLL'
+          ! PRINT*,ig,l,lmix(ig),lmaxa(ig),xxx(ig,l),'LLLLLLL'
           fraca(ig, l) = max(fraca(ig,l), 0.)
           fraca(ig, l) = min(fraca(ig,l), 0.5)
@@ -3877,6 +3877,6 @@
 
   PRINT *, 'fin calcul fraca'
-  ! print*,'11 OK convect8'
-  ! print*,'Ea3 ',wa_moy
+  ! PRINT*,'11 OK convect8'
+  ! PRINT*,'Ea3 ',wa_moy
   ! ------------------------------------------------------------------
   ! Calcul de fracd, wd
@@ -3919,6 +3919,6 @@
   END DO
 
-  ! print*,'12 OK convect8'
-  ! print*,'WA4 ',wa_moy
+  ! PRINT*,'12 OK convect8'
+  ! PRINT*,'WA4 ',wa_moy
   ! c------------------------------------------------------------------
   ! calcul du transport vertical
@@ -3926,10 +3926,10 @@
 
   GO TO 4444
-  ! print*,'XXXXXXXXXXXXXXX ptimestep= ',ptimestep
+  ! PRINT*,'XXXXXXXXXXXXXXX ptimestep= ',ptimestep
   DO l = 2, nlay - 1
     DO ig = 1, ngrid
       IF (fm(ig,l+1)*ptimestep>masse(ig,l) .AND. fm(ig,l+1)*ptimestep>masse( &
           ig,l+1)) THEN
-        ! print*,'WARN!!! FM>M ig=',ig,' l=',l,'  FM='
+        ! PRINT*,'WARN!!! FM>M ig=',ig,' l=',l,'  FM='
         ! s         ,fm(ig,l+1)*ptimestep
         ! s         ,'   M=',masse(ig,l),masse(ig,l+1)
@@ -3941,5 +3941,5 @@
     DO ig = 1, ngrid
       IF (entr(ig,l)*ptimestep>masse(ig,l)) THEN
-        ! print*,'WARN!!! E>M ig=',ig,' l=',l,'  E=='
+        ! PRINT*,'WARN!!! E>M ig=',ig,' l=',l,'  E=='
         ! s         ,entr(ig,l)*ptimestep
         ! s         ,'   M=',masse(ig,l)
@@ -3951,19 +3951,19 @@
     DO ig = 1, ngrid
       IF (.NOT. fm(ig,l)>=0. .OR. .NOT. fm(ig,l)<=10.) THEN
-        ! print*,'WARN!!! fm exagere ig=',ig,'   l=',l
+        ! PRINT*,'WARN!!! fm exagere ig=',ig,'   l=',l
         ! s         ,'   FM=',fm(ig,l)
       END IF
       IF (.NOT. masse(ig,l)>=1.E-10 .OR. .NOT. masse(ig,l)<=1.E4) THEN
-        ! print*,'WARN!!! masse exagere ig=',ig,'   l=',l
+        ! PRINT*,'WARN!!! masse exagere ig=',ig,'   l=',l
         ! s         ,'   M=',masse(ig,l)
-        ! print*,'rho(ig,l),pplay(ig,l),zpspsk(ig,l),RD,zh(ig,l)',
+        ! PRINT*,'rho(ig,l),pplay(ig,l),zpspsk(ig,l),RD,zh(ig,l)',
         ! s                 rho(ig,l),pplay(ig,l),zpspsk(ig,l),RD,zh(ig,l)
-        ! print*,'zlev(ig,l+1),zlev(ig,l)'
+        ! PRINT*,'zlev(ig,l+1),zlev(ig,l)'
         ! s                ,zlev(ig,l+1),zlev(ig,l)
-        ! print*,'pphi(ig,l-1),pphi(ig,l),pphi(ig,l+1)'
+        ! PRINT*,'pphi(ig,l-1),pphi(ig,l),pphi(ig,l+1)'
         ! s                ,pphi(ig,l-1),pphi(ig,l),pphi(ig,l+1)
       END IF
       IF (.NOT. entr(ig,l)>=0. .OR. .NOT. entr(ig,l)<=10.) THEN
-        ! print*,'WARN!!! entr exagere ig=',ig,'   l=',l
+        ! PRINT*,'WARN!!! entr exagere ig=',ig,'   l=',l
         ! s         ,'   E=',entr(ig,l)
       END IF
@@ -3980,5 +3980,5 @@
         entr(ig, l) = entr(ig, l) - detr(ig, l)
         detr(ig, l) = 0.
-        ! print*,'WARNING !!! detrainement negatif ',ig,l
+        ! PRINT*,'WARNING !!! detrainement negatif ',ig,l
       END IF
     END DO
@@ -4026,6 +4026,6 @@
 
 
-  ! print*,'13 OK convect8'
-  ! print*,'WA5 ',wa_moy
+  ! PRINT*,'13 OK convect8'
+  ! PRINT*,'WA5 ',wa_moy
   DO l = 1, nlay
     DO ig = 1, ngrid
@@ -4038,9 +4038,9 @@
   ! do ig=1,ngrid
   ! if(abs(pdtadj(ig,l))*86400..gt.500.) then
-  ! print*,'WARN!!! ig=',ig,'  l=',l
+  ! PRINT*,'WARN!!! ig=',ig,'  l=',l
   ! s         ,'   pdtadj=',pdtadj(ig,l)
   ! endif
   ! if(abs(pdoadj(ig,l))*86400..gt.1.) then
-  ! print*,'WARN!!! ig=',ig,'  l=',l
+  ! PRINT*,'WARN!!! ig=',ig,'  l=',l
   ! s         ,'   pdoadj=',pdoadj(ig,l)
   ! endif
@@ -4048,5 +4048,5 @@
   ! enddo
 
-  ! print*,'14 OK convect8'
+  ! PRINT*,'14 OK convect8'
   ! ------------------------------------------------------------------
   ! Calculs pour les sorties
@@ -4070,10 +4070,10 @@
     ! entr(ig,l)=entr(ig,l)-detr(ig,l)
     ! detr(ig,l)=0.
-    ! print*,'WARNING !!! detrainement negatif ',ig,l
+    ! PRINT*,'WARNING !!! detrainement negatif ',ig,l
     ! endif
     ! enddo
     ! enddo
 
-    ! print*,'15 OK convect8'
+    ! PRINT*,'15 OK convect8'
 
 
@@ -4111,5 +4111,5 @@
 
     ! recalcul des flux en diagnostique...
-    ! print*,'PAS DE TEMPS ',ptimestep
+    ! PRINT*,'PAS DE TEMPS ',ptimestep
     CALL dt2f(pplev, pplay, pt, pdtadj, wh)
     CALL writeg1d(1, nlay, wh, 'wh2     ', 'wh2     ')
@@ -4121,5 +4121,5 @@
   ! if(wa_moy(1,4).gt.1.e-10) stop
 
-  ! print*,'19 OK convect8'
+  ! PRINT*,'19 OK convect8'
   RETURN
 END SUBROUTINE thermcell
@@ -4158,12 +4158,12 @@
         entr(ig, k) = entr(ig, k) - detr(ig, k)
         detr(ig, k) = 0.
-        ! print*,'detr2<0!!!','ig=',ig,'k=',k,'f=',fm(ig,k),
+        ! PRINT*,'detr2<0!!!','ig=',ig,'k=',k,'f=',fm(ig,k),
         ! s         'f+1=',fm(ig,k+1),'e=',entr(ig,k),'d=',detr(ig,k)
       END IF
       IF (fm(ig,k+1)<0.) THEN
-        ! print*,'fm2<0!!!'
+        ! PRINT*,'fm2<0!!!'
       END IF
       IF (entr(ig,k)<0.) THEN
-        ! print*,'entr2<0!!!'
+        ! PRINT*,'entr2<0!!!'
       END IF
     END DO
@@ -4184,8 +4184,8 @@
       END IF
       IF (qa(ig,k)<0.) THEN
-        ! print*,'qa<0!!!'
+        ! PRINT*,'qa<0!!!'
       END IF
       IF (q(ig,k)<0.) THEN
-        ! print*,'q<0!!!'
+        ! PRINT*,'q<0!!!'
       END IF
     END DO
@@ -4197,5 +4197,5 @@
       wqd(ig, k) = fm(ig, k)*q(ig, k)
       IF (wqd(ig,k)<0.) THEN
-        ! print*,'wqd<0!!!'
+        ! PRINT*,'wqd<0!!!'
       END IF
     END DO
@@ -4211,5 +4211,5 @@
         1))/masse(ig, k)
       ! if (dq(ig,k).lt.0.) then
-      ! print*,'dq<0!!!'
+      ! PRINT*,'dq<0!!!'
       ! endif
     END DO
@@ -4285,5 +4285,5 @@
           va(ig, k) = (fm(ig,k)*va(ig,k-1)+(entr(ig,k)+gamma(ig, &
             k))*v(ig,k))/(fm(ig,k+1)+detr(ig,k)+gamma(ig,k))
-          ! print*,k,ua(ig,k),va(ig,k),u(ig,k),v(ig,k),dua,dva
+          ! PRINT*,k,ua(ig,k),va(ig,k),u(ig,k),v(ig,k),dua,dva
           dua = ua(ig, k) - u(ig, k)
           dva = va(ig, k) - v(ig, k)
@@ -4475,5 +4475,5 @@
             k))*v(ig,k))/(fm(ig,k+1)+detr(ig,k)+entr(ig,k)*zf*zf2+gamma(ig,k) &
             )
-          ! print*,k,ua(ig,k),va(ig,k),u(ig,k),v(ig,k),dua,dva
+          ! PRINT*,k,ua(ig,k),va(ig,k),u(ig,k),v(ig,k),dua,dva
           dua = ua(ig, k) - u(ig, k)
           dva = va(ig, k) - v(ig, k)
@@ -4666,5 +4666,5 @@
   ! ---------------------------------------------------
 
-  ! print*,'0 OK convect8'
+  ! PRINT*,'0 OK convect8'
 
   DO l = 1, nlay
@@ -4679,5 +4679,5 @@
   END DO
 
-  ! print*,'1 OK convect8'
+  ! PRINT*,'1 OK convect8'
   ! --------------------
 
@@ -4716,5 +4716,5 @@
   END DO
 
-  ! print*,'2 OK convect8'
+  ! PRINT*,'2 OK convect8'
   ! -----------------------------------------------------------------------
   ! Calcul des densites
@@ -4741,5 +4741,5 @@
   END DO
 
-  ! print*,'3 OK convect8'
+  ! PRINT*,'3 OK convect8'
   ! ------------------------------------------------------------------
   ! Calcul de w2, quarre de w a partir de la cape
@@ -4840,5 +4840,5 @@
   END DO
 
-  ! print*,'fin calcul entr_star'
+  ! PRINT*,'fin calcul entr_star'
   DO k = 1, klev
     DO ig = 1, ngrid
@@ -4847,5 +4847,5 @@
   END DO
   ! RC
-  ! print*,'7 OK convect8'
+  ! PRINT*,'7 OK convect8'
   DO k = 1, klev + 1
     DO ig = 1, ngrid
@@ -4861,5 +4861,5 @@
   END DO
 
-  ! print*,'8 OK convect8'
+  ! PRINT*,'8 OK convect8'
   DO ig = 1, ngrid
     linter(ig) = 1.
@@ -4891,5 +4891,5 @@
         ! test
         IF (abs(zw2(ig,l+1)-zw2(ig,l))<1E-10) THEN
-          ! print*,'pb linter'
+          ! PRINT*,'pb linter'
         END IF
         linter(ig) = (l*(zw2(ig,l+1)-zw2(ig,l))-zw2(ig,l))/(zw2(ig,l+1)-zw2( &
@@ -4899,5 +4899,5 @@
       ELSE
         IF (zw2(ig,l+1)<0.) THEN
-          ! print*,'pb1 zw2<0'
+          ! PRINT*,'pb1 zw2<0'
         END IF
         wa_moy(ig, l+1) = sqrt(zw2(ig,l+1))
@@ -4910,5 +4910,5 @@
     END DO
   END DO
-  ! print*,'fin calcul zw2'
+  ! PRINT*,'fin calcul zw2'
 
   ! Calcul de la couche correspondant a la hauteur du thermique
@@ -4940,5 +4940,5 @@
       IF (l<=lmax(ig)) THEN
         IF (zw2(ig,l)<0.) THEN
-          ! print*,'pb2 zw2<0'
+          ! PRINT*,'pb2 zw2<0'
         END IF
         zw2(ig, l) = sqrt(zw2(ig,l))
@@ -4962,5 +4962,5 @@
   END DO
 
-  ! print*,'avant fermeture'
+  ! PRINT*,'avant fermeture'
   ! Fermeture,determination de f
   DO ig = 1, ngrid
@@ -4985,7 +4985,7 @@
     END IF
     ! f0(ig)=f(ig)
-    ! first=.true.
-  END DO
-  ! print*,'apres fermeture'
+    ! first=.TRUE.
+  END DO
+  ! PRINT*,'apres fermeture'
 
   ! Calcul de l'entrainement
@@ -5016,6 +5016,6 @@
 
 
-  ! print*,'9 OK convect8'
-  ! print*,'WA1 ',wa_moy
+  ! PRINT*,'9 OK convect8'
+  ! PRINT*,'WA1 ',wa_moy
 
   ! determination de l'indice du debut de la mixed layer ou w decroit
@@ -5042,5 +5042,5 @@
         ! cette option est finalement en dur.
         IF ((l_mix*zlev(ig,l))<0.) THEN
-          ! print*,'pb l_mix*zlev<0'
+          ! PRINT*,'pb l_mix*zlev<0'
         END IF
         ! CR: test: nouvelle def de lambda
@@ -5066,6 +5066,6 @@
   END DO
 
-  ! print*,'10 OK convect8'
-  ! print*,'WA2 ',wa_moy
+  ! PRINT*,'10 OK convect8'
+  ! PRINT*,'WA2 ',wa_moy
   ! calcul de la fraction de la maille concernée par l'ascendance en tenant
   ! compte de l'epluchage du thermique.
@@ -5088,5 +5088,5 @@
       ELSE
         zmix(ig) = zlev(ig, lmix(ig))
-        ! print*,'pb zmix'
+        ! PRINT*,'pb zmix'
       END IF
     ELSE
@@ -5096,5 +5096,5 @@
     IF ((zmax(ig)-zmix(ig))<0.) THEN
       zmix(ig) = 0.99*zmax(ig)
-      ! print*,'pb zmix>zmax'
+      ! PRINT*,'pb zmix>zmax'
     END IF
   END DO
@@ -5112,5 +5112,5 @@
     DO ig = 1, ngrid
       IF (larg_cons(ig,l)>1.) THEN
-        ! print*,ig,l,lmix(ig),lmaxa(ig),larg_cons(ig,l),'  KKK'
+        ! PRINT*,ig,l,lmix(ig),lmaxa(ig),larg_cons(ig,l),'  KKK'
         fraca(ig, l) = (larg_cons(ig,l)-larg_detr(ig,l))/(r_aspect*zmax(ig))
         ! test
@@ -5141,5 +5141,5 @@
           ! test
           IF (zmax(ig)-zmix(ig)<1.E-10) THEN
-            ! print*,'pb xxx'
+            ! PRINT*,'pb xxx'
             xxx(ig, l) = (lmaxa(ig)+1.-l)/(lmaxa(ig)+1.-lmix(ig))
           ELSE
@@ -5155,5 +5155,5 @@
             fraca(ig, l) = fracazmix(ig)*xxx(ig, l)**2
           END IF
-          ! print*,ig,l,lmix(ig),lmaxa(ig),xxx(ig,l),'LLLLLLL'
+          ! PRINT*,ig,l,lmix(ig),lmaxa(ig),xxx(ig,l),'LLLLLLL'
           fraca(ig, l) = max(fraca(ig,l), 0.)
           fraca(ig, l) = min(fraca(ig,l), 0.5)
@@ -5165,7 +5165,7 @@
   END DO
 
-  ! print*,'fin calcul fraca'
-  ! print*,'11 OK convect8'
-  ! print*,'Ea3 ',wa_moy
+  ! PRINT*,'fin calcul fraca'
+  ! PRINT*,'11 OK convect8'
+  ! PRINT*,'Ea3 ',wa_moy
   ! ------------------------------------------------------------------
   ! Calcul de fracd, wd
@@ -5208,6 +5208,6 @@
   END DO
 
-  ! print*,'12 OK convect8'
-  ! print*,'WA4 ',wa_moy
+  ! PRINT*,'12 OK convect8'
+  ! PRINT*,'WA4 ',wa_moy
   ! c------------------------------------------------------------------
   ! calcul du transport vertical
@@ -5215,10 +5215,10 @@
 
   GO TO 4444
-  ! print*,'XXXXXXXXXXXXXXX ptimestep= ',ptimestep
+  ! PRINT*,'XXXXXXXXXXXXXXX ptimestep= ',ptimestep
   DO l = 2, nlay - 1
     DO ig = 1, ngrid
       IF (fm(ig,l+1)*ptimestep>masse(ig,l) .AND. fm(ig,l+1)*ptimestep>masse( &
           ig,l+1)) THEN
-        ! print*,'WARN!!! FM>M ig=',ig,' l=',l,'  FM='
+        ! PRINT*,'WARN!!! FM>M ig=',ig,' l=',l,'  FM='
         ! s         ,fm(ig,l+1)*ptimestep
         ! s         ,'   M=',masse(ig,l),masse(ig,l+1)
@@ -5230,5 +5230,5 @@
     DO ig = 1, ngrid
       IF (entr(ig,l)*ptimestep>masse(ig,l)) THEN
-        ! print*,'WARN!!! E>M ig=',ig,' l=',l,'  E=='
+        ! PRINT*,'WARN!!! E>M ig=',ig,' l=',l,'  E=='
         ! s         ,entr(ig,l)*ptimestep
         ! s         ,'   M=',masse(ig,l)
@@ -5240,19 +5240,19 @@
     DO ig = 1, ngrid
       IF (.NOT. fm(ig,l)>=0. .OR. .NOT. fm(ig,l)<=10.) THEN
-        ! print*,'WARN!!! fm exagere ig=',ig,'   l=',l
+        ! PRINT*,'WARN!!! fm exagere ig=',ig,'   l=',l
         ! s         ,'   FM=',fm(ig,l)
       END IF
       IF (.NOT. masse(ig,l)>=1.E-10 .OR. .NOT. masse(ig,l)<=1.E4) THEN
-        ! print*,'WARN!!! masse exagere ig=',ig,'   l=',l
+        ! PRINT*,'WARN!!! masse exagere ig=',ig,'   l=',l
         ! s         ,'   M=',masse(ig,l)
-        ! print*,'rho(ig,l),pplay(ig,l),zpspsk(ig,l),RD,zh(ig,l)',
+        ! PRINT*,'rho(ig,l),pplay(ig,l),zpspsk(ig,l),RD,zh(ig,l)',
         ! s                 rho(ig,l),pplay(ig,l),zpspsk(ig,l),RD,zh(ig,l)
-        ! print*,'zlev(ig,l+1),zlev(ig,l)'
+        ! PRINT*,'zlev(ig,l+1),zlev(ig,l)'
         ! s                ,zlev(ig,l+1),zlev(ig,l)
-        ! print*,'pphi(ig,l-1),pphi(ig,l),pphi(ig,l+1)'
+        ! PRINT*,'pphi(ig,l-1),pphi(ig,l),pphi(ig,l+1)'
         ! s                ,pphi(ig,l-1),pphi(ig,l),pphi(ig,l+1)
       END IF
       IF (.NOT. entr(ig,l)>=0. .OR. .NOT. entr(ig,l)<=10.) THEN
-        ! print*,'WARN!!! entr exagere ig=',ig,'   l=',l
+        ! PRINT*,'WARN!!! entr exagere ig=',ig,'   l=',l
         ! s         ,'   E=',entr(ig,l)
       END IF
@@ -5269,5 +5269,5 @@
         entr(ig, l) = entr(ig, l) - detr(ig, l)
         detr(ig, l) = 0.
-        ! print*,'WARNING !!! detrainement negatif ',ig,l
+        ! PRINT*,'WARNING !!! detrainement negatif ',ig,l
       END IF
     END DO
@@ -5315,6 +5315,6 @@
 
 
-  ! print*,'13 OK convect8'
-  ! print*,'WA5 ',wa_moy
+  ! PRINT*,'13 OK convect8'
+  ! PRINT*,'WA5 ',wa_moy
   DO l = 1, nlay
     DO ig = 1, ngrid
@@ -5327,9 +5327,9 @@
   ! do ig=1,ngrid
   ! if(abs(pdtadj(ig,l))*86400..gt.500.) then
-  ! print*,'WARN!!! ig=',ig,'  l=',l
+  ! PRINT*,'WARN!!! ig=',ig,'  l=',l
   ! s         ,'   pdtadj=',pdtadj(ig,l)
   ! endif
   ! if(abs(pdoadj(ig,l))*86400..gt.1.) then
-  ! print*,'WARN!!! ig=',ig,'  l=',l
+  ! PRINT*,'WARN!!! ig=',ig,'  l=',l
   ! s         ,'   pdoadj=',pdoadj(ig,l)
   ! endif
@@ -5337,5 +5337,5 @@
   ! enddo
 
-  ! print*,'14 OK convect8'
+  ! PRINT*,'14 OK convect8'
   ! ------------------------------------------------------------------
   ! Calculs pour les sorties
@@ -5505,5 +5505,5 @@
   ! ---------------------------------------------------
 
-  ! print*,'0 OK convect8'
+  ! PRINT*,'0 OK convect8'
 
   DO l = 1, nlay
@@ -5518,5 +5518,5 @@
   END DO
 
-  ! print*,'1 OK convect8'
+  ! PRINT*,'1 OK convect8'
   ! --------------------
 
@@ -5555,5 +5555,5 @@
   END DO
 
-  ! print*,'2 OK convect8'
+  ! PRINT*,'2 OK convect8'
   ! -----------------------------------------------------------------------
   ! Calcul des densites
@@ -5580,5 +5580,5 @@
   END DO
 
-  ! print*,'3 OK convect8'
+  ! PRINT*,'3 OK convect8'
   ! ------------------------------------------------------------------
   ! Calcul de w2, quarre de w a partir de la cape
@@ -5741,5 +5741,5 @@
   END DO
 
-  ! print*,'fin calcul entr_star'
+  ! PRINT*,'fin calcul entr_star'
   DO k = 1, klev
     DO ig = 1, ngrid
@@ -5748,5 +5748,5 @@
   END DO
   ! RC
-  ! print*,'7 OK convect8'
+  ! PRINT*,'7 OK convect8'
   DO k = 1, klev + 1
     DO ig = 1, ngrid
@@ -5762,5 +5762,5 @@
   END DO
 
-  ! print*,'8 OK convect8'
+  ! PRINT*,'8 OK convect8'
   DO ig = 1, ngrid
     linter(ig) = 1.
@@ -5792,5 +5792,5 @@
         ! test
         IF (abs(zw2(ig,l+1)-zw2(ig,l))<1E-10) THEN
-          ! print*,'pb linter'
+          ! PRINT*,'pb linter'
         END IF
         linter(ig) = (l*(zw2(ig,l+1)-zw2(ig,l))-zw2(ig,l))/(zw2(ig,l+1)-zw2( &
@@ -5800,5 +5800,5 @@
       ELSE
         IF (zw2(ig,l+1)<0.) THEN
-          ! print*,'pb1 zw2<0'
+          ! PRINT*,'pb1 zw2<0'
         END IF
         wa_moy(ig, l+1) = sqrt(zw2(ig,l+1))
@@ -5811,5 +5811,5 @@
     END DO
   END DO
-  ! print*,'fin calcul zw2'
+  ! PRINT*,'fin calcul zw2'
 
   ! Calcul de la couche correspondant a la hauteur du thermique
@@ -5845,5 +5845,5 @@
       IF (l<=lmax(ig)) THEN
         IF (zw2(ig,l)<0.) THEN
-          ! print*,'pb2 zw2<0'
+          ! PRINT*,'pb2 zw2<0'
         END IF
         zw2(ig, l) = sqrt(zw2(ig,l))
@@ -5872,5 +5872,5 @@
   RETURN
 
-  ! print*,'avant fermeture'
+  ! PRINT*,'avant fermeture'
   ! Fermeture,determination de f
   ! Attention! entrainement normalisé ou pas?
@@ -5896,7 +5896,7 @@
     END IF
     f0(ig) = f(ig)
-    ! first=.true.
-  END DO
-  ! print*,'apres fermeture'
+    ! first=.TRUE.
+  END DO
+  ! PRINT*,'apres fermeture'
   ! on stoppe après la fermeture
   RETURN
@@ -5930,6 +5930,6 @@
 
 
-  ! print*,'9 OK convect8'
-  ! print*,'WA1 ',wa_moy
+  ! PRINT*,'9 OK convect8'
+  ! PRINT*,'WA1 ',wa_moy
 
   ! determination de l'indice du debut de la mixed layer ou w decroit
@@ -5956,5 +5956,5 @@
         ! cette option est finalement en dur.
         IF ((l_mix*zlev(ig,l))<0.) THEN
-          ! print*,'pb l_mix*zlev<0'
+          ! PRINT*,'pb l_mix*zlev<0'
         END IF
         ! CR: test: nouvelle def de lambda
@@ -5980,6 +5980,6 @@
   END DO
 
-  ! print*,'10 OK convect8'
-  ! print*,'WA2 ',wa_moy
+  ! PRINT*,'10 OK convect8'
+  ! PRINT*,'WA2 ',wa_moy
   ! calcul de la fraction de la maille concernée par l'ascendance en tenant
   ! compte de l'epluchage du thermique.
@@ -6002,5 +6002,5 @@
       ELSE
         zmix(ig) = zlev(ig, lmix(ig))
-        ! print*,'pb zmix'
+        ! PRINT*,'pb zmix'
       END IF
     ELSE
@@ -6010,5 +6010,5 @@
     IF ((zmax(ig)-zmix(ig))<0.) THEN
       zmix(ig) = 0.99*zmax(ig)
-      ! print*,'pb zmix>zmax'
+      ! PRINT*,'pb zmix>zmax'
     END IF
   END DO
@@ -6026,5 +6026,5 @@
     DO ig = 1, ngrid
       IF (larg_cons(ig,l)>1.) THEN
-        ! print*,ig,l,lmix(ig),lmaxa(ig),larg_cons(ig,l),'  KKK'
+        ! PRINT*,ig,l,lmix(ig),lmaxa(ig),larg_cons(ig,l),'  KKK'
         fraca(ig, l) = (larg_cons(ig,l)-larg_detr(ig,l))/(r_aspect*zmax(ig))
         ! test
@@ -6055,5 +6055,5 @@
           ! test
           IF (zmax(ig)-zmix(ig)<1.E-10) THEN
-            ! print*,'pb xxx'
+            ! PRINT*,'pb xxx'
             xxx(ig, l) = (lmaxa(ig)+1.-l)/(lmaxa(ig)+1.-lmix(ig))
           ELSE
@@ -6069,5 +6069,5 @@
             fraca(ig, l) = fracazmix(ig)*xxx(ig, l)**2
           END IF
-          ! print*,ig,l,lmix(ig),lmaxa(ig),xxx(ig,l),'LLLLLLL'
+          ! PRINT*,ig,l,lmix(ig),lmaxa(ig),xxx(ig,l),'LLLLLLL'
           fraca(ig, l) = max(fraca(ig,l), 0.)
           fraca(ig, l) = min(fraca(ig,l), 0.5)
@@ -6079,7 +6079,7 @@
   END DO
 
-  ! print*,'fin calcul fraca'
-  ! print*,'11 OK convect8'
-  ! print*,'Ea3 ',wa_moy
+  ! PRINT*,'fin calcul fraca'
+  ! PRINT*,'11 OK convect8'
+  ! PRINT*,'Ea3 ',wa_moy
   ! ------------------------------------------------------------------
   ! Calcul de fracd, wd
@@ -6123,6 +6123,6 @@
   END DO
 
-  ! print*,'12 OK convect8'
-  ! print*,'WA4 ',wa_moy
+  ! PRINT*,'12 OK convect8'
+  ! PRINT*,'WA4 ',wa_moy
   ! c------------------------------------------------------------------
   ! calcul du transport vertical
@@ -6130,10 +6130,10 @@
 
   GO TO 4444
-  ! print*,'XXXXXXXXXXXXXXX ptimestep= ',ptimestep
+  ! PRINT*,'XXXXXXXXXXXXXXX ptimestep= ',ptimestep
   DO l = 2, nlay - 1
     DO ig = 1, ngrid
       IF (fm(ig,l+1)*ptimestep>masse(ig,l) .AND. fm(ig,l+1)*ptimestep>masse( &
           ig,l+1)) THEN
-        ! print*,'WARN!!! FM>M ig=',ig,' l=',l,'  FM='
+        ! PRINT*,'WARN!!! FM>M ig=',ig,' l=',l,'  FM='
         ! s         ,fm(ig,l+1)*ptimestep
         ! s         ,'   M=',masse(ig,l),masse(ig,l+1)
@@ -6145,5 +6145,5 @@
     DO ig = 1, ngrid
       IF (entr(ig,l)*ptimestep>masse(ig,l)) THEN
-        ! print*,'WARN!!! E>M ig=',ig,' l=',l,'  E=='
+        ! PRINT*,'WARN!!! E>M ig=',ig,' l=',l,'  E=='
         ! s         ,entr(ig,l)*ptimestep
         ! s         ,'   M=',masse(ig,l)
@@ -6155,19 +6155,19 @@
     DO ig = 1, ngrid
       IF (.NOT. fm(ig,l)>=0. .OR. .NOT. fm(ig,l)<=10.) THEN
-        ! print*,'WARN!!! fm exagere ig=',ig,'   l=',l
+        ! PRINT*,'WARN!!! fm exagere ig=',ig,'   l=',l
         ! s         ,'   FM=',fm(ig,l)
       END IF
       IF (.NOT. masse(ig,l)>=1.E-10 .OR. .NOT. masse(ig,l)<=1.E4) THEN
-        ! print*,'WARN!!! masse exagere ig=',ig,'   l=',l
+        ! PRINT*,'WARN!!! masse exagere ig=',ig,'   l=',l
         ! s         ,'   M=',masse(ig,l)
-        ! print*,'rho(ig,l),pplay(ig,l),zpspsk(ig,l),RD,zh(ig,l)',
+        ! PRINT*,'rho(ig,l),pplay(ig,l),zpspsk(ig,l),RD,zh(ig,l)',
         ! s                 rho(ig,l),pplay(ig,l),zpspsk(ig,l),RD,zh(ig,l)
-        ! print*,'zlev(ig,l+1),zlev(ig,l)'
+        ! PRINT*,'zlev(ig,l+1),zlev(ig,l)'
         ! s                ,zlev(ig,l+1),zlev(ig,l)
-        ! print*,'pphi(ig,l-1),pphi(ig,l),pphi(ig,l+1)'
+        ! PRINT*,'pphi(ig,l-1),pphi(ig,l),pphi(ig,l+1)'
         ! s                ,pphi(ig,l-1),pphi(ig,l),pphi(ig,l+1)
       END IF
       IF (.NOT. entr(ig,l)>=0. .OR. .NOT. entr(ig,l)<=10.) THEN
-        ! print*,'WARN!!! entr exagere ig=',ig,'   l=',l
+        ! PRINT*,'WARN!!! entr exagere ig=',ig,'   l=',l
         ! s         ,'   E=',entr(ig,l)
       END IF
@@ -6185,5 +6185,5 @@
         fm(ig, l+1) = fm(ig, l) + entr(ig, l)
         detr(ig, l) = 0.
-        ! print*,'WARNING !!! detrainement negatif ',ig,l
+        ! PRINT*,'WARNING !!! detrainement negatif ',ig,l
       END IF
     END DO
@@ -6231,6 +6231,6 @@
 
 
-  ! print*,'13 OK convect8'
-  ! print*,'WA5 ',wa_moy
+  ! PRINT*,'13 OK convect8'
+  ! PRINT*,'WA5 ',wa_moy
   DO l = 1, nlay
     DO ig = 1, ngrid
@@ -6243,9 +6243,9 @@
   ! do ig=1,ngrid
   ! if(abs(pdtadj(ig,l))*86400..gt.500.) then
-  ! print*,'WARN!!! ig=',ig,'  l=',l
+  ! PRINT*,'WARN!!! ig=',ig,'  l=',l
   ! s         ,'   pdtadj=',pdtadj(ig,l)
   ! endif
   ! if(abs(pdoadj(ig,l))*86400..gt.1.) then
-  ! print*,'WARN!!! ig=',ig,'  l=',l
+  ! PRINT*,'WARN!!! ig=',ig,'  l=',l
   ! s         ,'   pdoadj=',pdoadj(ig,l)
   ! endif
@@ -6253,5 +6253,5 @@
   ! enddo
 
-  ! print*,'14 OK convect8'
+  ! PRINT*,'14 OK convect8'
   ! ------------------------------------------------------------------
   ! Calculs pour les sorties
@@ -6275,10 +6275,10 @@
     ! entr(ig,l)=entr(ig,l)-detr(ig,l)
     ! detr(ig,l)=0.
-    ! print*,'WARNING !!! detrainement negatif ',ig,l
+    ! PRINT*,'WARNING !!! detrainement negatif ',ig,l
     ! endif
     ! enddo
     ! enddo
 
-    ! print*,'15 OK convect8'
+    ! PRINT*,'15 OK convect8'
 
     isplit = isplit + 1
@@ -6318,5 +6318,5 @@
 
     ! recalcul des flux en diagnostique...
-    ! print*,'PAS DE TEMPS ',ptimestep
+    ! PRINT*,'PAS DE TEMPS ',ptimestep
     CALL dt2f(pplev, pplay, pt, pdtadj, wh)
     CALL writeg1d(1, nlay, wh, 'wh2     ', 'wh2     ')
@@ -6328,5 +6328,5 @@
   ! if(wa_moy(1,4).gt.1.e-10) stop
 
-  ! print*,'19 OK convect8'
+  ! PRINT*,'19 OK convect8'
   RETURN
 END SUBROUTINE calcul_sec
@@ -6422,5 +6422,5 @@
           ! detr_star(ig,l)=0.
         END IF
-        ! print*,'ok detr_star'
+        ! PRINT*,'ok detr_star'
         ! prise en compte du detrainement dans le calcul du flux
         f_star(ig, l+1) = f_star(ig, l) + alim_star(ig, l) + &
@@ -6441,5 +6441,5 @@
           ig,l))
         zw2(ig, l+1) = 0.
-        ! print*,'linter=',linter(ig)
+        ! PRINT*,'linter=',linter(ig)
       ELSE
         wa_moy(ig, l+1) = sqrt(zw2(ig,l+1))
@@ -6452,5 +6452,5 @@
     END DO
   END DO
-  ! print*,'fin calcul zw2'
+  ! PRINT*,'fin calcul zw2'
 
   ! Calcul de la couche correspondant a la hauteur du thermique
@@ -6483,5 +6483,5 @@
       IF (l<=lmax(ig)) THEN
         IF (zw2(ig,l)<0.) THEN
-          ! print*,'pb2 zw2<0'
+          ! PRINT*,'pb2 zw2<0'
         END IF
         zw2(ig, l) = sqrt(zw2(ig,l))
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_plume.f90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_plume.f90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_plume.f90	(revision 5103)
@@ -100,6 +100,6 @@
     REAL, dimension(ngrid, nlay) :: c2
 
-    if (ngrid==1) print*, 'THERMCELL PLUME MODIFIE 2014/07/11'
-    Zsat = .false.
+    if (ngrid==1) PRINT*, 'THERMCELL PLUME MODIFIE 2014/07/11'
+    Zsat = .FALSE.
     ! Initialisation
 
@@ -213,7 +213,7 @@
 
       ztemp(:) = zpspsk(:, l) * ztla(:, l - 1)
-      call thermcell_qsat(ngrid, active, pplev(:, l), ztemp, zqta(:, l - 1), zqsat(:))
-      do ig = 1, ngrid
-        !       print*,'active',active(ig),ig,l
+      CALL thermcell_qsat(ngrid, active, pplev(:, l), ztemp, zqta(:, l - 1), zqsat(:))
+      do ig = 1, ngrid
+        !       PRINT*,'active',active(ig),ig,l
         if(active(ig)) then
           zqla_est(ig, l) = max(0., zqta(ig, l - 1) - zqsat(ig))
@@ -334,5 +334,5 @@
       do ig = 1, ngrid
         if (activetmp(ig)) then
-          Zsat = .false.
+          Zsat = .FALSE.
           ztla(ig, l) = (f_star(ig, l) * ztla(ig, l - 1) + &
                   (alim_star(ig, l) + entr_star(ig, l)) * zthl(ig, l))  &
@@ -346,5 +346,5 @@
 
       ztemp(:) = zpspsk(:, l) * ztla(:, l)
-      call thermcell_qsat(ngrid, activetmp, pplev(:, l), ztemp, zqta(:, l), zqsatth(:, l))
+      CALL thermcell_qsat(ngrid, activetmp, pplev(:, l), ztemp, zqta(:, l), zqsatth(:, l))
       do ig = 1, ngrid
         if (activetmp(ig)) then
@@ -370,5 +370,5 @@
       enddo
 
-      if (prt_level>=20) print*, 'coucou calcul detr 460: ig, l', ig, l
+      if (prt_level>=20) PRINT*, 'coucou calcul detr 460: ig, l', ig, l
 
       !===========================================================================
@@ -380,5 +380,5 @@
         if (zw2(ig, l + 1)>0. .and. zw2(ig, l + 1)<1.e-10) then
           !               stop'On tombe sur le cas particulier de thermcell_dry'
-          !               print*,'On tombe sur le cas particulier de thermcell_plume'
+          !               PRINT*,'On tombe sur le cas particulier de thermcell_plume'
           nbpb = nbpb + 1
           zw2(ig, l + 1) = 0.
@@ -412,5 +412,5 @@
 
       if (nbpb>0) then
-        print*, 'WARNING on tombe ', nbpb, ' x sur un pb pour l=', l, ' dans thermcell_plume'
+        PRINT*, 'WARNING on tombe ', nbpb, ' x sur un pb pour l=', l, ' dans thermcell_plume'
       endif
 
@@ -430,5 +430,5 @@
     enddo
 
-    if (prt_level>=20) print*, 'coucou calcul detr 470: ig, l', ig, l
+    if (prt_level>=20) PRINT*, 'coucou calcul detr 470: ig, l', ig, l
     RETURN
   end
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_plume_6A.f90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_plume_6A.f90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_plume_6A.f90	(revision 5103)
@@ -94,6 +94,6 @@
     REAL, dimension(ngrid, nlay) :: c2
 
-    if (ngrid==1) print*, 'THERMCELL PLUME MODIFIE 2014/07/11'
-    Zsat = .false.
+    if (ngrid==1) PRINT*, 'THERMCELL PLUME MODIFIE 2014/07/11'
+    Zsat = .FALSE.
     ! Initialisation
 
@@ -214,7 +214,7 @@
 
       ztemp(:) = zpspsk(:, l) * ztla(:, l - 1)
-      call thermcell_qsat(ngrid, active, pplev(:, l), ztemp, zqta(:, l - 1), zqsat(:))
-      do ig = 1, ngrid
-        !       print*,'active',active(ig),ig,l
+      CALL thermcell_qsat(ngrid, active, pplev(:, l), ztemp, zqta(:, l - 1), zqsat(:))
+      do ig = 1, ngrid
+        !       PRINT*,'active',active(ig),ig,l
         if(active(ig)) then
           zqla_est(ig, l) = max(0., zqta(ig, l - 1) - zqsat(ig))
@@ -521,5 +521,5 @@
           !        endif
 
-          !        print*,'alim0',zlev(ig,l),entr_star(ig,l),detr_star(ig,l),zw2m,zbuoy(ig,l),f_star(ig,l)
+          !        PRINT*,'alim0',zlev(ig,l),entr_star(ig,l),detr_star(ig,l),zw2m,zbuoy(ig,l),f_star(ig,l)
           ! Calcul du flux montant normalise
           f_star(ig, l + 1) = f_star(ig, l) + alim_star(ig, l) + entr_star(ig, l)  &
@@ -537,5 +537,5 @@
       do ig = 1, ngrid
         if (activetmp(ig)) then
-          Zsat = .false.
+          Zsat = .FALSE.
           ztla(ig, l) = (f_star(ig, l) * ztla(ig, l - 1) + &
                   (alim_star(ig, l) + entr_star(ig, l)) * zthl(ig, l))  &
@@ -549,5 +549,5 @@
 
       ztemp(:) = zpspsk(:, l) * ztla(:, l)
-      call thermcell_qsat(ngrid, activetmp, pplev(:, l), ztemp, zqta(:, l), zqsatth(:, l))
+      CALL thermcell_qsat(ngrid, activetmp, pplev(:, l), ztemp, zqta(:, l), zqsatth(:, l))
       do ig = 1, ngrid
         if (activetmp(ig)) then
@@ -612,5 +612,5 @@
       enddo
 
-      if (prt_level>=20) print*, 'coucou calcul detr 460: ig, l', ig, l
+      if (prt_level>=20) PRINT*, 'coucou calcul detr 460: ig, l', ig, l
 
       !===========================================================================
@@ -622,5 +622,5 @@
         if (zw2(ig, l + 1)>0. .and. zw2(ig, l + 1)<1.e-10) then
           !               stop'On tombe sur le cas particulier de thermcell_dry'
-          !               print*,'On tombe sur le cas particulier de thermcell_plume'
+          !               PRINT*,'On tombe sur le cas particulier de thermcell_plume'
           nbpb = nbpb + 1
           zw2(ig, l + 1) = 0.
@@ -654,5 +654,5 @@
 
       if (nbpb>0) then
-        print*, 'WARNING on tombe ', nbpb, ' x sur un pb pour l=', l, ' dans thermcell_plume'
+        PRINT*, 'WARNING on tombe ', nbpb, ' x sur un pb pour l=', l, ' dans thermcell_plume'
       endif
 
@@ -672,5 +672,5 @@
     enddo
 
-    if (prt_level>=20) print*, 'coucou calcul detr 470: ig, l', ig, l
+    if (prt_level>=20) PRINT*, 'coucou calcul detr 470: ig, l', ig, l
     RETURN
   end
@@ -761,5 +761,5 @@
     REAL fact_gamma, fact_epsilon, fact_gamma2, fact_epsilon2
     REAL c2(ngrid, nlay)
-    Zsat = .false.
+    Zsat = .FALSE.
     ! Initialisation
 
@@ -894,8 +894,8 @@
 
       ztemp(:) = zpspsk(:, l) * ztla(:, l - 1)
-      call thermcell_qsat(ngrid, active, pplev(:, l), ztemp, zqta(:, l - 1), zqsat(:))
-
-      do ig = 1, ngrid
-        !       print*,'active',active(ig),ig,l
+      CALL thermcell_qsat(ngrid, active, pplev(:, l), ztemp, zqta(:, l - 1), zqsat(:))
+
+      do ig = 1, ngrid
+        !       PRINT*,'active',active(ig),ig,l
         if(active(ig)) then
           zqla_est(ig, l) = max(0., zqta(ig, l - 1) - zqsat(ig))
@@ -967,5 +967,5 @@
       do ig = 1, ngrid
         if (activetmp(ig)) then
-          Zsat = .false.
+          Zsat = .FALSE.
           ztla(ig, l) = (f_star(ig, l) * ztla(ig, l - 1) + &
                   (alim_star(ig, l) + entr_star(ig, l)) * zthl(ig, l))  &
@@ -979,5 +979,5 @@
 
       ztemp(:) = zpspsk(:, l) * ztla(:, l)
-      call thermcell_qsat(ngrid, activetmp, pplev(:, l), ztemp, zqta(:, l), zqsatth(:, l))
+      CALL thermcell_qsat(ngrid, activetmp, pplev(:, l), ztemp, zqta(:, l), zqsatth(:, l))
 
       do ig = 1, ngrid
@@ -1002,5 +1002,5 @@
       enddo
 
-      if (prt_level>=20) print*, 'coucou calcul detr 460: ig, l', ig, l
+      if (prt_level>=20) PRINT*, 'coucou calcul detr 460: ig, l', ig, l
 
       !---------------------------------------------------------------------------
@@ -1012,5 +1012,5 @@
         if (zw2(ig, l + 1)>0. .and. zw2(ig, l + 1)<1.e-10) then
           !               stop'On tombe sur le cas particulier de thermcell_dry'
-          !               print*,'On tombe sur le cas particulier de thermcell_plume'
+          !               PRINT*,'On tombe sur le cas particulier de thermcell_plume'
           nbpb = nbpb + 1
           zw2(ig, l + 1) = 0.
@@ -1025,5 +1025,5 @@
           linter(ig) = (l * (f_star(ig, l + 1) - f_star(ig, l))  &
                   - f_star(ig, l)) / (f_star(ig, l + 1) - f_star(ig, l))
-          !           print*,"linter plume", linter(ig)
+          !           PRINT*,"linter plume", linter(ig)
           zw2(ig, l + 1) = 0.
         endif
@@ -1043,5 +1043,5 @@
 
       if (nbpb>0) then
-        print*, 'WARNING on tombe ', nbpb, ' x sur un pb pour l=', l, ' dans thermcell_plume'
+        PRINT*, 'WARNING on tombe ', nbpb, ' x sur un pb pour l=', l, ' dans thermcell_plume'
       endif
 
@@ -1061,5 +1061,5 @@
     enddo
 
-    if (prt_level>=20) print*, 'coucou calcul detr 470: ig, l', ig, l
+    if (prt_level>=20) PRINT*, 'coucou calcul detr 470: ig, l', ig, l
   end
 END MODULE lmdz_thermcell_plume_6A
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_qsat.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_qsat.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_qsat.F90	(revision 5103)
@@ -2,5 +2,5 @@
 CONTAINS
 
-subroutine thermcell_qsat(klon,active,pplev,ztemp,zqta,zqsat)
+SUBROUTINE thermcell_qsat(klon,active,pplev,ztemp,zqta,zqsat)
 implicit none
 
@@ -37,6 +37,6 @@
 
 RLvCp = RLVTT/RCPD
-tout_converge=.false.
-afaire(:)=.false.
+tout_converge=.FALSE.
+afaire(:)=.FALSE.
 DT(:)=0.
 
@@ -48,5 +48,5 @@
 !====================================================================
 
-do ig=1,klon
+DO ig=1,klon
    if (active(ig)) then
                Tbef(ig)=ztemp(ig)
@@ -60,9 +60,9 @@
                zqsat(ig)=qsatbef
      endif
-enddo
+END DO
 
 ! Traitement du cas ou il y a condensation mais faible
 ! On ne condense pas mais on dit que le qsat est le qta
-do ig=1,klon
+DO ig=1,klon
    if (active(ig)) then
       if (0.<abs(DT(ig)).and.abs(DT(ig))<=DDT0) then
@@ -70,7 +70,7 @@
       endif
    endif
-enddo
+END DO
 
-do iter=1,10
+DO iter=1,10
     afaire(:)=abs(DT(:))>DDT0
     do ig=1,klon
@@ -93,5 +93,5 @@
                endif
     enddo
-enddo
+END DO
 
 return
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_wake.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_wake.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_wake.F90	(revision 5103)
@@ -302,8 +302,8 @@
   REAL, DIMENSION(klon)                                 :: wdens_in, awdens_in   ! pour les prints
 
-!!!  LOGICAL                                               :: phys_sub=.true.
-  LOGICAL                                               :: phys_sub=.false.
-
-  LOGICAL                                               :: first_call=.true.
+!!!  LOGICAL                                               :: phys_sub=.TRUE.
+  LOGICAL                                               :: phys_sub=.FALSE.
+
+  LOGICAL                                               :: first_call=.TRUE.
 
 
@@ -317,5 +317,5 @@
   REAL, DIMENSION (klon)                                :: h_zzz
 
-!print*,'WAKE LJYFz'
+!PRINT*,'WAKE LJYFz'
 
   ! -------------------------------------------------------------------------
@@ -356,10 +356,10 @@
 #ifdef IOPHYS_WK
   IF (phys_sub) THEN
-    call iophys_ini(dtimesub)
+    CALL iophys_ini(dtimesub)
   ELSE
-    call iophys_ini(dtime)
+    CALL iophys_ini(dtime)
   ENDIF
 #endif
-  first_call = .false.
+  first_call = .FALSE.
 ENDIF   !(first_call)
 
@@ -384,8 +384,8 @@
  ENDIF
 
-  ! print*,'stark',stark
-  ! print*,'alpk',alpk
-  ! print*,'wdens',wdens
-  ! print*,'coefgw',coefgw
+  ! PRINT*,'stark',stark
+  ! PRINT*,'alpk',alpk
+  ! PRINT*,'wdens',wdens
+  ! PRINT*,'coefgw',coefgw
   ! cc
   ! Minimum value for |T_wake - T_undist|. Used for wake top definition
@@ -479,5 +479,5 @@
   ! sigmaw1=sigmaw
   ! IF (sigd_con.GT.sigmaw1) THEN
-  ! print*, 'sigmaw,sigd_con', sigmaw, sigd_con
+  ! PRINT*, 'sigmaw,sigd_con', sigmaw, sigd_con
   ! ENDIF
   IF (iflag_wk_pop_dyn >= 1) THEN
@@ -905,5 +905,5 @@
           ((1.-sigmaw(i))*omg(i,kupper(i)+1)/((ph(i,1)-pupper(i))*cstar(i)))**(2)
         IF (prt_level >= 10) THEN
-             print*,'omg(i,kupper(i)+1),wdens0,wdens(i),cstar(i), ph(i,1)-pupper(i)', &
+             PRINT*,'omg(i,kupper(i)+1),wdens0,wdens(i),cstar(i), ph(i,1)-pupper(i)', &
                      omg(i,kupper(i)+1),wdens0,wdens(i),cstar(i), ph(i,1)-pupper(i)
         ENDIF
@@ -1053,5 +1053,5 @@
             dtimesub
           ! $              - nat_rate(i)*sigmaw(i)*dtimesub
-          ! c        print*, 'd_sigmaw(i),sigmaw(i),gfl(i),Cstar(i),wape(i),
+          ! c        PRINT*, 'd_sigmaw(i),sigmaw(i),gfl(i),Cstar(i),wape(i),
           ! c     $  death_rate(i),ktop(i),kupper(i)',
           ! c     $	         d_sigmaw(i),sigmaw(i),gfl(i),Cstar(i),wape(i),
@@ -1168,7 +1168,7 @@
 
     ! c      DO i=1,klon
-    ! c        print*,'Pente entre 0 et kupper (reference)'
+    ! c        PRINT*,'Pente entre 0 et kupper (reference)'
     ! c     $   	,omg(i,kupper(i)+1)/(pupper(i)-ph(i,1))
-    ! c        print*,'Pente entre ktop et kupper'
+    ! c        PRINT*,'Pente entre ktop et kupper'
     ! c     $  	,(omg(i,kupper(i)+1)-omgtop(i))/(pupper(i)-ptop(i))
     ! c      ENDDO
@@ -1185,5 +1185,5 @@
     ! cc nrlmd
     ! c      DO i=1,klon
-    ! c      print*,'deltaw_ktop,deltaw_conv',omgtop(i),omg(i,kupper(i)+1)
+    ! c      PRINT*,'deltaw_ktop,deltaw_conv',omgtop(i),omg(i,kupper(i)+1)
     ! c      END DO
     ! cc
@@ -1313,5 +1313,5 @@
              (1.-alpha_up(i,k))*omgbdth(i,k)- &
              alpha_up(i,k+1)*omgbdth(i,k+1))*ppi(i, k)
-!           print*,'d_d,k_ptop_provis(i)eltatw=', k, d_deltatw(i,k)
+!           PRINT*,'d_d,k_ptop_provis(i)eltatw=', k, d_deltatw(i,k)
 
           d_deltaqw(i, k) = dtimesub/(ph(i,k)-ph(i,k+1))* &
@@ -1320,5 +1320,5 @@
              (1.-alpha_up(i,k))*omgbdq(i,k)- &
              alpha_up(i,k+1)*omgbdq(i,k+1))
-!           print*,'d_deltaqw=', k, d_deltaqw(i,k)
+!           PRINT*,'d_deltaqw=', k, d_deltaqw(i,k)
 
           ! and increment large scale tendencies
@@ -1415,5 +1415,5 @@
           dtke(i, k) = (dtdwn(i,k)/sigmaw(i)-dta(i,k)/(1.-sigmaw(i)))
           dqke(i, k) = (dqdwn(i,k)/sigmaw(i)-dqa(i,k)/(1.-sigmaw(i)))
-          ! print*,'dtKE= ',dtKE(i,k),' dqKE= ',dqKE(i,k)
+          ! PRINT*,'dtKE= ',dtKE(i,k),' dqKE= ',dqKE(i,k)
 
           ! cc nrlmd          Prise en compte du taux de mortalite
@@ -1500,7 +1500,7 @@
 
     ! cc nrlmd
-    ! c      print*,'alpha'
+    ! c      PRINT*,'alpha'
     ! c      do i=1,klon
-    ! c         print*,alpha(i)
+    ! c         PRINT*,alpha(i)
     ! c      END DO
     ! cc
@@ -1546,5 +1546,5 @@
           deltaqw(i, k) = deltaqw(i, k) + d_deltaqw(i, k)
           dth(i, k) = deltatw(i, k)/ppi(i, k)
-          ! c      print*,'k,qx,qw',k,qb(i,k)-sigmaw(i)*deltaqw(i,k)
+          ! c      PRINT*,'k,qx,qw',k,qb(i,k)-sigmaw(i)*deltaqw(i,k)
           ! c     $        ,qb(i,k)+(1-sigmaw(i))*deltaqw(i,k)
         END IF
@@ -1672,15 +1672,15 @@
      CALL iophys_ecrit('asigmawb',1,'asigmawb','m',asigmaw)
 
-     call iophys_ecrit('d_wdens2',1,'d_wdens2','',d_wdens2)
-     call iophys_ecrit('d_dens_gen2',1,'d_dens_gen2','',d_dens_gen2)
-     call iophys_ecrit('d_dens_death2',1,'d_dens_death2','',d_dens_death2)
-     call iophys_ecrit('d_dens_col2',1,'d_dens_col2','',d_dens_col2)
-     call iophys_ecrit('d_dens_bnd2',1,'d_dens_bnd2','',d_dens_bnd2)
-
-     call iophys_ecrit('d_awdens2',1,'d_awdens2','',d_awdens2)
-     call iophys_ecrit('d_adens_death2',1,'d_adens_death2','',d_adens_death2)
-     call iophys_ecrit('d_adens_icol2',1,'d_adens_icol2','',d_adens_icol2)
-     call iophys_ecrit('d_adens_acol2',1,'d_adens_acol2','',d_adens_acol2)
-     call iophys_ecrit('d_adens_bnd2',1,'d_adens_bnd2','',d_adens_bnd2)
+     CALL iophys_ecrit('d_wdens2',1,'d_wdens2','',d_wdens2)
+     CALL iophys_ecrit('d_dens_gen2',1,'d_dens_gen2','',d_dens_gen2)
+     CALL iophys_ecrit('d_dens_death2',1,'d_dens_death2','',d_dens_death2)
+     CALL iophys_ecrit('d_dens_col2',1,'d_dens_col2','',d_dens_col2)
+     CALL iophys_ecrit('d_dens_bnd2',1,'d_dens_bnd2','',d_dens_bnd2)
+
+     CALL iophys_ecrit('d_awdens2',1,'d_awdens2','',d_awdens2)
+     CALL iophys_ecrit('d_adens_death2',1,'d_adens_death2','',d_adens_death2)
+     CALL iophys_ecrit('d_adens_icol2',1,'d_adens_icol2','',d_adens_icol2)
+     CALL iophys_ecrit('d_adens_acol2',1,'d_adens_acol2','',d_adens_acol2)
+     CALL iophys_ecrit('d_adens_bnd2',1,'d_adens_bnd2','',d_adens_bnd2)
 
      CALL iophys_ecrit('d_sigmaw2',1,'d_sigmaw2','',d_sigmaw2)
@@ -2132,15 +2132,15 @@
        CALL iophys_ecrit('irad_wk',1,'irad_wk','J/kg',irad_wk)
 
-       call iophys_ecrit('d_wdens2',1,'d_wdens2','',d_wdens2)
-       call iophys_ecrit('d_dens_gen2',1,'d_dens_gen2','',d_dens_gen2)
-       call iophys_ecrit('d_dens_death2',1,'d_dens_death2','',d_dens_death2)
-       call iophys_ecrit('d_dens_col2',1,'d_dens_col2','',d_dens_col2)
-       call iophys_ecrit('d_dens_bnd2',1,'d_dens_bnd2','',d_dens_bnd2)
-
-       call iophys_ecrit('d_awdens2',1,'d_awdens2','',d_awdens2)
-       call iophys_ecrit('d_adens_death2',1,'d_adens_death2','',d_adens_death2)
-       call iophys_ecrit('d_adens_icol2',1,'d_adens_icol2','',d_adens_icol2)
-       call iophys_ecrit('d_adens_acol2',1,'d_adens_acol2','',d_adens_acol2)
-       call iophys_ecrit('d_adens_bnd2',1,'d_adens_bnd2','',d_adens_bnd2)
+       CALL iophys_ecrit('d_wdens2',1,'d_wdens2','',d_wdens2)
+       CALL iophys_ecrit('d_dens_gen2',1,'d_dens_gen2','',d_dens_gen2)
+       CALL iophys_ecrit('d_dens_death2',1,'d_dens_death2','',d_dens_death2)
+       CALL iophys_ecrit('d_dens_col2',1,'d_dens_col2','',d_dens_col2)
+       CALL iophys_ecrit('d_dens_bnd2',1,'d_dens_bnd2','',d_dens_bnd2)
+
+       CALL iophys_ecrit('d_awdens2',1,'d_awdens2','',d_awdens2)
+       CALL iophys_ecrit('d_adens_death2',1,'d_adens_death2','',d_adens_death2)
+       CALL iophys_ecrit('d_adens_icol2',1,'d_adens_icol2','',d_adens_icol2)
+       CALL iophys_ecrit('d_adens_acol2',1,'d_adens_acol2','',d_adens_acol2)
+       CALL iophys_ecrit('d_adens_bnd2',1,'d_adens_bnd2','',d_adens_bnd2)
 
        CALL iophys_ecrit('d_sigmaw2',1,'d_sigmaw2','',d_sigmaw2)
@@ -2208,5 +2208,5 @@
       wape(i) = 0.
       cstar(i) = 0.
-!!jyg   Outside subroutine "Wake" hw, wdens sigmaw and asigmaw are zero when there are no wakes
+!!jyg   Outside SUBROUTINE "Wake" hw, wdens sigmaw and asigmaw are zero when there are no wakes
 !!      hw(i) = hwmin                       !jyg
 !!      sigmaw(i) = sigmad                  !jyg
@@ -2255,5 +2255,5 @@
       cstar(i) = cstar2(i)
     END IF  ! (kill_wake(i))
-    ! c        print*,'wape wape2 ktopw OK_qx_qw =',
+    ! c        PRINT*,'wape wape2 ktopw OK_qx_qw =',
     ! c     $          wape(i),wape2(i),ktopw(i),OK_qx_qw(i)
   END DO
@@ -2285,5 +2285,5 @@
         d_deltaqw2(i, k) = d_deltaqw2(i, k)/dtime
         d_deltat_gw(i, k) = d_deltat_gw(i, k)/dtime
-        ! c      print*,'k,dqls,omg,entr,detr',k,dqls(i,k),omg(i,k),entr(i,k)
+        ! c      PRINT*,'k,dqls,omg,entr,detr',k,dqls(i,k),omg(i,k),entr(i,k)
         ! c     $         ,death_rate(i)*sigmaw(i)
       END IF
@@ -2381,5 +2381,5 @@
         c = qb(i, k) + (zeta(i,k)-sigmaw(i))*deltaqw(i, k) + epsilon_loc
         discrim = b*b - 4.*a*c
-        ! print*, 'x, a, b, c, discrim', x, a, b, c, discrim
+        ! PRINT*, 'x, a, b, c, discrim', x, a, b, c, discrim
         IF (a+b>=0.) THEN !! Condition suffisante pour la positivite de ovap
           alpha1(i) = 1.
@@ -2394,5 +2394,5 @@
               alpha1(i) = 0.9*(-c/b)
             ELSE
-              ! print*,'a,b,c discrim',a,b,c discrim
+              ! PRINT*,'a,b,c discrim',a,b,c discrim
               alpha1(i) = 0.9*max( (2.*c)/(-b+sqrt(discrim)),  &
                                    (-b+sqrt(discrim))/(2.*a))
@@ -2468,5 +2468,5 @@
 
 !compte=compte+1
-!print*,'compte=',compte
+!PRINT*,'compte=',compte
 
     ! Determine Ptop from buoyancy integral
@@ -2474,12 +2474,12 @@
 
     ! -     1/ Pressure of the level where dth changes sign.
-    !print*,'WAKE LJYF'
-
-
-if (iflag_wk_new_ptop==0) then
+    !PRINT*,'WAKE LJYF'
+
+
+IF (iflag_wk_new_ptop==0) then
     delta_t_min=delta_t_min_in
 else
     delta_t_min=wk_delta_t_min
-endif
+END IF
 
     DO i = 1, klon
@@ -2595,9 +2595,9 @@
     ! -----------------------------------------------------------------------
 !if (iflag_wk_new_ptop>0) then
-do i=1,klon
+DO i=1,klon
    ptop1(i)=ph(i,1)
    ktop1(i)=1
    h_zzz(i)=0.
-enddo
+END DO
     
 IF (iflag_wk_new_ptop/=0) THEN
@@ -2654,6 +2654,6 @@
         ENDDO
     endif ! (abs(iflag_wk_new_ptop) == 1 )
-   ! print*, 'xxx, int_dth', (k,int_dth(1,k),k=1,klev)
-   ! print*, 'xxx, k_ptop_provis', k_ptop_provis(1)
+   ! PRINT*, 'xxx, int_dth', (k,int_dth(1,k),k=1,klev)
+   ! PRINT*, 'xxx, k_ptop_provis', k_ptop_provis(1)
    
 
@@ -2663,5 +2663,5 @@
           if (int_dth(i,k_ptop_provis(i)) > -wk_int_delta_t_min .or. k_ptop_provis(i)==1) then
           !if (1==0) then
-             wk_active(i)=.false.
+             wk_active(i)=.FALSE.
              ptop(i)=ph(i,1)
              ktop(i)=1
@@ -2679,19 +2679,19 @@
     DO k = 1,klev
        DO i =1, klon
-!         print*,ipas,'yyy ',k,int_dth(i,k),frac_int_dth(i)
+!         PRINT*,ipas,'yyy ',k,int_dth(i,k),frac_int_dth(i)
           IF (wk_active(i)) THEN
             IF (int_dth(i,k)>=frac_int_dth(i)) THEN
               ktop1(i) = min(k, k_ptop_provis(i))
               !ktop1(i) = k
-              !print*,ipas,'yyy ktop1= ',ktop1
+              !PRINT*,ipas,'yyy ktop1= ',ktop1
             ENDIF
           ENDIF
        END DO
     END DO
-    !print*, 'LAMINE'
+    !PRINT*, 'LAMINE'
     
     DO i = 1, klon
        IF (wk_active(i)) THEN
-           !print*, ipas,'xxx1, int_dth(i,ktop1(i)), frac_int_dth(i), int_dth(i,ktop1(i)+1) ',ktop1
+           !PRINT*, ipas,'xxx1, int_dth(i,ktop1(i)), frac_int_dth(i), int_dth(i,ktop1(i)+1) ',ktop1
            ddd=int_dth(i,ktop1(i)+1)-int_dth(i,ktop1(i))
            if (ddd==0.) then
@@ -2700,14 +2700,14 @@
               omega(i) = (frac_int_dth(i) - int_dth(i,ktop1(i)))/ddd
            endif
-           !! print*,'OMEGA ',omega(i)
+           !! PRINT*,'OMEGA ',omega(i)
        END IF
     END DO
     
-    !! print*, 'xxx'
+    !! PRINT*, 'xxx'
     DO i = 1, klon
        IF (wk_active(i)) THEN
-      ! print*, 'xxx, int_dth(i,ktop1(i)), frac_int_dth(i), int_dth(i,ktop1(i)+1) ', &
+      ! PRINT*, 'xxx, int_dth(i,ktop1(i)), frac_int_dth(i), int_dth(i,ktop1(i)+1) ', &
       !               int_dth(i,ktop1(i)), frac_int_dth(i), int_dth(i,ktop1(i)+1)
-      ! print*, 'xxx, omega(i), ph(i,ktop1(i)), ph(i,ktop1(i)+1) ',  &
+      ! PRINT*, 'xxx, omega(i), ph(i,ktop1(i)), ph(i,ktop1(i)+1) ',  &
       !e               omega(i), ph(i,ktop1(i)), ph(i,ktop1(i)+1)
           ptop1(i) = min((1 - omega(i))*ph(i,ktop1(i)) + omega(i)*ph(i,ktop1(i)+1), ph(i,1))
@@ -3246,5 +3246,5 @@
           d_sigmaw(i) =  d_sig_gen(i) + d_sig_death(i) + d_sig_col(i) + d_sig_spread(i)
 #ifdef IOPHYS_WK
-          IF (phys_sub) call iophys_ecrit('d_sigmaw0',1,'d_sigmaw0','',d_sigmaw)
+          IF (phys_sub) CALL iophys_ecrit('d_sigmaw0',1,'d_sigmaw0','',d_sigmaw)
 #endif
 
@@ -3258,11 +3258,11 @@
 #ifdef IOPHYS_WK
           IF (phys_sub) THEN
-             call iophys_ecrit('tauwk_inv',1,'tau_wk_inv_min','',tau_wk_inv_min)
-             call iophys_ecrit('d_sigmaw',1,'d_sigmaw','',d_sigmaw)
-             call iophys_ecrit('d_sig_gen',1,'d_sig_gen','',d_sig_gen)
-             call iophys_ecrit('d_sig_death',1,'d_sig_death','',d_sig_death)
-             call iophys_ecrit('d_sig_col',1,'d_sig_col','',d_sig_col)
-             call iophys_ecrit('d_sig_spread',1,'d_sig_spread','',d_sig_spread)
-             call iophys_ecrit('d_sig_bnd',1,'d_sig_bnd','',d_sig_bnd)
+             CALL iophys_ecrit('tauwk_inv',1,'tau_wk_inv_min','',tau_wk_inv_min)
+             CALL iophys_ecrit('d_sigmaw',1,'d_sigmaw','',d_sigmaw)
+             CALL iophys_ecrit('d_sig_gen',1,'d_sig_gen','',d_sig_gen)
+             CALL iophys_ecrit('d_sig_death',1,'d_sig_death','',d_sig_death)
+             CALL iophys_ecrit('d_sig_col',1,'d_sig_col','',d_sig_col)
+             CALL iophys_ecrit('d_sig_spread',1,'d_sig_spread','',d_sig_spread)
+             CALL iophys_ecrit('d_sig_bnd',1,'d_sig_bnd','',d_sig_bnd)
           ENDIF
 #endif
@@ -3278,5 +3278,5 @@
           d_asigmaw(i) =  d_sig_gen(i) + d_asig_death(i) + d_asig_aicol(i) + d_asig_iicol(i) + d_asig_spread(i)
 #ifdef IOPHYS_WK
-          IF (phys_sub) call iophys_ecrit('d_asigmaw0',1,'d_asigmaw0','',d_asigmaw)
+          IF (phys_sub) CALL iophys_ecrit('d_asigmaw0',1,'d_asigmaw0','',d_asigmaw)
 #endif
 
@@ -3287,10 +3287,10 @@
 #ifdef IOPHYS_WK
           IF (phys_sub) THEN
-             call iophys_ecrit('d_asigmaw',1,'d_asigmaw','',d_asigmaw)
-             call iophys_ecrit('d_asig_death',1,'d_asig_death','',d_asig_death)
-             call iophys_ecrit('d_asig_aicol',1,'d_asig_aicol','',d_asig_aicol)
-             call iophys_ecrit('d_asig_iicol',1,'d_asig_iicol','',d_asig_iicol)
-             call iophys_ecrit('d_asig_spread',1,'d_asig_spread','',d_asig_spread)
-             call iophys_ecrit('d_asig_bnd',1,'d_asig_bnd','',d_asig_bnd)
+             CALL iophys_ecrit('d_asigmaw',1,'d_asigmaw','',d_asigmaw)
+             CALL iophys_ecrit('d_asig_death',1,'d_asig_death','',d_asig_death)
+             CALL iophys_ecrit('d_asig_aicol',1,'d_asig_aicol','',d_asig_aicol)
+             CALL iophys_ecrit('d_asig_iicol',1,'d_asig_iicol','',d_asig_iicol)
+             CALL iophys_ecrit('d_asig_spread',1,'d_asig_spread','',d_asig_spread)
+             CALL iophys_ecrit('d_asig_bnd',1,'d_asig_bnd','',d_asig_bnd)
           ENDIF
 #endif
@@ -3310,8 +3310,8 @@
 #ifdef IOPHYS_WK
     IF (phys_sub) THEN 
-        call iophys_ecrit('d_wdens',1,'d_wdens','',d_wdens)
-        call iophys_ecrit('d_dens_gen',1,'d_dens_gen','',d_dens_gen)
-        call iophys_ecrit('d_dens_death',1,'d_dens_death','',d_dens_death)
-        call iophys_ecrit('d_dens_col',1,'d_dens_col','',d_dens_col)
+        CALL iophys_ecrit('d_wdens',1,'d_wdens','',d_wdens)
+        CALL iophys_ecrit('d_dens_gen',1,'d_dens_gen','',d_dens_gen)
+        CALL iophys_ecrit('d_dens_death',1,'d_dens_death','',d_dens_death)
+        CALL iophys_ecrit('d_dens_col',1,'d_dens_col','',d_dens_col)
     ENDIF
 #endif
@@ -3327,8 +3327,8 @@
 #ifdef IOPHYS_WK
     IF (phys_sub) THEN 
-        call iophys_ecrit('d_awdens',1,'d_awdens','',d_awdens)
-        call iophys_ecrit('d_adens_death',1,'d_adens_death','',d_adens_death)
-        call iophys_ecrit('d_adens_icol',1,'d_adens_icol','',d_adens_icol)
-        call iophys_ecrit('d_adens_acol',1,'d_adens_acol','',d_adens_acol)
+        CALL iophys_ecrit('d_awdens',1,'d_awdens','',d_awdens)
+        CALL iophys_ecrit('d_adens_death',1,'d_adens_death','',d_adens_death)
+        CALL iophys_ecrit('d_adens_icol',1,'d_adens_icol','',d_adens_icol)
+        CALL iophys_ecrit('d_adens_acol',1,'d_adens_acol','',d_adens_acol)
     ENDIF
 #endif
@@ -3344,6 +3344,6 @@
 !!          d_irad(i) = d_irad(i)*dtimesub
 !!          d_arad(i) = d_arad(i)*dtimesub
-!!          call iophys_ecrit('d_irad',1,'d_irad','m',d_irad)
-!!          call iophys_ecrit('d_airad',1,'d_arad','m',d_arad)
+!!          CALL iophys_ecrit('d_irad',1,'d_irad','m',d_irad)
+!!          CALL iophys_ecrit('d_airad',1,'d_arad','m',d_arad)
 !!
         ENDIF
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_wake_ini.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_wake_ini.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_wake_ini.F90	(revision 5103)
@@ -179,12 +179,12 @@
   ! Flag concerning the bug in gfl computation
   ok_bug_gfl = .True.
-  call getin_p('ok_bug_gfl', ok_bug_gfl)
+  CALL getin_p('ok_bug_gfl', ok_bug_gfl)
 
   ! Get wapecut from parameter file
   wapecut = 1.
 
-print*,'wapecut',wapecut
+PRINT*,'wapecut',wapecut
   CALL getin_p('wapecut', wapecut)
-print*,'wapecut',wapecut
+PRINT*,'wapecut',wapecut
 
   ! cc nrlmd Lecture du fichier wake_param.data
@@ -264,5 +264,5 @@
   WRITE(*,*) 'coefgw=', coefgw 
 
-  flag_wk_check_trgl=.false.
+  flag_wk_check_trgl=.FALSE.
   CALL getin_p('flag_wk_check_trgl ', flag_wk_check_trgl)
   WRITE(*,*) 'flag_wk_check_trgl=', flag_wk_check_trgl
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/lsc_scav.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/lsc_scav.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/lsc_scav.F90	(revision 5103)
@@ -115,11 +115,11 @@
 9999  CONTINUE
 
-   print*,'alpha_r',alpha_r
-   print*,'alpha_s',alpha_s
-   print*,'R_r',R_r
-   print*,'R_s',R_s
-   print*,'frac_fine_scav',frac_fine_scav
-   print*,'frac_coar_scav',frac_coar_scav
-   print*,'frac_aer ev',frac_aer
+   PRINT*,'alpha_r',alpha_r
+   PRINT*,'alpha_s',alpha_s
+   PRINT*,'R_r',R_r
+   PRINT*,'R_s',R_s
+   PRINT*,'frac_fine_scav',frac_fine_scav
+   PRINT*,'frac_coar_scav',frac_coar_scav
+   PRINT*,'frac_aer ev',frac_aer
 
   ENDIF !(debut)
@@ -231,5 +231,5 @@
       ENDIF
 
-!      print*,  k, 'beta_ev',beta_ev
+!      PRINT*,  k, 'beta_ev',beta_ev
 ! remove tracers from precipitation owing to release by evaporation in his_dh
 !      dxev=frac_ev*deltaP(i,k)*pdtime * his_dh(i) /(zrho(i,k)*zdz(i,k))
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/macv2sp.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/macv2sp.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/macv2sp.F90	(revision 5103)
@@ -84,5 +84,5 @@
   ENDIF
 
-  !--call to sp routine -- 443 nm
+  !--CALL to sp routine -- 443 nm
 
   CALL sp_aop_profile                                    ( &
@@ -94,5 +94,5 @@
   od443aer(:)= od443aer(:)+SUM(aod_prof(:,:),dim=2)
 
-  !--call to sp routine -- 550 nm
+  !--CALL to sp routine -- 550 nm
 
   CALL sp_aop_profile                                    ( &
@@ -113,5 +113,5 @@
   ec550aer(:,:)=ec550aer(:,:)+aod_prof(:,:)/dz(:,:)
 
-  !--call to sp routine -- 865 nm
+  !--CALL to sp routine -- 865 nm
 
   CALL sp_aop_profile                                    ( &
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/mo_simple_plumes.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/mo_simple_plumes.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/mo_simple_plumes.F90	(revision 5103)
@@ -69,5 +69,5 @@
 
   ! ------------------------------------------------------------------------------------------------------------------------
-  ! SP_SETUP:  This subroutine should be called at initialization to read the netcdf data that describes the simple plume
+  ! SP_SETUP:  This SUBROUTINE should be called at initialization to read the netcdf data that describes the simple plume
   ! climatology.  The information needs to be either read by each processor or distributed to processors.
 
@@ -311,5 +311,5 @@
 
   ! ------------------------------------------------------------------------------------------------------------------------
-  ! SP_AOP_PROFILE:  This subroutine calculates the simple plume aerosol and cloud active optical properties based on the
+  ! SP_AOP_PROFILE:  This SUBROUTINE calculates the simple plume aerosol and cloud active optical properties based on the
   ! the simple plume fit to the MPI Aerosol Climatology (Version 2).  It sums over nplumes to provide a profile of aerosol
   ! optical properties on a host models vertical grid. 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/moy_undefSTD.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/moy_undefSTD.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/moy_undefSTD.F90	(revision 5103)
@@ -5,7 +5,5 @@
   USE netcdf, ONLY: nf90_fill_real
   USE dimphy
-#ifdef CPP_IOIPSL 
   USE phys_state_var_mod
-#endif
   USE wxios, ONLY: missing_val_xios => missing_val, using_xios
  
@@ -64,5 +62,5 @@
     IF (freq_outnmc(n)<0) THEN
       freq_moynmc(n) = (mth_len*un_jour)/freq_calnmc(n)
-      ! print*,'moy_undefSTD n freq_out freq_moy =',
+      ! PRINT*,'moy_undefSTD n freq_out freq_moy =',
       ! $n,freq_moyNMC(n)
     ELSE
@@ -75,5 +73,5 @@
         phys_tstep))==0) THEN
 
-      ! print*,'moy_undefSTD n itap itapm1',n,itap,itapm1
+      ! PRINT*,'moy_undefSTD n itap itapm1',n,itap,itapm1
 
       DO k = 1, nlevstd
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/nuage.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/nuage.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/nuage.F90	(revision 5103)
@@ -219,5 +219,5 @@
   ! cc      ENDDO
   ! cc      ENDDO
-  ! ccccc      print*, 'pas de nuage dans le rayonnement'
+  ! ccccc      PRINT*, 'pas de nuage dans le rayonnement'
   ! ccccc      DO k = 1, klev
   ! ccccc      DO i = 1, klon
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/o3_chem_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/o3_chem_m.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/o3_chem_m.F90	(revision 5103)
@@ -8,5 +8,5 @@
 contains
 
-  subroutine o3_chem(julien, gmtime, t_seri, zmasse, pdtphys, rlat, rlon, q)
+  SUBROUTINE o3_chem(julien, gmtime, t_seri, zmasse, pdtphys, rlat, rlon, q)
 
     ! This procedure evolves the ozone mass fraction through a time
@@ -67,7 +67,7 @@
     !-------------------------------------------------------------
 
-    call assert(klon == (/size(q, 1), size(t_seri, 1), size(zmasse, 1), &
+    CALL assert(klon == (/size(q, 1), size(t_seri, 1), size(zmasse, 1), &
          size(rlat), size(rlon)/), "o3_chem klon")
-    call assert(nbp_lev == (/size(q, 2), size(t_seri, 2), size(zmasse, 2)/), &
+    CALL assert(nbp_lev == (/size(q, 2), size(t_seri, 2), size(zmasse, 2)/), &
          "o3_chem nbp_lev")
 
@@ -84,6 +84,6 @@
 
     ! Heterogeneous chemistry is only during daytime:
-    call orbite(real(julien), earth_long, trash1)
-    call zenang(earth_long, gmtime, 0., pdtphys, rlat, rlon, pmu0, trash2)
+    CALL orbite(real(julien), earth_long, trash1)
+    CALL zenang(earth_long, gmtime, 0., pdtphys, rlat, rlon, pmu0, trash2)
     forall (k = 1: nbp_lev)
        where (pmu0 <= cos(87. / 180. * pi)) b(:, k) = 0.
@@ -103,5 +103,5 @@
     q = min(max(q, 0.), .01)
 
-  end subroutine o3_chem
+  END SUBROUTINE  o3_chem
 
   !*************************************************
@@ -152,7 +152,7 @@
     !-------------------------------------------------------------------
 
-    call assert(klon == (/size(q, 1), size(zmasse, 1), size(c, 1), &
+    CALL assert(klon == (/size(q, 1), size(zmasse, 1), size(c, 1), &
          size(b, 1)/), "o3_prod 1")
-    call assert(nbp_lev == (/size(q, 2), size(zmasse, 2), size(c, 2), &
+    CALL assert(nbp_lev == (/size(q, 2), size(zmasse, 2), size(c, 2), &
          size(b, 2)/), "o3_prod 2")
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/oasis.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/oasis.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/oasis.F90	(revision 5103)
@@ -122,5 +122,4 @@
     USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi_para_nb
     use config_ocean_skin_m, only: activate_ocean_skin
-    USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA
 
 ! Local variables
@@ -349,5 +348,5 @@
              WRITE(lunout,*) 'inicma : Problem with prism_def_var_proto for field : ',&
                   inforecv(jf)%name
-             abort_message=' Problem in call to prism_def_var_proto for fields to receive'
+             abort_message=' Problem in CALL to prism_def_var_proto for fields to receive'
              CALL abort_physic(modname,abort_message,1)
           ENDIF
@@ -356,10 +355,8 @@
 
 
-  IF (CPPKEY_INCA) THEN
     IF (dms_cycle_cpl .OR. n2o_cycle_cpl) THEN
        CALL init_inca_oasis(inforecv(idr_ocedms:idr_ocen2o))
     ENDIF
-  END IF
- 
+
 !************************************************************************************
 ! Atmospheric Fields to send
@@ -374,5 +371,5 @@
              WRITE(lunout,*) 'inicma : Problem with prism_def_var_proto for field : ',&
                   infosend(jf)%name
-             abort_message=' Problem in call to prism_def_var_proto for fields to send'
+             abort_message=' Problem in CALL to prism_def_var_proto for fields to send'
              CALL abort_physic(modname,abort_message,1)
           ENDIF
@@ -388,5 +385,5 @@
     CALL prism_enddef_proto(ierror)
     IF (ierror .NE. PRISM_Ok) THEN
-       abort_message=' Problem in call to prism_endef_proto'
+       abort_message=' Problem in CALL to prism_endef_proto'
        CALL abort_physic(modname,abort_message,1)
     ELSE
@@ -402,5 +399,5 @@
   SUBROUTINE fromcpl(ktime, tab_get)
 ! ======================================================================
-! L. Fairhead (09/2003) adapted From L.Z.X Li: this subroutine reads the SST 
+! L. Fairhead (09/2003) adapted From L.Z.X Li: this SUBROUTINE reads the SST
 ! and Sea-Ice provided by the coupler. Adaptation to psmile library
 !======================================================================
@@ -460,5 +457,5 @@
   SUBROUTINE intocpl(ktime, last, tab_put) 
 ! ======================================================================
-! L. Fairhead (09/2003) adapted From L.Z.X Li: this subroutine provides the 
+! L. Fairhead (09/2003) adapted From L.Z.X Li: this SUBROUTINE provides the
 ! atmospheric coupling fields to the coupler with the psmile library.
 ! IF last time step, writes output fields to binary files.
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/ocean_cpl_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/ocean_cpl_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/ocean_cpl_mod.F90	(revision 5103)
@@ -57,6 +57,6 @@
        delta_sst, dTer, dSer, dt_ds)
 
-! This subroutine treats the "open ocean", all grid points that are not entierly covered
-! by ice. The subroutine first receives fields from coupler, then some calculations at 
+! This SUBROUTINE treats the "open ocean", all grid points that are not entierly covered
+! by ice. The SUBROUTINE first receives fields from coupler, then some calculations at
 ! surface is done and finally it sends some fields to the coupler.
 
@@ -248,5 +248,5 @@
        tsurf_new, dflux_s, dflux_l, rhoa)
 
-! This subroutine treats the ocean where there is ice. The subroutine first receives 
+! This SUBROUTINE treats the ocean where there is ice. The SUBROUTINE first receives
 ! fields from coupler, then some calculations at surface is done and finally sends 
 ! some fields to the coupler.
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/ocean_forced_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/ocean_forced_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/ocean_forced_mod.F90	(revision 5103)
@@ -29,5 +29,5 @@
        )
 
-! This subroutine treats the "open ocean", all grid points that are not entierly covered
+! This SUBROUTINE treats the "open ocean", all grid points that are not entierly covered
 ! by ice.
 ! The routine receives data from climatologie file limit.nc and does some calculations at the 
@@ -255,5 +255,5 @@
        )
 
-! This subroutine treats the ocean where there is ice. 
+! This SUBROUTINE treats the ocean where there is ice.
 ! The routine reads data from climatologie file and does flux calculations at the 
 ! surface.
@@ -463,5 +463,5 @@
 ! isotopes: tout est externalisé
 !#ifdef ISOVERIF
-!        write(*,*) 'ocean_forced_mod 377: call calcul_iso_surf_sic_vectall'
+!        write(*,*) 'ocean_forced_mod 377: CALL calcul_iso_surf_sic_vectall'
 !        write(*,*) 'klon,knon=',klon,knon
 !#endif
@@ -509,5 +509,5 @@
 !  SUBROUTINE read_tsurf1d(knon,sst_out)
 
-! This subroutine specifies the surface temperature to be used in 1D simulations
+! This SUBROUTINE specifies the surface temperature to be used in 1D simulations
 
 !      USE dimphy, ONLY: klon
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/orografi.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/orografi.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/orografi.F90	(revision 5103)
@@ -810,5 +810,5 @@
   ! **   interface.
   ! ----------
-  ! call *gwstress*  from *gwdrag*
+  ! CALL *gwstress*  from *gwdrag*
 
   ! explicit arguments :
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/orografi_strato.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/orografi_strato.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/orografi_strato.F90	(revision 5103)
@@ -965,5 +965,5 @@
   ! **   interface.
   ! ----------
-  ! call *gwstress*  from *gwdrag*
+  ! CALL *gwstress*  from *gwdrag*
 
   ! explicit arguments :
@@ -1875,5 +1875,5 @@
   IF (cell/=-1) THEN
 
-    !print*,'SUGWD shape ',shape(pplay),cell+1
+    !PRINT*,'SUGWD shape ',shape(pplay),cell+1
 
     DO jk = 1, nlev
@@ -1902,5 +1902,5 @@
   PRINT *, ' DANS SUGWD nktopg=', nktopg
   PRINT *, ' DANS SUGWD nstra=', nstra
-  if (nstra == 0) call abort_physic("sugwd_strato", "no level in stratosphere", 1)
+  if (nstra == 0) CALL abort_physic("sugwd_strato", "no level in stratosphere", 1)
 
 !  Valeurs lues dans les .def, ou attribues dans conf_phys
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/output_physiqex_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/output_physiqex_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/output_physiqex_mod.F90	(revision 5103)
@@ -51,9 +51,9 @@
 
 
-print*,'nnnnnnn ',nid_hist,debut,itau
+PRINT*,'nnnnnnn ',nid_hist,debut,itau
 
-if(debut)then
+IF(debut)then
 
-   call getin_p("iwrite_phys",iwrite_phys)
+   CALL getin_p("iwrite_phys",iwrite_phys)
 
    !$OMP MASTER
@@ -62,24 +62,24 @@
    !$OMP BARRIER
 
-endif
+END IF
 
 
 itau=itau+1
 
-if (modulo(itau,iwrite_phys)==0) then
-     call iophys_ecrit('temp',klev,'Temperature','K',t)
-     call iophys_ecrit('u',klev,'zonal wind','m/s',u)
-     call iophys_ecrit('v',klev,'meridinal wind','m/s',v)
-     call iophys_ecrit('ps',1,'Surface pressure','Pa',paprs(:,1))
-     call iophys_ecrit('qv',klev,'Water vapor specifiq content', 'kg/kg', qx(:,:,1))
-     call iophys_ecrit('qc',klev,'Cloud liquid water specifiq content', 'kg/kg', qx(:,:,2))
-     call iophys_ecrit('qi',klev,'Cloud solid water specifiq content', 'kg/kg', qx(:,:,3))
-     call iophys_ecrit('CF',klev,'Cloud fraction', '0-1', cf)
-     call iophys_ecrit('qr',klev,'Rain specifiq content', 'kg/kg', zqr)
-     call iophys_ecrit('qs',klev,'Snow specifiq content', 'kg/kg', zqs)
-     call iophys_ecrit('qg',klev,'Graupel specifiq content', 'kg/kg', zqg)
-     call iophys_ecrit('TKE',klev,'TKE', 'm2/s2', ptke)
-     call iophys_ecrit('theta',klev,'Temperature potentielle', 'K', theta)
-endif
+IF (modulo(itau,iwrite_phys)==0) then
+     CALL iophys_ecrit('temp',klev,'Temperature','K',t)
+     CALL iophys_ecrit('u',klev,'zonal wind','m/s',u)
+     CALL iophys_ecrit('v',klev,'meridinal wind','m/s',v)
+     CALL iophys_ecrit('ps',1,'Surface pressure','Pa',paprs(:,1))
+     CALL iophys_ecrit('qv',klev,'Water vapor specifiq content', 'kg/kg', qx(:,:,1))
+     CALL iophys_ecrit('qc',klev,'Cloud liquid water specifiq content', 'kg/kg', qx(:,:,2))
+     CALL iophys_ecrit('qi',klev,'Cloud solid water specifiq content', 'kg/kg', qx(:,:,3))
+     CALL iophys_ecrit('CF',klev,'Cloud fraction', '0-1', cf)
+     CALL iophys_ecrit('qr',klev,'Rain specifiq content', 'kg/kg', zqr)
+     CALL iophys_ecrit('qs',klev,'Snow specifiq content', 'kg/kg', zqs)
+     CALL iophys_ecrit('qg',klev,'Graupel specifiq content', 'kg/kg', zqg)
+     CALL iophys_ecrit('TKE',klev,'TKE', 'm2/s2', ptke)
+     CALL iophys_ecrit('theta',klev,'Temperature potentielle', 'K', theta)
+END IF
 
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/ozonecm_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/ozonecm_m.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/ozonecm_m.F90	(revision 5103)
@@ -51,6 +51,6 @@
     !----------------------------------------------------------
 
-    call assert((/size(rlat), size(paprs, 1)/) == klon, "ozonecm klon")
-    call assert(size(paprs, 2) == klev + 1, "ozonecm klev")
+    CALL assert((/size(rlat), size(paprs, 1)/) == klon, "ozonecm klon")
+    CALL assert(size(paprs, 2) == klev + 1, "ozonecm klev")
 
     pi = 4. * atan(1.)
@@ -91,5 +91,5 @@
     ozonecm = max(ozonecm, 1e-12)
 
-!    print*,'ozonecm Version2'
+!    PRINT*,'ozonecm Version2'
 
   END function ozonecm
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/paramlmdz_phy_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/paramlmdz_phy_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/paramlmdz_phy_mod.F90	(revision 5103)
@@ -227,5 +227,5 @@
 
       IF (ok_sync) THEN
-        call histsync(nid_ctesGCM)
+        CALL histsync(nid_ctesGCM)
       ENDIF
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/pbl_surface_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/pbl_surface_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/pbl_surface_mod.F90	(revision 5103)
@@ -1142,5 +1142,5 @@
        WRITE(lunout,*) 'ok_bug_zg_wk_pbl=',ok_bug_zg_wk_pbl
 
-       print*,'PBL SURFACE AVEC GUSTINESS'
+       PRINT*,'PBL SURFACE AVEC GUSTINESS'
        first_call=.FALSE.
       
@@ -1151,5 +1151,5 @@
        ! intialize beta_land
        beta_land = 0.5
-       call getin_p('beta_land', beta_land)
+       CALL getin_p('beta_land', beta_land)
        
        ! Initilize debug IO
@@ -1704,8 +1704,8 @@
 #ifdef ISOVERIF
           IF (iso_eau >= 0) THEN
-              call iso_verif_egalite_choix(ysnow_f(j), &
+              CALL iso_verif_egalite_choix(ysnow_f(j), &
             yxtsnow_f(iso_eau,j),'pbl_surf_mod 862', &
             errmax,errmaxrel)
-              call iso_verif_egalite_choix(ysnow(j), &
+              CALL iso_verif_egalite_choix(ysnow(j), &
             yxtsnow(iso_eau,j),'pbl_surf_mod 872', &
             errmax,errmaxrel)
@@ -1714,5 +1714,5 @@
 #ifdef ISOVERIF
          DO ixt=1,ntraciso
-           call iso_verif_noNaN(yxtsnow_f(ixt,j),'pbl_surf_mod 921')
+           CALL iso_verif_noNaN(yxtsnow_f(ixt,j),'pbl_surf_mod 921')
          ENDDO
 #endif
@@ -1878,6 +1878,6 @@
 ! Fuxing WANG, 04/03/2015, replace the clcdrag by the merged version: cdrag
         DO i = 1, knon
-!          print*,'PBL ',i,RD
-!          print*,'PBL ',yt(i,1),ypaprs(i,1),ypplay(i,1)
+!          PRINT*,'PBL ',i,RD
+!          PRINT*,'PBL ',yt(i,1),ypaprs(i,1),ypplay(i,1)
            zgeo1(i) = RD * yt(i,1) / (0.5*(ypaprs(i,1)+ypplay(i,1))) &
                 * (ypaprs(i,1)-ypplay(i,1))
@@ -2262,5 +2262,5 @@
        ELSE IF (iflag_split >= 1) THEN
 #ifdef ISO
-        call abort_gcm('pbl_surface_mod 2149','isos pas encore dans iflag_split=1',1)
+        CALL abort_gcm('pbl_surface_mod 2149','isos pas encore dans iflag_split=1',1)
 #endif
 
@@ -2411,5 +2411,5 @@
      
        CASE(is_ter)
-!          print*,"DEBUGTS",yts(knon/2),ylwdown(knon/2)
+!          PRINT*,"DEBUGTS",yts(knon/2),ylwdown(knon/2)
           CALL surf_land(itap, dtime, date0, jour, knon, ni,&
                rlon, rlat, yrmu0, &
@@ -2539,5 +2539,5 @@
                ENDDO
                 do ixt=1,niso
-                   call iso_verif_noNaN(yxtsol(ixt,j), &
+                   CALL iso_verif_noNaN(yxtsol(ixt,j), &
         'pbl_surface 1095b: apres surf_landice')
                 enddo
@@ -2740,5 +2740,5 @@
        IF (iflag_split >= 1) THEN
 #ifdef ISO
-        call abort_gcm('pbl_surface_mod 2607','isos pas encore dans iflag_split=1',1)
+        CALL abort_gcm('pbl_surface_mod 2607','isos pas encore dans iflag_split=1',1)
 #endif
 
@@ -2758,12 +2758,12 @@
           IF (prt_level >=10) THEN
            DO j=1,knon
-            print*,'y_flux_t1,yfluxlat,wakes' &
+            PRINT*,'y_flux_t1,yfluxlat,wakes' &
                   ,  y_flux_t1(j), yfluxlat(j), ywake_s(j)
-            print*,'beta_prev, beta, ytsurf_new', ybeta_prev(j), ybeta(j), ytsurf_new(j)
-            print*,'inertia,facteur,cstar', inertia, facteur,wake_cstar(j)
+            PRINT*,'beta_prev, beta, ytsurf_new', ybeta_prev(j), ybeta(j), ytsurf_new(j)
+            PRINT*,'inertia,facteur,cstar', inertia, facteur,wake_cstar(j)
            ENDDO
           ENDIF  ! (prt_level >=10)
 
-! Second call to wx_pbl0_merge and wx_pbl_dts_merge in order to take into account 
+! Second CALL to wx_pbl0_merge and wx_pbl_dts_merge in order to take into account
 ! the update of the aridity coeficient beta.
 
@@ -2929,16 +2929,16 @@
        IF (prt_level >=10) THEN
         DO j = 1, knon
-         print*,'Chx,Chw,Ch', ycdragh_x(j), ycdragh_w(j), ycdragh(j)
-         print*,'Khx,Khw,Kh', Kech_h_x(j), Kech_h_w(j), Kech_h(j)
-         print*,'t1x, t1w, t1, t1_ancien', &
+         PRINT*,'Chx,Chw,Ch', ycdragh_x(j), ycdragh_w(j), ycdragh(j)
+         PRINT*,'Khx,Khw,Kh', Kech_h_x(j), Kech_h_w(j), Kech_h(j)
+         PRINT*,'t1x, t1w, t1, t1_ancien', &
                  yt_x(j,1), yt_w(j,1),  yt(j,1), t(j,1)
-         print*,'delta_coef,delta_flux,delta_tsurf,tau', delta_coef(j), y_delta_flux_t1(j), y_delta_tsurf(j), tau_eq(j) 
+         PRINT*,'delta_coef,delta_flux,delta_tsurf,tau', delta_coef(j), y_delta_flux_t1(j), y_delta_tsurf(j), tau_eq(j)
         ENDDO
 
         DO j=1,knon
-         print*,'fluxT_x, fluxT_w, y_flux_t1, fluxQ_x, fluxQ_w, yfluxlat, wakes' &
+         PRINT*,'fluxT_x, fluxT_w, y_flux_t1, fluxQ_x, fluxQ_w, yfluxlat, wakes' &
                , y_flux_t1_x(j), y_flux_t1_w(j), y_flux_t1(j), y_flux_q1_x(j)*RLVTT, y_flux_q1_w(j)*RLVTT, yfluxlat(j), ywake_s(j)
-         print*,'beta, ytsurf_new ', ybeta(j), ytsurf_new(j)
-         print*,'inertia, facteur, cstar', inertia, facteur,wake_cstar(j)
+         PRINT*,'beta, ytsurf_new ', ybeta(j), ytsurf_new(j)
+         PRINT*,'inertia, facteur, cstar', inertia, facteur,wake_cstar(j)
         ENDDO
        ENDIF  ! (prt_level >=10)
@@ -3017,5 +3017,5 @@
      ,iflag_pbl)
      ENDIF
-!     print*,'yamada_c OK'
+!     PRINT*,'yamada_c OK'
 
        ELSE  !(iflag_split .eq.0)
@@ -3035,5 +3035,5 @@
      ,iflag_pbl)
      ENDIF
-!     print*,'yamada_c OK'
+!     PRINT*,'yamada_c OK'
 
         CALL climb_wind_up(knon, dtime, yu_w, yv_w, y_flux_u1_w, y_flux_v1_w, &
@@ -3052,5 +3052,5 @@
      ,iflag_pbl)
      ENDIF
-!     print*,'yamada_c OK'
+!     PRINT*,'yamada_c OK'
 
         IF (prt_level >=10) THEN
@@ -3100,5 +3100,5 @@
              IF  (nsrf == is_ter .and. ifl_pbltree >= 1) THEN
 !            if (y_d_u_frein(j,k).ne.0. ) then
-!        print*, nsrf,'IS_TER ++', y_d_u_frein(j,k)*ypct(j),y_d_u(j,k),j,k
+!        PRINT*, nsrf,'IS_TER ++', y_d_u_frein(j,k)*ypct(j),y_d_u(j,k),j,k
 !            ENDIF
                y_d_u(j,k) =y_d_u(j,k) + y_d_u_frein(j,k)*ypct(j)
@@ -3128,5 +3128,5 @@
 #ifdef ISOVERIF
         if (iso_eau.gt.0) then
-         call iso_verif_egalite_vect2D( &
+         CALL iso_verif_egalite_vect2D( &
                 y_d_xt,y_d_q, &
                 'pbl_surface_mod 2600',ntraciso,klon,klev)
@@ -3271,5 +3271,5 @@
 #ifdef ISOVERIF
         IF (iso_eau.gt.0) THEN  
-          call iso_verif_egalite_choix(Rland_ice(iso_eau,i),1.0, &
+          CALL iso_verif_egalite_choix(Rland_ice(iso_eau,i),1.0, &
            'pbl_surf_mod 1230',errmax,errmaxrel)
         ENDIF !if (iso_eau.gt.0) then
@@ -3278,5 +3278,5 @@
        ENDDO
 
-!      print*,'Dans pbl OK2'
+!      PRINT*,'Dans pbl OK2'
 
 !!! jyg le 07/02/2012
@@ -3374,5 +3374,5 @@
        ENDDO
 
-!      print*,'Dans pbl OK3'
+!      PRINT*,'Dans pbl OK3'
 
        IF ( nsrf == is_ter ) THEN
@@ -3405,5 +3405,5 @@
        DO i = 1, klon
          DO ixt=1,niso
-           call iso_verif_noNaN(xtsol(ixt,i),'pbl_surface 1405')
+           CALL iso_verif_noNaN(xtsol(ixt,i),'pbl_surface 1405')
          ENDDO
        ENDDO
@@ -3411,5 +3411,5 @@
 #ifdef ISOVERIF
      IF (iso_eau.gt.0) THEN
-        call iso_verif_egalite_vect2D( &
+        CALL iso_verif_egalite_vect2D( &
                 y_d_xt,y_d_q, &
                 'pbl_surface_mod 1261',ntraciso,klon,klev)
@@ -3482,12 +3482,12 @@
 !        write(*,*) 'y_d_q,y_d_xt(iso_eau,2,1)=',y_d_q(2,1),y_d_xt(iso_eau,2,1)
 !        write(*,*) 'iso_eau.gt.0=',iso_eau.gt.0
-        call iso_verif_noNaN_vect2D( &
+        CALL iso_verif_noNaN_vect2D( &
              d_xt, &
              'pbl_surface 1385',ntraciso,klon,klev)
      IF (iso_eau >= 0) THEN
-        call iso_verif_egalite_vect2D( &
+        CALL iso_verif_egalite_vect2D( &
                 y_d_xt,y_d_q, &
                 'pbl_surface_mod 2945',ntraciso,klon,klev)
-        call iso_verif_egalite_vect2D( &
+        CALL iso_verif_egalite_vect2D( &
                 d_xt,d_q, &
                 'pbl_surface_mod 1276',ntraciso,klon,klev)
@@ -3496,5 +3496,5 @@
 #endif
 
-!      print*,'Dans pbl OK4'
+!      PRINT*,'Dans pbl OK4'
 
        IF (prt_level >=10) THEN
@@ -3545,7 +3545,7 @@
 ! Calculations of diagnostic t,q at 2m and u, v at 10m
 
-!      print*,'Dans pbl OK41'
-!      print*,'tair1,yt(:,1),y_d_t(:,1)'
-!      print*, tair1,yt(:,1),y_d_t(:,1)
+!      PRINT*,'Dans pbl OK41'
+!      PRINT*,'tair1,yt(:,1),y_d_t(:,1)'
+!      PRINT*, tair1,yt(:,1),y_d_t(:,1)
 !!! jyg le 07/02/2012
        IF (iflag_split ==0) THEN
@@ -3602,7 +3602,7 @@
        ENDIF
        
-!      print*,'Dans pbl OK42A'
-!      print*,'tair1,yt(:,1),y_d_t(:,1)'
-!      print*, tair1,yt(:,1),y_d_t(:,1)
+!      PRINT*,'Dans pbl OK42A'
+!      PRINT*,'tair1,yt(:,1),y_d_t(:,1)'
+!      PRINT*, tair1,yt(:,1),y_d_t(:,1)
 
 ! Calculate the temperature and relative humidity at 2m and the wind at 10m 
@@ -3699,5 +3699,5 @@
 !!!
 
-!      print*,'Dans pbl OK43'
+!      PRINT*,'Dans pbl OK43'
 !IM Calcule de l'humidite relative a 2m (rh2m) pour diagnostique
 !IM Ajoute dependance type surface
@@ -3749,5 +3749,5 @@
        ENDIF
 
-!   print*,'OK pbl 5'
+!   PRINT*,'OK pbl 5'
 
 !!! jyg le 07/02/2012
@@ -3864,5 +3864,5 @@
 !!!
 
-!   print*,'OK pbl 6'
+!   PRINT*,'OK pbl 6'
 #else 
 ! T2m not defined
@@ -3886,5 +3886,5 @@
 !        write(*,*) 'pbl_surface tmp 3249: d_q,d_xt(iso_eau,2,1)=',d_q(2,1),d_xt(iso_eau,2,1)
     IF (iso_eau >= 0) THEN
-        call iso_verif_egalite_vect2D( &
+        CALL iso_verif_egalite_vect2D( &
                 d_xt,d_q, &
                 'pbl_surface_mod 1276',ntraciso,klon,klev)
@@ -3907,5 +3907,5 @@
     ENDDO
 
-!   print*,'OK pbl 7'
+!   PRINT*,'OK pbl 7'
     zxfluxt(:,:) = 0.0 ; zxfluxq(:,:) = 0.0
     zxfluxu(:,:) = 0.0 ; zxfluxv(:,:) = 0.0
@@ -4019,5 +4019,5 @@
     wstar(:,is_ave)=0.
     
-!   print*,'OK pbl 9'
+!   PRINT*,'OK pbl 9'
     
 !!! nrlmd le 02/05/2011
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/phyaqua_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/phyaqua_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/phyaqua_mod.F90	(revision 5103)
@@ -135,5 +135,5 @@
     if (year_len/=360) then
       write (*,*) year_len
-      call abort_physic("iniaqua", 'iniaqua: 360 day calendar is required !', 1)
+      CALL abort_physic("iniaqua", 'iniaqua: 360 day calendar is required !', 1)
     endif
 
@@ -487,11 +487,11 @@
 
       ! Affichage de l'angel zenitale
-      ! print*,'************************************'
-      ! print*,'************************************'
-      ! print*,'************************************'
-      ! print*,'latitude=',rlat(i),'longitude=',rlon(i)
-      ! print*,'rmu0m=',rmu0m(i)
-      ! print*,'rmu0a=',rmu0a(i)
-      ! print*,'rmu0=',rmu0(i)
+      ! PRINT*,'************************************'
+      ! PRINT*,'************************************'
+      ! PRINT*,'************************************'
+      ! PRINT*,'latitude=',rlat(i),'longitude=',rlon(i)
+      ! PRINT*,'rmu0m=',rmu0m(i)
+      ! PRINT*,'rmu0a=',rmu0a(i)
+      ! PRINT*,'rmu0=',rmu0(i)
 
     ELSE
@@ -941,5 +941,5 @@
 
       if (type_profil==20) then
-      print*,'Profile SST 20'
+      PRINT*,'Profile SST 20'
 !     Méthode 13 "Qmax2K" plateau réel é|  l'Equateur augmenté +2K
 
@@ -950,5 +950,5 @@
 
       if (type_profil==21) then
-      print*,'Profile SST 21'
+      PRINT*,'Profile SST 21'
 !     Méthode 13 "Qmax2K" plateau réel é|  l'Equateur augmenté +2K
       do j=1,klon
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/phyetat0_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/phyetat0_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/phyetat0_mod.F90	(revision 5103)
@@ -292,5 +292,5 @@
         IF (isw>99) THEN
            PRINT*, "Trop de bandes SW"
-           call abort_physic("phyetat0", "", 1)
+           CALL abort_physic("phyetat0", "", 1)
         ENDIF
         WRITE(str2, '(i2.2)') isw
@@ -315,5 +315,5 @@
         IF (isoil>99) THEN
            PRINT*, "Trop de couches "
-           call abort_physic("phyetat0", "", 1)
+           CALL abort_physic("phyetat0", "", 1)
         ENDIF
         WRITE(str2,'(i2.2)') isoil
@@ -392,5 +392,5 @@
   found=phyetat0_srf(agesno,"AGESNO","SNOW AGE",0.001)
 
-  ancien_ok=.true.
+  ancien_ok=.TRUE.
   ancien_ok=ancien_ok.AND.phyetat0_get(t_ancien,"TANCIEN","TANCIEN",0.)
   ancien_ok=ancien_ok.AND.phyetat0_get(q_ancien,"QANCIEN","QANCIEN",0.)
@@ -424,5 +424,5 @@
        (maxval(prsw_ancien)==minval(prsw_ancien)) .OR. &
        (maxval(t_ancien)==minval(t_ancien)) ) THEN
-    ancien_ok=.false.
+    ancien_ok=.FALSE.
   ENDIF
 
@@ -430,5 +430,5 @@
     IF ( (maxval(qbs_ancien)==minval(qbs_ancien))       .OR. &
          (maxval(prbsw_ancien)==minval(prbsw_ancien)) ) THEN
-       ancien_ok=.false.
+       ancien_ok=.FALSE.
     ENDIF
   ENDIF
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/phyredem.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/phyredem.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/phyredem.F90	(revision 5103)
@@ -176,5 +176,5 @@
 
 ! ================== Albedo =======================================
-    print*,'PHYREDEM NOUVEAU'
+    PRINT*,'PHYREDEM NOUVEAU'
     CALL put_field_srf2(pass,"A_dir_SW","Albedo direct",falb_dir(:,:,:))
     CALL put_field_srf2(pass,"A_dif_SW","Albedo diffus",falb_dif(:,:,:))
@@ -376,8 +376,8 @@
     END IF
 
-    if (ok_gwd_rando) call put_field(pass,"du_gwd_rando", &
+    if (ok_gwd_rando) CALL put_field(pass,"du_gwd_rando", &
          "tendency on zonal wind due to flott gravity waves", du_gwd_rando)
 
-    IF (.not. ok_hines .and. ok_gwd_rando) call put_field(pass,"du_gwd_front", &
+    IF (.not. ok_hines .and. ok_gwd_rando) CALL put_field(pass,"du_gwd_front", &
          "tendency on zonal wind due to acama gravity waves", du_gwd_front)
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/phys_cal_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/phys_cal_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/phys_cal_mod.F90	(revision 5103)
@@ -68,5 +68,5 @@
 
   SUBROUTINE phys_cal_update(julian_date)
-    ! This subroutine updates the module saved variables.
+    ! This SUBROUTINE updates the module saved variables.
 
     USE IOIPSL, only: ju2ymds, ymds2ju, ioget_mon_len, ioget_year_len
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/phys_output_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/phys_output_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/phys_output_mod.F90	(revision 5103)
@@ -366,5 +366,5 @@
       IF (.not. ok_all_xml) THEN
         IF (prt_level >= 10) THEN
-         print*,'phys_output_open: call wxios_add_file with phys_out_filenames(iff)=',trim(phys_out_filenames(iff))    
+         PRINT*,'phys_output_open: CALL wxios_add_file with phys_out_filenames(iff)=',trim(phys_out_filenames(iff))
         ENDIF
         CALL wxios_add_file(phys_out_filenames(iff),chtimestep(iff),lev_files(iff))  
@@ -373,5 +373,5 @@
       !!! Declaration des axes verticaux de chaque fichier:
       IF (prt_level >= 10) THEN
-        print*,'phys_output_open: Declare vertical axes for each file'
+        PRINT*,'phys_output_open: Declare vertical axes for each file'
       ENDIF
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/phys_output_var_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/phys_output_var_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/phys_output_var_mod.F90	(revision 5103)
@@ -125,5 +125,5 @@
   !$OMP THREADPRIVATE(swaerofree_diag, swaero_diag, dryaod_diag)
  
-  ! ok_4xCO2atm : flag indicates if it is necessary to do a second call of
+  ! ok_4xCO2atm : flag indicates if it is necessary to do a second CALL of
   ! radiation code with a 4xCO2 or another different GES to assess SW/LW
   ! in this case
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/phys_output_write_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/phys_output_write_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/phys_output_write_mod.F90	(revision 5103)
@@ -21,5 +21,5 @@
        d_u, d_t, qx, d_qx, zmasse, flag_aerosol, flag_aerosol_strat, ok_cdnc, t, u1, v1)
 
-    ! This subroutine does the actual writing of diagnostics that were
+    ! This SUBROUTINE does the actual writing of diagnostics that were
     ! defined and initialised in phys_output_mod.F90
 
@@ -586,5 +586,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)
@@ -1470,5 +1470,4 @@
        !       ENDIF
 
-#ifdef CPP_IOIPSL
        IF (.NOT. using_xios) THEN
          IF (.NOT.ok_all_xml) THEN
@@ -1478,5 +1477,5 @@
               ll=0
               DO k=1, nlevSTD
-                bb2=clevSTD(k) 
+                bb2=clevSTD(k)
                   IF (bb2.EQ."850".OR.bb2.EQ."700".OR. &
                        bb2.EQ."500".OR.bb2.EQ."200".OR. &
@@ -1498,5 +1497,4 @@
          ENDIF
        ENDIF
-#endif
 
        IF (using_xios) THEN
@@ -2585,7 +2583,6 @@
        ENDIF !ok_4xCO2atm
 !!!!!!!!!!!! Sorties niveaux de pression NMC !!!!!!!!!!!!!!!!!!!!
-#ifdef CPP_IOIPSL
        IF (.NOT. using_xios) THEN
-         IF (.NOT.ok_all_xml) THEN 
+         IF (.NOT.ok_all_xml) THEN
            ! ATTENTION, LES ANCIENS HISTWRITE ONT ETES CONSERVES EN ATTENDANT MIEUX:
            ! Champs interpolles sur des niveaux de pression
@@ -2655,5 +2652,4 @@
          ENDIF
        ENDIF !.NOT. using_xios
-#endif
 
        IF (using_xios) THEN
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/phys_state_var_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/phys_state_var_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/phys_state_var_mod.F90	(revision 5103)
@@ -554,5 +554,5 @@
 include "clesphys.h"
 
-      print*, 'is_initialized', is_initialized
+      PRINT*, 'is_initialized', is_initialized
       IF (is_initialized) RETURN
       is_initialized=.TRUE.
@@ -567,7 +567,7 @@
       ALLOCATE(falb2(klon,nbsrf))
 !albedo SB >>> 
-      print*, 'allocate falb'
+      PRINT*, 'allocate falb'
       ALLOCATE(falb_dir(klon,nsw,nbsrf),falb_dif(klon,nsw,nbsrf))
-!!      print*, 'allocate falb good', falb_dir(1,1,1)
+!!      PRINT*, 'allocate falb good', falb_dir(1,1,1)
       ALLOCATE(chl_con(klon))
 !albedo SB <<<
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/physiq_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/physiq_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/physiq_mod.F90	(revision 5103)
@@ -349,5 +349,4 @@
             reffclwc, cldnvi, lcc3d, lcc3dcon, lcc3dstra, icc3dcon, icc3dstra
     USE output_physiqex_mod, ONLY: output_physiqex
-    USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA
 
     IMPLICIT NONE
@@ -776,5 +775,5 @@
 
     !@$$      LOGICAL offline           ! Controle du stockage ds "physique"
-    !@$$      PARAMETER (offline=.false.)
+    !@$$      PARAMETER (offline=.FALSE.)
     !@$$      INTEGER physid
     REAL frac_impa(klon, klev) ! fractions d'aerosols lessivees (impaction)
@@ -1261,8 +1260,8 @@
     if (debut) then                                                        !
       iflag_physiq = 0
-      call getin_p('iflag_physiq', iflag_physiq)                          !
+      CALL getin_p('iflag_physiq', iflag_physiq)                          !
     endif                                                                  !
     if (iflag_physiq == 2) then                                          !
-      call physiqex (nlon, nlev, &                                         !
+      CALL physiqex (nlon, nlev, &                                         !
               debut, lafin, pdtphys_, &                                             !
               paprs, pplay, pphi, pphis, presnivs, &                                  !
@@ -1276,5 +1275,5 @@
     pi = 4. * ATAN(1.)
 
-    ! set-up call to alerte function
+    ! set-up CALL to alerte function
     call_alert = (alert_first_call .AND. is_master)
 
@@ -1365,5 +1364,5 @@
               CALL regr_horiz_time_climoz(read_climoz, ok_daily_climoz)
 
-      print*, '================================================='
+      PRINT*, '================================================='
 
       !CR: check sur le nb de traceurs de l eau
@@ -1448,5 +1447,5 @@
       WRITE(lunout, *) 'debut physiq_mod tau_gl=', tau_gl
       iflag_thermcell_tke = 0
-      call getin_p('iflag_thermcell_tke', iflag_thermcell_tke)                          !
+      CALL getin_p('iflag_thermcell_tke', iflag_thermcell_tke)                          !
 
       CALL getin_p('iflag_alp_wk_cond', iflag_alp_wk_cond)
@@ -1476,5 +1475,5 @@
       fl_cor_ebil = 0 ! by default, no correction to ensure energy conservation
       CALL getin_p('fl_cor_ebil', fl_cor_ebil)
-      iflag_phytrac = 1 ! by default we do want to call phytrac
+      iflag_phytrac = 1 ! by default we do want to CALL phytrac
       CALL getin_p('iflag_phytrac', iflag_phytrac)
 
@@ -1482,5 +1481,5 @@
       CALL getin_p('ok_water_mass_fixer', ok_water_mass_fixer)
       IF (CPPKEY_DUST) THEN
-        IF (iflag_phytrac.EQ.0) THEN
+        IF (iflag_phytrac==0) THEN
           WRITE(lunout, *) 'In order to run with SPLA, iflag_phytrac will be forced to 1'
           iflag_phytrac = 1
@@ -1514,5 +1513,5 @@
       !AI 08 2023
 #ifdef CPP_ECRAD
-       ok_3Deffect=.false.
+       ok_3Deffect=.FALSE.
        CALL getin_p('ok_3Deffect',ok_3Deffect)
        namelist_ecrad_file='namelist_ecrad'
@@ -1584,7 +1583,7 @@
       clwcon(:, :) = 0.0
 
-      print*, 'iflag_coupl,iflag_clos,iflag_wake', &
+      PRINT*, 'iflag_coupl,iflag_clos,iflag_wake', &
               iflag_coupl, iflag_clos, iflag_wake
-      print*, 'iflag_cycle_diurne', iflag_cycle_diurne
+      PRINT*, 'iflag_cycle_diurne', iflag_cycle_diurne
 
       IF (iflag_con==2.AND.iflag_cld_th>-1) THEN
@@ -1674,8 +1673,8 @@
         CLOSE(98)
         IF(nCFMIP>npCFMIP) THEN
-          print*, 'nCFMIP > npCFMIP : augmenter npCFMIP et recompiler'
+          PRINT*, 'nCFMIP > npCFMIP : augmenter npCFMIP et recompiler'
           CALL abort_physic("physiq", "", 1)
         ELSE
-          print*, 'physiq npCFMIP=', npCFMIP, 'nCFMIP=', nCFMIP
+          PRINT*, 'physiq npCFMIP=', npCFMIP, 'nCFMIP=', nCFMIP
         ENDIF
 
@@ -1708,8 +1707,7 @@
       ENDIF
 
-#ifdef CPP_IOIPSL
 
        !$OMP MASTER
-       ! FH : if ok_sync=.true. , the time axis is written at each time step
+       ! FH : if ok_sync=.TRUE. , the time axis is written at each time step
        ! in the output files. Only at the end in the opposite case
        ok_sync_omp=.FALSE.
@@ -1740,5 +1738,4 @@
       END IF
 
-#endif
       ecrit_reg = ecrit_reg * un_jour
       ecrit_tra = ecrit_tra * un_jour
@@ -1920,5 +1917,5 @@
       ENDIF
       !IM begin
-      print*, 'physiq: clwcon rnebcon ratqs', clwcon(1, 1), rnebcon(1, 1) &
+      PRINT*, 'physiq: clwcon rnebcon ratqs', clwcon(1, 1), rnebcon(1, 1) &
               , ratqs(1, 1)
       !IM end
@@ -1937,5 +1934,5 @@
       !               pdtphys
       !          abort_message='Pas physique n est pas correct '
-      !          !           call abort_physic(modname,abort_message,1)
+      !          !           CALL abort_physic(modname,abort_message,1)
       !          phys_tstep=pdtphys
       !       ENDIF
@@ -1997,5 +1994,5 @@
                   , alp_bl_prescr, ale_bl_prescr)
           ! 11/09/06 rajout initialisation ALE et ALP du wake et PBL(YU)
-          !        print*,'apres ini_wake iflag_cld_th=', iflag_cld_th
+          !        PRINT*,'apres ini_wake iflag_cld_th=', iflag_cld_th
 
           ! Initialize tendencies of wake state variables (for some flag values
@@ -2091,5 +2088,5 @@
         CALL bcast_omp(missing_val)
 
-        ! Now we activate some double radiation call flags only if some
+        ! Now we activate some double radiation CALL flags only if some
         ! diagnostics are requested, otherwise there is no point in doing this
         IF (is_master) THEN
@@ -2145,5 +2142,4 @@
 
       IF (ANY(type_trac == ['inca', 'inco'])) THEN ! ModThL
-        IF (CPPKEY_INCA) THEN
           CALL VTe(VTphysiq)
           CALL VTb(VTinca)
@@ -2151,5 +2147,5 @@
           WRITE(lunout, *) 'initial time chemini', days_elapsed, calday
 
-          call init_const_lmdz(&
+          CALL init_const_lmdz(&
                   ndays, nbsrf, is_oce, is_sic, is_ter, is_lic, calend, &
                   config_inca)
@@ -2221,5 +2217,4 @@
           CALL VTe(VTinca)
           CALL VTb(VTphysiq)
-        END IF
       ENDIF
 
@@ -2338,5 +2333,5 @@
 #ifdef REPROBUS
        CALL Init_chem_rep_xjour(jD_cur-jD_ref+day_ref)
-       print*,'xjour equivalent rjourvrai',jD_cur-jD_ref+day_ref
+       PRINT*,'xjour equivalent rjourvrai',jD_cur-jD_ref+day_ref
        CALL Rtime(debut)
 #endif
@@ -3056,5 +3051,5 @@
 
       IF (iflag_con==1) THEN
-        abort_message = 'reactiver le call conlmd dans physiq.F'
+        abort_message = 'reactiver le CALL conlmd dans physiq.F'
         CALL abort_physic (modname, abort_message, 1)
         !     CALL conlmd (phys_tstep, paprs, pplay, t_seri, q_seri, conv_q,
@@ -3105,5 +3100,5 @@
         ! Perform dry adiabatic adjustment on wake profile
         ! The corresponding tendencies are added to the convective tendencies
-        ! after the call to the convective scheme.
+        ! after the CALL to the convective scheme.
         IF (iflag_wake>=1) then
           IF (iflag_adjwk >= 1) THEN
@@ -3201,5 +3196,5 @@
 
           !IM begin
-          !       print*,'physiq: cin pbase dnwd0 ftd fqd ',cin(1),pbase(1),
+          !       PRINT*,'physiq: cin pbase dnwd0 ftd fqd ',cin(1),pbase(1),
           !    .dnwd0(1,1),ftd(1,1),fqd(1,1)
           !IM end
@@ -3210,5 +3205,5 @@
 
           !jyg<
-          ! If convective tendencies are too large, then call convection
+          ! If convective tendencies are too large, then CALL convection
           !  every time step
           cvpas = cvpas_0
@@ -3236,5 +3231,5 @@
           ENDDO
           !!!   Ligne a ne surtout pas remettre sans avoir murement reflechi (jyg)
-          !!!          call bcast(cvpas)
+          !!!          CALL bcast(cvpas)
           !!!   ------------------------------------------------------------
           !>jyg
@@ -3378,5 +3373,5 @@
     !!                     dqi0, paprs, 'convection_sat', abortphy, flag_inhib_tend,&
     !!                     itap, 1)
-    !!    call prt_enerbil('convection_sat',itap)
+    !!    CALL prt_enerbil('convection_sat',itap)
     !!
     !!
@@ -3685,5 +3680,5 @@
         ! FH : 2010/02/01
         if (iflag_thermcell_tke==1) then
-          call thermcell_dtke(klon, klev, nbsrf, pdtphys, fm_therm, entr_therm, rg, paprs, pbl_tke)
+          CALL thermcell_dtke(klon, klev, nbsrf, pdtphys, fm_therm, entr_therm, rg, paprs, pbl_tke)
         endif
         ! -------------------------------------------------------------------
@@ -3713,5 +3708,5 @@
         ENDIF
 
-        ! Attention : le call ajsec_convV2 n'est maintenu que momentanneement
+        ! Attention : le CALL ajsec_convV2 n'est maintenu que momentanneement
         ! pour des test de convergence numerique.
         ! Le nouveau ajsec est a priori mieux, meme pour le cas
@@ -3900,12 +3895,12 @@
     IF (iflag_cld_th<=-1) THEN ! seulement pour Tiedtke
       snow_tiedtke = 0.
-      !     print*,'avant calcul de la pseudo precip '
-      !     print*,'iflag_cld_th',iflag_cld_th
+      !     PRINT*,'avant calcul de la pseudo precip '
+      !     PRINT*,'iflag_cld_th',iflag_cld_th
       IF (iflag_cld_th==-1) THEN
         rain_tiedtke = rain_con
       ELSE
-        !       print*,'calcul de la pseudo precip '
+        !       PRINT*,'calcul de la pseudo precip '
         rain_tiedtke = 0.
-        !         print*,'calcul de la pseudo precip 0'
+        !         PRINT*,'calcul de la pseudo precip 0'
         DO k = 1, klev
           DO i = 1, klon
@@ -3918,5 +3913,5 @@
       ENDIF
 
-      !     call dump2d(iim,jjm,rain_tiedtke(2:klon-1),'PSEUDO PRECIP ')
+      !     CALL dump2d(iim,jjm,rain_tiedtke(2:klon-1),'PSEUDO PRECIP ')
 
       ! Nuages diagnostiques pour Tiedtke
@@ -4096,5 +4091,4 @@
 
     IF (ANY(type_trac == ['inca', 'inco'])) THEN ! ModThL
-      IF (CPPKEY_INCA) THEN
         CALL VTe(VTphysiq)
         CALL VTb(VTinca)
@@ -4149,5 +4143,4 @@
         CALL VTe(VTinca)
         CALL VTb(VTphysiq)
-      END IF
     ENDIF !type_trac = inca or inco
     IF (type_trac == 'repr') THEN
@@ -4352,5 +4345,5 @@
 
         !IM 251017 begin
-        !               print*,'physiq betaCRF global zdtime=',zdtime
+        !               PRINT*,'physiq betaCRF global zdtime=',zdtime
         !IM 251017 end
         DO k = 1, klev
@@ -4403,5 +4396,5 @@
       !lecture de la chlorophylle pour le nouvel albedo de Sunghye Baek
       IF (ok_chlorophyll) THEN
-        print*, "-- reading chlorophyll"
+        PRINT*, "-- reading chlorophyll"
         CALL readchlorophyll(debut)
       ENDIF
@@ -4433,5 +4426,4 @@
 
       IF (aerosol_couple.AND.config_inca=='aero') THEN
-        IF (CPPKEY_INCA) THEN
           CALL radlwsw_inca  &
                   (chemistry_couple, kdlon, kflev, dist, rmu0, fract, solaire, &
@@ -4453,5 +4445,4 @@
                   cldtaupirad, &
                   topswai_aero, solswai_aero)
-        END IF
       ELSE
 
@@ -4600,5 +4591,5 @@
 #ifdef CPP_ECRAD
           IF (ok_3Deffect) then
-!                print*,'ok_3Deffect = ',ok_3Deffect
+!                PRINT*,'ok_3Deffect = ',ok_3Deffect
                 namelist_ecrad_file='namelist_ecrad_s2'
                 CALL radlwsw &
@@ -4722,5 +4713,5 @@
 
     IF (prt_level >=10) THEN
-      print *, ' call orography ? ', ok_orodr
+      print *, ' CALL orography ? ', ok_orodr
     ENDIF
 
@@ -4989,5 +4980,5 @@
 
     IF (prt_level>=5) &
-            print*, 'addtkeoro', addtkeoro
+            PRINT*, 'addtkeoro', addtkeoro
 
     alphatkeoro = 1.
@@ -5090,8 +5081,8 @@
 
           IF (prt_level .GE.10) THEN
-             print*,'freq_cosp',freq_cosp
+             PRINT*,'freq_cosp',freq_cosp
           ENDIF
           mr_ozone=wo(:, :, 1) * dobson_u * 1e3 / zmasse
-          !       print*,'Dans physiq.F avant appel cosp ref_liq,ref_ice=',
+          !       PRINT*,'Dans physiq.F avant appel cosp ref_liq,ref_ice=',
           !     s        ref_liq,ref_ice
           CALL phys_cosp(itap,phys_tstep,freq_cosp, &
@@ -5121,8 +5112,8 @@
 
           IF (prt_level .GE.10) THEN
-             print*,'freq_cosp',freq_cosp
+             PRINT*,'freq_cosp',freq_cosp
           ENDIF
           mr_ozone=wo(:, :, 1) * dobson_u * 1e3 / zmasse
-                 print*,'Dans physiq.F avant appel '
+                 PRINT*,'Dans physiq.F avant appel '
           !     s        ref_liq,ref_ice
           CALL phys_cosp2(itap,phys_tstep,freq_cosp, &
@@ -5146,5 +5137,5 @@
 
           IF (prt_level .GE.10) THEN
-             print*,'freq_cosp',freq_cosp
+             PRINT*,'freq_cosp',freq_cosp
           ENDIF
            DO k = 1, klev
@@ -5154,5 +5145,5 @@
            ENDDO
           mr_ozone=wo(:, :, 1) * dobson_u * 1e3 / zmasse
-                 print*,'Dans physiq.F avant appel '
+                 PRINT*,'Dans physiq.F avant appel '
           !     s        ref_liq,ref_ice
           CALL lmdz_cosp_interface(itap,phys_tstep,freq_cosp, &
@@ -5267,5 +5258,5 @@
 
 
-          print*,'avt add phys rep',abortphy
+          PRINT*,'avt add phys rep',abortphy
 
      CALL add_phys_tend &
@@ -5274,5 +5265,5 @@
         IF (abortphy==1) Print*,'ERROR ABORT REP'
 
-          print*,'apr add phys rep',abortphy
+          PRINT*,'apr add phys rep',abortphy
 
 #endif
@@ -5285,5 +5276,5 @@
 
       IF (prt_level>=9) &
-              print*, 'Attention on met a 0 les thermiques pour phystoke'
+              PRINT*, 'Attention on met a 0 les thermiques pour phystoke'
       CALL phystokenc (&
               nlon, klev, pdtphys, longitude_deg, latitude_deg, &
@@ -5423,5 +5414,4 @@
 
     IF (ANY(type_trac == ['inca', 'inco'])) THEN
-      IF (CPPKEY_INCA) THEN
         CALL VTe(VTphysiq)
         CALL VTb(VTinca)
@@ -5443,5 +5433,4 @@
         CALL VTe(VTinca)
         CALL VTb(VTphysiq)
-      END IF
     ENDIF
 
@@ -5591,5 +5580,4 @@
     !   Ecriture des sorties
     !=============================================================
-#ifdef CPP_IOIPSL
 
     ! Recupere des varibles calcule dans differents modules
@@ -5651,8 +5639,7 @@
     END IF
 
-#endif
     ! Petit appelle de sorties pour accompagner le travail sur phyex
     if (iflag_physiq == 1) then
-      call output_physiqex(debut, jD_eq, pdtphys, presnivs, paprs, u, v, t, qx, cldfra, 0. * t, 0. * t, 0. * t, pbl_tke, theta)
+      CALL output_physiqex(debut, jD_eq, pdtphys, presnivs, paprs, u, v, t, qx, cldfra, 0. * t, 0. * t, 0. * t, pbl_tke, theta)
     endif
 
@@ -5695,10 +5682,8 @@
       IF (using_xios) THEN
 
-        IF (CPPKEY_INCA) THEN
           IF (type_trac == 'inca') THEN
             IF (is_omp_master .AND. grid_type==unstructured) THEN
               CALL finalize_inca
             ENDIF
-          ENDIF
         END IF
 
@@ -5710,5 +5695,5 @@
     ENDIF
 
-    !      first=.false.
+    !      first=.FALSE.
 
   END SUBROUTINE physiq
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/physiqex_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/physiqex_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/physiqex_mod.F90	(revision 5103)
@@ -28,6 +28,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)
@@ -59,5 +59,5 @@
 real :: temp_newton(klon,klev)
 integer :: k
-logical, save :: first=.true.
+logical, save :: first=.TRUE.
 !$OMP THREADPRIVATE(first)
 
@@ -74,12 +74,12 @@
 !------------------------------------------------------------
 
-print*,'Debut physiqex',debut
+PRINT*,'Debut physiqex',debut
 ! initializations
-if (debut) then ! Things to do only for the first call to physics 
-print*,'Debut physiqex IN'
+IF (debut) then ! Things to do only for the first CALL to physics
+PRINT*,'Debut physiqex IN'
 
 ! load initial conditions for physics (including the grid)
-  call phys_state_var_init(1) ! some initializations, required before calling phyetat0
-  call phyetat0("startphy.nc", clesphy0, tabcntr0)
+  CALL phys_state_var_init(1) ! some initializations, required before calling phyetat0
+  CALL phyetat0("startphy.nc", clesphy0, tabcntr0)
 
 ! Initialize outputs:
@@ -87,5 +87,5 @@
   ! 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)
 
 #ifndef CPP_IOIPSL_NO_OUTPUT
@@ -93,5 +93,5 @@
 #endif
 
-endif ! of if (debut)
+END IF ! of if (debut)
 
 !------------------------------------------------------------
@@ -116,8 +116,8 @@
 d_v(1:klon,1)=-v(1:klon,1)/86400.
 ! newtonian relaxation towards temp_newton()
-do k=1,klev
+DO k=1,klev
   temp_newton(1:klon,k)=280.+cos(latitude(1:klon))*40.-pphi(1:klon,k)/rg*6.e-3
   d_t(1:klon,k)=(temp_newton(1:klon,k)-t(1:klon,k))/1.e5
-enddo
+END DO
 
 
@@ -127,14 +127,14 @@
 
 
-call output_physiqex(debut,zjulian,pdtphys,presnivs,paprs,u,v,t,qx,0.*t,0.*t,0.*t,0.*t,0.*t,0.*t)
+CALL output_physiqex(debut,zjulian,pdtphys,presnivs,paprs,u,v,t,qx,0.*t,0.*t,0.*t,0.*t,0.*t,0.*t)
 
 
 ! if lastcall, then it is time to write "restartphy.nc" file
-if (lafin) then
-  call phyredem("restartphy.nc")
-endif
+IF (lafin) then
+  CALL phyredem("restartphy.nc")
+END IF
 
 
-end subroutine physiqex
+END SUBROUTINE  physiqex
 
 END MODULE physiqex_mod
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/phytrac_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/phytrac_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/phytrac_mod.F90	(revision 5103)
@@ -426,11 +426,11 @@
       !$OMP MASTER
       convscav_omp = .FALSE.
-      call getin('convscav', convscav_omp)
+      CALL getin('convscav', convscav_omp)
       iflag_vdf_trac_omp = 1
-      call getin('iflag_vdf_trac', iflag_vdf_trac_omp)
+      CALL getin('iflag_vdf_trac', iflag_vdf_trac_omp)
       iflag_con_trac_omp = 1
-      call getin('iflag_con_trac', iflag_con_trac_omp)
+      CALL getin('iflag_con_trac', iflag_con_trac_omp)
       iflag_the_trac_omp = 1
-      call getin('iflag_the_trac', iflag_the_trac_omp)
+      CALL getin('iflag_the_trac', iflag_the_trac_omp)
       !$OMP END MASTER
       !$OMP BARRIER
@@ -449,11 +449,11 @@
       !$OMP MASTER
       iflag_lscav_omp = 1
-      call getin('iflag_lscav', iflag_lscav_omp)
+      CALL getin('iflag_lscav', iflag_lscav_omp)
       ccntrAA_omp = 1
       ccntrENV_omp = 1.
       coefcoli_omp = 0.001
-      call getin('ccntrAA', ccntrAA_omp)
-      call getin('ccntrENV', ccntrENV_omp)
-      call getin('coefcoli', coefcoli_omp)
+      CALL getin('ccntrAA', ccntrAA_omp)
+      CALL getin('ccntrENV', ccntrENV_omp)
+      CALL getin('coefcoli', coefcoli_omp)
       !$OMP END MASTER
       !$OMP BARRIER
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/plevel.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/plevel.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/plevel.F90	(revision 5103)
@@ -9,7 +9,5 @@
   USE netcdf, ONLY: nf90_fill_real
   USE dimphy
-#ifdef CPP_IOIPSL 
-  USE phys_state_var_mod, ONLY: missing_val_nf90 
-#endif
+  USE phys_state_var_mod, ONLY: missing_val_nf90
   USE wxios, ONLY: missing_val_xios => missing_val, using_xios
   IMPLICIT NONE
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/plevel_new.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/plevel_new.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/plevel_new.F90	(revision 5103)
@@ -9,7 +9,5 @@
   ! ================================================================
   USE dimphy
-#ifdef CPP_IOIPSL 
   USE phys_state_var_mod, ONLY: missing_val_nf90
-#endif
   USE wxios, ONLY: missing_val_xios=>missing_val, using_xios
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/press_coefoz_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/press_coefoz_m.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/press_coefoz_m.F90	(revision 5103)
@@ -14,5 +14,5 @@
 contains
 
-  subroutine press_coefoz
+  SUBROUTINE press_coefoz
 
     ! This procedure is called once per "gcm" run.
@@ -40,18 +40,18 @@
 
     if (is_mpi_root) then
-       call nf95_open("coefoz_LMDZ.nc", nf90_nowrite, ncid)
+       CALL nf95_open("coefoz_LMDZ.nc", nf90_nowrite, ncid)
 
-       call nf95_inq_varid(ncid, "plev", varid)
-       call nf95_gw_var(ncid, varid, plev)
+       CALL nf95_inq_varid(ncid, "plev", varid)
+       CALL nf95_gw_var(ncid, varid, plev)
        ! Convert from hPa to Pa because "paprs" and "pplay" are in Pa:
        plev = plev * 100.
        n_plev = size(plev)
 
-       call nf95_close(ncid)
+       CALL nf95_close(ncid)
     end if
 
-    call bcast_mpi(n_plev)
+    CALL bcast_mpi(n_plev)
     if (.not. is_mpi_root) allocate(plev(n_plev))
-    call bcast_mpi(plev)
+    CALL bcast_mpi(plev)
     
     ! Compute edges of pressure intervals:
@@ -67,8 +67,8 @@
        ! surface pressure would do)
     end if
-    call bcast_mpi(press_in_edg)
+    CALL bcast_mpi(press_in_edg)
     !$omp end single
 
-  end subroutine press_coefoz
+  END SUBROUTINE  press_coefoz
 
 end module press_coefoz_m
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/print_debug_phys.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/print_debug_phys.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/print_debug_phys.F90	(revision 5103)
@@ -11,6 +11,6 @@
 integer k
 
-print*,'PLANTAGE POUR LE POINT i=',i,text
-print*,'l    u, v, T, q, ql'
+PRINT*,'PLANTAGE POUR LE POINT i=',i,text
+PRINT*,'l    u, v, T, q, ql'
 DO k = 1, klev
    write(*,'(i3,2f8.4,3f14.4,2e14.2)') k,longitude_deg(i),latitude_deg(i), &
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/radio_decay.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/radio_decay.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/radio_decay.F90	(revision 5103)
@@ -18,6 +18,6 @@
 ! Entrees
 
-  LOGICAL,DIMENSION(nbtr),INTENT(IN)        :: radio ! .true. = traceur radioactif  
-  LOGICAL,INTENT(IN)                        :: rnpb  ! .true. = decroissance RN = source PB
+  LOGICAL,DIMENSION(nbtr),INTENT(IN)        :: radio ! .TRUE. = traceur radioactif
+  LOGICAL,INTENT(IN)                        :: rnpb  ! .TRUE. = decroissance RN = source PB
   REAL,INTENT(IN)                           :: dtime ! Pas de temps physique (secondes)
   REAL,DIMENSION(nbtr),INTENT(IN)           :: tautr ! Constante de decroissance radioactive
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/radlwsw_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/radlwsw_m.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/radlwsw_m.F90	(revision 5103)
@@ -215,5 +215,5 @@
     LOGICAL, INTENT(in)  :: ok_volcan                                      ! produce volcanic diags (SW/LW heat flux and rate)
     INTEGER, INTENT(in)  :: flag_volc_surfstrat                            ! allow to impose volcanic cooling rate at surf or heating in strato
-    LOGICAL              :: lldebug=.false.
+    LOGICAL              :: lldebug=.FALSE.
     INTEGER, INTENT(in)  :: flag_aerosol                                   ! takes value 0 (no aerosol) or 1 to 6 (aerosols)
     INTEGER, INTENT(in)  :: flag_aerosol_strat                             ! use stratospheric aerosols
@@ -349,5 +349,5 @@
     REAL(KIND=8) seuilmach
     ! AI 10 mars 22 : Pour les tests Offline
-    logical   :: lldebug_for_offline = .false.
+    logical   :: lldebug_for_offline = .FALSE.
     REAL(KIND=8) solaire_off(klon), &
          ZCO2_off(klon,klev), &
@@ -480,7 +480,7 @@
     ! =========  INITIALISATIONS ==============================================
     IF (lldebug) THEN
-       print*,'Entree dans radlwsw '
-       print*,'************* INITIALISATIONS *****************************'
-       print*,'klon, kdlon, klev, kflev =',klon, kdlon, klev, kflev
+       PRINT*,'Entree dans radlwsw '
+       PRINT*,'************* INITIALISATIONS *****************************'
+       PRINT*,'klon, kdlon, klev, kflev =',klon, kdlon, klev, kflev
     ENDIF
 
@@ -537,9 +537,9 @@
     IF (nb_gr*kdlon /= KLON) THEN
        PRINT*, "kdlon mauvais:", KLON, kdlon, nb_gr
-       call abort_physic("radlwsw", "", 1)
+       CALL abort_physic("radlwsw", "", 1)
     ENDIF
     IF (kflev /= KLEV) THEN
        PRINT*, "kflev differe de KLEV, kflev, KLEV"
-       call abort_physic("radlwsw", "", 1)
+       CALL abort_physic("radlwsw", "", 1)
     ENDIF
     !-------------------------------------------
@@ -563,5 +563,5 @@
        IF (iflag_rrtm==0) THEN
           IF (ok_SUNTIME) PSCT = solaireTIME/zdist/zdist
-          print*,'Constante solaire: ',PSCT*zdist*zdist
+          PRINT*,'Constante solaire: ',PSCT*zdist*zdist
        ENDIF
 #endif
@@ -569,5 +569,5 @@
 
     IF (lldebug) THEN
-       print*,'************** Debut boucle de 1 a ', nb_gr
+       PRINT*,'************** Debut boucle de 1 a ', nb_gr
     ENDIF
 
@@ -1126,5 +1126,5 @@
              zsollwdown(i)= -1.*ZFLDN(i,1)
           ENDDO
-          !     print*,'OK2'
+          !     PRINT*,'OK2'
 
           !--add VOLMIP (surf cool or strat heat activate)
@@ -1160,11 +1160,11 @@
 #else
           abort_message="You should compile with -rrtm if running with iflag_rrtm=1"
-          call abort_physic(modname, abort_message, 1)
+          CALL abort_physic(modname, abort_message, 1)
 #endif
           !======================================================================
           ! AI fev 2021
        ELSE IF(iflag_rrtm == 2) THEN
-          print*,'Traitement cas iflag_rrtm = ',iflag_rrtm
-          !    print*,'Mise a zero des flux '
+          PRINT*,'Traitement cas iflag_rrtm = ',iflag_rrtm
+          !    PRINT*,'Mise a zero des flux '
 #ifdef CPP_ECRAD
           DO k = 1, kflev+1
@@ -1244,5 +1244,5 @@
 
           ! On met les donnees dans l'ordre des niveaux ecrad
-          !         print*,'On inverse sur la verticale '
+          !         PRINT*,'On inverse sur la verticale '
           paprs_i(:,1)=paprs(:,klev+1)
           DO k=1,klev
@@ -1357,5 +1357,5 @@
 
           if (namelist_ecrad_file.eq.'namelist_ecrad') then 
-             print*,' 1er apell Ecrad : ok_3Deffect, namelist_ecrad_file = ', &
+             PRINT*,' 1er apell Ecrad : ok_3Deffect, namelist_ecrad_file = ', &
                   ok_3Deffect, namelist_ecrad_file    
              CALL RADIATION_SCHEME &
@@ -1401,5 +1401,5 @@
    cloud_cover_sw)
           else
-             print*,' 2e apell Ecrad : ok_3Deffect, namelist_ecrad_file = ', &
+             PRINT*,' 2e apell Ecrad : ok_3Deffect, namelist_ecrad_file = ', &
                   ok_3Deffect, namelist_ecrad_file       
              CALL RADIATION_SCHEME_S2 &
@@ -1471,6 +1471,6 @@
           ! avec l ancien rayonnement AR4. Si nuit, fract=0 donc pas de 
           ! rayonnement SW. (MPL 260609)
-          print*,'On retablit l ordre des niveaux verticaux pour LMDZ'
-          print*,'On multiplie les flux SW par fract et LW dwn par -1'
+          PRINT*,'On retablit l ordre des niveaux verticaux pour LMDZ'
+          PRINT*,'On multiplie les flux SW par fract et LW dwn par -1'
           DO k=0,klev
              DO i=1,klon
@@ -1566,5 +1566,5 @@
           ENDDO
 #endif  
-          print*,'Fin traitement ECRAD'
+          PRINT*,'Fin traitement ECRAD'
           ! Fin ECRAD
        ENDIF        ! iflag_rrtm
@@ -1677,34 +1677,34 @@
        if (0==1) then
           ! Verifs dans le cas 1D
-          print*,'================== Sortie de radlw ================='
-          print*,'******** LW LW LW *******************'
-          print*,'ZLWFT =',ZLWFT
-          print*,'ZLWFT0_i =',ZLWFT0_i
-          print*,'ZFLUP0 =',ZFLUP0
-          print*,'ZFLDN0 =',ZFLDN0
-          print*,'ZFLDNC0 =',ZFLDNC0
-          print*,'ZFLUPC0 =',ZFLUPC0
-
-          print*,'******** SW SW SW *******************'
-          print*,'ZSWFT =',ZSWFT
-          print*,'ZSWFT0_i =',ZSWFT0_i
-          print*,'ZFSDN =',ZFSDN
-          print*,'ZFSDN0 =',ZFSDN0
-          print*,'ZFSDNC0 =',ZFSDNC0
-          print*,'ZFSUP =',ZFSUP
-          print*,'ZFSUP0 =',ZFSUP0
-          print*,'ZFSUPC0 =',ZFSUPC0
-
-          print*,'******** LMDZ  *******************'
-          print*,'cool = ', cool
-          print*,'heat = ', heat
-          print*,'topsw = ', topsw
-          print*,'toplw = ', toplw
-          print*,'sollw = ', sollw
-          print*,'solsw = ', solsw
-          print*,'lwdn = ', lwdn
-          print*,'lwup = ', lwup
-          print*,'swdn = ', swdn
-          print*,'swup =', swup
+          PRINT*,'================== Sortie de radlw ================='
+          PRINT*,'******** LW LW LW *******************'
+          PRINT*,'ZLWFT =',ZLWFT
+          PRINT*,'ZLWFT0_i =',ZLWFT0_i
+          PRINT*,'ZFLUP0 =',ZFLUP0
+          PRINT*,'ZFLDN0 =',ZFLDN0
+          PRINT*,'ZFLDNC0 =',ZFLDNC0
+          PRINT*,'ZFLUPC0 =',ZFLUPC0
+
+          PRINT*,'******** SW SW SW *******************'
+          PRINT*,'ZSWFT =',ZSWFT
+          PRINT*,'ZSWFT0_i =',ZSWFT0_i
+          PRINT*,'ZFSDN =',ZFSDN
+          PRINT*,'ZFSDN0 =',ZFSDN0
+          PRINT*,'ZFSDNC0 =',ZFSDNC0
+          PRINT*,'ZFSUP =',ZFSUP
+          PRINT*,'ZFSUP0 =',ZFSUP0
+          PRINT*,'ZFSUPC0 =',ZFSUPC0
+
+          PRINT*,'******** LMDZ  *******************'
+          PRINT*,'cool = ', cool
+          PRINT*,'heat = ', heat
+          PRINT*,'topsw = ', topsw
+          PRINT*,'toplw = ', toplw
+          PRINT*,'sollw = ', sollw
+          PRINT*,'solsw = ', solsw
+          PRINT*,'lwdn = ', lwdn
+          PRINT*,'lwup = ', lwup
+          PRINT*,'swdn = ', swdn
+          PRINT*,'swup =', swup
        endif
     ENDIF
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/read_pstoke0.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/read_pstoke0.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/read_pstoke0.F90	(revision 5103)
@@ -336,6 +336,6 @@
     status = nf90_get_var(ncidp, varidch, coefh2, start, count)
     CALL gr_ecrit_fi(kev, kon, nbp_lon, nbp_lat, coefh2, coefh)
-    ! call dump2d(iip1,jjp1,coefh2(1,2),'COEFH2READ   ')
-    ! call dump2d(iim ,jjm ,coefh (2,2),'COEFH2READ   ')
+    ! CALL dump2d(iip1,jjp1,coefh2(1,2),'COEFH2READ   ')
+    ! CALL dump2d(iim ,jjm ,coefh (2,2),'COEFH2READ   ')
 
     ! **** Flux ascendants et entrant dans le thermique
@@ -400,10 +400,10 @@
     ! psrf1
     status = nf90_get_var(ncidp, varidpsr1, psrf12, start, count)
-    ! call dump2d(iip1-1,jjm+1,psrf12,'PSRF1NC')
+    ! CALL dump2d(iip1-1,jjm+1,psrf12,'PSRF1NC')
     CALL gr_ecrit_fi(1, kon, nbp_lon, nbp_lat, psrf12, psrf1)
 
     ! psrf2
     status = nf90_get_var(ncidp, varidpsr2, psrf22, start, count)
-    ! call dump2d(iip1-1,jjm+1,psrf22,'PSRF2NC')
+    ! CALL dump2d(iip1-1,jjm+1,psrf22,'PSRF2NC')
     CALL gr_ecrit_fi(1, kon, nbp_lon, nbp_lat, psrf22, psrf2)
 
@@ -422,5 +422,5 @@
       psrf(i, 3) = psrf3(i)
       ! test abderr
-      ! print*,'Dans read_pstoke psrf3 =',psrf3(i),i
+      ! PRINT*,'Dans read_pstoke psrf3 =',psrf3(i),i
       psrf(i, 4) = psrf4(i)
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/readaerosol_interp.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/readaerosol_interp.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/readaerosol_interp.F90	(revision 5103)
@@ -6,5 +6,5 @@
 ! the pre-industrial values(pi_mass_out) for aerosol corresponding to "id_aero".
 ! The mass concentrations for all aerosols are saved in this routine but each
-! call to this routine only treats the aerosol "id_aero".
+! CALL to this routine only treats the aerosol "id_aero".
 
 ! 1) Read in data for the whole year, only at first time step
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/readaerosolstrato.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/readaerosolstrato.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/readaerosolstrato.F90	(revision 5103)
@@ -1,3 +1,3 @@
-subroutine readaerosolstrato(debut)
+SUBROUTINE readaerosolstrato(debut)
 
     use netcdf95, only: nf95_close, nf95_gw_var, nf95_inq_dimid, & 
@@ -203,3 +203,3 @@
     ENDDO
 
-end subroutine readaerosolstrato
+END SUBROUTINE  readaerosolstrato
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 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/regr_horiz_time_climoz_m.F90	(revision 5103)
@@ -329,15 +329,15 @@
         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
@@ -596,5 +596,5 @@
           vID_ou, ndims, cal_ou)
     !-------------------------------------------------------------------------------
-    ! Purpose:  This subroutine creates the NetCDF output file, defines
+    ! Purpose:  This SUBROUTINE creates the NetCDF output file, defines
     !     dimensions and variables, and writes some of the coordinate variables.
     !-------------------------------------------------------------------------------
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 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/regr_lat_time_coefoz_m.F90	(revision 5103)
@@ -11,5 +11,5 @@
 contains
 
-  subroutine regr_lat_time_coefoz
+  SUBROUTINE regr_lat_time_coefoz
 
     ! "regr_lat_time_coefoz" stands for "regrid latitude time
@@ -153,10 +153,10 @@
     name_out(i_v) = "R_Het"
 
-    call nf95_open("coefoz.nc", nf90_nowrite, ncid_in)
+    CALL nf95_open("coefoz.nc", nf90_nowrite, ncid_in)
 
     ! Get coordinates from the input file:
 
-    call nf95_inq_varid(ncid_in, "latitude", varid)
-    call nf95_gw_var(ncid_in, varid, latitude)
+    CALL nf95_inq_varid(ncid_in, "latitude", varid)
+    CALL nf95_gw_var(ncid_in, varid, latitude)
     ! Convert from degrees to rad, because "boundslat_reg" is in rad:
     latitude = latitude / 180. * pi
@@ -174,6 +174,6 @@
     deallocate(latitude)
 
-    call nf95_inq_varid(ncid_in, "plev", varid)
-    call nf95_gw_var(ncid_in, varid, plev)
+    CALL nf95_inq_varid(ncid_in, "plev", varid)
+    CALL nf95_gw_var(ncid_in, varid, plev)
     n_plev = size(plev)
     ! (We only need the pressure coordinate to copy it to the output file.)
@@ -181,14 +181,14 @@
     ! Get the IDs of ozone parameters in the input file:
     do i_v = 1, n_o3_param
-       call nf95_inq_varid(ncid_in, trim(name_in(i_v)), varid_in(i_v))
+       CALL nf95_inq_varid(ncid_in, trim(name_in(i_v)), varid_in(i_v))
     END DO
 
     ! Create the output file and get the variable IDs:
-    call prepare_out(ncid_in, varid_in, n_plev, name_out, ncid_out, &
+    CALL prepare_out(ncid_in, varid_in, n_plev, name_out, ncid_out, &
          varid_out, varid_plev, varid_time)
 
     ! Write remaining coordinate variables:
-    call nf95_put_var(ncid_out, varid_time, tmidday)
-    call nf95_put_var(ncid_out, varid_plev, plev)
+    CALL nf95_put_var(ncid_out, varid_time, tmidday)
+    CALL nf95_put_var(ncid_out, varid_plev, plev)
 
     deallocate(plev)
@@ -201,5 +201,5 @@
        ! Process ozone parameter "name_in(i_v)"
 
-       call nf95_get_var(ncid_in, varid_in(i_v), o3_par_in)
+       CALL nf95_get_var(ncid_in, varid_in(i_v), o3_par_in)
        if (desc_lat) o3_par_in = o3_par_in(n_lat:1:-1, :, :)
 
@@ -207,5 +207,5 @@
        ! We average with respect to sine of latitude, which is
        ! equivalent to weighting by cosine of latitude:
-       call regr_conserv(1, o3_par_in, xs = sin(lat_in_edg), &
+       CALL regr_conserv(1, o3_par_in, xs = sin(lat_in_edg), &
             xt = (/-1., sin((/boundslat_reg(nbp_lat-1:1:-1,south)/)), 1./), &
             vt = v_regr_lat(nbp_lat:1:-1, :, 1:12))
@@ -219,23 +219,23 @@
 
        ! Regrid in time by linear interpolation:
-       call regr_lint(3, v_regr_lat, tmidmonth, tmidday, o3_par_out)
+       CALL regr_lint(3, v_regr_lat, tmidmonth, tmidday, o3_par_out)
 
        ! Write to file:
-       call nf95_put_var(ncid_out, varid_out(i_v), &
+       CALL nf95_put_var(ncid_out, varid_out(i_v), &
             o3_par_out(nbp_lat:1:-1, :, :))
        ! (The order of "rlatu" is inverted in the output file)
     END DO
 
-    call nf95_close(ncid_out)
-    call nf95_close(ncid_in)
-
-  end subroutine regr_lat_time_coefoz
+    CALL nf95_close(ncid_out)
+    CALL nf95_close(ncid_in)
+
+  END SUBROUTINE  regr_lat_time_coefoz
 
   !********************************************
 
-  subroutine prepare_out(ncid_in, varid_in, n_plev, name_out, ncid_out, &
+  SUBROUTINE prepare_out(ncid_in, varid_in, n_plev, name_out, ncid_out, &
        varid_out, varid_plev, varid_time)
 
-    ! This subroutine creates the NetCDF output file, defines
+    ! This SUBROUTINE creates the NetCDF output file, defines
     ! dimensions and variables, and writes one of the coordinate variables.
 
@@ -266,31 +266,31 @@
          size(name_out), "prepare_out") 
 
-    call nf95_create("coefoz_LMDZ.nc", nf90_clobber, ncid_out)
+    CALL nf95_create("coefoz_LMDZ.nc", nf90_clobber, ncid_out)
 
     ! Dimensions:
-    call nf95_def_dim(ncid_out, "time", 360, dimid_time)
-    call nf95_def_dim(ncid_out, "plev", n_plev, dimid_plev)
-    call nf95_def_dim(ncid_out, "rlatu", nbp_lat, dimid_rlatu)
+    CALL nf95_def_dim(ncid_out, "time", 360, dimid_time)
+    CALL nf95_def_dim(ncid_out, "plev", n_plev, dimid_plev)
+    CALL nf95_def_dim(ncid_out, "rlatu", nbp_lat, dimid_rlatu)
 
     ! Define coordinate variables:
 
-    call nf95_def_var(ncid_out, "time", nf90_float, dimid_time, varid_time)
-    call nf95_put_att(ncid_out, varid_time, "units", "days since 2000-1-1")
-    call nf95_put_att(ncid_out, varid_time, "calendar", "360_day")
-    call nf95_put_att(ncid_out, varid_time, "standard_name", "time")
-
-    call nf95_def_var(ncid_out, "plev", nf90_float, dimid_plev, varid_plev)
-    call nf95_put_att(ncid_out, varid_plev, "units", "millibar")
-    call nf95_put_att(ncid_out, varid_plev, "standard_name", "air_pressure")
-    call nf95_put_att(ncid_out, varid_plev, "long_name", "air pressure")
-
-    call nf95_def_var(ncid_out, "rlatu", nf90_float, dimid_rlatu, varid_rlatu)
-    call nf95_put_att(ncid_out, varid_rlatu, "units", "degrees_north")
-    call nf95_put_att(ncid_out, varid_rlatu, "standard_name", "latitude")
+    CALL nf95_def_var(ncid_out, "time", nf90_float, dimid_time, varid_time)
+    CALL nf95_put_att(ncid_out, varid_time, "units", "days since 2000-1-1")
+    CALL nf95_put_att(ncid_out, varid_time, "calendar", "360_day")
+    CALL nf95_put_att(ncid_out, varid_time, "standard_name", "time")
+
+    CALL nf95_def_var(ncid_out, "plev", nf90_float, dimid_plev, varid_plev)
+    CALL nf95_put_att(ncid_out, varid_plev, "units", "millibar")
+    CALL nf95_put_att(ncid_out, varid_plev, "standard_name", "air_pressure")
+    CALL nf95_put_att(ncid_out, varid_plev, "long_name", "air pressure")
+
+    CALL nf95_def_var(ncid_out, "rlatu", nf90_float, dimid_rlatu, varid_rlatu)
+    CALL nf95_put_att(ncid_out, varid_rlatu, "units", "degrees_north")
+    CALL nf95_put_att(ncid_out, varid_rlatu, "standard_name", "latitude")
 
     ! Define primary variables:
 
     do i = 1, n_o3_param
-       call nf95_def_var(ncid_out, name_out(i), nf90_float, &
+       CALL nf95_def_var(ncid_out, name_out(i), nf90_float, &
             (/dimid_rlatu, dimid_plev, dimid_time/), varid_out(i))
 
@@ -300,31 +300,31 @@
        ncerr = nf90_copy_att(ncid_in, varid_in(i), "long_name",&
    ncid_out, varid_out(i))
-       call handle_err_copy_att("long_name")
+       CALL handle_err_copy_att("long_name")
 
        ncerr = nf90_copy_att(ncid_in, varid_in(i), "units", ncid_out,&
    varid_out(i))
-       call handle_err_copy_att("units")
+       CALL handle_err_copy_att("units")
 
        ncerr = nf90_copy_att(ncid_in, varid_in(i), "standard_name", ncid_out,&
    varid_out(i))
-       call handle_err_copy_att("standard_name")
+       CALL handle_err_copy_att("standard_name")
     END DO
 
     ! Global attributes:
-    call nf95_copy_att(ncid_in, nf90_global, "Conventions", ncid_out, &
+    CALL nf95_copy_att(ncid_in, nf90_global, "Conventions", ncid_out, &
          nf90_global)
-    call nf95_copy_att(ncid_in, nf90_global, "title", ncid_out, nf90_global)
-    call nf95_copy_att(ncid_in, nf90_global, "source", ncid_out, nf90_global)
-    call nf95_put_att(ncid_out, nf90_global, "comment", "Regridded for LMDZ")
-
-    call nf95_enddef(ncid_out)
+    CALL nf95_copy_att(ncid_in, nf90_global, "title", ncid_out, nf90_global)
+    CALL nf95_copy_att(ncid_in, nf90_global, "source", ncid_out, nf90_global)
+    CALL nf95_put_att(ncid_out, nf90_global, "comment", "Regridded for LMDZ")
+
+    CALL nf95_enddef(ncid_out)
 
     ! Write one of the coordinate variables:
-    call nf95_put_var(ncid_out, varid_rlatu, lat_reg(nbp_lat:1:-1) / pi * 180.)
+    CALL nf95_put_var(ncid_out, varid_rlatu, lat_reg(nbp_lat:1:-1) / pi * 180.)
     ! (convert from rad to degrees and sort in ascending order)
 
   contains
 
-    subroutine handle_err_copy_att(att_name)
+    SUBROUTINE handle_err_copy_att(att_name)
 
       use netcdf, only: nf90_noerr, nf90_strerror
@@ -340,7 +340,7 @@
       end if
 
-    end subroutine handle_err_copy_att
-
-  end subroutine prepare_out
+    END SUBROUTINE  handle_err_copy_att
+
+  END SUBROUTINE  prepare_out
 
 end module regr_lat_time_coefoz_m
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/regr_pr_comb_coefoz_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/regr_pr_comb_coefoz_m.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/regr_pr_comb_coefoz_m.F90	(revision 5103)
@@ -34,5 +34,5 @@
 contains
 
-  subroutine alloc_coefoz
+  SUBROUTINE alloc_coefoz
 
     ! This procedure is called once per run.
@@ -52,9 +52,9 @@
     allocate(a6_mass(klon, nbp_lev), r_het_interm(klon, nbp_lev))
 
-  end subroutine alloc_coefoz
+  END SUBROUTINE  alloc_coefoz
 
   !*******************************************************
 
-  subroutine regr_pr_comb_coefoz(julien, rlat, paprs, pplay)
+  SUBROUTINE regr_pr_comb_coefoz(julien, rlat, paprs, pplay)
 
     ! "regr_pr_comb_coefoz" stands for "regrid pressure combine
@@ -119,14 +119,14 @@
 
     !!print *, "Call sequence information: regr_pr_comb_coefoz"
-    call assert((/size(rlat), size(paprs, 1), size(pplay, 1)/) == klon, &
+    CALL assert((/size(rlat), size(paprs, 1), size(pplay, 1)/) == klon, &
          "regr_pr_comb_coefoz klon")
-    call assert((/size(paprs, 2) - 1, size(pplay, 2)/) == nbp_lev, &
+    CALL assert((/size(paprs, 2) - 1, size(pplay, 2)/) == nbp_lev, &
          "regr_pr_comb_coefoz nbp_lev")
 
     !$omp master
-    if (is_mpi_root) call nf95_open("coefoz_LMDZ.nc", nf90_nowrite, ncid)
+    if (is_mpi_root) CALL nf95_open("coefoz_LMDZ.nc", nf90_nowrite, ncid)
     !$omp end master
 
-    call regr_pr_time_av(ncid, (/"a2           ", "a4           ", "a6           ", &
+    CALL regr_pr_time_av(ncid, (/"a2           ", "a4           ", "a6           ", &
          "P_net_Mob    ", "r_Mob        ", "temp_Mob     ", "R_Het        "/),      &
          REAL(julien-1), 'I', press_in_edg, paprs, coefoz)
@@ -140,5 +140,5 @@
 
     ! We can overwrite "coefoz(:, :, 1)", which was saved to "a2":
-    call regr_pr_int(ncid, "Sigma_Mob", julien, plev, pplay, top_value=0., &
+    CALL regr_pr_int(ncid, "Sigma_Mob", julien, plev, pplay, top_value=0., &
          v3=coefoz(:, :, 1))
 
@@ -156,8 +156,8 @@
 
     !$omp master
-    if (is_mpi_root) call nf95_close(ncid)
+    if (is_mpi_root) CALL nf95_close(ncid)
     !$omp end master
 
-  end subroutine regr_pr_comb_coefoz
+  END SUBROUTINE  regr_pr_comb_coefoz
 
 end module regr_pr_comb_coefoz_m
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/regr_pr_int_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/regr_pr_int_m.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/regr_pr_int_m.F90	(revision 5103)
@@ -8,5 +8,5 @@
 contains
 
-  subroutine regr_pr_int(ncid, name, julien, plev, pplay, top_value, v3)
+  SUBROUTINE regr_pr_int(ncid, name, julien, plev, pplay, top_value, v3)
 
     ! "regr_pr_int" stands for "regrid pressure interpolation".
@@ -70,13 +70,13 @@
     !--------------------------------------------
 
-    call assert(shape(v3) == (/klon, nbp_lev/), "regr_pr_int v3")
-    call assert(shape(pplay) == (/klon, nbp_lev/), "regr_pr_int pplay")
+    CALL assert(shape(v3) == (/klon, nbp_lev/), "regr_pr_int v3")
+    CALL assert(shape(pplay) == (/klon, nbp_lev/), "regr_pr_int pplay")
 
     !$omp master
     if (is_mpi_root) then
-       call nf95_inq_varid(ncid, name, varid)
+       CALL nf95_inq_varid(ncid, name, varid)
 
        ! Get data at the right day from the input file:
-       call nf95_get_var(ncid, varid, v1(1, :, 1:), start=(/1, 1, julien/))
+       CALL nf95_get_var(ncid, varid, v1(1, :, 1:), start=(/1, 1, julien/))
        ! Latitudes are in ascending order in the input file while
        ! "rlatu" is in descending order so we need to invert order:
@@ -91,14 +91,14 @@
     !$omp end master
 
-    call scatter2d(v1, v2)
+    CALL scatter2d(v1, v2)
 
     ! Regrid in pressure at each horizontal position:
     do i = 1, klon
-       call regr_lint(1, v2(i, :), (/0., plev/), pplay(i, nbp_lev:1:-1), &
+       CALL regr_lint(1, v2(i, :), (/0., plev/), pplay(i, nbp_lev:1:-1), &
                          v3(i, nbp_lev:1:-1))
        ! (invert order of indices because "pplay" is in descending order)
     END DO
 
-  end subroutine regr_pr_int
+  END SUBROUTINE  regr_pr_int
 
 end module regr_pr_int_m
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/regr_pr_o3_m.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/regr_pr_o3_m.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/regr_pr_o3_m.F90	(revision 5103)
@@ -6,5 +6,5 @@
 contains
 
-  subroutine regr_pr_o3(p3d, o3_mob_regr)
+  SUBROUTINE regr_pr_o3(p3d, o3_mob_regr)
 
     ! "regr_pr_o3" stands for "regrid pressure ozone".
@@ -55,18 +55,18 @@
 
     print *, "Call sequence information: regr_pr_o3"
-    call assert(shape(o3_mob_regr) == (/nbp_lon + 1, nbp_lat, nbp_lev/), &
+    CALL assert(shape(o3_mob_regr) == (/nbp_lon + 1, nbp_lat, nbp_lev/), &
          "regr_pr_o3 o3_mob_regr")
-    call assert(shape(p3d) == (/nbp_lon + 1, nbp_lat, nbp_lev + 1/), "regr_pr_o3 p3d")
+    CALL assert(shape(p3d) == (/nbp_lon + 1, nbp_lat, nbp_lev + 1/), "regr_pr_o3 p3d")
 
-    call nf95_open("coefoz_LMDZ.nc", nf90_nowrite, ncid)
+    CALL nf95_open("coefoz_LMDZ.nc", nf90_nowrite, ncid)
 
-    call nf95_inq_varid(ncid, "r_Mob", varid)
+    CALL nf95_inq_varid(ncid, "r_Mob", varid)
     ! Get data at the right day from the input file:
-    call nf95_get_var(ncid, varid, r_mob, start=(/1, 1, day_ref/))
+    CALL nf95_get_var(ncid, varid, r_mob, start=(/1, 1, day_ref/))
     ! Latitudes are in ascending order in the input file while
     ! "rlatu" is in descending order so we need to invert order:
     r_mob = r_mob(nbp_lat:1:-1, :)
 
-    call nf95_close(ncid)
+    CALL nf95_close(ncid)
 
     ! Regrid in pressure by averaging a step function of pressure:
@@ -74,5 +74,5 @@
     ! Poles:
     do j = 1, nbp_lat, nbp_lat-1
-       call regr_conserv(1, r_mob(j, :), press_in_edg, &
+       CALL regr_conserv(1, r_mob(j, :), press_in_edg, &
             p3d(1, j, nbp_lev + 1:1:-1), o3_mob_regr(1, j, nbp_lev:1:-1))
        ! (invert order of indices because "p3d" is in descending order)
@@ -82,5 +82,5 @@
     do j = 2, nbp_lat-1
        do i = 1, nbp_lon
-          call regr_conserv(1, r_mob(j, :), press_in_edg, &
+          CALL regr_conserv(1, r_mob(j, :), press_in_edg, &
                p3d(i, j, nbp_lev + 1:1:-1), o3_mob_regr(i, j, nbp_lev:1:-1))
           ! (invert order of indices because "p3d" is in descending order)
@@ -96,5 +96,5 @@
     o3_mob_regr(nbp_lon + 1, 2:nbp_lat-1, :) = o3_mob_regr(1, 2:nbp_lat-1, :)
 
-  end subroutine regr_pr_o3
+  END SUBROUTINE  regr_pr_o3
 
 end module regr_pr_o3_m
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 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/regr_pr_time_av_m.F90	(revision 5103)
@@ -42,5 +42,5 @@
 !      adjustment is activated, to avoid "strairs shape effect" on profiles.
 !  * All the fields are regridded as a single multi-dimensional array, so it
-!    saves CPU time to call this procedure once for several NetCDF variables
+!    saves CPU time to CALL this procedure once for several NetCDF variables
 !    rather than several times, each time for a single NetCDF variable.
 !  * The input file pressure at tropopause can be (in decreasing priority):
@@ -91,5 +91,5 @@
   LOGICAL, SAVE :: lPrTfile                        !--- Tropopause pressure flag
   LOGICAL, SAVE :: lO3Tfile                        !--- Tropopause ozone flag
-  LOGICAL, SAVE :: lfirst=.TRUE.                   !--- First call flag
+  LOGICAL, SAVE :: lfirst=.TRUE.                   !--- First CALL flag
 !$OMP THREADPRIVATE(lfirst)
   REAL,    PARAMETER :: pTropUp=9.E+3 !--- Value  <  tropopause pressure (Pa)
@@ -482,6 +482,6 @@
   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])
+  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".
@@ -513,6 +513,6 @@
     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])
+    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/simu_airs.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/simu_airs.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/simu_airs.F90	(revision 5103)
@@ -68,5 +68,5 @@
    slope(first_point))*(P(first_point+1)-P(first_point))
         P_tropo=P(first_point)+tmp
-        ! print*, 'P_tropo= ', tmp, P(first_point), P_tropo
+        ! PRINT*, 'P_tropo= ', tmp, P(first_point), P_tropo
         end if
 
@@ -81,5 +81,5 @@
 
 
-        subroutine cloud_structure(len_cs, rneb_cs, temp_cs, &
+        SUBROUTINE cloud_structure(len_cs, rneb_cs, temp_cs, &
    emis_cs, iwco_cs, &
    pres_cs, dz_cs, rhodz_cs, rad_cs, &
@@ -126,5 +126,5 @@
         write(lunout,*) 'dans cloud_structure'
 
-        call ordonne(len_cs, rneb_cs, rneb_ord)
+        CALL ordonne(len_cs, rneb_cs, rneb_ord)
        
 
@@ -184,5 +184,5 @@
 
         do i = 1, nss
-         call sous_section(len_cs, rneb_cs, temp_cs, &
+         CALL sous_section(len_cs, rneb_cs, temp_cs, &
     emis_cs, iwco_cs, &
     pres_cs, dz_cs, rhodz_cs, rad_cs, rneb_ord, &
@@ -277,26 +277,26 @@
         deallocate (sAnv)
 
-       call normal_undef(pcld_hc_cs,cc_hc_cs)
-       call normal_undef(tcld_hc_cs,cc_hc_cs)
-       call normal_undef(iwp_hc_cs,cc_hc_cs)
-       call normal_undef(em_hc_cs,cc_hc_cs)
-       call normal_undef(deltaz_hc_cs,cc_hc_cs)
+       CALL normal_undef(pcld_hc_cs,cc_hc_cs)
+       CALL normal_undef(tcld_hc_cs,cc_hc_cs)
+       CALL normal_undef(iwp_hc_cs,cc_hc_cs)
+       CALL normal_undef(em_hc_cs,cc_hc_cs)
+       CALL normal_undef(deltaz_hc_cs,cc_hc_cs)
        
-       call normal_undef(iwp_hist_cs,cc_hist_cs)
-       call normal_undef(em_hist_cs,cc_hist_cs)
-       call normal_undef(deltaz_hist_cs,cc_hist_cs)
-       call normal_undef(rad_hist_cs,cc_hist_cs)
-
-       call normal_undef(pcld_Cb_cs,cc_Cb_cs)
-       call normal_undef(tcld_Cb_cs,cc_Cb_cs)
-       call normal_undef(em_Cb_cs,cc_Cb_cs)
-
-       call normal_undef(pcld_ThCi_cs,cc_ThCi_cs)
-       call normal_undef(tcld_ThCi_cs,cc_ThCi_cs)
-       call normal_undef(em_ThCi_cs,cc_ThCi_cs)
+       CALL normal_undef(iwp_hist_cs,cc_hist_cs)
+       CALL normal_undef(em_hist_cs,cc_hist_cs)
+       CALL normal_undef(deltaz_hist_cs,cc_hist_cs)
+       CALL normal_undef(rad_hist_cs,cc_hist_cs)
+
+       CALL normal_undef(pcld_Cb_cs,cc_Cb_cs)
+       CALL normal_undef(tcld_Cb_cs,cc_Cb_cs)
+       CALL normal_undef(em_Cb_cs,cc_Cb_cs)
+
+       CALL normal_undef(pcld_ThCi_cs,cc_ThCi_cs)
+       CALL normal_undef(tcld_ThCi_cs,cc_ThCi_cs)
+       CALL normal_undef(em_ThCi_cs,cc_ThCi_cs)
     
-       call normal_undef(pcld_Anv_cs,cc_Anv_cs)
-       call normal_undef(tcld_Anv_cs,cc_Anv_cs)
-       call normal_undef(em_Anv_cs,cc_Anv_cs)
+       CALL normal_undef(pcld_Anv_cs,cc_Anv_cs)
+       CALL normal_undef(tcld_Anv_cs,cc_Anv_cs)
+       CALL normal_undef(em_Anv_cs,cc_Anv_cs)
 
 
@@ -314,8 +314,8 @@
         endif
  
-        end subroutine cloud_structure
-
-
-        subroutine normal_undef(num, den)
+        END SUBROUTINE  cloud_structure
+
+
+        SUBROUTINE normal_undef(num, den)
 
         REAL, intent(in) :: den
@@ -328,8 +328,8 @@
         endif
 
-        end subroutine normal_undef
-
-
-        subroutine normal2_undef(res,num,den)
+        END SUBROUTINE  normal_undef
+
+
+        SUBROUTINE normal2_undef(res,num,den)
 
         REAL, intent(in) :: den
@@ -343,8 +343,8 @@
         endif
 
-        end subroutine normal2_undef
-
-
-        subroutine sous_section(len_cs, rneb_cs, temp_cs, &
+        END SUBROUTINE  normal2_undef
+
+
+        SUBROUTINE sous_section(len_cs, rneb_cs, temp_cs, &
    emis_cs, iwco_cs, &
    pres_cs, dz_cs, rhodz_cs, rad_cs, rneb_ord, &
@@ -406,5 +406,5 @@
 ! Definition d'un nuage de la sous-section
 
-        call topbot(ideb, w, ibeg, iend)
+        CALL topbot(ideb, w, ibeg, iend)
         ideb = iend+1
 
@@ -416,5 +416,5 @@
 ! (ep. optique, ice water path, pression, temperature)
 
-        call caract(ibeg, iend, temp_cs, tau_cs, iwco_cs, &
+        CALL caract(ibeg, iend, temp_cs, tau_cs, iwco_cs, &
    pres_cs, dz_cs, rhodz_cs, rad_cs, pcld, tcld, &
    som_tau, som_iwc, som_dz, som_rad)
@@ -422,5 +422,5 @@
 ! On masque le nuage s'il n'est pas detectable
 
-        call masque(ibeg, iend, som_tau, visible, w)
+        CALL masque(ibeg, iend, som_tau, visible, w)
 
         endif
@@ -432,9 +432,9 @@
 ! Analyse du nuage detecte
 
-        call topbot(1, w, ibeg, iend)
+        CALL topbot(1, w, ibeg, iend)
 
         if (ibeg > 0) then
 
-        call caract(ibeg, iend, temp_cs, tau_cs, iwco_cs, &
+        CALL caract(ibeg, iend, temp_cs, tau_cs, iwco_cs, &
    pres_cs, dz_cs, rhodz_cs, rad_cs, pcld, tcld, &
    som_tau, som_iwc, som_dz, som_rad)
@@ -511,8 +511,8 @@
         endif
 
-        end subroutine sous_section
-
-
-        subroutine masque (ibeg, iend, som_tau, &
+        END SUBROUTINE  sous_section
+
+
+        SUBROUTINE masque (ibeg, iend, som_tau, &
    visible, w)
 
@@ -552,8 +552,8 @@
 
 
-        end subroutine masque
-
-
-         subroutine caract (ibeg, iend, temp_cs, tau_cs, iwco_cs, &
+        END SUBROUTINE  masque
+
+
+         SUBROUTINE caract (ibeg, iend, temp_cs, tau_cs, iwco_cs, &
    pres_cs, dz_cs, rhodz_cs, rad_cs, pcld, tcld, &
    som_tau, som_iwc, som_dz, som_rad)
@@ -617,7 +617,7 @@
 
 
-       end subroutine caract
+       END SUBROUTINE  caract
  
-        subroutine topbot(ideb,w,ibeg,iend)
+        SUBROUTINE topbot(ideb,w,ibeg,iend)
 
         INTEGER, intent(in) :: ideb
@@ -648,7 +648,7 @@
 
 
-        end subroutine topbot
-
-        subroutine ordonne(len_cs, rneb_cs, rneb_ord)
+        END SUBROUTINE  topbot
+
+        SUBROUTINE ordonne(len_cs, rneb_cs, rneb_ord)
 
         INTEGER, intent(in) :: len_cs
@@ -682,8 +682,8 @@
         enddo
         
-        end subroutine ordonne
+        END SUBROUTINE  ordonne
 
  
-        subroutine sim_mesh(rneb_1D, temp_1D, emis_1D, &
+        SUBROUTINE sim_mesh(rneb_1D, temp_1D, emis_1D, &
    iwcon_1D, rad_1D, &
    pres, dz, &
@@ -848,5 +848,5 @@
 ! Appel du sous_programme cloud_structure
 
-        call cloud_structure(len_cs,rneb_cs,temp_cs,emis_cs,iwco_cs,&
+        CALL cloud_structure(len_cs,rneb_cs,temp_cs,emis_cs,iwco_cs,&
    pres_cs, dz_cs, rhodz_cs, rad_cs, &
    cc_tot_cs, cc_hc_cs, cc_hist_cs, &
@@ -913,10 +913,10 @@
 ! Pour test
         
-        call test_bornes('cc_tot_cs     ',cc_tot_cs,1.,0.)
-        call test_bornes('cc_hc_cs      ',cc_hc_cs,1.,0.)
-        call test_bornes('cc_hist_cs    ',cc_hist_cs,1.,0.)
-        call test_bornes('pcld_hc_cs    ',pcld_hc_cs,1200.,0.)
-        call test_bornes('tcld_hc_cs    ',tcld_hc_cs,1000.,100.)
-        call test_bornes('em_hc_cs      ',em_hc_cs,1000.,0.048)
+        CALL test_bornes('cc_tot_cs     ',cc_tot_cs,1.,0.)
+        CALL test_bornes('cc_hc_cs      ',cc_hc_cs,1.,0.)
+        CALL test_bornes('cc_hist_cs    ',cc_hist_cs,1.,0.)
+        CALL test_bornes('pcld_hc_cs    ',pcld_hc_cs,1200.,0.)
+        CALL test_bornes('tcld_hc_cs    ',tcld_hc_cs,1000.,100.)
+        CALL test_bornes('em_hc_cs      ',em_hc_cs,1000.,0.048)
 
         test_tot(num_cs) = cc_tot_cs
@@ -955,44 +955,44 @@
         cc_Anv_mesh = som_Anv
 
-        call normal2_undef(pcld_hc_mesh,som_pcl_hc, &
+        CALL normal2_undef(pcld_hc_mesh,som_pcl_hc, &
    cc_hc_mesh)
-        call normal2_undef(tcld_hc_mesh,som_tcl_hc, &
+        CALL normal2_undef(tcld_hc_mesh,som_tcl_hc, &
    cc_hc_mesh)
-        call normal2_undef(em_hc_mesh,som_emi_hc, &
+        CALL normal2_undef(em_hc_mesh,som_emi_hc, &
    cc_hc_mesh)
-        call normal2_undef(iwp_hc_mesh,som_iwp_hc, &
+        CALL normal2_undef(iwp_hc_mesh,som_iwp_hc, &
    cc_hc_mesh)
-        call normal2_undef(deltaz_hc_mesh,som_deltaz_hc, &
+        CALL normal2_undef(deltaz_hc_mesh,som_deltaz_hc, &
    cc_hc_mesh)
 
-        call normal2_undef(em_Cb_mesh,som_emi_Cb, &
+        CALL normal2_undef(em_Cb_mesh,som_emi_Cb, &
    cc_Cb_mesh)
-        call normal2_undef(tcld_Cb_mesh,som_tcld_Cb, &
+        CALL normal2_undef(tcld_Cb_mesh,som_tcld_Cb, &
    cc_Cb_mesh)
-        call normal2_undef(pcld_Cb_mesh,som_pcld_Cb, &
+        CALL normal2_undef(pcld_Cb_mesh,som_pcld_Cb, &
    cc_Cb_mesh)
 
-        call normal2_undef(em_ThCi_mesh,som_emi_ThCi, &
+        CALL normal2_undef(em_ThCi_mesh,som_emi_ThCi, &
    cc_ThCi_mesh)
-        call normal2_undef(tcld_ThCi_mesh,som_tcld_ThCi, &
+        CALL normal2_undef(tcld_ThCi_mesh,som_tcld_ThCi, &
    cc_ThCi_mesh)
-        call normal2_undef(pcld_ThCi_mesh,som_pcld_ThCi, &
+        CALL normal2_undef(pcld_ThCi_mesh,som_pcld_ThCi, &
    cc_ThCi_mesh)
 
-       call normal2_undef(em_Anv_mesh,som_emi_Anv, &
+       CALL normal2_undef(em_Anv_mesh,som_emi_Anv, &
    cc_Anv_mesh)
-        call normal2_undef(tcld_Anv_mesh,som_tcld_Anv, &
+        CALL normal2_undef(tcld_Anv_mesh,som_tcld_Anv, &
    cc_Anv_mesh)
-        call normal2_undef(pcld_Anv_mesh,som_pcld_Anv, &
+        CALL normal2_undef(pcld_Anv_mesh,som_pcld_Anv, &
    cc_Anv_mesh)
 
 
-        call normal2_undef(em_hist_mesh,som_emi_hist, &
+        CALL normal2_undef(em_hist_mesh,som_emi_hist, &
    cc_hist_mesh)
-        call normal2_undef(iwp_hist_mesh,som_iwp_hist, &
+        CALL normal2_undef(iwp_hist_mesh,som_iwp_hist, &
    cc_hist_mesh)
-        call normal2_undef(deltaz_hist_mesh,som_deltaz_hist, &
+        CALL normal2_undef(deltaz_hist_mesh,som_deltaz_hist, &
    cc_hist_mesh)
-        call normal2_undef(rad_hist_mesh,som_rad_hist, &
+        CALL normal2_undef(rad_hist_mesh,som_rad_hist, &
    cc_hist_mesh)
 
@@ -1102,7 +1102,7 @@
         endif                  ! if N_CS>0
 
-        end subroutine sim_mesh
-
-        subroutine test_bornes(sx,x,bsup,binf)
+        END SUBROUTINE  sim_mesh
+
+        SUBROUTINE test_bornes(sx,x,bsup,binf)
 
         REAL, intent(in) :: x, bsup, binf
@@ -1116,10 +1116,10 @@
         endif
  
-        end subroutine test_bornes
+        END SUBROUTINE  test_bornes
 
         end module m_simu_airs
 
 
-        subroutine simu_airs &
+        SUBROUTINE simu_airs &
    (itap, rneb_airs, temp_airs, cldemi_airs, iwcon0_airs, rad_airs, &
    geop_airs, pplay_airs, paprs_airs, &
@@ -1239,5 +1239,5 @@
 !        if (itap .eq. 1 ) then
 
-        call sim_mesh(rneb_1D, temp_1D, emis_1D, iwcon_1D, rad_1D, &
+        CALL sim_mesh(rneb_1D, temp_1D, emis_1D, iwcon_1D, rad_1D, &
    pres_1D, dz_1D, rhodz_1D, &
    cc_tot_mesh, cc_hc_mesh, cc_hist_mesh, &
@@ -1262,7 +1262,7 @@
 ! Definition des variables a ecrire dans le fichier de sortie
 
-        call normal2_undef(map_prop_hc(i),cc_hc_mesh, &
+        CALL normal2_undef(map_prop_hc(i),cc_hc_mesh, &
    cc_tot_mesh)
-        call normal2_undef(map_prop_hist(i),cc_hist_mesh, &
+        CALL normal2_undef(map_prop_hist(i),cc_hist_mesh, &
    cc_tot_mesh)
 
@@ -1303,4 +1303,4 @@
         
 
-        end subroutine simu_airs
-
+        END SUBROUTINE  simu_airs
+
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/soil.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/soil.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/soil.F90	(revision 5103)
@@ -252,5 +252,5 @@
   ELSE
      WRITE(lunout,*) "valeur d indice non prevue", indice
-     call abort_physic("soil", "", 1)
+     CALL abort_physic("soil", "", 1)
   ENDIF
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/solarlong.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/solarlong.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/solarlong.F90	(revision 5103)
@@ -76,5 +76,5 @@
     pperi_day = r_peri + 180.
     WRITE (lunout, *) ' Number of days in a year = ', pyear_day
-    ! call iniorbit(249.22,206.66,669.,485.,25.2)
+    ! CALL iniorbit(249.22,206.66,669.,485.,25.2)
     CALL iniorbit(152.59, 146.61, pyear_day, pperi_day, r_incl)
     first = .FALSE.
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/stdlevvar_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/stdlevvar_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/stdlevvar_mod.F90	(revision 5103)
@@ -311,5 +311,5 @@
 
       RETURN
-      END subroutine stdlevvar
+      END SUBROUTINE stdlevvar
 
       SUBROUTINE stdlevvarn(klon, knon, nsrf, zxli, &
@@ -752,5 +752,5 @@
 
       RETURN
-      END subroutine stdlevvarn
+      END SUBROUTINE stdlevvarn
 
 END MODULE stdlevvar_mod
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/stratosphere_mask.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/stratosphere_mask.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/stratosphere_mask.F90	(revision 5103)
@@ -50,5 +50,5 @@
 REAL, PARAMETER                        :: pliml=7500.
 REAL, PARAMETER                        :: gamma=-0.002
-LOGICAL, PARAMETER                     :: dofill=.true.
+LOGICAL, PARAMETER                     :: dofill=.TRUE.
 REAL,DIMENSION(klon)                   :: tp
 REAL,DIMENSION(klev)                   :: t, p
@@ -66,5 +66,5 @@
   psrf=pplay(i,1)
   zsrf=pphis(i)/RG           !--altitude de la surface
-  call twmo(missing_val, klev, t, p, psrf, zsrf, plimu, pliml, gamma, ptrp, ttrp, ztrp)
+  CALL twmo(missing_val, klev, t, p, psrf, zsrf, plimu, pliml, gamma, ptrp, ttrp, ztrp)
   tp(i)=ptrp
   p_tropopause(i)=ptrp
@@ -107,5 +107,5 @@
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-subroutine twmo(missing_val, level, t, p, ps, zs, plimu, pliml, gamma, ptrp, ttrp, ztrp)
+SUBROUTINE twmo(missing_val, level, t, p, ps, zs, plimu, pliml, gamma, ptrp, ttrp, ztrp)
 
 ! reference: Reichler, T., M. Dameris, and R. Sausen (GRL, 10.1029/2003GL018240, 2003)
@@ -137,5 +137,5 @@
 faktor = -RG/RD
 
-do j=level,2,-1
+DO j=level,2,-1
 
    ! dt/dz
@@ -206,7 +206,7 @@
 
 jj = LEVEL                                       ! bottom
-do while ((P(jj)>PS) .or. (T(jj)<100))     ! T must be valid too
+DO while ((P(jj)>PS) .or. (T(jj)<100))     ! T must be valid too
   jj=jj-1
-enddo
+END DO
 
 DLNP = log(PS/P(jj))                             ! from surface pressure
@@ -214,10 +214,10 @@
 TDLNP = TM*DLNP
 
-do while ( (JJ>=2) .and. (PTRP<P(jj-1)) )
+DO while ( (JJ>=2) .and. (PTRP<P(jj-1)) )
   DLNP = log(P(jj)/P(jj-1))
   TM = 0.5 * (T(jj) + T(jj-1))
   TDLNP = TDLNP + TM*DLNP
   JJ=JJ-1
-enddo
+END DO
 
 DLNP = log(P(jj)/PTRP)                           ! up to tropopause pressure
@@ -228,9 +228,9 @@
 
 !!if (ZTRP .lt. 0) then
-!!  print*,'ZTRP=',ZTRP
-!!  print*,'PS=',PS
-!!  print*,'P=',P
-!!  print*,'T=',T
-!!  print*,'ZS=',ZS
+!!  PRINT*,'ZTRP=',ZTRP
+!!  PRINT*,'PS=',PS
+!!  PRINT*,'P=',P
+!!  PRINT*,'T=',T
+!!  PRINT*,'ZS=',ZS
 !!  stop
 !!endif
@@ -246,7 +246,7 @@
     b0 = b
 
-enddo 
+END DO
 
 ! no tropopouse found
 return
-end subroutine twmo
+END SUBROUTINE  twmo
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/suphel.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/suphel.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/suphel.F90	(revision 5103)
@@ -55,5 +55,5 @@
   ! exp1      R_peri = 102.04
   ! exp1      R_incl = 22.5
-  ! exp1      print*, 'Parametres orbitaux modifies'
+  ! exp1      PRINT*, 'Parametres orbitaux modifies'
   ! ref      R_ecc = 0.016724
   ! ref      R_peri = 102.04
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/surf_land_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/surf_land_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/surf_land_mod.F90	(revision 5103)
@@ -180,8 +180,8 @@
         do i=1,knon
           if (iso_eau.gt.0) then
-            call iso_verif_egalite_choix(precip_snow(i), &
+            CALL iso_verif_egalite_choix(precip_snow(i), &
             xtprecip_snow(iso_eau,i),'surf_land_mod 129', &
             errmax,errmaxrel)
-            call iso_verif_egalite_choix(qsol(i), &
+            CALL iso_verif_egalite_choix(qsol(i), &
             xtsol(iso_eau,i),'surf_land_mod 139', &
             errmax,errmaxrel)
@@ -193,5 +193,5 @@
         do i=1,knon
          do ixt=1,ntiso
-           call iso_verif_noNaN(xtprecip_snow(ixt,i),'surf_land 146')
+           CALL iso_verif_noNaN(xtprecip_snow(ixt,i),'surf_land 146')
          enddo
         enddo
@@ -201,5 +201,5 @@
 
 !**************************************************************************************** 
-! Choice between call to vegetation model (ok_veget=true) or simple calculation below
+! Choice between CALL to vegetation model (ok_veget=true) or simple calculation below
 
 !****************************************************************************************
@@ -253,5 +253,5 @@
      do i=1,knon
         if (iso_eau.gt.0) then
-             call iso_verif_egalite_choix(xtevap(iso_eau,i),evap(i), &
+             CALL iso_verif_egalite_choix(xtevap(iso_eau,i),evap(i), &
               'surf_land 197',errmax,errmaxrel)
         endif !if (iso_eau.gt.0) then      
@@ -268,5 +268,5 @@
     ELSE  ! not ok_veget
 !****************************************************************************************
-! No extern vegetation model choosen, call simple bucket calculations instead.
+! No extern vegetation model choosen, CALL simple bucket calculations instead.
 
 !****************************************************************************************
@@ -274,5 +274,5 @@
 #ifdef ISOVERIF
 !       write(*,*) 'surf_land 247'
-        call iso_verif_egalite_vect1D( &
+        CALL iso_verif_egalite_vect1D( &
              xtsnow,snow,'surf_land_mod 207',niso,klon)
 #endif
@@ -281,5 +281,5 @@
 #ifdef ISO
         if (nudge_qsol.eq.1) then
-          call surf_land_nudge_qsol(knon,rlat,rlon,qsol,xtsol,knindex)
+          CALL surf_land_nudge_qsol(knon,rlat,rlon,qsol,xtsol,knindex)
         endif
         !write(*,*) 'surf_land 258'
@@ -325,5 +325,5 @@
       DO i=1,knon
         IF (iso_eau >= 0) THEN
-             call iso_verif_egalite_choix(xtsnow(iso_eau,i),snow(i), &
+             CALL iso_verif_egalite_choix(xtsnow(iso_eau,i),snow(i), &
               'surf_land 241',errmax,errmaxrel)
         ENDIF !if (iso_eau.gt.0) then      
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/surf_land_orchidee_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/surf_land_orchidee_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/surf_land_orchidee_mod.F90	(revision 5103)
@@ -246,5 +246,5 @@
 ! Test of coherence between variable ok_veget and cpp key CPP_VEGET
 #ifndef CPP_VEGET
-       abort_message='Pb de coherence: ok_veget = .true. mais CPP_VEGET = .false.'
+       abort_message='Pb de coherence: ok_veget = .TRUE. mais CPP_VEGET = .FALSE.'
        CALL abort_physic(modname,abort_message,1)
 #endif
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 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/surf_land_orchidee_nofrein_mod.F90	(revision 5103)
@@ -232,5 +232,5 @@
 ! Test of coherence between variable ok_veget and cpp key CPP_VEGET
 #ifndef CPP_VEGET
-       abort_message='Pb de coherence: ok_veget = .true. mais CPP_VEGET = .false.'
+       abort_message='Pb de coherence: ok_veget = .TRUE. mais CPP_VEGET = .FALSE.'
        CALL abort_physic(modname,abort_message,1)
 #endif
@@ -631,5 +631,5 @@
          ENDDO
        ELSE
-       print*,'sonia : knon_glo,ij,jj', knon_glo, ij,jj
+       PRINT*,'sonia : knon_glo,ij,jj', knon_glo, ij,jj
        
        DO igrid = 1, knon_glo
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 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/surf_land_orchidee_nolic_mod.F90	(revision 5103)
@@ -239,5 +239,5 @@
 ! Test of coherence between variable ok_veget and cpp key CPP_VEGET
 #ifndef CPP_VEGET
-       abort_message='Pb de coherence: ok_veget = .true. mais CPP_VEGET = .false.'
+       abort_message='Pb de coherence: ok_veget = .TRUE. mais CPP_VEGET = .FALSE.'
        CALL abort_physic(modname,abort_message,1)
 #endif
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 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/surf_land_orchidee_nounstruct_mod.F90	(revision 5103)
@@ -222,5 +222,5 @@
 ! Test of coherence between variable ok_veget and cpp key CPP_VEGET
 #ifndef CPP_VEGET
-       abort_message='Pb de coherence: ok_veget = .true. mais CPP_VEGET = .false.'
+       abort_message='Pb de coherence: ok_veget = .TRUE. mais CPP_VEGET = .FALSE.'
        CALL abort_physic(modname,abort_message,1)
 #endif
@@ -628,5 +628,5 @@
          ENDDO
        ELSE
-       print*,'sonia : knon_glo,ij,jj', knon_glo, ij,jj
+       PRINT*,'sonia : knon_glo,ij,jj', knon_glo, ij,jj
        
        DO igrid = 1, knon_glo
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 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/surf_land_orchidee_noz0h_mod.F90	(revision 5103)
@@ -229,5 +229,5 @@
 ! Test of coherence between variable ok_veget and cpp key CPP_VEGET
 #ifndef CPP_VEGET
-       abort_message='Pb de coherence: ok_veget = .true. mais CPP_VEGET = .false.'
+       abort_message='Pb de coherence: ok_veget = .TRUE. mais CPP_VEGET = .FALSE.'
        CALL abort_physic(modname,abort_message,1)
 #endif
@@ -631,5 +631,5 @@
          ENDDO
        ELSE
-       print*,'sonia : knon_glo,ij,jj', knon_glo, ij,jj
+       PRINT*,'sonia : knon_glo,ij,jj', knon_glo, ij,jj
        
        DO igrid = 1, knon_glo
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/surf_landice_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/surf_landice_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/surf_landice_mod.F90	(revision 5103)
@@ -227,5 +227,5 @@
       PRINT*, 'alb_nir_sno_lic', alb_nir_sno_lic
 
-      firstcall = .false.
+      firstcall = .FALSE.
     ENDIF
     !******************************************************************************************
@@ -248,5 +248,5 @@
     !****************************************************************************************
     !  landice_opt = 0 : soil_model, calcul_flux, fonte_neige, ...
-    !  landice_opt = 1  : prepare and call INterace Lmdz SISvat (INLANDSIS)
+    !  landice_opt = 1  : prepare and CALL INterace Lmdz SISvat (INLANDSIS)
     !****************************************************************************************
 
@@ -263,5 +263,5 @@
 
         debut_is = debut
-        lafin_is = .false.
+        lafin_is = .FALSE.
         ! Suppose zero surface speed
         u0(:) = 0.0
@@ -299,5 +299,5 @@
 
         IF (lafin) THEN
-          lafin_is = .true.
+          lafin_is = .TRUE.
         END IF
 
@@ -312,5 +312,5 @@
                 emis_new, z0m, z0h, qsurf)
 
-        debut_is = .false.
+        debut_is = .FALSE.
 
 
@@ -330,5 +330,5 @@
 
       ELSE
-        abort_message = 'Pb de coherence: landice_opt = 1  mais CPP_INLANDSIS = .false.'
+        abort_message = 'Pb de coherence: landice_opt = 1  mais CPP_INLANDSIS = .FALSE.'
         CALL abort_physic(modname, abort_message, 1)
       END IF
@@ -506,12 +506,12 @@
 
             if (precip_snow(j) > abs(fluxbs_1(j))) then
-              ok_remaining_freshsnow(j) = .true.
+              ok_remaining_freshsnow(j) = .TRUE.
               bsweight_fresh(j) = 1.
             else
-              ok_remaining_freshsnow(j) = .false.
+              ok_remaining_freshsnow(j) = .FALSE.
               bsweight_fresh(j) = exp(-(abs(fluxbs_1(j)) - precip_snow(j)) / precip_snow(j))
             endif
           else
-            ok_remaining_freshsnow(j) = .false.
+            ok_remaining_freshsnow(j) = .FALSE.
             fluxbs_1(j) = 0.
             bsweight_fresh(j) = 0.
@@ -626,5 +626,5 @@
      )
 
-!        call fonte_neige_export_xtrun_off_lic_0(knon,xtrun_off_lic_0_diag)
+!        CALL fonte_neige_export_xtrun_off_lic_0(knon,xtrun_off_lic_0_diag)
 
 #endif
@@ -639,5 +639,5 @@
     ! Send run-off on land-ice to coupler if coupled ocean.
     ! run_off_lic has been calculated in fonte_neige or surf_inlandsis
-    ! If landice_opt>=2, corresponding call is done from surf_land_orchidee
+    ! If landice_opt>=2, corresponding CALL is done from surf_land_orchidee
     !****************************************************************************************
     IF (type_ocean=='couple' .AND. landice_opt < 2) THEN
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/surf_ocean_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/surf_ocean_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/surf_ocean_mod.F90	(revision 5103)
@@ -46,5 +46,5 @@
     USE config_ocean_skin_m, ONLY: activate_ocean_skin
 
-    ! This subroutine will make a call to ocean_XXX_noice according to the ocean mode (force, 
+    ! This SUBROUTINE will make a CALL to ocean_XXX_noice according to the ocean mode (force,
     ! slab or couple). The calculations of albedo and rugosity for the ocean surface are 
     ! done in here because they are identical for the different modes of ocean. 
@@ -380,5 +380,5 @@
     if (activate_ocean_skin >= 1) then
        if (type_ocean /= 'couple') sss(:knon) = 35.
-       call bulk_flux(tkt, tks, taur, dter, dser, t_int, s_int, ds_ns, dt_ns, &
+       CALL bulk_flux(tkt, tks, taur, dter, dser, t_int, s_int, ds_ns, dt_ns, &
             u = windsp(:knon), t_ocean_1 = tsurf_new(:knon), s1 = sss(:knon), &
             rain = precip_rain(:knon) + precip_totsnow(:knon), &
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/surf_seaice_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/surf_seaice_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/surf_seaice_mod.F90	(revision 5103)
@@ -38,5 +38,5 @@
 #endif
 
-! This subroutine will make a call to ocean_XXX_ice according to the ocean mode (force, 
+! This SUBROUTINE will make a CALL to ocean_XXX_ice according to the ocean mode (force,
 ! slab or couple). The calculation of rugosity for the sea-ice surface is also done
 ! in here because it is the same calculation for the different modes of ocean.
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/sw_aeroAR4.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/sw_aeroAR4.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/sw_aeroAR4.F90	(revision 5103)
@@ -570,5 +570,5 @@
 ! net anthropogenic forcing direct and 1st indirect effect diagnostics
 ! requires a natural aerosol field read and used 
-! Difference of net fluxes from double call to radiation
+! Difference of net fluxes from double CALL to radiation
 
 IF (ok_ade) THEN
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/time_phylmdz_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/time_phylmdz_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/time_phylmdz_mod.F90	(revision 5103)
@@ -78,5 +78,5 @@
 
   SUBROUTINE update_time(pdtphys_)
-  ! This subroutine updates the module saved variables.
+  ! This SUBROUTINE updates the module saved variables.
   USE ioipsl, ONLY: ymds2ju
   USE phys_cal_mod, ONLY: phys_cal_update
@@ -91,5 +91,5 @@
     ! Check if the physics timestep has changed
     IF ( ABS( (pdtphys-pdtphys_) / ((pdtphys+pdtphys_)/2))> 10.*EPSILON(pdtphys_)) THEN
-       WRITE(lunout,*) "WARNING ! Physics time step changes from a call to the next",pdtphys_,pdtphys
+       WRITE(lunout,*) "WARNING ! Physics time step changes from a CALL to the next",pdtphys_,pdtphys
        WRITE(lunout,*) "Not sure the physics parametrizations can handle this..."
     ENDIF
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/tracco2i_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/tracco2i_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/tracco2i_mod.F90	(revision 5103)
@@ -15,5 +15,5 @@
 
   SUBROUTINE tracco2i_init()
-    ! This subroutine calls carbon_cycle_init needed to be done before first call to phys_output_write in physiq.
+    ! This SUBROUTINE calls carbon_cycle_init needed to be done before first CALL to phys_output_write in physiq.
     USE carbon_cycle_mod, ONLY: carbon_cycle_init, carbon_cycle_cpl
 
@@ -129,5 +129,5 @@
     ENDDO
 
-!--call CO2 emission routine 
+!--CALL CO2 emission routine
 !--co2bb is zero for now
 !--unit kg CO2 m-2 s-1 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/tracinca_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/tracinca_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/tracinca_mod.F90	(revision 5103)
@@ -16,5 +16,5 @@
 
   SUBROUTINE tracinca_init(aerosol,lessivage)
-    ! This subroutine initialize some control varaibles. 
+    ! This SUBROUTINE initialize some control varaibles.
 
     USE infotrac_phy, ONLY: nbtr, type_trac
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/traclmdz_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/traclmdz_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/traclmdz_mod.F90	(revision 5103)
@@ -62,6 +62,6 @@
 
   SUBROUTINE traclmdz_from_restart(trs_in)
-    ! This subroutine initialize the module saved variable trs with values from restart file (startphy.nc). 
-    ! This subroutine is called from phyetat0 after the field trs_in has been read.
+    ! This SUBROUTINE initialize the module saved variable trs with values from restart file (startphy.nc).
+    ! This SUBROUTINE is called from phyetat0 after the field trs_in has been read.
     
     USE dimphy
@@ -85,5 +85,5 @@
 
   SUBROUTINE traclmdz_init(pctsrf, xlat, xlon, ftsol, tr_seri, t_seri, pplay, sh, pdtphys, aerosol, lessivage)
-    ! This subroutine allocates and initialize module variables and control variables.
+    ! This SUBROUTINE allocates and initialize module variables and control variables.
     ! Initialization of the tracers should be done here only for those not found in the restart file.
     USE dimphy
@@ -136,5 +136,5 @@
     ALLOCATE( radio(nbtr), stat=ierr)
     IF (ierr /= 0) CALL abort_physic('traclmdz_init', 'pb in allocation 11',1)
-    radio(:) = .false.    ! Par defaut pas decroissance radioactive
+    radio(:) = .FALSE.    ! Par defaut pas decroissance radioactive
     
     ALLOCATE( masktr(klon,nbtr), stat=ierr)
@@ -158,9 +158,9 @@
     lessivage  = .TRUE.
 !!jyg(20130206) : le choix d activation du lessivage est fait dans phytrac avec iflag_lscav
-!!    call getin('lessivage',lessivage)
+!!    CALL getin('lessivage',lessivage)
 !!    if(lessivage) then
-!!     print*,'lessivage lsc ON'
+!!     PRINT*,'lessivage lsc ON'
 !!    else
-!!     print*,'lessivage lsc OFF'
+!!     PRINT*,'lessivage lsc OFF'
 !!    endif
     aerosol(:) = .FALSE.  ! Tous les traceurs sont des gaz par defaut
@@ -574,5 +574,5 @@
 
   SUBROUTINE traclmdz_to_restart(trs_out)
-    ! This subroutine is called from phyredem.F where the module 
+    ! This SUBROUTINE is called from phyredem.F where the module
     ! variable trs is written to restart file (restartphy.nc)
     USE dimphy
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/tracreprobus_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/tracreprobus_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/tracreprobus_mod.F90	(revision 5103)
@@ -1,5 +1,5 @@
 MODULE tracreprobus_mod
 
-! This module prepares and calls the Reprobus main subroutine 
+! This module prepares and calls the Reprobus main SUBROUTINE
 
 CONTAINS
@@ -75,5 +75,5 @@
 ! verif valeurs extremes
 ! correction: a 1.e-30 quand =0 ou negatif et
-! call abort si >ou= 1.e10
+! CALL abort si >ou= 1.e10
 !          WRITE(*,*)it,'nqtot',nqtot,'nbtr',nbtr
 !          IF (it < nqtot) THEN
@@ -107,5 +107,5 @@
 ! verif valeurs extremes
 ! correction: a 1.e-30 quand =0 ou negatif et
-! call abort si >ou= 1.e10
+! CALL abort si >ou= 1.e10
 !          WRITE(*,*)it,'nqtot',nqtot,'nbtr',nbtr
 !          IF (it < nqtot) THEN
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/undefSTD.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/undefSTD.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/undefSTD.F90	(revision 5103)
@@ -5,7 +5,5 @@
   USE netcdf, ONLY: nf90_fill_real
   USE dimphy
-#ifdef CPP_IOIPSL 
   USE phys_state_var_mod
-#endif
   USE wxios, ONLY: missing_val_xios => missing_val, using_xios
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/vdif_kcay.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/vdif_kcay.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/vdif_kcay.F90	(revision 5103)
@@ -338,5 +338,5 @@
   END IF
 
-  ! (abd 5 2)      print*,'LONG0=',long0
+  ! (abd 5 2)      PRINT*,'LONG0=',long0
 
   ! -----------------------------------------------------------------------
@@ -385,5 +385,5 @@
       ! abd
       ! if(ilev.le.57.and.ilev.ge.37) then
-      ! print*,'L=',ilev,'   GN=',gn,'  SM=',sm(igrid,ilev)
+      ! PRINT*,'L=',ilev,'   GN=',gn,'  SM=',sm(igrid,ilev)
       ! endif
       ! --->
@@ -408,5 +408,5 @@
         snstable = snstable*snstable
 
-        ! abde       print*,'SN ',ilev,sn(1,ilev),snstable
+        ! abde       PRINT*,'SN ',ilev,sn(1,ilev),snstable
         IF (sn(igrid,ilev)<snstable) THEN
           sn(igrid, ilev) = snstable
@@ -505,5 +505,5 @@
       mcstat = sqrt(m2cstat)
 
-      ! abde      print*,'M2 L=',ilev,mpre(igrid,ilev),mcstat
+      ! abde      PRINT*,'M2 L=',ilev,mpre(igrid,ilev),mcstat
 
       ! -----{puis on ecrit la valeur de q qui annule l'equation de m
@@ -534,5 +534,5 @@
       m(igrid, ilev) = mcstat
       ! abd       if(ilev.le.57.and.ilev.ge.37) then
-      ! print*,'L=',ilev,'   M2=',m2(igrid,ilev),m2cstat,
+      ! PRINT*,'L=',ilev,'   M2=',m2(igrid,ilev),m2cstat,
       ! s     'N2=',n2(igrid,ilev)
       ! abd       endif
@@ -562,5 +562,5 @@
       ! abd
       ! if(ilev.le.57.and.ilev.ge.37) then
-      ! print*,'L=',ilev,'   GN=',gn,'  SM=',sm(igrid,ilev)
+      ! PRINT*,'L=',ilev,'   GN=',gn,'  SM=',sm(igrid,ilev)
       ! endif
 
@@ -595,7 +595,7 @@
       sssq = sssq + (plev(1,ilev-1)-plev(1,ilev+1))*q2(1, ilev)
     END DO
-    ! print*,'Q2moy avant',sssq/sss
-    ! print*,'Q2q20 ',(q2(1,ilev),ilev=1,10)
-    ! print*,'Q2km0 ',(km(1,ilev),ilev=1,10)
+    ! PRINT*,'Q2moy avant',sssq/sss
+    ! PRINT*,'Q2q20 ',(q2(1,ilev),ilev=1,10)
+    ! PRINT*,'Q2km0 ',(km(1,ilev),ilev=1,10)
     ! ! C'est quoi ca qu'etait dans l'original???
     ! do igrid=1,ngrid
@@ -604,5 +604,5 @@
     ! q2s=q2
     ! do iii=1,10
-    ! call vdif_q2(dt,g,rconst,plev,temp,km,q2)
+    ! CALL vdif_q2(dt,g,rconst,plev,temp,km,q2)
     ! do ilev=1,klev+1
     ! write(iii+49,*) q2(1,ilev),zlev(1,ilev)
@@ -611,9 +611,9 @@
     ! stop
     ! do ilev=1,klev
-    ! print*,zlev(1,ilev),q2s(1,ilev),q2(1,ilev)
+    ! PRINT*,zlev(1,ilev),q2s(1,ilev),q2(1,ilev)
     ! enddo
     ! q2s=q2-q2s
     ! do ilev=1,klev
-    ! print*,q2s(1,ilev),zlev(1,ilev)
+    ! PRINT*,q2s(1,ilev),zlev(1,ilev)
     ! enddo
     DO ilev = 2, klev - 1
@@ -648,5 +648,5 @@
           snstable = snstable*snstable
 
-          ! abde      print*,'SN ',ilev,sn(1,ilev),snstable
+          ! abde      PRINT*,'SN ',ilev,sn(1,ilev),snstable
           IF (sn(igrid,ilev)<snstable) THEN
             sn(igrid, ilev) = snstable
@@ -667,5 +667,5 @@
       END DO
     END DO
-    ! print*,'Q2km1 ',(km(1,ilev),ilev=1,10)
+    ! PRINT*,'Q2km1 ',(km(1,ilev),ilev=1,10)
 
   END IF
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/water_int.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/water_int.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/water_int.F90	(revision 5103)
@@ -1,3 +1,3 @@
-subroutine water_int(klon,klev,field3d,mass,field2d)
+SUBROUTINE water_int(klon,klev,field3d,mass,field2d)
 
 !=============================================================
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/write_bilKP_ave.h
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/write_bilKP_ave.h	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/write_bilKP_ave.h	(revision 5103)
@@ -150,5 +150,5 @@
 C
       if (ok_sync) then
-        call histsync(nid_bilKPave)
+        CALL histsync(nid_bilKPave)
       endif
        ENDIF
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/write_bilKP_ins.h
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/write_bilKP_ins.h	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/write_bilKP_ins.h	(revision 5103)
@@ -174,5 +174,5 @@
 C
       if (ok_sync) then
-        call histsync(nid_bilKPins)
+        CALL histsync(nid_bilKPins)
       endif
        ENDIF
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/write_histREGDYN.h
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/write_histREGDYN.h	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/write_histREGDYN.h	(revision 5103)
@@ -56,5 +56,5 @@
 
       if (ok_sync) then
-        call histsync(nid_regdyn)
+        CALL histsync(nid_regdyn)
       endif
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/write_histday_seri.h
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/write_histday_seri.h	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/write_histday_seri.h	(revision 5103)
@@ -158,5 +158,5 @@
 
       if (ok_sync) then
-        call histsync(nid_day_seri)
+        CALL histsync(nid_day_seri)
       endif
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/yamada.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/yamada.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/yamada.F90	(revision 5103)
@@ -153,5 +153,5 @@
       l0(ig) = 0.2*sqz(ig)/sq(ig)
     END DO
-    ! (abd 3 5 2)         print*,'ITER=',iter,'  L0=',l0
+    ! (abd 3 5 2)         PRINT*,'ITER=',iter,'  L0=',l0
 
   END DO
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/yamada4.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/yamada4.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/yamada4.F90	(revision 5103)
@@ -13,5 +13,5 @@
   ! ************************************************************************************************
 
-  ! yamada4: subroutine qui calcule le transfert turbulent avec une fermeture d'ordre 2 ou 2.5
+  ! yamada4: SUBROUTINE qui calcule le transfert turbulent avec une fermeture d'ordre 2 ou 2.5
 
   ! Reference: Simulation of nocturnal drainage flows by a q2l Turbulence Closure Model
@@ -235,5 +235,5 @@
         rif(ig, k) = rifc
       END IF
-if (new_yamada4) then
+IF (new_yamada4) then
         alpha(ig, k) = max(falpha(rif(ig,k)),seuilalpha)
         sm(ig, k) = max(fsm(rif(ig,k)),seuilsm)
@@ -715,5 +715,5 @@
   IMPLICIT NONE
  
-!    vdif_q2: subroutine qui calcule la diffusion de la TKE par la TKE
+!    vdif_q2: SUBROUTINE qui calcule la diffusion de la TKE par la TKE
 !             avec un schema implicite en temps avec 
 !             inversion d'un syst??me tridiagonal
@@ -804,5 +804,5 @@
   IMPLICIT NONE
 
-! vdif_q2e: subroutine qui calcule la diffusion de TKE par la TKE
+! vdif_q2e: SUBROUTINE qui calcule la diffusion de TKE par la TKE
 !           avec un schema explicite en temps
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/yamada_c.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/yamada_c.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/yamada_c.F90	(revision 5103)
@@ -82,6 +82,6 @@
       integer ipas
       save first,ipas
-!FH/IM     data first,ipas/.true.,0/
-      data first,ipas/.false.,0/
+!FH/IM     data first,ipas/.TRUE.,0/
+      data first,ipas/.FALSE.,0/
 !$OMP THREADPRIVATE( first,ipas)
        INTEGER, SAVE :: iflag_tke_diff=0
@@ -116,5 +116,5 @@
       real lyam(klon,klev),knyam(klon,klev)
       real w2yam(klon,klev),t2yam(klon,klev)
-      logical,save :: firstcall=.true.
+      logical,save :: firstcall=.TRUE.
 !$OMP THREADPRIVATE(firstcall)       
       CHARACTER(len=20),PARAMETER :: modname="yamada_c"
@@ -139,7 +139,7 @@
 #define IOPHYS
 #ifdef IOPHYS
-!        call iophys_ini(timestep)
-#endif
-        firstcall=.false.
+!        CALL iophys_ini(timestep)
+#endif
+        firstcall=.FALSE.
       endif
 
@@ -147,8 +147,8 @@
 
 #ifdef IOPHYS
-if (okiophys) then
-call iophys_ecrit('q2i',klev,'q2 debut my','m2/s2',q2(:,1:klev))
-call iophys_ecrit('kmi',klev,'Kz debut my','m/s2',km(:,1:klev))
-endif
+IF (okiophys) then
+CALL iophys_ecrit('q2i',klev,'q2 debut my','m2/s2',q2(:,1:klev))
+CALL iophys_ecrit('kmi',klev,'Kz debut my','m/s2',km(:,1:klev))
+END IF
 #endif
 
@@ -212,18 +212,18 @@
 
 #ifdef IOPHYS
-if (okiophys) then
-      call iophys_ecrit('zlay',klev,'Geop','m',zlay)
-      call iophys_ecrit('teta',klev,'teta','K',teta)
-      call iophys_ecrit('temp',klev,'temp','K',zt)
-      call iophys_ecrit('pt',klev,'temp','K',pt)
-      call iophys_ecrit('pu',klev,'u','m/s',pu)
-      call iophys_ecrit('pv',klev,'v','m/s',pv)
-      call iophys_ecrit('d_u',klev,'d_u','m/s2',d_u)
-      call iophys_ecrit('d_v',klev,'d_v','m/s2',d_v)
-      call iophys_ecrit('d_t',klev,'d_t','K/s',d_t)
-      call iophys_ecrit('exner',klev,'exner','',exner)
-      call iophys_ecrit('masse',klev,'masse','',masse)
-      call iophys_ecrit('masseb',klev,'masseb','',masseb)
-endif
+IF (okiophys) then
+      CALL iophys_ecrit('zlay',klev,'Geop','m',zlay)
+      CALL iophys_ecrit('teta',klev,'teta','K',teta)
+      CALL iophys_ecrit('temp',klev,'temp','K',zt)
+      CALL iophys_ecrit('pt',klev,'temp','K',pt)
+      CALL iophys_ecrit('pu',klev,'u','m/s',pu)
+      CALL iophys_ecrit('pv',klev,'v','m/s',pv)
+      CALL iophys_ecrit('d_u',klev,'d_u','m/s2',d_u)
+      CALL iophys_ecrit('d_v',klev,'d_v','m/s2',d_v)
+      CALL iophys_ecrit('d_t',klev,'d_t','K/s',d_t)
+      CALL iophys_ecrit('exner',klev,'exner','',exner)
+      CALL iophys_ecrit('masse',klev,'masse','',masse)
+      CALL iophys_ecrit('masseb',klev,'masseb','',masseb)
+END IF
 #endif
 
@@ -327,5 +327,5 @@
                                                           enddo
       enddo
-!     print*,'L0 cas 8 ou 10 ',l0
+!     PRINT*,'L0 cas 8 ou 10 ',l0
 
       else
@@ -341,5 +341,5 @@
                                                           enddo
           enddo
-!     print*,'L0 cas autres ',l0
+!     PRINT*,'L0 cas autres ',l0
 
       endif
@@ -347,10 +347,10 @@
 
 #ifdef IOPHYS
-if (okiophys) then
-call iophys_ecrit('rif',klev,'Flux Richardson','m',rif(:,1:klev))
-call iophys_ecrit('m2',klev,'m2 ','m/s',m2(:,1:klev))
-call iophys_ecrit('Km2app',klev,'m2 conserv','m/s',km(:,1:klev)*m2(:,1:klev))
-call iophys_ecrit('Km',klev,'Km','m2/s',km(:,1:klev))
-endif
+IF (okiophys) then
+CALL iophys_ecrit('rif',klev,'Flux Richardson','m',rif(:,1:klev))
+CALL iophys_ecrit('m2',klev,'m2 ','m/s',m2(:,1:klev))
+CALL iophys_ecrit('Km2app',klev,'m2 conserv','m/s',km(:,1:klev)*m2(:,1:klev))
+CALL iophys_ecrit('Km',klev,'Km','m2/s',km(:,1:klev))
+END IF
 #endif
 
@@ -362,5 +362,5 @@
 ELSE
 
-!  print*,'OK1'
+!  PRINT*,'OK1'
 
 ! Evolution of TKE under source terms K M2 and K N2
@@ -393,8 +393,8 @@
  
 #ifdef IOPHYS
-if (okiophys) then
-      call iophys_ecrit('km2',klev,'m2 conserv','m/s',km2(:,1:klev))
-      call iophys_ecrit('kn2',klev,'n2 conserv','m/s',kn2(:,1:klev))
-endif
+IF (okiophys) then
+      CALL iophys_ecrit('km2',klev,'m2 conserv','m/s',km2(:,1:klev))
+      CALL iophys_ecrit('kn2',klev,'n2 conserv','m/s',kn2(:,1:klev))
+END IF
 #endif
 
@@ -414,5 +414,5 @@
 !     ENDDO
 !  ENDIF
-!  print*,'iflag_pbl ',d_t_diss
+!  PRINT*,'iflag_pbl ',d_t_diss
 !###################################################################
 
@@ -451,7 +451,7 @@
 
 #ifdef IOPHYS
-if (okiophys) then
-call iophys_ecrit('q2b',klev,'KTE inter','m2/s',q2(:,1:klev))
-endif
+IF (okiophys) then
+CALL iophys_ecrit('q2b',klev,'KTE inter','m2/s',q2(:,1:klev))
+END IF
 #endif
 
@@ -469,16 +469,16 @@
 
 #ifdef IOPHYS
-if (okiophys) then
-call iophys_ecrit('mixingl',klev,'Mixing length','m',leff(:,1:klev))
-call iophys_ecrit('rife',klev,'Flux Richardson','m',rif(:,1:klev))
-call iophys_ecrit('q2f',klev,'KTE finale','m2/s',q2(:,1:klev))
-call iophys_ecrit('q2neg',klev,'KTE non bornee','m2/s',q2neg(:,1:klev))
-call iophys_ecrit('alpha',klev,'alpha','',alpha(:,1:klev))
-call iophys_ecrit('sm',klev,'sm','',sm(:,1:klev))
-call iophys_ecrit('q2f',klev,'KTE finale','m2/s',q2(:,1:klev))
-call iophys_ecrit('kmf',klev,'Kz final','m2/s',km(:,1:klev))
-call iophys_ecrit('knf',klev,'Kz final','m2/s',kn(:,1:klev))
-call iophys_ecrit('kqf',klev,'Kz final','m2/s',kq(:,1:klev))
-endif
+IF (okiophys) then
+CALL iophys_ecrit('mixingl',klev,'Mixing length','m',leff(:,1:klev))
+CALL iophys_ecrit('rife',klev,'Flux Richardson','m',rif(:,1:klev))
+CALL iophys_ecrit('q2f',klev,'KTE finale','m2/s',q2(:,1:klev))
+CALL iophys_ecrit('q2neg',klev,'KTE non bornee','m2/s',q2neg(:,1:klev))
+CALL iophys_ecrit('alpha',klev,'alpha','',alpha(:,1:klev))
+CALL iophys_ecrit('sm',klev,'sm','',sm(:,1:klev))
+CALL iophys_ecrit('q2f',klev,'KTE finale','m2/s',q2(:,1:klev))
+CALL iophys_ecrit('kmf',klev,'Kz final','m2/s',km(:,1:klev))
+CALL iophys_ecrit('knf',klev,'Kz final','m2/s',kn(:,1:klev))
+CALL iophys_ecrit('kqf',klev,'Kz final','m2/s',kq(:,1:klev))
+END IF
 #endif
 
@@ -487,5 +487,5 @@
 
 
-!  print*,'OK2'
+!  PRINT*,'OK2'
       RETURN
       END
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/yamada_ini_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/yamada_ini_mod.F90	(revision 5102)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/yamada_ini_mod.F90	(revision 5103)
@@ -43,5 +43,5 @@
     ALLOCATE (l0(klon))
 
-   new_yamada4=.false.
+   new_yamada4=.FALSE.
    CALL getin_p('new_yamada4',new_yamada4)
 
