Index: trunk/LMDZ.MARS/libf/phymars/initracer.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/initracer.F	(revision 1377)
+++ trunk/LMDZ.MARS/libf/phymars/initracer.F	(revision 1380)
@@ -589,4 +589,30 @@
        endif
 
+       if (callnlte) then ! NLTE requirements
+         if (nltemodel.ge.1) then
+           ! check that co2, co, o and n2 tracers are available
+           if (igcm_co2.eq.0) then
+             write(*,*) "initracer: error !!"
+             write(*,*) "  with nltemodel>0, we need the co2 tracer!"
+             stop
+           endif
+           if (igcm_co.eq.0) then
+             write(*,*) "initracer: error !!"
+             write(*,*) "  with nltemodel>0, we need the co tracer!"
+             stop
+           endif
+           if (igcm_o.eq.0) then
+             write(*,*) "initracer: error !!"
+             write(*,*) "  with nltemodel>0, we need the o tracer!"
+             stop
+           endif
+           if (igcm_n2.eq.0) then
+             write(*,*) "initracer: error !!"
+             write(*,*) "  with nltemodel>0, we need the n2 tracer!"
+             stop
+           endif
+         endif 
+       endif
+
        if (scavenging) then
        ! verify that we indeed have ccn_mass and ccn_number tracers
Index: trunk/LMDZ.MARS/libf/phymars/iostart.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/iostart.F90	(revision 1377)
+++ trunk/LMDZ.MARS/libf/phymars/iostart.F90	(revision 1380)
@@ -528,5 +528,10 @@
       ENDIF
       
-      ierr=NF90_DEF_DIM(nid_restart,"number_of_advected_fields",nqtot,idim5)
+      if (nqtot.ne.0) then
+        ierr=NF90_DEF_DIM(nid_restart,"number_of_advected_fields",nqtot,idim5)
+      else
+        ! pretend nqtot=1 because 0 size implies unlimited dimension for NetCDF
+        ierr=NF90_DEF_DIM(nid_restart,"number_of_advected_fields",1,idim5)
+      endif
       IF (ierr/=NF90_NOERR) THEN
         write(*,*)'open_restartphy: problem defining number_of_advected_fields dimension '
Index: trunk/LMDZ.MARS/libf/phymars/physiq.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/physiq.F	(revision 1377)
+++ trunk/LMDZ.MARS/libf/phymars/physiq.F	(revision 1380)
@@ -2454,10 +2454,10 @@
          call WRITEDIAGFI(ngrid,"pplev","Pressure","Pa",1,zplev)
          call WRITEDIAGFI(ngrid,"rho","rho","kg.m-3",1,rho)
-!         call WRITEDIAGFI(ngrid,"dtrad","rad. heat. rate",              &
-!     &              "K.s-1",1,dtrad/zpopsk)
-!        call WRITEDIAGFI(ngrid,'sw_htrt','sw heat. rate',
-!     &                   'w.m-2',1,zdtsw/zpopsk)
-!        call WRITEDIAGFI(ngrid,'lw_htrt','lw heat. rate',
-!     &                   'w.m-2',1,zdtlw/zpopsk)
+         call WRITEDIAGFI(ngrid,"dtrad","rad. heat. rate",              &
+     &              "K.s-1",1,dtrad)
+        call WRITEDIAGFI(ngrid,'sw_htrt','sw heat. rate',
+     &                   'w.m-2',1,zdtsw)
+        call WRITEDIAGFI(ngrid,'lw_htrt','lw heat. rate',
+     &                   'w.m-2',1,zdtlw)
          call WRITEDIAGFI(ngrid,"co2ice","co2 ice thickness"
      &                                   ,"kg.m-2",0,co2ice)
Index: trunk/LMDZ.MARS/libf/phymars/testphys1d.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/testphys1d.F	(revision 1377)
+++ trunk/LMDZ.MARS/libf/phymars/testphys1d.F	(revision 1380)
@@ -373,4 +373,5 @@
       ! we still need to set (dummy) tracer number and names for physdem1
         nq=1
+        nqtot=nq ! set value of nqtot (in infotrac module) as nq
         ! allocate arrays:
         allocate(tname(nq))
@@ -381,5 +382,5 @@
         allocate(mqtot(nq))
         do iq=1,nq
-          write(str7,'(a1,i2.2)')'q',iq
+          write(str7,'(a1,i2.2)')'t',iq
           tname(iq)=str7
         enddo
@@ -797,5 +798,6 @@
         CALL endg1d(1,nlayer,zlay/1000.,ndt)
 
-c    ========================================================
+      write(*,*) "testphys1d: Everything is cool."
+
       END
  
