Index: /trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F
===================================================================
--- /trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F	(revision 3026)
+++ /trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F	(revision 3027)
@@ -445,5 +445,5 @@
       paleomars=.false. ! Default: no water ice reservoir
       call getin("paleomars",paleomars)
-      if (paleomars.eqv..true.) then
+      if (paleomars) then
         write(*,*) "paleomars=", paleomars
         write(*,*) "Orbital parameters from callphys.def"
Index: /trunk/LMDZ.MARS/libf/phymars/initracer.F
===================================================================
--- /trunk/LMDZ.MARS/libf/phymars/initracer.F	(revision 3026)
+++ /trunk/LMDZ.MARS/libf/phymars/initracer.F	(revision 3027)
@@ -39,4 +39,5 @@
       real, parameter :: popratio = 25.
       character(len=30) :: txt ! to store some text
+      character(len=30), dimension(nq) :: idtracers
 
 c-----------------------------------------------------------------------
@@ -133,4 +134,5 @@
           if (noms(iq).eq.txt) then
             count=count+1
+            idtracers(count) = txt
             igcm_dustbin(count)=iq
             mmol(iq)=100.
@@ -143,8 +145,10 @@
             igcm_dust_mass=iq
             count=count+1
+            idtracers(count) = "dust_mass"
           endif
           if (noms(iq).eq."dust_number") then
             igcm_dust_number=iq
             count=count+1
+            idtracers(count) = "dust_number"
           endif
         enddo
@@ -155,8 +159,10 @@
             igcm_ccn_mass=iq
             count=count+1
+            idtracers(count) = "ccn_mass"
           endif
           if (noms(iq).eq."ccn_number") then
             igcm_ccn_number=iq
             count=count+1
+            idtracers(count) = "ccn_number"
           endif
         enddo
@@ -168,4 +174,5 @@
             mmol(iq)=100.
             count=count+1
+            idtracers(count) = "dust_submicron"
           endif
         enddo
@@ -176,8 +183,10 @@
             igcm_stormdust_mass=iq
             count=count+1
+            idtracers(count) = "stormdust_mass"
           endif
           if (noms(iq).eq."stormdust_number") then
             igcm_stormdust_number=iq
             count=count+1
+            idtracers(count) = "stormdust_number"
           endif
         enddo
@@ -188,8 +197,10 @@
             igcm_topdust_mass=iq
             count=count+1
+            idtracers(count) = "topdust_mass"
           endif
           if (noms(iq).eq."topdust_number") then
             igcm_topdust_number=iq
             count=count+1
+            idtracers(count) = "topdust_number"
           endif
         enddo
@@ -201,4 +212,5 @@
           mmol(igcm_co2)=44.
           count=count+1
+          idtracers(count) = "co2"
         endif
         if (noms(iq).eq."co") then
@@ -206,4 +218,5 @@
           mmol(igcm_co)=28.
           count=count+1
+          idtracers(count) = "co"
         endif
         if (noms(iq).eq."o") then
@@ -211,4 +224,5 @@
           mmol(igcm_o)=16.
           count=count+1
+          idtracers(count) = "o"
         endif
         if (noms(iq).eq."o1d") then
@@ -216,4 +230,5 @@
           mmol(igcm_o1d)=16.
           count=count+1
+          idtracers(count) = "o1d"
         endif
         if (noms(iq).eq."o2") then
@@ -221,4 +236,5 @@
           mmol(igcm_o2)=32.
           count=count+1
+          idtracers(count) = "o2"
         endif
         if (noms(iq).eq."o3") then
@@ -226,4 +242,5 @@
           mmol(igcm_o3)=48.
           count=count+1
+          idtracers(count) = "o3"
         endif
         if (noms(iq).eq."h") then
@@ -231,4 +248,5 @@
           mmol(igcm_h)=1.
           count=count+1
+          idtracers(count) = "h"
         endif
         if (noms(iq).eq."h2") then
@@ -236,4 +254,5 @@
           mmol(igcm_h2)=2.
           count=count+1
+          idtracers(count) = "h2"
         endif
         if (noms(iq).eq."oh") then
@@ -241,4 +260,5 @@
           mmol(igcm_oh)=17.
           count=count+1
+          idtracers(count) = "oh"
         endif
         if (noms(iq).eq."ho2") then
@@ -246,4 +266,5 @@
           mmol(igcm_ho2)=33.
           count=count+1
+          idtracers(count) = "ho2"
         endif
         if (noms(iq).eq."h2o2") then
@@ -251,4 +272,5 @@
           mmol(igcm_h2o2)=34.
           count=count+1
+          idtracers(count) = "h2o2"
         endif
         if (noms(iq).eq."n2") then
@@ -256,4 +278,5 @@
           mmol(igcm_n2)=28.
           count=count+1
+          idtracers(count) = "n2"
         endif
         if (noms(iq).eq."ch4") then
@@ -261,4 +284,5 @@
           mmol(igcm_ch4)=16.
           count=count+1
+          idtracers(count) = "ch4"
         endif
         if (noms(iq).eq."ar") then
@@ -266,4 +290,5 @@
           mmol(igcm_ar)=40.
           count=count+1
+          idtracers(count) = "ar"
         endif
         if (noms(iq).eq."n") then
@@ -271,4 +296,5 @@
           mmol(igcm_n)=14.
           count=count+1
+          idtracers(count) = "n"
         endif
         if (noms(iq).eq."no") then
@@ -276,4 +302,5 @@
           mmol(igcm_no)=30.
           count=count+1
+          idtracers(count) = "no"
         endif
         if (noms(iq).eq."no2") then
@@ -281,4 +308,5 @@
           mmol(igcm_no2)=46.
           count=count+1
+          idtracers(count) = "no2"
         endif
         if (noms(iq).eq."n2d") then
@@ -286,4 +314,5 @@
           mmol(igcm_n2d)=28.
           count=count+1
+          idtracers(count) = "n2d"
         endif
         if (noms(iq).eq."he") then
@@ -291,4 +320,5 @@
           mmol(igcm_he)=4.
           count=count+1
+          idtracers(count) = "he"
         endif
         if (noms(iq).eq."co2plus") then
@@ -296,4 +326,5 @@
           mmol(igcm_co2plus)=44.
           count=count+1
+          idtracers(count) = "co2plus"
         endif
         if (noms(iq).eq."oplus") then
@@ -301,4 +332,5 @@
           mmol(igcm_oplus)=16.
           count=count+1
+          idtracers(count) = "oplus"
         endif
         if (noms(iq).eq."o2plus") then
@@ -306,4 +338,5 @@
           mmol(igcm_o2plus)=32.
           count=count+1
+          idtracers(count) = "o2plus"
         endif
         if (noms(iq).eq."coplus") then
@@ -311,4 +344,5 @@
           mmol(igcm_coplus)=28.
           count=count+1
+          idtracers(count) = "coplus"
         endif
         if (noms(iq).eq."cplus") then
@@ -316,4 +350,5 @@
           mmol(igcm_cplus)=12.
           count=count+1
+          idtracers(count) = "cplus"
         endif
         if (noms(iq).eq."nplus") then
@@ -321,4 +356,5 @@
           mmol(igcm_nplus)=14.
           count=count+1
+          idtracers(count) = "nplus"
         endif
         if (noms(iq).eq."noplus") then
@@ -326,4 +362,5 @@
           mmol(igcm_noplus)=30.
           count=count+1
+          idtracers(count) = "noplus"
         endif
         if (noms(iq).eq."n2plus") then
@@ -331,4 +368,5 @@
           mmol(igcm_n2plus)=28.
           count=count+1
+          idtracers(count) = "n2plus"
         endif
         if (noms(iq).eq."hplus") then
@@ -336,4 +374,5 @@
           mmol(igcm_hplus)=1.
           count=count+1
+          idtracers(count) = "hplus"
         endif
         if (noms(iq).eq."hco2plus") then
@@ -341,4 +380,5 @@
           mmol(igcm_hco2plus)=45.
           count=count+1
+          idtracers(count) = "hco2plus"
         endif
         if (noms(iq).eq."hcoplus") then
@@ -346,4 +386,5 @@
           mmol(igcm_hcoplus)=29.
           count=count+1
+          idtracers(count) = "hcoplus"
         endif
         if (noms(iq).eq."h2oplus") then
@@ -351,4 +392,5 @@
           mmol(igcm_h2oplus)=18.
           count=count+1
+          idtracers(count) = "h2oplus"
         endif
         if (noms(iq).eq."h3oplus") then
@@ -356,4 +398,5 @@
           mmol(igcm_h3oplus)=19.
           count=count+1
+          idtracers(count) = "h3oplus"
         endif
         if (noms(iq).eq."ohplus") then
@@ -361,4 +404,5 @@
           mmol(igcm_ohplus)=17.
           count=count+1
+          idtracers(count) = "ohplus"
         endif
         if (noms(iq).eq."elec") then
@@ -366,4 +410,5 @@
           mmol(igcm_elec)=1./1822.89
           count=count+1
+          idtracers(count) = "elec"
         endif
         if (noms(iq).eq."h2o_vap") then
@@ -371,4 +416,5 @@
           mmol(igcm_h2o_vap)=18.
           count=count+1
+          idtracers(count) = "h2o_vap"
         endif
         if (noms(iq).eq."hdo_vap") then
@@ -376,4 +422,5 @@
           mmol(igcm_hdo_vap)=19.
           count=count+1
+          idtracers(count) = "hdo_vap"
         endif
         if (noms(iq).eq."od") then
@@ -381,4 +428,5 @@
           mmol(igcm_od)=18.
           count=count+1
+          idtracers(count) = "od"
         endif
         if (noms(iq).eq."d") then
@@ -386,4 +434,5 @@
            mmol(igcm_d)=2.
            count=count+1
+           idtracers(count) = "d"
         endif
         if (noms(iq).eq."hd") then
@@ -391,4 +440,5 @@
            mmol(igcm_hd)=3.
            count=count+1
+           idtracers(count) = "hd"
         endif
         if (noms(iq).eq."do2") then
@@ -396,4 +446,5 @@
            mmol(igcm_do2)=34.
            count=count+1
+           idtracers(count) = "do2"
         endif
         if (noms(iq).eq."hdo2") then
@@ -401,4 +452,5 @@
            mmol(igcm_hdo2)=35.
            count=count+1
+           idtracers(count) = "hdo2"
         endif
         if (noms(iq).eq."co2_ice") then
@@ -406,4 +458,5 @@
           mmol(igcm_co2_ice)=44.
           count=count+1
+          idtracers(count) = "co2_ice"
         endif
         if (noms(iq).eq."h2o_ice") then
@@ -411,4 +464,5 @@
           mmol(igcm_h2o_ice)=18.
           count=count+1
+          idtracers(count) = "h2o_ice"
         endif
         if (noms(iq).eq."hdo_ice") then
@@ -416,4 +470,5 @@
           mmol(igcm_hdo_ice)=19.
           count=count+1
+          idtracers(count) = "hdo_ice"
         endif
         ! Other stuff: e.g. for simulations using co2 + neutral gaz
@@ -422,4 +477,5 @@
           mmol(igcm_ar_n2)=30.
           count=count+1
+          idtracers(count) = "Ar_N2"
         endif
         if (co2clouds) then
@@ -427,8 +483,10 @@
               igcm_ccnco2_mass=iq
               count=count+1
+              idtracers(count) = "ccnco2_mass"
            endif
            if (noms(iq).eq."ccnco2_number") then
               igcm_ccnco2_number=iq
               count=count+1
+              idtracers(count) = "ccnco2_number"
            endif
            if (meteo_flux) then
@@ -436,8 +494,10 @@
                 igcm_ccnco2_meteor_mass=iq
                 count=count+1
+                idtracers(count) = "ccnco2_meteor_mass"
              endif
              if (noms(iq).eq."ccnco2_meteor_number") then
                 igcm_ccnco2_meteor_number=iq
                 count=count+1
+                idtracers(count) = "ccnco2_meteor_number"
              endif
            end if
@@ -446,12 +506,15 @@
               igcm_ccnco2_h2o_number=iq
               count=count+1
+              idtracers(count) = "ccnco2_h2o_number"
            endif
            if (noms(iq).eq."ccnco2_h2o_mass_ice") then
               igcm_ccnco2_h2o_mass_ice=iq
               count=count+1
+              idtracers(count) = "ccnco2_h2o_mass_ice"
            endif
            if (noms(iq).eq."ccnco2_h2o_mass_ccn") then
               igcm_ccnco2_h2o_mass_ccn=iq
               count=count+1
+              idtracers(count) = "ccnco2_h2o_mass_ccn"
            endif
            end if
@@ -460,12 +523,16 @@
      
       ! check that we identified all tracers:
-      if (count.ne.nq) then
-        write(*,*) "initracer: found only ",count," tracers"
-        write(*,*) "               expected ",nq
+      if (count /= nq) then
+        write(*,*) "initracer: found only",count,"tracers but",
+     &nq,"are expected according to traceur.def!"
+        write(*,*) "initracer: the only identified tracers are:"
+        do iq = 1,count
+          write(*,*) '      ',iq,trim(idtracers(iq))
+        enddo
         call abort_physic("initracer","tracer mismatch",1)
       else
         write(*,*) "initracer: found all expected tracers, namely:"
-        do iq=1,nq
-          write(*,*)'      ',iq,' ',trim(noms(iq))
+        do iq = 1,nq
+          write(*,*) '      ',iq,' ',trim(noms(iq))
         enddo
       endif
Index: /trunk/LMDZ.MARS/libf/phymars/physiq_mod.F
===================================================================
--- /trunk/LMDZ.MARS/libf/phymars/physiq_mod.F	(revision 3026)
+++ /trunk/LMDZ.MARS/libf/phymars/physiq_mod.F	(revision 3027)
@@ -3845,5 +3845,4 @@
         ENDIF ! hdo
            endif !not.scavenging
-        ENDIF ! of IF (water)
 
 ! Output needed by the PEM
@@ -3893,4 +3892,5 @@
       CALL write_output("co2_layer1","co2 mass mr in the first layer",
      &     'kg/kg',zq(:,1,igcm_co2))
+        ENDIF ! of IF (water)
 
 !PREVIOUSLY IN 1D ONLY
