Index: /trunk/LMDZ.MARS/README
===================================================================
--- /trunk/LMDZ.MARS/README	(revision 1659)
+++ /trunk/LMDZ.MARS/README	(revision 1660)
@@ -2383,6 +2383,12 @@
 	  callphys.def.co2clouds in deftank has been accordingly modified
 	  
-
-
+== 08/02/2017 == JYC+EM
+- Added possibility to run with an Helium "he" tracer (to be initialized
+  at constant value of 3.6e-7 kg/kg_air, i.e. the 4ppm of Krasnopolsky 1996
+  EUVE satellite, using newstart).
+- corrected case for CH4 in aeronomars/photochemistry.F (was using undefined
+  indexes when there is no CH4).
+- updated aki/cpi coefficients for Argon used to compute mean atmospheric
+  Cp and thermal conductivity in aeronomars/concentrations.F
 
 	  
Index: /trunk/LMDZ.MARS/libf/aeronomars/concentrations.F
===================================================================
--- /trunk/LMDZ.MARS/libf/aeronomars/concentrations.F	(revision 1659)
+++ /trunk/LMDZ.MARS/libf/aeronomars/concentrations.F	(revision 1660)
@@ -9,7 +9,7 @@
      &                      igcm_o2plus, igcm_coplus, igcm_cplus,
      &                      igcm_nplus, igcm_noplus, igcm_n2plus,
-     &                      igcm_hplus, igcm_hco2plus, mmol
+     &                      igcm_hplus, igcm_hco2plus, mmol,
+     &                      igcm_he
       use conc_mod, only: mmean, Akknew, rnew, cpnew
-      USE comcstfi_h                   
       implicit none
 
@@ -136,6 +136,10 @@
             nbq = nbq + 1
             niq(nbq) = igcm_ar
-            aki(nbq) = 0.0      !?
-            cpi(nbq) = 1.000e3  !?
+            aki(nbq) = 3.4e-4
+            cpi(nbq) = 5.2e2
+            ! aki/cpi from Leslie A. Guildner,
+            ! JOURNAL OF RESEARCH of the National Bureau of Standards- 
+            ! A. Physics and Chemistry
+            ! Vol. 79A, No.2, March-April 1975
          end if
          if (igcm_h2o_vap /= 0) then
@@ -168,4 +172,14 @@
             aki(nbq) = 0.0
             cpi(nbq) = 0.0
+         endif
+         if(igcm_he /= 0) then
+            nbq = nbq + 1
+            niq(nbq) = igcm_he
+            aki(nbq) = 30.e-4
+            cpi(nbq) = 5.2e3
+            ! aki/cpi from Leslie A. Guildner,
+            ! JOURNAL OF RESEARCH of the National Bureau of Standards- 
+            ! A. Physics and Chemistry
+            ! Vol. 79A, No.2, March-April 1975
          endif
          if(igcm_co2plus /= 0) then
Index: /trunk/LMDZ.MARS/libf/aeronomars/inichim_newstart.F90
===================================================================
--- /trunk/LMDZ.MARS/libf/aeronomars/inichim_newstart.F90	(revision 1659)
+++ /trunk/LMDZ.MARS/libf/aeronomars/inichim_newstart.F90	(revision 1660)
@@ -53,5 +53,5 @@
 ! local :
 
-      integer :: iq, i, j, l, n, nbqchem
+      integer :: iq, i, j, l, n
       integer :: count, ierr, dummy
       real    :: mmean(nbp_lon+1,nbp_lat,nbp_lev)             ! mean molecular mass (g)
@@ -76,40 +76,46 @@
       nqmx=nq ! initialize value of nqmx
       
-      do iq = 1,nqmx
-        igcm_dustbin(iq) = 0
-      end do
-
-      igcm_dust_mass   = 0
-      igcm_dust_number = 0
-      igcm_ccn_mass    = 0
-      igcm_ccn_number  = 0
-      igcm_h2o_vap     = 0
-      igcm_h2o_ice     = 0
-      igcm_co2         = 0
-      igcm_co          = 0
-      igcm_o           = 0
-      igcm_o1d         = 0
-      igcm_o2          = 0
-      igcm_o3          = 0
-      igcm_h           = 0
-      igcm_h2          = 0
-      igcm_oh          = 0
-      igcm_ho2         = 0
-      igcm_h2o2        = 0
-      igcm_ch4         = 0
-      igcm_n2          = 0
-      igcm_ar          = 0
-      igcm_ar_n2       = 0
-      igcm_co2plus     = 0
-      igcm_oplus       = 0
-      igcm_o2plus      = 0
-      igcm_coplus      = 0
-      igcm_cplus       = 0
-      igcm_nplus       = 0
-      igcm_noplus      = 0
-      igcm_n2plus      = 0
-      igcm_hplus       = 0
-      igcm_hco2plus    = 0
-      igcm_elec        = 0
+      igcm_dustbin(1:nq)=0
+      igcm_co2_ice=0
+      igcm_ccnco2_mass=0
+      igcm_ccnco2_number=0
+      igcm_dust_mass=0
+      igcm_dust_number=0
+      igcm_ccn_mass=0
+      igcm_ccn_number=0
+      igcm_dust_submicron=0
+      igcm_h2o_vap=0
+      igcm_h2o_ice=0
+      igcm_co2=0
+      igcm_co=0
+      igcm_o=0
+      igcm_o1d=0
+      igcm_o2=0
+      igcm_o3=0
+      igcm_h=0
+      igcm_h2=0
+      igcm_oh=0
+      igcm_ho2=0
+      igcm_h2o2=0
+      igcm_ch4=0
+      igcm_n2=0
+      igcm_ar=0
+      igcm_ar_n2=0
+      igcm_n=0
+      igcm_no=0
+      igcm_no2=0
+      igcm_n2d=0
+      igcm_he=0
+      igcm_co2plus=0
+      igcm_oplus=0
+      igcm_o2plus=0
+      igcm_coplus=0
+      igcm_cplus=0
+      igcm_nplus=0
+      igcm_noplus=0
+      igcm_n2plus=0
+      igcm_hplus=0
+      igcm_hco2plus=0
+      igcm_elec=0
 
 ! 1.2 find dust tracers
@@ -167,5 +173,4 @@
 ! 1.3 find chemistry and water tracers
 
-      nbqchem = 0
       do iq = 1,nqmx
          if (noms(iq) == "co2") then
@@ -173,5 +178,4 @@
             mmol(igcm_co2) = 44.
             count = count + 1
-            nbqchem = nbqchem + 1
         end if
         if (noms(iq) == "co") then
@@ -179,5 +183,4 @@
            mmol(igcm_co) = 28.
            count = count + 1
-           nbqchem = nbqchem + 1
         end if
         if (noms(iq) == "o") then
@@ -185,5 +188,4 @@
            mmol(igcm_o) = 16.
            count = count + 1
-           nbqchem = nbqchem + 1
         end if
         if (noms(iq) == "o1d") then
@@ -191,5 +193,4 @@
            mmol(igcm_o1d) = 16.
            count = count + 1
-           nbqchem = nbqchem + 1
         end if
         if (noms(iq) == "o2") then
@@ -197,5 +198,4 @@
            mmol(igcm_o2) = 32.
            count = count + 1
-           nbqchem = nbqchem + 1
         end if
         if (noms(iq) == "o3") then
@@ -203,5 +203,4 @@
            mmol(igcm_o3) = 48.
            count = count + 1
-           nbqchem = nbqchem + 1
         end if
         if (noms(iq) == "h") then
@@ -209,5 +208,4 @@
            mmol(igcm_h) = 1.
            count = count + 1
-           nbqchem = nbqchem + 1
         end if
         if (noms(iq) == "h2") then
@@ -215,5 +213,4 @@
            mmol(igcm_h2) = 2.
            count = count + 1
-           nbqchem = nbqchem + 1
         end if
         if (noms(iq) == "oh") then
@@ -221,5 +218,4 @@
            mmol(igcm_oh) = 17.
            count = count + 1
-           nbqchem = nbqchem + 1
         end if
         if (noms(iq) == "ho2") then
@@ -227,5 +223,4 @@
            mmol(igcm_ho2) = 33.
            count = count + 1
-           nbqchem = nbqchem + 1
         end if
         if (noms(iq) == "h2o2") then
@@ -233,5 +228,4 @@
            mmol(igcm_h2o2) = 34.
            count = count + 1
-           nbqchem = nbqchem + 1
         end if
         if (noms(iq) == "ch4") then
@@ -239,5 +233,4 @@
            mmol(igcm_ch4) = 16.
            count = count + 1
-           nbqchem = nbqchem + 1
         end if
         if (noms(iq) == "n2") then
@@ -245,5 +238,4 @@
            mmol(igcm_n2) = 28.
            count = count + 1
-           nbqchem = nbqchem + 1
         end if
         if (noms(iq) == "n") then
@@ -251,5 +243,4 @@
            mmol(igcm_n) = 14.
            count = count + 1
-           nbqchem = nbqchem + 1
         end if
         if (noms(iq) == "n2d") then
@@ -257,5 +248,4 @@
            mmol(igcm_n2d) = 14.
            count = count + 1
-           nbqchem = nbqchem + 1
         end if
         if (noms(iq) == "no") then
@@ -263,5 +253,4 @@
            mmol(igcm_no) = 30.
            count = count + 1
-           nbqchem = nbqchem + 1
         end if
         if (noms(iq) == "no2") then
@@ -269,5 +258,4 @@
            mmol(igcm_no2) = 46.
            count = count + 1
-           nbqchem = nbqchem + 1
         end if
         if (noms(iq) == "ar") then
@@ -275,5 +263,4 @@
            mmol(igcm_ar) = 40.
            count = count + 1
-           nbqchem = nbqchem + 1
         end if
         if (noms(iq) == "h2o_vap") then
@@ -281,5 +268,4 @@
            mmol(igcm_h2o_vap) = 18.
            count = count + 1
-           nbqchem = nbqchem + 1
         end if
         if (noms(iq) == "h2o_ice") then
@@ -287,6 +273,10 @@
            mmol(igcm_h2o_ice) = 18.
            count = count + 1
-           nbqchem = nbqchem + 1
-        end if
+        end if
+        if (noms(iq).eq."he") then
+          igcm_he=iq
+          mmol(igcm_he)=4.
+          count=count+1
+        endif
 
 ! 1.4 find ions
@@ -296,5 +286,4 @@
            mmol(igcm_co2plus) = 44.
            count = count + 1
-           nbqchem = nbqchem + 1
         end if
         if (noms(iq) == "oplus") then
@@ -302,5 +291,4 @@
            mmol(igcm_oplus) = 16.
            count = count + 1
-           nbqchem = nbqchem + 1
         end if
         if (noms(iq) == "o2plus") then
@@ -308,5 +296,4 @@
            mmol(igcm_o2plus) = 32.
            count = count + 1
-           nbqchem = nbqchem + 1
         end if
         if (noms(iq) == "coplus") then
@@ -314,5 +301,4 @@
            mmol(igcm_coplus) = 28.
            count = count + 1
-           nbqchem = nbqchem + 1
         end if
         if (noms(iq) == "cplus") then
@@ -320,5 +306,4 @@
            mmol(igcm_cplus) = 12.
            count = count + 1
-           nbqchem = nbqchem + 1
         end if
         if (noms(iq) == "nplus") then
@@ -326,5 +311,4 @@
            mmol(igcm_nplus) = 14.
            count = count + 1
-           nbqchem = nbqchem + 1
         end if
         if (noms(iq) == "noplus") then
@@ -332,5 +316,4 @@
            mmol(igcm_noplus) = 30.
            count = count + 1
-           nbqchem = nbqchem + 1
         end if
         if (noms(iq) == "n2plus") then
@@ -338,5 +321,4 @@
            mmol(igcm_n2plus) = 28.
            count = count + 1
-           nbqchem = nbqchem + 1
         end if
         if (noms(iq) == "hplus") then
@@ -344,5 +326,4 @@
            mmol(igcm_hplus) = 1.
            count = count + 1
-           nbqchem = nbqchem + 1
         end if
         if (noms(iq) == "hco2plus") then
@@ -350,5 +331,4 @@
            mmol(igcm_hco2plus) = 45.
            count = count + 1
-           nbqchem = nbqchem + 1
         end if
         if (noms(iq) == "elec") then
Index: /trunk/LMDZ.MARS/libf/aeronomars/moldiff_red.F90
===================================================================
--- /trunk/LMDZ.MARS/libf/aeronomars/moldiff_red.F90	(revision 1659)
+++ /trunk/LMDZ.MARS/libf/aeronomars/moldiff_red.F90	(revision 1660)
@@ -64,5 +64,6 @@
       real*8,dimension(:),allocatable,save ::  wi,Wad,Uthermal,Lambdaexo,Hspecie
       real*8,dimension(:),allocatable,save :: Mtot1,Mtot2,Mraf1,Mraf2
-      character(len=20),dimension(14) :: ListeDiff
+      integer,parameter :: ListeDiffNb=15
+      character(len=20),dimension(ListeDiffNb) :: ListeDiff
       real*8,parameter :: pi=3.141592653
       real*8,parameter :: g=3.72d0
@@ -108,4 +109,5 @@
       real,save :: step
 
+
 ! Initializations at first call
       if (firstcall) then
@@ -127,4 +129,5 @@
 	ListeDiff(13)='o3'
 	ListeDiff(14)='n'
+        ListeDiff(15)='he'
 	i_h=1000
 	i_h2=1000
@@ -135,5 +138,5 @@
 	
 	do nn=1,nq
-	do n=1,14
+	do n=1,ListeDiffNb
 	if (ListeDiff(n) .eq. noms(nn)) then
 	indic_diff(nn)=1
Index: /trunk/LMDZ.MARS/libf/aeronomars/photochemistry.F
===================================================================
--- /trunk/LMDZ.MARS/libf/aeronomars/photochemistry.F	(revision 1659)
+++ /trunk/LMDZ.MARS/libf/aeronomars/photochemistry.F	(revision 1660)
@@ -188,4 +188,5 @@
 c*****************************************************************
 
+      use tracer_mod, only: igcm_ch4
       implicit none 
 
@@ -686,12 +687,16 @@
          production(l,i_ch4) = 0.
 
-         loss(l,i_ch4) = j(l,j_ch4_ch3_h)
-     $                 + j(l,j_ch4_1ch2_h2)
-     $                 + j(l,j_ch4_3ch2_h_h)
-     $                 + j(l,j_ch4_ch_h2_h)
-     $                 + b007(l)*cc(l,i_o1d) 
-     $                 + b008(l)*cc(l,i_o1d)
-     $                 + b009(l)*cc(l,i_o1d)
-     $                 + e003(l)*cc(l,i_oh)
+         if (igcm_ch4/=0) then
+           loss(l,i_ch4) = j(l,j_ch4_ch3_h)
+     $                   + j(l,j_ch4_1ch2_h2)
+     $                   + j(l,j_ch4_3ch2_h_h)
+     $                   + j(l,j_ch4_ch_h2_h)
+     $                   + b007(l)*cc(l,i_o1d) 
+     $                   + b008(l)*cc(l,i_o1d)
+     $                   + b009(l)*cc(l,i_o1d)
+     $                   + e003(l)*cc(l,i_oh)
+         else
+           loss(l,i_ch4) = 0.
+         endif
 
       end do
Index: unk/LMDZ.MARS/libf/phymars/dyn1d/meteoriticflux_mod.F90
===================================================================
--- /trunk/LMDZ.MARS/libf/phymars/dyn1d/meteoriticflux_mod.F90	(revision 1659)
+++ 	(revision )
@@ -1,6 +1,0 @@
-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/initracer.F
===================================================================
--- /trunk/LMDZ.MARS/libf/phymars/initracer.F	(revision 1659)
+++ /trunk/LMDZ.MARS/libf/phymars/initracer.F	(revision 1660)
@@ -88,4 +88,5 @@
       igcm_no2=0
       igcm_n2d=0
+      igcm_he=0
       igcm_co2plus=0
       igcm_oplus=0
@@ -238,4 +239,9 @@
           count=count+1
         endif
+        if (noms(iq).eq."he") then
+          igcm_he=iq
+          mmol(igcm_he)=4.
+          count=count+1
+        endif
         if (noms(iq).eq."co2plus") then
           igcm_co2plus=iq
Index: /trunk/LMDZ.MARS/libf/phymars/physiq_mod.F
===================================================================
--- /trunk/LMDZ.MARS/libf/phymars/physiq_mod.F	(revision 1659)
+++ /trunk/LMDZ.MARS/libf/phymars/physiq_mod.F	(revision 1660)
@@ -20,5 +20,6 @@
      &                      rho_ice_co2,nuiceco2_sed,nuiceco2_ref,
      &                      igcm_dust_mass, igcm_dust_number, igcm_h2o2,
-     &                      nuice_ref, rho_ice, rho_dust, ref_r0
+     &                      nuice_ref, rho_ice, rho_dust, ref_r0,
+     &                      igcm_he
       use comsoil_h, only: inertiedat, ! soil thermal inertia
      &                     tsoil, nsoilmx ! number of subsurface layers
@@ -2336,4 +2337,15 @@
          endif ! of if (tracer.and.(igcm_co2.ne.0))
 
+
+        ! Output He tracer, if there is one
+        if (tracer.and.(igcm_he.ne.0)) then
+          call WRITEDIAGFI(ngrid,"he","helium mass mixing ratio",
+     &                     "kg/kg",3,zq(1,1,igcm_he))
+          vmr=zq(1:ngrid,1:nlayer,igcm_he)
+     &       *mmean(1:ngrid,1:nlayer)/mmol(igcm_he)
+          call WRITEDIAGFI(ngrid,'vmr_he','helium vol. mixing ratio',
+     &                       'mol/mol',3,vmr)
+        endif
+
 c        ----------------------------------------------------------
 c        Outputs of the water cycle
Index: /trunk/LMDZ.MARS/libf/phymars/tracer_mod.F90
===================================================================
--- /trunk/LMDZ.MARS/libf/phymars/tracer_mod.F90	(revision 1659)
+++ /trunk/LMDZ.MARS/libf/phymars/tracer_mod.F90	(revision 1660)
@@ -73,4 +73,5 @@
       integer,save :: igcm_no2
       integer,save :: igcm_n2d
+      integer,save :: igcm_he
       integer,save :: igcm_ch4
       ! Ions
