Index: trunk/LMDZ.MARS/libf/aeronomars/moldiff.F
===================================================================
--- trunk/LMDZ.MARS/libf/aeronomars/moldiff.F	(revision 408)
+++ trunk/LMDZ.MARS/libf/aeronomars/moldiff.F	(revision 414)
@@ -32,5 +32,7 @@
 c Local
 c
-       real hco2(ncomptot),ho
+
+      integer,parameter :: ncompmoldiff = 14
+       real hco2(ncompmoldiff),ho
 
       integer ig,nz,l,n,nn,iq
@@ -39,16 +41,16 @@
       real hp(nlayermx)
       real tt(nlayermx)
-      real qq(nlayermx,ncomptot)
+      real qq(nlayermx,ncompmoldiff)
       real dmmeandz(nlayermx)
-      real qnew(nlayermx,ncomptot)
+      real qnew(nlayermx,ncompmoldiff)
       real zlocal(nlayermx)
-      real alf(ncomptot-1,ncomptot-1)
-      real alfinv(nlayermx,ncomptot-1,ncomptot-1)
-      real indx(ncomptot-1)
-      real b(nlayermx,ncomptot-1)
-      real y(ncomptot-1,ncomptot-1)
-      real aa(nlayermx,ncomptot-1,ncomptot-1)
-      real bb(nlayermx,ncomptot-1,ncomptot-1)
-      real cc(nlayermx,ncomptot-1,ncomptot-1)
+      real alf(ncompmoldiff-1,ncompmoldiff-1)
+      real alfinv(nlayermx,ncompmoldiff-1,ncompmoldiff-1)
+      real indx(ncompmoldiff-1)
+      real b(nlayermx,ncompmoldiff-1)
+      real y(ncompmoldiff-1,ncompmoldiff-1)
+      real aa(nlayermx,ncompmoldiff-1,ncompmoldiff-1)
+      real bb(nlayermx,ncompmoldiff-1,ncompmoldiff-1)
+      real cc(nlayermx,ncompmoldiff-1,ncompmoldiff-1)
       real atri(nlayermx-2)
       real btri(nlayermx-2)
@@ -56,6 +58,6 @@
       real rtri(nlayermx-2)
       real qtri(nlayermx-2)
-      real alfdiag(ncomptot-1)
-      real wi(ncomptot), flux(ncomptot), pote
+      real alfdiag(ncompmoldiff-1)
+      real wi(ncompmoldiff), flux(ncompmoldiff), pote
 
 cccccccccccccccccccccccccccccccccccccccccccccccccccccccc
@@ -95,10 +97,10 @@
       integer,save :: g_h2o=0
 
-      integer,save :: gcmind(ncomptot) ! array of GCM indexes
+      integer,save :: gcmind(ncompmoldiff) ! array of GCM indexes
       integer ierr
 
       logical,save :: firstcall=.true.
-      real abfac(ncomptot)
-      real,save :: dij(ncomptot,ncomptot)
+      real abfac(ncompmoldiff)
+      real,save :: dij(ncompmoldiff,ncompmoldiff)
 
 ! Initializations at first call
@@ -215,5 +217,5 @@
      &                  +pdtconduc(ig,l)*ptimestep
 
-          do nn=1,ncomptot
+          do nn=1,ncompmoldiff
             qq(l,nn)=pq(ig,l,gcmind(nn))+pdq(ig,l,gcmind(nn))*ptimestep
             qq(l,nn)=max(qq(l,nn),1.e-30)
@@ -230,5 +232,5 @@
      &                  +pdtconduc(ig,nz)*ptimestep
 
-        do nn=1,ncomptot
+        do nn=1,ncompmoldiff
           qq(1,nn)=pq(ig,1,gcmind(nn))+pdq(ig,1,gcmind(nn))*ptimestep
           qq(nz,nn)=pq(ig,nz,gcmind(nn))+pdq(ig,nz,gcmind(nn))*ptimestep
@@ -251,8 +253,8 @@
         ntot=pplay(ig,l)/(1.381e-23*tt(l))      		! in #/m3
 
-        do nn=1,ncomptot-1            ! rows
+        do nn=1,ncompmoldiff-1            ! rows
           alfdiag(nn)=0.
           dcoef1=dij(nn,i_o)*ptfac
-          do n=1,ncomptot-1           ! columns
+          do n=1,ncompmoldiff-1           ! columns
             y(nn,n)=0.
             dcoef=dij(nn,n)*ptfac
@@ -277,5 +279,5 @@
 c Inverting the alfa matrix
 c
-        call ludcmp(alf,ncomptot-1,ncomptot-1,indx,d,ierr)
+        call ludcmp(alf,ncompmoldiff-1,ncompmoldiff-1,indx,d,ierr)
 
 c       TEMPORAIRE *****************************
@@ -291,7 +293,7 @@
         end if
 c       *******************************************
-        do n=1,ncomptot-1
-          call lubksb(alf,ncomptot-1,ncomptot-1,indx,y(1,n))
-          do nn=1,ncomptot-1
+        do n=1,ncompmoldiff-1
+          call lubksb(alf,ncompmoldiff-1,ncompmoldiff-1,indx,y(1,n))
+          do nn=1,ncompmoldiff-1
             alfinv(l,nn,n)=y(nn,n)/hh
           enddo
@@ -309,6 +311,6 @@
         del1=hp(l)*pplay(ig,l)/(g*ptimestep)
         del2=(hp(l)/2)**2*pplay(ig,l)/(g*ptimestep)
-        do nn=1,ncomptot-1
-          do n=1,ncomptot-1
+        do nn=1,ncompmoldiff-1
+          do n=1,ncompmoldiff-1
             dalfinvdz=(alfinv(l+1,nn,n)-alfinv(l-1,nn,n))/hp(l)
             aa(l,nn,n)=-dalfinvdz/del1+alfinv(l,nn,n)/del2
@@ -336,5 +338,5 @@
 c (Hunten 1973, eq. 5)
       
-      do n=1,ncomptot
+      do n=1,ncompmoldiff
         wi(n)=1.
         flux(n)=0.
@@ -379,5 +381,5 @@
 c
 
-      do nn=1,ncomptot-1
+      do nn=1,ncompmoldiff-1
         do l=2,nz-1
           atri(l-1)=aa(l,nn,nn)
@@ -385,5 +387,5 @@
           ctri(l-1)=cc(l,nn,nn)
           rtri(l-1)=qq(l,nn)
-          do n=1,ncomptot-1
+          do n=1,ncompmoldiff-1
             rtri(l-1)=rtri(l-1)-(aa(l,nn,n)*qq(l-1,n)
      &                           +bb(l,nn,n)*qq(l,n)
@@ -434,5 +436,5 @@
         if(zlocal(l).gt.65000.)then
         pdqdiff(ig,l,g_o)=0.
-        do n=1,ncomptot-1
+        do n=1,ncompmoldiff-1
           pdqdiff(ig,l,gcmind(n))=(qnew(l,n)-qq(l,n))
           pdqdiff(ig,l,g_o)=pdqdiff(ig,l,g_o)-(qnew(l,n)-qq(l,n))
Index: trunk/LMDZ.MARS/libf/aeronomars/moldiffcoeff.F
===================================================================
--- trunk/LMDZ.MARS/libf/aeronomars/moldiffcoeff.F	(revision 408)
+++ trunk/LMDZ.MARS/libf/aeronomars/moldiffcoeff.F	(revision 414)
@@ -22,5 +22,6 @@
 c    Input/Output
 c    ------------
-      real dij(ncomptot,ncomptot)
+       integer,parameter :: ncompmoldiff = 14
+      real dij(ncompmoldiff,ncompmoldiff)
 
 c    Local variables:
@@ -63,5 +64,5 @@
       integer,save :: g_h2o=0
 
-      integer,save :: gcmind(ncomptot)
+      integer,save :: gcmind(ncompmoldiff)
 
       real dnh
@@ -187,7 +188,7 @@
        print*,'moldiffcoef: COEFF CALC'
        open(56,file='coeffs.dat',status='unknown')
-      do n=1,ncomptot
+      do n=1,ncompmoldiff
         if (dij(i_h2,n).gt.0.0) then
-          do nn=n,ncomptot
+          do nn=n,ncompmoldiff
             dij(nn,n)=dij(i_h2,n)
      &                  *sqrt(mmol(g_h2)/mmol(gcmind(nn)))
@@ -198,5 +199,5 @@
         if (dij(i_h2,n).eq.0.0) then
           dnh=dij(i_h,i_o)*sqrt(mmol(g_o)/mmol(gcmind(n)))
-          do nn=n,ncomptot
+          do nn=n,ncompmoldiff
             dij(nn,n)=dnh*sqrt(mmol(g_h)/mmol(gcmind(nn)))
             if(n.eq.nn) dij(nn,n)=1.0
@@ -206,6 +207,6 @@
       enddo 
 
-      do n=1,ncomptot
-        do nn=n,ncomptot
+      do n=1,ncompmoldiff
+        do nn=n,ncompmoldiff
           write(56,*) n,nn,dij(n,nn)	!*1.e5/1.381e-23/(273**1.75)
         enddo
