Index: trunk/LMDZ.GENERIC/libf/phygeneric/molvis.F90
===================================================================
--- trunk/LMDZ.GENERIC/libf/phygeneric/molvis.F90	(revision 4036)
+++ trunk/LMDZ.GENERIC/libf/phygeneric/molvis.F90	(revision 4146)
@@ -9,8 +9,8 @@
                         pvel,zzlev,zzlay,zdvelmolvis)
       
-      use comcstfi_mod, only: r, cpp, mugaz
       use callkeys_mod, only: phitop_molvis,zztop
       use conc_mod,     only: lambda
       use gases_h
+      use thermo_mod
 
 !=======================================================================
@@ -51,5 +51,5 @@
 
       INTEGER l,ig, nz     ! layer index, grid index, and number of layers
-      real fac             ! conversion factor between thermal conductivity and molecular viscosity
+      real fac(ngrid,nlayer)  ! conversion factor between thermal conductivity and molecular viscosity
       REAL zvel(nlayer)    ! wind
       real zt(nlayer)      ! temperature (K)
@@ -71,5 +71,5 @@
       nz = nlayer
 
-      fac = (9 * cpp - 5 * (cpp - r)) / 4
+      fac(:,:) = (9 * cpp(:,:) - 5 * (cpp(:,:) - r(:,:))) / 4
 
       do ig=1,ngrid
@@ -89,16 +89,16 @@
         zlev(nz+1) = zlev(nz) + zztop
         
-        mu(1) = lambda(ig,1) / fac
+        mu(1) = lambda(ig,1) / fac(ig,1)
 
         DO l=2,nz
-          mu(l)=lambda(ig,l)/fac
+          mu(l)=lambda(ig,l)/fac(ig,l)
         ENDDO
     
         DO l=1,nz-1
-          muvol(l) = pplay(ig,l) / (r*zt(l)) 
+          muvol(l) = pplay(ig,l) / (r(ig,l)*zt(l)) 
           alpha(l) = (muvol(l) / ptimestep) * (zlev(l+1) - zlev(l))
         ENDDO
 
-        muvol(nz) = pplay(ig,nz) / (r*zt(nz)) 
+        muvol(nz) = pplay(ig,nz) / (r(ig,nz)*zt(nz)) 
         alpha(nz) = (muvol(nz) / ptimestep) * (zlev(nz+1) - zlev(nz))
 
