Index: trunk/LMDZ.MARS/libf/aeronomars/euvheat.F
===================================================================
--- trunk/LMDZ.MARS/libf/aeronomars/euvheat.F	(revision 517)
+++ trunk/LMDZ.MARS/libf/aeronomars/euvheat.F	(revision 552)
@@ -193,5 +193,5 @@
 
         do l=1,nlayermx
-          pdteuv(ig,l)=0.16*jtot(l)/10.
+          pdteuv(ig,l)=euveff*jtot(l)/10.
      &            /(cpnew(ig,l)*pplay(ig,l)/(rnew(ig,l)*zt(ig,l)))
      &                  *(1.52/dist_sol)**2 
Index: trunk/LMDZ.MARS/libf/aeronomars/inichim_newstart.F
===================================================================
--- trunk/LMDZ.MARS/libf/aeronomars/inichim_newstart.F	(revision 517)
+++ trunk/LMDZ.MARS/libf/aeronomars/inichim_newstart.F	(revision 552)
@@ -72,6 +72,5 @@
      &           1.,17.,33.,18.,34.,16.,48./   ! minors
       character*3 tmp ! temporary variable
-      integer ierr,lnblnk
-      external lnblnk
+      integer ierr
 
       logical :: oldnames ! =.true. if old tracer naming convention (q01,...)
@@ -476,11 +475,11 @@
 c----------------------------------------------------------------------
       open(210, iostat=ierr,file=
-     & datafile(1:lnblnk(datafile))//'/atmosfera_LMD_may.dat')
+     & trim(datafile)//'/atmosfera_LMD_may.dat')
       if (ierr.ne.0) then
         write(*,*)'Error : cannot open file atmosfera_LMD_may.dat '
         write(*,*)'(in aeronomars/inichim.F)'
-        write(*,*)'It should be in :', datafile(1:lnblnk(datafile)),'/'
-        write(*,*)'1) You can change this directory address in '
-        write(*,*)'   file phymars/datafile.h'
+        write(*,*)'It should be in :', trim(datafile),'/'
+        write(*,*)'1) You can change this path in callphys.def with'
+        write(*,*)'   datadir=/path/to/datafiles/'
         write(*,*)'2) If necessary atmosfera_LMD_may.dat (and others)'
         write(*,*)'   can be obtained online on:'
@@ -489,11 +488,11 @@
       endif
       open(220, iostat=ierr,file=
-     & datafile(1:lnblnk(datafile))//'/atmosfera_LMD_min.dat')
+     & trim(datafile)//'/atmosfera_LMD_min.dat')
       if (ierr.ne.0) then
         write(*,*)'Error : cannot open file atmosfera_LMD_min.dat '
         write(*,*)'(in aeronomars/inichim.F)'
-        write(*,*)'It should be in :', datafile(1:lnblnk(datafile)),'/'
-        write(*,*)'1) You can change this directory address in '
-        write(*,*)'   file phymars/datafile.h'
+        write(*,*)'It should be in :', trim(datafile),'/'
+        write(*,*)'1) You can change this path in callphys.def with'
+        write(*,*)'   datadir=/path/to/datafiles/'
         write(*,*)'2) If necessary atmosfera_LMD_min.dat (and others)'
         write(*,*)'   can be obtained online on:'
Index: trunk/LMDZ.MARS/libf/aeronomars/moldiff_red.F90
===================================================================
--- trunk/LMDZ.MARS/libf/aeronomars/moldiff_red.F90	(revision 517)
+++ trunk/LMDZ.MARS/libf/aeronomars/moldiff_red.F90	(revision 552)
@@ -314,7 +314,7 @@
 
 
-! If Zmax > 2000 km there is a problem / stop 
-
-	if (Zmax .gt. 2000000.) then
+! If Zmax > 4000 km there is a problem / stop 
+
+	if (Zmax .gt. 4000000.) then
 	Print*,'Zmax too high',ig,zmax,zmin
 	do l=1,nlayermx
@@ -918,9 +918,10 @@
 	SUBROUTINE QMNEW(Q1,DQ,Q2,dtime,nl,nq,gc,ig)
         IMPLICIT NONE
+#include "dimensions.h"
 
         INTEGER :: nl,nq
         INTEGER :: l,iq,ig
 	INTEGER,dimension(nq) :: gc
-        REAL,DIMENSION(nl,nq) :: Q1,DQ
+        REAL,DIMENSION(nl,nqmx) :: Q1,DQ
         REAL*8,DIMENSION(nl,nq) :: Q2
         REAL :: dtime
@@ -951,4 +952,5 @@
 	SUBROUTINE MMOY(massemoy,mmol,qq,gc,nl,nq)
 	IMPLICIT NONE
+#include "dimensions.h"
 
 	INTEGER :: nl,nq,l
@@ -956,5 +958,5 @@
 	REAL*8,DIMENSION(nl,nq) :: qq
 	REAL*8,DIMENSION(nl) :: massemoy
-	REAL,DIMENSION(nq) :: MMOL
+	REAL,DIMENSION(nqmx) :: MMOL
 
 
@@ -1034,4 +1036,5 @@
      & Nraf,Nrafk,Rraf,Rrafk,il,nl,nq,nlx,ig)
 	IMPLICIT NONE
+#include "dimensions.h"
 	
 	INTEGER :: nl,nq,il,l,i,iq,nlx,iz,ig
@@ -1044,5 +1047,5 @@
 	REAL*8, DIMENSION(nl,nq) :: Qraf,Rrafk,Nrafk
 	REAL*8 :: facZ,dZ,H
-	REAL,DIMENSION(nq) :: mmol
+	REAL,DIMENSION(nqmx) :: mmol
 	masseU=1.660538782d-27
         kbolt=1.3806504d-23
@@ -1354,4 +1357,5 @@
      &    pp,M,gc,nl,nq,nlx)
 	IMPLICIT NONE
+#include "dimensions.h"
 	INTEGER :: nl,nq,nlx,il,nn,iP
 	INTEGER,DIMENSION(1) :: indP
@@ -1359,5 +1363,5 @@
 	REAL*8,DIMENSION(nl) :: Z,P,T
 	REAL*8,DIMENSION(nl,nq) :: Q,Nk,Rk
-	REAL,DIMENSION(nq) :: M
+	REAL,DIMENSION(nqmx) :: M
 	REAL*8,DIMENSION(nq) :: nNew
 	REAL*8,DIMENSION(nlx) :: pp,tt,tnew
@@ -1447,4 +1451,5 @@
      &   ,pp,M,gc,nl,nq,nlx,facM)
         IMPLICIT NONE
+#include "dimensions.h"
         INTEGER :: nl,nq,nlx,il,nn,iP
         INTEGER,DIMENSION(1) :: indP
@@ -1452,5 +1457,5 @@
         REAL*8,DIMENSION(nl) :: Z,P,T
         REAL*8,DIMENSION(nl,nq) :: Q,Nk,Rk
-        REAL,DIMENSION(nq) :: M
+        REAL,DIMENSION(nqmx) :: M
         REAL*8,DIMENSION(nq) :: nNew
         REAL*8,DIMENSION(nlx) :: pp,rhonew,tt,tnew
