Index: /trunk/LMDZ.MARS/README
===================================================================
--- /trunk/LMDZ.MARS/README	(revision 1650)
+++ /trunk/LMDZ.MARS/README	(revision 1651)
@@ -2374,2 +2374,15 @@
 -callphys.def.co2clouds was added in deftank. It contains the necessary flags and constant for including co2clouds
 -traceur.def.co2clouds was added in deftank. It supplies the necessary tracers for running the co2 clouds scheme
+
+== 30/01/2017 == JA
+-Modification of CO2 clouds microtimestep : now is set by imicro in callphys.def together with the water ice clouds microtimestep
+-Addition of a meteoritic flux of dust is now possible:
+	  meteoriticflux_mod.F90 was added, it contains 3 variables that are provided in callphys.def (default values = no flux): meteo_flux_mass, meteo_flux_number and meteo_alt (in km)
+	  meteo_flux_mass and meteo_flux_number are added to the dust tracers at the z-level corresponding to meteo_alt at every timestep inside co2cloud.F
+	  conf_phys.F was modified to perform the initialization of the meteoritic flux with the callphys.def values (default values = no flux)
+	  callphys.def.co2clouds in deftank has been accordingly modified
+	  
+
+
+
+	  
Index: /trunk/LMDZ.MARS/deftank/callphys.def.co2clouds
===================================================================
--- /trunk/LMDZ.MARS/deftank/callphys.def.co2clouds	(revision 1650)
+++ /trunk/LMDZ.MARS/deftank/callphys.def.co2clouds	(revision 1651)
@@ -127,4 +127,5 @@
 naerkind = 1
 
+imicro=30
 #include co2 clouds scheme?
 co2clouds=.true.
@@ -164,4 +165,8 @@
 ## be used to compensate for low 15 um cooling)
 euveff = 0.21       
+#meteoritic flux of dust 
+meteo_flux_mass=2.21938e-14
+meteo_flux_number=  2.11935e+09
+meteo_alt= 90
 
 
Index: /trunk/LMDZ.MARS/libf/dyn3d/meteoriticflux_mod.F90
===================================================================
--- /trunk/LMDZ.MARS/libf/dyn3d/meteoriticflux_mod.F90	(revision 1651)
+++ /trunk/LMDZ.MARS/libf/dyn3d/meteoriticflux_mod.F90	(revision 1651)
@@ -0,0 +1,6 @@
+MODULE meteoriticflux_mod
+IMPLICIT NONE
+      DOUBLE PRECISION :: meteo_flux_mass,meteo_flux_number ! meteoritic flux of dust
+      integer :: meteo_alt
+
+END MODULE meteoriticflux_mod
Index: /trunk/LMDZ.MARS/libf/phymars/co2cloud.F
===================================================================
--- /trunk/LMDZ.MARS/libf/phymars/co2cloud.F	(revision 1650)
+++ /trunk/LMDZ.MARS/libf/phymars/co2cloud.F	(revision 1651)
@@ -12,8 +12,10 @@
       use tracer_mod, only: nqmx, igcm_co2, igcm_co2_ice,
      &     igcm_dust_mass, igcm_dust_number,
-     &     igcm_dust_mass, igcm_dust_number,
      &     igcm_ccnco2_mass, igcm_ccnco2_number,
      &     rho_dust, nuiceco2_sed, nuiceco2_ref,
      &     rho_ice_co2,r3n_q
+      USE meteoriticflux_mod, ONLY:meteo_flux_mass,meteo_flux_number
+     &     ,meteo_alt
+
       IMPLICIT NONE
 
@@ -126,5 +128,6 @@
       real masse (ngrid,nlay) ! Layer mass (kg.m-2)
     
-
+      double precision diff,diff0
+      integer meteo_lvl
       real tempo_traceur_t(ngrid,nlay)
       real tempo_traceurs(ngrid,nlay,nq)
@@ -152,6 +155,4 @@
 #endif
         call getin("imicro",imicro)
-             imicro=ptimestep/50.
-
         write(*,*)"imicro = ",imicro
         
@@ -159,9 +160,40 @@
         write(*,*)"Physical timestep is",ptimestep 
         write(*,*)"CO2 Microphysics timestep is",microtimestep 
-
+      
+              
+        write(*,*) "Warning ! Meteoritic flux of dust is turned on"
+        write(*,*) "Dust mass = ",meteo_flux_mass 
+        write(*,*) "Dust number = ",meteo_flux_number
+        write(*,*) "Are added at the z-level (km)",meteo_alt
+        write(*,*) "Every timestep in co2cloud.F"
+     
         firstcall=.false.
       ENDIF                     ! of IF (firstcall)
    
 c-----Initialization
+
+c add meteoritic flux of dust 
+    !convert meteo_alt (in km) to z-level 
+        !pzlay altitudes of the layers
+    
+      do ig=1, ngrid
+         diff0=1000
+         meteo_lvl=1
+         do  l=1,nlay
+            diff=pzlay(ig,l)/1000-meteo_alt
+            if (abs(diff) .lt. diff0) then
+               diff0=abs(diff)
+               meteo_lvl=l
+            endif
+         enddo
+c         write(*,*) "meteo_lvl=",meteo_lvl
+         pq(ig,meteo_lvl,igcm_dust_mass)=pq(ig,meteo_lvl,igcm_dust_mass)
+     &        +meteo_flux_mass
+         pq(ig,meteo_lvl,igcm_dust_number)=
+     &        pq(ig,meteo_lvl,igcm_dust_number)+meteo_flux_number
+      enddo
+
+       call WRITEDIAGFI(ngrid,"pzlay","altitude","km",3,
+     &        pzlay)
       beta=0.85
       subpdq(1:ngrid,1:nlay,1:nq) = 0
Index: /trunk/LMDZ.MARS/libf/phymars/conf_phys.F
===================================================================
--- /trunk/LMDZ.MARS/libf/phymars/conf_phys.F	(revision 1650)
+++ /trunk/LMDZ.MARS/libf/phymars/conf_phys.F	(revision 1651)
@@ -44,4 +44,5 @@
       use dimradmars_mod, only: naerkind, name_iaer,
      &                      ini_scatterers,tauvis
+      USE meteoriticflux_mod !meteo_flux_mass,meteo_flux_number,alt_meteo
 
       IMPLICIT NONE
@@ -711,4 +712,20 @@
          write(*,*) " euveff = ", euveff
 
+        !Meteoritic flux of dust : number, mass and altitude
+        !dust tracers are incremented by thoses values in co2cloud.F
+        ! Thus only apply if co2clouds=.true. in callphys.def
+        meteo_flux_mass=0.
+        call getin("meteo_flux_mass",meteo_flux_mass)
+        meteo_flux_number=0.
+        call getin("meteo_flux_number",meteo_flux_number)
+        meteo_alt=5.
+        call getin("meteo_alt",meteo_alt)
+        WRITE(*,*) ""
+        WRITE(*,*) "meteoritic flux of dust"
+        WRITE(*,*) "dust mass = ",meteo_flux_mass
+        WRITE(*,*) "dust number = ",meteo_flux_number
+        WRITE(*,*) "at altitude = ",meteo_alt
+         
+
          if (.not.callthermos) then
            if (thermoswater) then
Index: /trunk/LMDZ.MARS/libf/phymars/dyn1d/meteoriticflux_mod.F90
===================================================================
--- /trunk/LMDZ.MARS/libf/phymars/dyn1d/meteoriticflux_mod.F90	(revision 1651)
+++ /trunk/LMDZ.MARS/libf/phymars/dyn1d/meteoriticflux_mod.F90	(revision 1651)
@@ -0,0 +1,6 @@
+MODULE meteoriticflux_mod
+IMPLICIT NONE
+      DOUBLE PRECISION :: meteo_flux_mass,meteo_flux_number ! meteoritic flux of dust
+      integer :: meteo_alt
+
+END MODULE meteoriticflux_mod
