Index: trunk/LMDZ.MARS/libf/aeronomars/calchim_mod.F90
===================================================================
--- trunk/LMDZ.MARS/libf/aeronomars/calchim_mod.F90	(revision 2212)
+++ trunk/LMDZ.MARS/libf/aeronomars/calchim_mod.F90	(revision 2213)
@@ -191,5 +191,5 @@
 !     for output:
 
-      logical :: output             ! to issue calls to writediagfi and stats
+      logical,save :: output        ! to issue calls to writediagfi and stats
       real :: jo3_3d(ngrid,nlayer)  ! Photodissociation rate O3->O1D (s-1)
       real :: jh2o_3d(ngrid,nlayer)  ! Photodissociation rate H2O->H+OH (s-1)
@@ -200,18 +200,18 @@
 
 !=======================================================================
+!     initialization of the chemistry (first call only)
+!=======================================================================
+
+      if (firstcall) then
+
+!=======================================================================
 !     main dashboard for the chemistry
 !=======================================================================
 
-      unichim = .true.     ! true : unified chemistry ! false : separate models in lower and upper atmosphere
-      jonline = .true.     ! true : on-line calculation of photodissociation rates ! false : lookup table
-      ionchem = .false.    ! switch for ionospheric chemistry
-      depos   = .false.    ! switch for dry deposition
-      output  = .false.    ! true : triggers writing of specific outputs (photolysis rates, emission rates, etc)
-
-!=======================================================================
-!     initialization of the chemistry (first call only)
-!=======================================================================
-
-      if (firstcall) then
+        unichim = .true.     ! true : unified chemistry ! false : separate models in lower and upper atmosphere
+        jonline = .true.     ! true : on-line calculation of photodissociation rates ! false : lookup table
+        ionchem = .false.    ! switch for ionospheric chemistry
+        depos   = .false.    ! switch for dry deposition
+        output  = .false.    ! true : triggers writing of specific outputs (photolysis rates, emission rates, etc)
 
          if (photochem) then
Index: trunk/LMDZ.MARS/libf/aeronomars/jthermcalc.F
===================================================================
--- trunk/LMDZ.MARS/libf/aeronomars/jthermcalc.F	(revision 2212)
+++ trunk/LMDZ.MARS/libf/aeronomars/jthermcalc.F	(revision 2213)
@@ -1377,9 +1377,10 @@
 C escout(nlayer) on pressure grid p(nlayer).
 C
-      real*8 wm(nlayer),wp(nlayer),p(nlayer)
-      integer nm(nlayer)
-      real*8 pin(nl)
-      real*8 limup,limdown
-      integer nl,nlayer,n1,n,np,nini
+      real*8,intent(out) :: wm(nlayer),wp(nlayer) ! interpolation weights
+      integer,intent(out) :: nm(nlayer) ! index of nearest point
+      real*8,intent(in) :: pin(nl),p(nlayer)
+      real*8,intent(in) :: limup,limdown
+      integer,intent(in) :: nl,nlayer
+      integer :: n1,n,np,nini
       nini=1
       do n1=1,nlayer
@@ -1400,5 +1401,5 @@
          endif
       enddo
-      return
+
       end
 
