Index: trunk/libf/dyn3d/conf_gcm.F
===================================================================
--- trunk/libf/dyn3d/conf_gcm.F	(revision 110)
+++ trunk/libf/dyn3d/conf_gcm.F	(revision 119)
@@ -376,4 +376,12 @@
        iphysiq = 5
        CALL getin('iphysiq', iphysiq)
+
+!Config  Key  = iflag_trac
+!Config  Desc = traceurs presents ou non
+!Config  Def  = 1
+!Config  Help = Permet de faire tourner le modele sans traceurs
+!Config         
+       iflag_trac = 1 
+       CALL getin('iflag_trac',iflag_trac)
 
 !Config  Key  = ip_ebil_dyn
@@ -657,4 +665,5 @@
       write(lunout,*)' iflag_phys = ', iflag_phys
       write(lunout,*)' iphysiq = ', iphysiq
+      write(lunout,*)' iflag_trac = ', iflag_trac
       write(lunout,*)' clonn = ', clonn 
       write(lunout,*)' clatt = ', clatt
@@ -894,4 +903,5 @@
       write(lunout,*)' iflag_phys = ', iflag_phys
       write(lunout,*)' iphysiq = ', iphysiq
+      write(lunout,*)' iflag_trac = ', iflag_trac
       write(lunout,*)' clon = ', clon
       write(lunout,*)' clat = ', clat
Index: trunk/libf/dyn3d/leapfrog.F
===================================================================
--- trunk/libf/dyn3d/leapfrog.F	(revision 110)
+++ trunk/libf/dyn3d/leapfrog.F	(revision 119)
@@ -448,4 +448,5 @@
          IF (first) THEN
 #include "ini_paramLMDZ_dyn.h"
+          first=.false.
          ENDIF
 c
@@ -863,6 +864,4 @@
       END IF ! of IF(.not.purmats)
 
-      first=.false.
-
       STOP
       END
Index: trunk/libf/dyn3d/logic.h
===================================================================
--- trunk/libf/dyn3d/logic.h	(revision 110)
+++ trunk/libf/dyn3d/logic.h	(revision 119)
@@ -15,6 +15,6 @@
      & apdiss,apdelq,saison,ecripar,fxyhypb,ysinus                      &
      &  ,read_start,ok_guide,ok_strato,ok_gradsfile                     &
-     &  ,ok_limit,ok_etat0,iflag_trac
+     &  ,ok_limit,ok_etat0
 
-      INTEGER iflag_phys
+      INTEGER iflag_phys,iflag_trac
 !-----------------------------------------------------------------------
Index: trunk/libf/dyn3dpar/conf_gcm.F
===================================================================
--- trunk/libf/dyn3dpar/conf_gcm.F	(revision 110)
+++ trunk/libf/dyn3dpar/conf_gcm.F	(revision 119)
@@ -388,4 +388,12 @@
        iphysiq = 5
        CALL getin('iphysiq', iphysiq)
+
+!Config  Key  = iflag_trac
+!Config  Desc = traceurs presents ou non
+!Config  Def  = 1
+!Config  Help = Permet de faire tourner le modele sans traceurs
+!Config         
+       iflag_trac = 1 
+       CALL getin('iflag_trac',iflag_trac)
 
 !Config  Key  = ip_ebil_dyn
@@ -679,4 +687,5 @@
       write(lunout,*)' iflag_phys = ', iflag_phys
       write(lunout,*)' iphysiq = ', iphysiq
+      write(lunout,*)' iflag_trac = ', iflag_trac
       write(lunout,*)' clonn = ', clonn 
       write(lunout,*)' clatt = ', clatt
@@ -947,4 +956,5 @@
       write(lunout,*)' iflag_phys = ', iflag_phys
       write(lunout,*)' iphysiq = ', iphysiq
+      write(lunout,*)' iflag_trac = ', iflag_trac
       write(lunout,*)' clon = ', clon
       write(lunout,*)' clat = ', clat
Index: trunk/libf/dyn3dpar/logic.h
===================================================================
--- trunk/libf/dyn3dpar/logic.h	(revision 110)
+++ trunk/libf/dyn3dpar/logic.h	(revision 119)
@@ -15,7 +15,7 @@
      & apdiss,apdelq,saison,ecripar,fxyhypb,ysinus                      &
      &  ,read_start,ok_guide,ok_strato,ok_gradsfile                     &
-     &  ,ok_limit,ok_etat0,iflag_trac
+     &  ,ok_limit,ok_etat0
 
-      INTEGER iflag_phys
+      INTEGER iflag_phys,iflag_trac
 !$OMP THREADPRIVATE(/logic/)
 !-----------------------------------------------------------------------
Index: trunk/libf/phytitan/clcdrag.F90
===================================================================
--- trunk/libf/phytitan/clcdrag.F90	(revision 110)
+++ trunk/libf/phytitan/clcdrag.F90	(revision 119)
@@ -39,7 +39,7 @@
 ! Variables locales :
       INTEGER :: i
-      REAL :: zdu2, ztsolv, ztvd, zscf
-      REAL :: zucf, zcr
-      REAL :: friv, frih
+      REAL :: zscf
+      REAL :: zucf
+      REAL :: FRIV,FRIH
       REAL, dimension(klon) :: zcfm1, zcfm2
       REAL, dimension(klon) :: zcfh1, zcfh2
@@ -93,5 +93,4 @@
             pcfh(i) = zcdn(i)* fins(zri(i))
           ENDIF
-  	  zcr = (0.0016/(zcdn(i)*SQRT(zdu2)))*ABS(ztvd-ztsolv)**(1./3.)
         ENDIF
       END DO
Index: trunk/libf/phytitan/init_phys_lmdz.F90
===================================================================
--- trunk/libf/phytitan/init_phys_lmdz.F90	(revision 110)
+++ trunk/libf/phytitan/init_phys_lmdz.F90	(revision 119)
@@ -15,5 +15,5 @@
 
     CALL init_grid_phy_lmdz(iim,jjp1,llm)
-    CALL init_dimphy(klon,nbp_lev)
+    CALL init_dimphy(klon_glo,nbp_lev)
  
 END SUBROUTINE init_phys_lmdz  
Index: trunk/libf/phytitan/optci.F
===================================================================
--- trunk/libf/phytitan/optci.F	(revision 110)
+++ trunk/libf/phytitan/optci.F	(revision 119)
@@ -1,4 +1,5 @@
       SUBROUTINE OPTCI(ykim,qaer,nmicro,IPRINT)
       use dimphy
+      use infotrac
 #include "dimensions.h"
 #include "microtab.h"
@@ -9,5 +10,5 @@
 c   ---------
       REAL    ykim(klon,klev,nqtot)
-      real    qaer(klon,nlayer,nqtot)
+      real    qaer(klon,klev,nqtot)
       integer nmicro
 c   ---------
@@ -198,8 +199,8 @@
         if (microfi.eq.1) then
            do iq=1,nrad
-	      do j=1,NLAYER
-	         zqaer_1pt(j,iq)=qaer(ig,j,iq)
-	      enddo
-	   enddo
+             do j=1,NLAYER
+                 zqaer_1pt(j,iq)=qaer(ig,j,iq)
+             enddo
+           enddo
         else
          if (ig.eq.1)  then
@@ -260,2 +261,3 @@
       RETURN
       END
+
Index: trunk/libf/phytitan/optcv.F
===================================================================
--- trunk/libf/phytitan/optcv.F	(revision 110)
+++ trunk/libf/phytitan/optcv.F	(revision 119)
@@ -1,6 +1,6 @@
       SUBROUTINE OPTCV(qaer,nmicro,IPRINT)
 
-
       use dimphy
+      use infotrac
 #include "dimensions.h"
 #include "microtab.h"
@@ -9,5 +9,5 @@
 c   Argument:
 c   ---------
-      REAL    qaer(klon,nlayer,nqtot)
+      REAL    qaer(klon,klev,nqtot)
       integer nmicro
 c   ---------
Index: trunk/libf/phytitan/suphec.F
===================================================================
--- trunk/libf/phytitan/suphec.F	(revision 110)
+++ trunk/libf/phytitan/suphec.F	(revision 119)
@@ -58,8 +58,8 @@
 c     RSIDAY=1.37889e6   ! 15.96 j
       RDAY=1.37889e6   ! 15.96 j
-      ROMEGA=2.*RPI/RSIDAY
 c 1/(duree du jour) = 1/(periode rotation) - 1/(periode revolution)
 c     RDAY=RSIDAY/(1.-RSIDAY/RSIYEA) 
       RSIDAY=RDAY/(1.+RDAY/RSIYEA)
+      ROMEGA=2.*RPI/RSIDAY
       REA=1.5e12
       REPSM=0.  ! 0. veut dire qu'on commence au point vernal
Index: trunk/libf/phytitan/write_histmth.h
===================================================================
--- trunk/libf/phytitan/write_histmth.h	(revision 110)
+++ trunk/libf/phytitan/write_histmth.h	(revision 119)
@@ -156,5 +156,5 @@
       zx_tmp_fi3d(1:klon,1:klev)=t_tauhvd(1:klon,1:klev)
       CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d)
-      CALL histwrite(nid_day,"thv"//str1,itau_w,zx_tmp_3d,
+      CALL histwrite(nid_mth,"thv"//str1,itau_w,zx_tmp_3d,
      .                                   iim*jjmp1*klev,ndex3d)
        enddo      ! fin boucle NSPECV 
@@ -176,5 +176,5 @@
       zx_tmp_fi3d(1:klon,1:klev)=t_khvd(1:klon,1:klev)
       CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d)
-      CALL histwrite(nid_day,"khv"//str1,itau_w,zx_tmp_3d,
+      CALL histwrite(nid_mth,"khv"//str1,itau_w,zx_tmp_3d,
      .                                   iim*jjmp1*klev,ndex3d)
        enddo      ! fin boucle NSPECV 
@@ -189,5 +189,5 @@
       zx_tmp_fi3d(1:klon,1:klev)=t_tauhvd(1:klon,1:klev)
       CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d)
-      CALL histwrite(nid_day,"tgv"//str1,itau_w,zx_tmp_3d,
+      CALL histwrite(nid_mth,"tgv"//str1,itau_w,zx_tmp_3d,
      .                                   iim*jjmp1*klev,ndex3d)
        enddo      ! fin boucle NSPECV 
@@ -209,5 +209,5 @@
       zx_tmp_fi3d(1:klon,1:klev)=t_khvd(1:klon,1:klev)
       CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d)
-      CALL histwrite(nid_day,"kgv"//str1,itau_w,zx_tmp_3d,
+      CALL histwrite(nid_mth,"kgv"//str1,itau_w,zx_tmp_3d,
      .                                   iim*jjmp1*klev,ndex3d)
        enddo      ! fin boucle NSPECV 
@@ -222,5 +222,5 @@
       zx_tmp_fi3d(1:klon,1:klev)=t_tauhvd(1:klon,1:klev)
       CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d)
-      CALL histwrite(nid_day,"thi"//str1,itau_w,zx_tmp_3d,
+      CALL histwrite(nid_mth,"thi"//str1,itau_w,zx_tmp_3d,
      .                                   iim*jjmp1*klev,ndex3d)
        enddo      ! fin boucle NSPECI 
@@ -242,5 +242,5 @@
       zx_tmp_fi3d(1:klon,1:klev)=t_khvd(1:klon,1:klev)
       CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d)
-      CALL histwrite(nid_day,"khi"//str1,itau_w,zx_tmp_3d,
+      CALL histwrite(nid_mth,"khi"//str1,itau_w,zx_tmp_3d,
      .                                   iim*jjmp1*klev,ndex3d)
        enddo      ! fin boucle NSPECI 
@@ -255,5 +255,5 @@
       zx_tmp_fi3d(1:klon,1:klev)=t_tauhvd(1:klon,1:klev)
       CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d)
-      CALL histwrite(nid_day,"tgi"//str1,itau_w,zx_tmp_3d,
+      CALL histwrite(nid_mth,"tgi"//str1,itau_w,zx_tmp_3d,
      .                                   iim*jjmp1*klev,ndex3d)
        enddo      ! fin boucle NSPECI 
@@ -275,5 +275,5 @@
       zx_tmp_fi3d(1:klon,1:klev)=t_khvd(1:klon,1:klev)
       CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d)
-      CALL histwrite(nid_day,"kgi"//str1,itau_w,zx_tmp_3d,
+      CALL histwrite(nid_mth,"kgi"//str1,itau_w,zx_tmp_3d,
      .                                   iim*jjmp1*klev,ndex3d)
        enddo      ! fin boucle NSPECI 
Index: trunk/libf/phytitan/zenang.F
===================================================================
--- trunk/libf/phytitan/zenang.F	(revision 110)
+++ trunk/libf/phytitan/zenang.F	(revision 119)
@@ -150,4 +150,7 @@
       ENDIF   !---comparaison omega1 et omega2
 c
+c Petit test rajoute pour les cas pathologiques aux poles
+      if (pmu0(i).lt.0.) pmu0(i) = -1.*pmu0(i)
+
       ENDDO
 c
Index: trunk/libf/phyvenus/init_phys_lmdz.F90
===================================================================
--- trunk/libf/phyvenus/init_phys_lmdz.F90	(revision 110)
+++ trunk/libf/phyvenus/init_phys_lmdz.F90	(revision 119)
@@ -15,5 +15,5 @@
 
     CALL init_grid_phy_lmdz(iim,jjp1,llm)
-    CALL init_dimphy(klon,nbp_lev)
+    CALL init_dimphy(klon_glo,nbp_lev)
  
 END SUBROUTINE init_phys_lmdz  
Index: trunk/libf/phyvenus/physiq.F
===================================================================
--- trunk/libf/phyvenus/physiq.F	(revision 110)
+++ trunk/libf/phyvenus/physiq.F	(revision 119)
@@ -390,5 +390,5 @@
       ok_sync=.TRUE.
 
-      bilansmc = 1
+      bilansmc = 0
       ballons  = 0
 
