Index: trunk/LMDZ.COMMON/libf/dyn3d/leapfrog_nogcm.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d/leapfrog_nogcm.F	(revision 2106)
+++ trunk/LMDZ.COMMON/libf/dyn3d/leapfrog_nogcm.F	(revision 2108)
@@ -12,5 +12,5 @@
       use IOIPSL
 #endif
-      USE infotrac, ONLY: nqtot,ok_iso_verif
+      USE infotrac, ONLY: nqtot,ok_iso_verif,tname
       USE guide_mod, ONLY : guide_main
       USE write_field, ONLY: writefield
@@ -21,5 +21,4 @@
      &                       ok_dyn_ins,output_grads_dyn
       use exner_hyb_m, only: exner_hyb
-      use surfdat_h, only: co2ice
       use exner_milieu_m, only: exner_milieu
       use cpdet_mod, only: cpdet,tpot2t,t2tpot
@@ -29,11 +28,9 @@
      &                   aps,bps,presnivs,pseudoalt,preff,scaleheight
       USE comconst_mod, ONLY: daysec,dtvr,dtphys,dtdiss,
-     .			cpp,ihf,iflag_top_bound,pi,kappa
+     .			cpp,ihf,iflag_top_bound,pi,kappa,r
       USE logic_mod, ONLY: iflag_phys,ok_guide,forward,leapf,apphys,
      .			statcl,conser,purmats,tidal,ok_strato
       USE temps_mod, ONLY: jD_ref,jH_ref,itaufin,day_ini,day_ref,
      .			start_time,dt
-      USE comcstfi_h, ONLY: r,g
-      USE tracer_mod, ONLY: igcm_co2
 
 
@@ -246,4 +243,5 @@
       real :: co2mass(iip1,jjp1)
       real :: co2ice_ij(iip1,jjp1)
+      integer,save :: igcm_co2=0 ! index of CO2 tracer (if any)
       integer :: i,j,ig
       integer, parameter :: ngrid = 2+(jjm-1)*iim
@@ -346,4 +344,11 @@
 ! ED18 TEST
 !      PRINT*,'igcm_co2 = ',igcm_co2
+! Locate tracer "co2" and set igcm_co2:
+      do iq=1,nqtot
+        if (tname(iq)=="co2") then
+          igcm_co2=iq
+          exit
+        endif
+      enddo
 
 c-----------------------------------------------------------------------
