Index: LMDZ5/trunk/libf/phylmd/readaerosolstrato.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/readaerosolstrato.F90	(revision 1825)
+++ LMDZ5/trunk/libf/phylmd/readaerosolstrato.F90	(revision 1826)
@@ -33,4 +33,5 @@
     integer i, k, band, wave
     integer, save :: mth_pre
+!$OMP THREADPRIVATE(mth_pre)
 
     real, allocatable, dimension(:,:), save :: tau_aer_strat
@@ -41,5 +42,4 @@
     real, allocatable:: tauaerstrat_mois(:, :, :)
     real, allocatable:: tauaerstrat_mois_glo(:, :)
-    real, allocatable:: tauaerstrat_mois_glo_bands(:,:,:)
 
 ! For NetCDF:
@@ -61,7 +61,8 @@
     IF (.not.ALLOCATED(tau_aer_strat)) ALLOCATE(tau_aer_strat(klon,klev))
 
+!--only read file if beginning of run or start of new month
+    IF (debut.OR.mth_cur.NE.mth_pre) THEN
+
     IF (is_mpi_root) THEN
-
-    IF (debut.OR.mth_cur.NE.mth_pre) THEN
 
     IF (nbands.NE.2) THEN 
@@ -107,8 +108,7 @@
     ENDIF
 
-    ALLOCATE(tauaerstrat(n_lon, n_lat, n_lev, n_month))
-    ALLOCATE(tauaerstrat_mois(n_lon, n_lat, n_lev))
-    ALLOCATE(tauaerstrat_mois_glo(klon_glo, n_lev))
-    ALLOCATE(tauaerstrat_mois_glo_bands(klon_glo, n_lev,nbands))
+    IF (.not.ALLOCATED(tauaerstrat))          ALLOCATE(tauaerstrat(n_lon, n_lat, n_lev, n_month))
+    IF (.not.ALLOCATED(tauaerstrat_mois))     ALLOCATE(tauaerstrat_mois(n_lon, n_lat, n_lev))
+    IF (.not.ALLOCATED(tauaerstrat_mois_glo)) ALLOCATE(tauaerstrat_mois_glo(klon_glo, n_lev))
 
 !--reading stratospheric AOD at 550 nm
@@ -128,21 +128,23 @@
     CALL grid2dTo1d_glo(tauaerstrat_mois,tauaerstrat_mois_glo)
 
+!    DEALLOCATE(tauaerstrat)
+!    DEALLOCATE(tauaerstrat_mois)
+!    DEALLOCATE(tauaerstrat_mois_glo)
+  
+    ENDIF !--is_mpi_root
+
 !--scatter on all proc
     CALL scatter(tauaerstrat_mois_glo,tau_aer_strat)
 
-    DEALLOCATE(tauaerstrat)
-    DEALLOCATE(tauaerstrat_mois)
-    DEALLOCATE(tauaerstrat_mois_glo)
-  
+!--keep memory of previous month
     mth_pre=mth_cur
 
     ENDIF !--debut ou nouveau mois
 
-    ENDIF !--is_mpi_root
-
 !--total vertical aod at the 5 wavelengths
     DO wave=1, nwave
     DO k=1, klev
-    tausum_aero(:,wave,id_strat)=tausum_aero(:,wave,id_strat)+tau_aer_strat(:,k)*alpha_strat_wave(wave)/alpha_strat_wave(2)
+    tausum_aero(:,wave,id_STRAT)=tausum_aero(:,wave,id_STRAT)+tau_aer_strat(:,k)*alpha_strat_wave(wave)/alpha_strat_wave(2)
+!    tausum_aero(:,wave,id_ASBCM)=tausum_aero(:,wave,id_ASBCM)+tau_aer_strat(:,k)*alpha_strat_wave(wave)/alpha_strat_wave(2)
     ENDDO
     ENDDO
