Index: trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/newstart.F
===================================================================
--- trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/newstart.F	(revision 2217)
+++ trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/newstart.F	(revision 2258)
@@ -24,5 +24,6 @@
      &                      igcm_ccn_number, igcm_ccn_mass,
      &                      igcm_h2o_vap, igcm_h2o_ice, igcm_co2,
-     &                      igcm_n2, igcm_ar, igcm_o2, igcm_co
+     &                      igcm_n2, igcm_ar, igcm_o2, igcm_co,
+     &                      igcm_o, igcm_h2
       use surfdat_h, only: phisfi, z0, zmea, zstd, zsig, zgam, zthe,
      &                     albedodat, z0_default, qsurf, tsurf,
@@ -176,4 +177,5 @@
       real :: Mair_old,Mair_new,vmr_old,vmr_new
       real,allocatable :: coefvmr(:)  ! Correction coefficient when changing composition
+      real :: maxq
       integer :: iloc(1), iqmax
 ! sub-grid cloud fraction
@@ -1067,14 +1069,15 @@
 
               if (iq.eq.igcm_n2) then
-                write(*,*) "New vmr(n2)? (MSL: 2.03e-02 at Ls~184)"
+                write(*,*) "New vmr(n2)? (MSL: 2.8e-02 at Ls~180,",
+     &           " Trainer et al. 2019)"
               endif
               if (iq.eq.igcm_ar) then
-                write(*,*) "New vmr(ar)? (MSL: 2.07e-02 at Ls~184)"
+                write(*,*) "New vmr(ar)? (MSL: 2.1e-02 at Ls~180)"
               endif
               if (iq.eq.igcm_o2) then
-                write(*,*) "New vmr(o2)? (MSL: 1.73e-03 at Ls~184)"
+                write(*,*) "New vmr(o2)? (MSL: 1.7e-03 at Ls~180)"
               endif
               if (iq.eq.igcm_co) then
-                write(*,*) "New vmr(co)? (MSL: 7.49e-04 at Ls~184)"
+                write(*,*) "New vmr(co)? (ACS: 1e-03 at Ls~180)"
               endif
  302          read(*,*,iostat=ierr) vmr_new
@@ -1093,5 +1096,6 @@
             vmr_old=q(iref,jref,1,igcm_co2)*Mair_old/mmol(igcm_co2)  
             write(*,*) "Previous vmr(co2)=", vmr_old
-            write(*,*) "New vmr(co2) ? (MSL: 0.956521 at Ls~184)"
+            write(*,*) "New vmr(co2) ? (MSL: 0.947 at Ls~180)",
+     &                  " Trainer et al. 2019)"
  666          read(*,*,iostat=ierr) vmr_new
               if(ierr.ne.0) goto 666
@@ -1132,5 +1136,6 @@
                 if ((iq.eq.igcm_co2).or.(iq.eq.igcm_n2)
      &          .or.(iq.eq.igcm_ar)
-     &          .or. (iq.eq.igcm_o2).or.(iq.eq.igcm_co)) then
+     &          .or. (iq.eq.igcm_o2).or.(iq.eq.igcm_co)
+     &          .or. (iq.eq.igcm_o) .or. (iq.eq. igcm_h2) ) then
                    Smmr_old = Smmr_old + q(i,j,l,iq) ! sum of old mmr 
                    q(i,j,l,iq)=q(i,j,l,iq)*coefvmr(iq)*Mair_old/Mair_new
@@ -1138,6 +1143,18 @@
                 end if 
               enddo
-              iloc = maxloc(q(i,j,l,:))
-              iqmax = iloc(1)
+              !iloc = maxloc(q(i,j,l,:))
+              iqmax=0 ; maxq=0
+              do iq=1,nqtot
+                if ((iq.eq.igcm_co2).or.(iq.eq.igcm_n2)
+     &          .or.(iq.eq.igcm_ar)
+     &          .or. (iq.eq.igcm_o2).or.(iq.eq.igcm_co)
+     &          .or. (iq.eq.igcm_o) .or. (iq.eq. igcm_h2) ) then
+                  if (q(i,j,l,iq).gt.maxq) then
+                    maxq=q(i,j,l,iq)
+                    iqmax=iq
+                  endif
+                endif
+              enddo
+              !iqmax = iloc(1)
               q(i,j,l,iqmax) = q(i,j,l,iqmax) + Smmr_old - Smmr_new
             enddo
@@ -1150,6 +1167,14 @@
           write(*,*) 'At reference site vmr(CO2)=', 
      &        q(iref,jref,1,igcm_co2)*Mair_new/mmol(igcm_co2)
-          write(*,*) "Compared to MSL observation: vmr(CO2)= 0.957 "//
-     &   "at Ls=184" 
+          write(*,*) "Compared to MSL observation: vmr(CO2)= 0.947 "//
+     &   "at Ls=180" 
+
+          Sn = q(iref,jref,1,igcm_co2)*Mair_new/mmol(igcm_co2)
+     &       + q(iref,jref,1,igcm_n2)*Mair_new/mmol(igcm_n2)
+     &       + q(iref,jref,1,igcm_ar)*Mair_new/mmol(igcm_ar)
+     &       + q(iref,jref,1,igcm_o2)*Mair_new/mmol(igcm_o2)
+     &       + q(iref,jref,1,igcm_co)*Mair_new/mmol(igcm_co)
+
+          write(*,*) 'Sum of volume mixing ratios = ', Sn
 
 c      wetstart : wet atmosphere with a north to south gradient
