Index: LMDZ5/trunk/libf/phylmd/phys_local_var_mod.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/phys_local_var_mod.F90	(revision 2732)
+++ LMDZ5/trunk/libf/phylmd/phys_local_var_mod.F90	(revision 2752)
@@ -419,5 +419,6 @@
 
 #ifdef CPP_StratAer
-! variables for strat. aerosol CK
+!
+! variables for stratospheric aerosol
       REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: R2SO4
 !$OMP THREADPRIVATE(R2SO4)
@@ -426,22 +427,8 @@
       REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: f_r_wet
 !$OMP THREADPRIVATE(f_r_wet)
-      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: sfluxaer
-!$OMP THREADPRIVATE(sfluxaer)
       REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: decfluxaer
 !$OMP THREADPRIVATE(decfluxaer)
       REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: mdw
 !$OMP THREADPRIVATE(mdw)
-      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sulf_convert
-!$OMP THREADPRIVATE(sulf_convert)
-      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sulf_nucl
-!$OMP THREADPRIVATE(sulf_nucl)
-      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sulf_cond_evap
-!$OMP THREADPRIVATE(sulf_cond_evap)
-      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ocs_convert
-!$OMP THREADPRIVATE(ocs_convert)
-      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: SO2_backgr_tend
-!$OMP THREADPRIVATE(SO2_backgr_tend)
-      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: OCS_backgr_tend
-!$OMP THREADPRIVATE(OCS_backgr_tend)
       REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: OCS_lifetime
 !$OMP THREADPRIVATE(OCS_lifetime)
@@ -456,14 +443,8 @@
       REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tau_strat_550
 !$OMP THREADPRIVATE(tau_strat_550)
-      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tau_strat_550_lay
-!$OMP THREADPRIVATE(tau_strat_550_lay)
       REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tau_strat_1020
 !$OMP THREADPRIVATE(tau_strat_1020)
       REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tausum_strat
 !$OMP THREADPRIVATE(tausum_strat)
-      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: sulf_dep_dry
-!$OMP THREADPRIVATE(sulf_dep_dry)
-      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: sulf_dep_wet
-!$OMP THREADPRIVATE(sulf_dep_wet)
       REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: surf_PM25_sulf
 !$OMP THREADPRIVATE(surf_PM25_sulf)
@@ -472,4 +453,37 @@
       REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: vsed_aer
 !$OMP THREADPRIVATE(vsed_aer)
+!
+!---3D budget variables
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_nucl
+!$OMP THREADPRIVATE(budg_3D_nucl)
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_cond_evap
+!$OMP THREADPRIVATE(budg_3D_cond_evap)
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_ocs_to_so2
+!$OMP THREADPRIVATE(budg_3D_ocs_to_so2)
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_so2_to_h2so4
+!$OMP THREADPRIVATE(budg_3D_so2_to_h2so4)
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_backgr_ocs
+!$OMP THREADPRIVATE(budg_3D_backgr_ocs)
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_backgr_so2
+!$OMP THREADPRIVATE(budg_3D_backgr_so2)
+!
+!---2D budget variables
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_h2so4
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_part
+!$OMP THREADPRIVATE(budg_dep_dry_h2so4,budg_dep_dry_part)
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_h2so4
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_part
+!$OMP THREADPRIVATE(budg_dep_wet_h2so4,budg_dep_wet_part)
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_ocs
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_so2
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_h2so4
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_part
+!$OMP THREADPRIVATE(budg_emi_ocs,budg_emi_so2,budg_emi_h2so4,budg_emi_part)
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_ocs_to_so2
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_so2_to_h2so4
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_h2so4_to_part
+!$OMP THREADPRIVATE(budg_ocs_to_so2,budg_so2_to_h2so4,budg_h2so4_to_part)
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_sed_part
+!$OMP THREADPRIVATE(budg_sed_part)
 #endif
 
@@ -718,13 +732,12 @@
       ALLOCATE (DENSO4(klon,klev))
       ALLOCATE (f_r_wet(klon,klev))
-      ALLOCATE (sfluxaer(klon))
       ALLOCATE (decfluxaer(klon,nbtr))
       ALLOCATE (mdw(nbtr))
-      ALLOCATE (sulf_convert(klon,klev))
-      ALLOCATE (sulf_nucl(klon,klev))
-      ALLOCATE (sulf_cond_evap(klon,klev))
-      ALLOCATE (ocs_convert(klon,klev))
-      ALLOCATE (SO2_backgr_tend(klon,klev))
-      ALLOCATE (OCS_backgr_tend(klon,klev))
+      ALLOCATE (budg_3D_nucl(klon,klev))
+      ALLOCATE (budg_3D_cond_evap(klon,klev))
+      ALLOCATE (budg_3D_ocs_to_so2(klon,klev))
+      ALLOCATE (budg_3D_so2_to_h2so4(klon,klev))
+      ALLOCATE (budg_3D_backgr_ocs(klon,klev))
+      ALLOCATE (budg_3D_backgr_so2(klon,klev))
       ALLOCATE (OCS_lifetime(klon,klev))
       ALLOCATE (SO2_lifetime(klon,klev))
@@ -733,9 +746,18 @@
       ALLOCATE (cg_bin(nbands_sw_rrtm+nbands_lw_rrtm+nwave+nwave_lw,nbtr))
       ALLOCATE (tau_strat_550(klon,klev))
-      ALLOCATE (tau_strat_550_lay(klon,klev))
       ALLOCATE (tau_strat_1020(klon,klev))
       ALLOCATE (tausum_strat(klon,3))
-      ALLOCATE (sulf_dep_dry(klon))
-      ALLOCATE (sulf_dep_wet(klon))
+      ALLOCATE (budg_dep_dry_h2so4(klon))
+      ALLOCATE (budg_dep_wet_h2so4(klon))
+      ALLOCATE (budg_dep_dry_part(klon))
+      ALLOCATE (budg_dep_wet_part(klon))
+      ALLOCATE (budg_emi_ocs(klon))
+      ALLOCATE (budg_emi_so2(klon))
+      ALLOCATE (budg_emi_h2so4(klon))
+      ALLOCATE (budg_emi_part(klon))
+      ALLOCATE (budg_ocs_to_so2(klon))
+      ALLOCATE (budg_so2_to_h2so4(klon))
+      ALLOCATE (budg_h2so4_to_part(klon))
+      ALLOCATE (budg_sed_part(klon))
       ALLOCATE (surf_PM25_sulf(klon))
       ALLOCATE (p_tropopause(klon))
@@ -964,13 +986,6 @@
       DEALLOCATE (DENSO4)
       DEALLOCATE (f_r_wet)
-      DEALLOCATE (sfluxaer)
       DEALLOCATE (decfluxaer)
       DEALLOCATE (mdw)
-      DEALLOCATE (sulf_convert)
-      DEALLOCATE (sulf_nucl)
-      DEALLOCATE (sulf_cond_evap)
-      DEALLOCATE (ocs_convert)
-      DEALLOCATE (SO2_backgr_tend)
-      DEALLOCATE (OCS_backgr_tend)
       DEALLOCATE (SO2_lifetime)
       DEALLOCATE (OCS_lifetime)
@@ -979,12 +994,27 @@
       DEALLOCATE (cg_bin)
       DEALLOCATE (tau_strat_550)
-      DEALLOCATE (tau_strat_550_lay)
       DEALLOCATE (tau_strat_1020)
       DEALLOCATE (tausum_strat)
-      DEALLOCATE (sulf_dep_dry)
-      DEALLOCATE (sulf_dep_wet)
       DEALLOCATE (surf_PM25_sulf)
       DEALLOCATE (p_tropopause)
       DEALLOCATE (vsed_aer)
+      DEALLOCATE (budg_3D_ocs_to_so2)
+      DEALLOCATE (budg_3D_so2_to_h2so4)
+      DEALLOCATE (budg_3D_backgr_ocs)
+      DEALLOCATE (budg_3D_backgr_so2)
+      DEALLOCATE (budg_3D_nucl)
+      DEALLOCATE (budg_3D_cond_evap)
+      DEALLOCATE (budg_dep_dry_h2so4)
+      DEALLOCATE (budg_dep_wet_h2so4)
+      DEALLOCATE (budg_dep_dry_part)
+      DEALLOCATE (budg_dep_wet_part)
+      DEALLOCATE (budg_emi_ocs)
+      DEALLOCATE (budg_emi_so2)
+      DEALLOCATE (budg_emi_h2so4)
+      DEALLOCATE (budg_emi_part)
+      DEALLOCATE (budg_ocs_to_so2)
+      DEALLOCATE (budg_so2_to_h2so4)
+      DEALLOCATE (budg_h2so4_to_part)
+      DEALLOCATE (budg_sed_part)
 #endif
 
