Index: trunk/LMDZ.PLUTO/libf/phypluto/aerosol_mod.F90
===================================================================
--- trunk/LMDZ.PLUTO/libf/phypluto/aerosol_mod.F90	(revision 3627)
+++ trunk/LMDZ.PLUTO/libf/phypluto/aerosol_mod.F90	(revision 3632)
@@ -29,4 +29,5 @@
       use tracer_h
       use comcstfi_mod, only: r, pi
+      use mod_phys_lmdz_para, only : is_master
 
 !-----------------------------------------------------------------------
@@ -46,7 +47,6 @@
       integer :: iaer,l,ig,ifine
 
-      LOGICAL firstcall
-      SAVE firstcall
-      DATA firstcall/.true./
+      LOGICAL,SAVE :: firstcall=.true.
+!$OMP THREADPRIVATE(firstcall)
 
       !!read altitudes and haze mmrs
@@ -56,5 +56,7 @@
       character(len=100) :: file_path
       character(len=100) :: file_name
-      real,save :: levdat(Nfine),densdat(Nfine)
+    !   real,save :: levdat(Nfine),densdat(Nfine)
+      real,save,allocatable :: levdat(:)
+      real,save,allocatable :: densdat(:)
 
 !---------------- INPUT ------------------------------------------------
@@ -74,11 +76,22 @@
         endif
 
-        file_path=trim(datadir)//'/haze_prop/'//file_name
-        open(224,file=file_path,form='formatted')
-        do ifine=1,Nfine
-           read(224,*) levdat(ifine), densdat(ifine)
-        enddo
-        close(224)
-        print*, 'Read Haze profile: ',file_path
+        if (is_master) then
+            if(.not.allocated(levdat)) then
+                allocate(levdat(Nfine))
+            endif
+            if(.not.allocated(densdat)) then
+                allocate(densdat(Nfine))
+            endif
+
+
+            file_path=trim(datadir)//'/haze_prop/'//file_name
+            open(224,file=file_path,form='formatted')
+            do ifine=1,Nfine
+            read(224,*) levdat(ifine), densdat(ifine)
+            enddo
+            close(224)
+            print*, 'Read Haze profile: ',file_path
+        endif
+!$OMP BARRIER
       ENDIF
 
Index: trunk/LMDZ.PLUTO/libf/phypluto/lymalpha.F90
===================================================================
--- trunk/LMDZ.PLUTO/libf/phypluto/lymalpha.F90	(revision 3627)
+++ trunk/LMDZ.PLUTO/libf/phypluto/lymalpha.F90	(revision 3632)
@@ -2,5 +2,5 @@
       use datafile_mod
       use comcstfi_mod, only: pi
-      use mod_phys_lmdz_para, only : is_master, bcast
+      use mod_phys_lmdz_para, only : is_master
 
       implicit none
@@ -43,6 +43,7 @@
       integer ifine
       character(len=100) :: file_path
-      real,save :: lsdat(Nfine),fluxdat(Nfine)
-!$OMP THREADPRIVATE(lsdat,fluxdat)
+      ! real,save :: lsdat(Nfine),fluxdat(Nfine)
+      real,save,allocatable :: lsdat(:)
+      real,save,allocatable :: fluxdat(:)
 
 
@@ -50,20 +51,27 @@
 
       IF (firstcall) then
-        firstcall=.false.
-        file_path=trim(datadir)//'/sol_uv_flux.txt'
-        if (is_master) print*,file_path
-        open(222,file=file_path,form='formatted')
+         firstcall=.false.
 
-        if (is_master) then
-        do ifine=1,Nfine
-           read(222,*) lsdat(ifine), fluxdat(ifine)
-        enddo
-        close(222)
-        endif ! is_master
+!$OMP MASTER
+         file_path=trim(datadir)//'/sol_uv_flux.txt'
+         if (is_master) print*,file_path
 
-        call bcast(lsdat)
-        call bcast(fluxdat)
+         open(222,file=file_path,form='formatted')
+
+            if(.not.allocated(lsdat)) then
+               allocate(lsdat(Nfine))
+            endif
+            if(.not.allocated(fluxdat)) then
+               allocate(fluxdat(Nfine))
+            endif
+
+            do ifine=1,Nfine
+               read(222,*) lsdat(ifine), fluxdat(ifine)
+            enddo
+            close(222)
+
+!$OMP END MASTER
+!$OMP BARRIER
       ENDIF
-
 
       CALL interp_line(lsdat,fluxdat,Nfine,pls*180./pi,pflux,1)
Index: trunk/LMDZ.PLUTO/libf/phypluto/physiq_mod.F90
===================================================================
--- trunk/LMDZ.PLUTO/libf/phypluto/physiq_mod.F90	(revision 3627)
+++ trunk/LMDZ.PLUTO/libf/phypluto/physiq_mod.F90	(revision 3632)
@@ -116,5 +116,5 @@
 !         II.2.b Option 2 : Atmosphere has no radiative effect.
 !
-!      III. Vertical diffusion (turbulent mixing) 
+!      III. Vertical diffusion (turbulent mixing)
 !
 !      IV. Convection :
@@ -476,5 +476,6 @@
 
       ! local variables for skin depth check
-      real :: therm_inertia(ngrid,nsoilmx) 
+      real :: therm_inertia(ngrid,nsoilmx)
+    !   real :: tidat_out(ngrid,nsoilmx)
       real :: inertia_min,inertia_max
       real :: diurnal_skin ! diurnal skin depth (m)
@@ -1301,5 +1302,5 @@
                    qsurf(:,igcm_ch4_ice),dqsurf(:,igcm_ch4_ice), &
                    ptimestep,pplev,zdqch4fast,zdqsch4fast,'CH4',' vdifc ')
-        else 
+        else
              call testconserv(ngrid,nlayer,nq,pq,pdq,qsurf,dqsurf, &
                    igcm_ch4_gas,igcm_ch4_ice, &
@@ -1404,5 +1405,5 @@
                    qsurf(:,igcm_ch4_ice),dqsurf(:,igcm_ch4_ice), &
                    ptimestep,pplev,zdqch4fast,zdqsch4fast,'CH4',' n2cond')
-        else 
+        else
              call testconserv(ngrid,nlayer,nq,pq,pdq,qsurf,dqsurf, &
                    igcm_ch4_gas,igcm_ch4_ice, &
@@ -1504,9 +1505,9 @@
 
             pdqmufi(:,:,:) = 0.
-   
+
             call calmufi(ptimestep,pplev,zzlev,pplay,zzlay,gzlat,pt,pq,pdq,pdqmufi_prod,pdqmufi)
-   
+
             pdq(:,:,:) = pdq(:,:,:) + pdqmufi(:,:,:)
-            
+
          ELSE
             IF (haze) THEN
@@ -1690,8 +1691,8 @@
 
       ! ! For output :
-      ! tidat_out(:,:)=0.
-      ! DO l=1,min(nlayermx,nsoilmx)
-      !    tidat_out(:,l)=inertiedat(:,l)
-      ! ENDDO
+    !   tidat_out(:,:)=0.
+    !   DO l=1,nsoilmx
+    !      tidat_out(:,l)=therm_inertia(:,l)
+    !   ENDDO
 
       ! Test energy conservation
@@ -2142,5 +2143,6 @@
          call write_output("capcal","capcal","W.s m-2 K-1",capcal)
          call write_output("tsoil","tsoil","K",tsoil)
-      endif 
+         call write_output("therm_inertia","therm_inertia","S.I.",therm_inertia)
+      endif
 
       ! Total energy balance diagnostics
@@ -2347,5 +2349,5 @@
             call write_output("rcs","Spherical mode characteristic radius","m",mp2m_rc_sph(:,:))
             call write_output("rcf","Fractal mode characteristic radius","m",mp2m_rc_fra(:,:))
-            
+
            if (optichaze) then
               call write_output("tau_col",&
