Index: palm/trunk/SOURCE/flow_statistics.f90
===================================================================
--- palm/trunk/SOURCE/flow_statistics.f90	(revision 4130)
+++ palm/trunk/SOURCE/flow_statistics.f90	(revision 4131)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Allow profile output for salsa variables.
+! 
+! 4039 2019-06-18 10:32:41Z suehring
 ! Correct conversion to kinematic scalar fluxes in case of pw-scheme and 
 ! statistic regions
@@ -335,5 +338,5 @@
                 simulated_time, simulated_time_at_begin,                       &
                 use_subsidence_tendencies, use_surface_fluxes, use_top_fluxes, &
-                ws_scheme_mom, ws_scheme_sca
+                ws_scheme_mom, ws_scheme_sca, salsa, max_pr_salsa
 
     USE cpulog,                                                                &
@@ -1954,4 +1957,12 @@
                 ENDIF
              ENDIF
+             IF ( salsa )  THEN
+                IF ( max_pr_cs > 0 )  THEN
+                   sums_l(:,pr_palm+max_pr_user+max_pr_cs+1:pr_palm+max_pr_user+max_pr_cs+max_pr_salsa,0) =    &
+                      sums_l(:,pr_palm+max_pr_user+max_pr_cs+1:pr_palm+max_pr_user+max_pr_cs+max_pr_salsa,0) + &
+                      sums_l(:,pr_palm+max_pr_user+max_pr_cs+1:pr_palm+max_pr_user+max_pr_cs+max_pr_salsa,i)
+
+                ENDIF
+             ENDIF
           ENDDO
        ENDIF
@@ -1974,4 +1985,13 @@
                 CALL MPI_ALLREDUCE( sums_l(nzb,pr_palm+max_pr_user+i,0),       &
                                     sums(nzb,pr_palm+max_pr_user+i),           &
+                                    nzt+2-nzb, MPI_REAL, MPI_SUM, comm2d, ierr )
+             ENDDO
+       ENDIF
+
+       IF ( salsa  .AND.  max_pr_salsa > 0 )  THEN
+          IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+             DO  i = 1, max_pr_salsa
+                CALL MPI_ALLREDUCE( sums_l(nzb,pr_palm+max_pr_user+max_pr_cs+i,0),                 &
+                                    sums(nzb,pr_palm+max_pr_user+max_pr_user+i),                   &
                                     nzt+2-nzb, MPI_REAL, MPI_SUM, comm2d, ierr )
              ENDDO
@@ -2051,4 +2071,14 @@
                                  sums(k, pr_palm+1:pr_palm+max_pr_user+max_pr_cs) / &
                                  ngp_2dh_s_inner(k,sr)
+             ENDDO
+          ENDIF  
+       ENDIF
+
+       IF ( salsa ) THEN
+          IF ( max_pr_salsa > 0 )  THEN
+             DO k = nzb, nzt+1
+                sums(k,pr_palm+max_pr_user+max_pr_cs+1:pr_palm+max_pr_user+max_pr_cs+max_pr_salsa) = &
+                  sums(k,pr_palm+max_pr_user+max_pr_cs+1:pr_palm+max_pr_user+max_pr_cs+max_pr_salsa) &
+                  / ngp_2dh_s_inner(k,sr)
              ENDDO
           ENDIF  
@@ -2202,4 +2232,11 @@
           ENDIF
        ENDIF
+
+       IF ( salsa )  THEN
+          IF ( max_pr_salsa > 0 )  THEN    ! salsa profiles
+             hom(:,1,pr_palm+max_pr_user+max_pr_cs+1:pr_palm+max_pr_user+max_pr_cs+max_pr_salsa, sr) = &
+                  sums(:,pr_palm+max_pr_user+max_pr_cs+1:pr_palm+max_pr_user+max_pr_cs+max_pr_salsa)
+          ENDIF
+       ENDIF
 !
 !--    Determine the boundary layer height using two different schemes.
Index: palm/trunk/SOURCE/init_3d_model.f90
===================================================================
--- palm/trunk/SOURCE/init_3d_model.f90	(revision 4130)
+++ palm/trunk/SOURCE/init_3d_model.f90	(revision 4131)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Allocate sums and sums_l to allow profile output for salsa variables.
+! 
+! 4130 2019-08-01 13:04:13Z suehring
 ! Effectively reduce 3D initialization to 1D initial profiles. This is because
 ! 3D initialization produces structures in the w-component that are correlated
@@ -765,6 +768,6 @@
               ngp_2dh_s_inner_l(nzb:nzt+1,0:statistic_regions),                &
               rmask(nysg:nyng,nxlg:nxrg,0:statistic_regions),                  &
-              sums(nzb:nzt+1,pr_palm+max_pr_user+max_pr_cs),                   &
-              sums_l(nzb:nzt+1,pr_palm+max_pr_user+max_pr_cs,0:threads_per_task-1),      &
+              sums(nzb:nzt+1,pr_palm+max_pr_user+max_pr_cs+max_pr_salsa),      &
+              sums_l(nzb:nzt+1,pr_palm+max_pr_user+max_pr_cs+max_pr_salsa,0:threads_per_task-1),   &
               sums_l_l(nzb:nzt+1,0:statistic_regions,0:threads_per_task-1),    &
               sums_wsts_bc_l(nzb:nzt+1,0:statistic_regions) )
Index: palm/trunk/SOURCE/module_interface.f90
===================================================================
--- palm/trunk/SOURCE/module_interface.f90	(revision 4130)
+++ palm/trunk/SOURCE/module_interface.f90	(revision 4131)
@@ -397,4 +397,5 @@
         ONLY:  salsa_parin,                                                    &
                salsa_check_parameters,                                         &
+               salsa_check_data_output_pr,                                     &
                salsa_check_data_output,                                        &
                salsa_init_arrays,                                              &
@@ -409,4 +410,5 @@
                salsa_data_output_2d,                                           &
                salsa_data_output_3d,                                           &
+               salsa_statistics,                                               &
                salsa_rrd_local,                                                &
                salsa_wrd_local
@@ -783,4 +785,8 @@
     ENDIF
 
+    IF ( unit == 'illegal'  .AND.  salsa )  THEN
+       CALL salsa_check_data_output_pr( variable, var_count, unit, dopr_unit )
+    ENDIF
+
     IF ( unit == 'illegal'  .AND.  user_module_enabled )  THEN
        unit = '' ! ToDo: Seems like a hack. Find a general soultion!
@@ -1526,4 +1532,5 @@
     IF ( gust_module_enabled )  CALL gust_statistics( mode, sr, tn, dots_max )
     IF ( air_chemistry       )  CALL chem_statistics( mode, sr, tn )
+    IF ( salsa               )  CALL salsa_statistics( mode, sr, tn )
 
     IF ( user_module_enabled )  CALL user_statistics( mode, sr, tn )
Index: palm/trunk/SOURCE/modules.f90
===================================================================
--- palm/trunk/SOURCE/modules.f90	(revision 4130)
+++ palm/trunk/SOURCE/modules.f90	(revision 4131)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! Add max_pr_salsa to control_parameters. Used in creating profile output for
+! salsa.
+! 
+! 4110 2019-07-22 17:05:21Z suehring
 ! -advc_flags_1, advc_flags_2
 ! +advc_flags_m, advc_flags_s
@@ -1235,4 +1239,5 @@
     INTEGER(iwp) ::  maximum_grid_level                !< number of grid levels that the multigrid solver is using
     INTEGER(iwp) ::  maximum_parallel_io_streams = -1  !< maximum number of parallel io streams that the underlying parallel file system allows, set with palmrun option -w, ENVPAR namelist parameter, provided by palmrun
+    INTEGER(iwp) ::  max_pr_salsa = 0                  !< number of salsa profiles (must not change within a job chain)
     INTEGER(iwp) ::  max_pr_user = 0                   !< number of user-defined profiles (must not change within a job chain)
     INTEGER(iwp) ::  max_pr_user_tmp = 0               !< number of user-defined profiles that is temporary stored to check it against max_pr_user in case of restarts
Index: palm/trunk/SOURCE/parin.f90
===================================================================
--- palm/trunk/SOURCE/parin.f90	(revision 4130)
+++ palm/trunk/SOURCE/parin.f90	(revision 4131)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Allocate hom and hom_sum to allow profile output for salsa variables.
+! 
+! 4079 2019-07-09 18:04:41Z suehring
 ! +monotonic_limiter_z
 ! 
@@ -1093,6 +1096,6 @@
                        ref_state(0:nz+1), sa_init(0:nz+1), ug(0:nz+1),         &
                        u_init(0:nz+1), v_init(0:nz+1), vg(0:nz+1),             &
-                       hom(0:nz+1,2,pr_palm+max_pr_user+max_pr_cs,0:statistic_regions),  &
-                       hom_sum(0:nz+1,pr_palm+max_pr_user+max_pr_cs,0:statistic_regions) )
+                    hom(0:nz+1,2,pr_palm+max_pr_user+max_pr_cs+max_pr_salsa,0:statistic_regions),  &
+                    hom_sum(0:nz+1,pr_palm+max_pr_user+max_pr_cs+max_pr_salsa,0:statistic_regions) )
 
              hom = 0.0_wp
Index: palm/trunk/SOURCE/read_restart_data_mod.f90
===================================================================
--- palm/trunk/SOURCE/read_restart_data_mod.f90	(revision 4130)
+++ palm/trunk/SOURCE/read_restart_data_mod.f90	(revision 4131)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Allocate hom and hom_sum to allow profile output for salsa variables.
+! 
+! 4101 2019-07-17 15:14:26Z gronemeier
 ! remove old_dt
 ! 
@@ -316,6 +319,6 @@
                     v_init(0:nz+1), pt_init(0:nz+1), q_init(0:nz+1),           &
                     ref_state(0:nz+1), s_init(0:nz+1), sa_init(0:nz+1),        &
-                    hom(0:nz+1,2,pr_palm+max_pr_user+max_pr_cs,0:statistic_regions),     &
-                    hom_sum(0:nz+1,pr_palm+max_pr_user+max_pr_cs,0:statistic_regions) )
+                    hom(0:nz+1,2,pr_palm+max_pr_user+max_pr_cs+max_pr_salsa,0:statistic_regions),  &
+                    hom_sum(0:nz+1,pr_palm+max_pr_user+max_pr_cs+max_pr_salsa,0:statistic_regions) )
        ENDIF
 
Index: palm/trunk/SOURCE/salsa_mod.f90
===================================================================
--- palm/trunk/SOURCE/salsa_mod.f90	(revision 4130)
+++ palm/trunk/SOURCE/salsa_mod.f90	(revision 4131)
@@ -26,4 +26,15 @@
 ! -----------------
 ! $Id$
+! - Add "salsa_" before each salsa output variable
+! - Add a possibility to output the number (salsa_N_UFP) and mass concentration
+!   (salsa_PM0.1) of ultrafine particles, i.e. particles with a diameter smaller
+!   than 100 nm
+! - Implement aerosol emission mode "parameterized" which is based on the street
+!   type (similar to the chemistry module).
+! - Remove unnecessary nucleation subroutines.
+! - Add the z-dimension for gaseous emissions to correspond the implementation
+!   in the chemistry module
+! 
+! 4118 2019-07-25 16:11:45Z suehring
 ! - When Dirichlet condition is applied in decycling, the boundary conditions are
 !   only set at the ghost points and not at the prognostic grid points as done
@@ -211,7 +222,8 @@
                bc_lr, bc_lr_cyc, bc_ns, bc_ns_cyc, bc_radiation_l, bc_radiation_n, bc_radiation_r, &
                bc_radiation_s, coupling_char, debug_output, dt_3d, intermediate_timestep_count,    &
-               intermediate_timestep_count_max, land_surface, message_string, monotonic_limiter_z, &
-               plant_canopy, pt_surface, salsa, scalar_advec, surface_pressure,                    &
-               time_since_reference_point, timestep_scheme, tsc, urban_surface, ws_scheme_sca
+               intermediate_timestep_count_max, land_surface, max_pr_salsa, message_string,        &
+               monotonic_limiter_z, plant_canopy, pt_surface, salsa, scalar_advec,                 &
+               surface_pressure, time_since_reference_point, timestep_scheme, tsc, urban_surface,  &
+               ws_scheme_sca
 
     USE indices,                                                                                   &
@@ -392,4 +404,6 @@
                                             !< 1 = read vertical profile from an input file
     INTEGER(iwp) ::  lod_gas_emissions = 0  !< level of detail of the gaseous emission data
+    INTEGER(iwp) ::  main_street_id = 0     !< lower bound of main street IDs (OpenStreetMaps) for parameterized mode
+    INTEGER(iwp) ::  max_street_id = 0      !< upper bound of main street IDs (OpenStreetMaps) for parameterized mode
     INTEGER(iwp) ::  nbins_aerosol = 1      !< total number of size bins
     INTEGER(iwp) ::  ncc   = 1              !< number of chemical components used
@@ -413,4 +427,6 @@
                                             !< 9 = homomolecular nucleation of H2SO4 and ORG
                                             !<     + heteromolecular nucleation with H2SO4*ORG
+    INTEGER(iwp) ::  salsa_pr_count = 0     !< counter for salsa variable profiles
+    INTEGER(iwp) ::  side_street_id = 0     !< lower bound of side street IDs (OpenStreetMaps) for parameterized mode
     INTEGER(iwp) ::  start_subrange_1a = 1  !< start index for bin subranges: subrange 1a
     INTEGER(iwp) ::  start_subrange_2a = 1  !<                                subrange 2a
@@ -419,8 +435,9 @@
     INTEGER(iwp), DIMENSION(nreg) ::  nbin = (/ 3, 7/)  !< Number of size bins per subrange: 1 & 2
 
-    INTEGER(iwp), DIMENSION(ngases_salsa) ::  gas_index_chem = &
-                                                 (/ 1, 1, 1, 1, 1/)  !< gas indices in chemistry_model_mod
-                                                 !< 1 = H2SO4, 2 = HNO3, 3 = NH3, 4 = OCNV, 5 = OCSV
+    INTEGER(iwp), DIMENSION(ngases_salsa) ::  gas_index_chem = (/ 1, 1, 1, 1, 1/)  !< gas indices in chemistry_model_mod
+                                                                                   !< 1 = H2SO4, 2 = HNO3,
+                                                                                   !< 3 = NH3,   4 = OCNV, 5 = OCSV
     INTEGER(iwp), DIMENSION(ngases_salsa) ::  emission_index_chem  !< gas indices in the gas emission file
+    INTEGER(iwp), DIMENSION(99) ::  salsa_pr_index  = 0            !< index for salsa profiles
 
     INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  k_topo_top  !< vertical index of the topography top
@@ -466,6 +483,8 @@
     LOGICAL ::  lspartition  = .FALSE.  !< Partition of HNO3 and NH3
 
-    REAL(wp) ::  act_coeff = 1.0E-7_wp               !< Activation coefficient
+    REAL(wp) ::  act_coeff = 1.0E-7_wp               !< Activation coefficient (1/s)
     REAL(wp) ::  dt_salsa  = 0.00001_wp              !< Time step of SALSA
+    REAL(wp) ::  emiss_factor_main = 0.0_wp          !< relative emission factor for main streets
+    REAL(wp) ::  emiss_factor_side = 0.0_wp          !< relative emission factor for side streets
     REAL(wp) ::  h2so4_init = nclim                  !< Init value for sulphuric acid gas
     REAL(wp) ::  hno3_init  = nclim                  !< Init value for nitric acid gas
@@ -557,5 +576,5 @@
        INTEGER(iwp) ::  tind               !< time index for reference time in salsa emission data
 
-       INTEGER(iwp), DIMENSION(maxspec) ::  cc_input_to_model   !<
+       INTEGER(iwp), DIMENSION(maxspec) ::  cc_in2mod = 0   !<
 
        INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  cat_index  !< Index of emission categories
@@ -630,17 +649,17 @@
     TYPE salsa_variable
 
-       REAL(wp), ALLOCATABLE, DIMENSION(:)     ::  init  !<
-
-       REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::  diss_s     !<
-       REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::  flux_s     !<
-       REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::  source     !<
-       REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::  sums_ws_l  !<
-
-       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::  diss_l  !<
-       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::  flux_l  !<
-
-       REAL(wp), POINTER, DIMENSION(:,:,:), CONTIGUOUS ::  conc     !<
-       REAL(wp), POINTER, DIMENSION(:,:,:), CONTIGUOUS ::  conc_p   !<
-       REAL(wp), POINTER, DIMENSION(:,:,:), CONTIGUOUS ::  tconc_m  !<
+       REAL(wp), DIMENSION(:), ALLOCATABLE     ::  init  !<
+
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  diss_s     !<
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  flux_s     !<
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  source     !<
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  sums_ws_l  !<
+
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  diss_l  !<
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  flux_l  !<
+
+       REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  conc     !<
+       REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  conc_p   !<
+       REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  tconc_m  !<
 
     END TYPE salsa_variable
@@ -673,5 +692,6 @@
 
     TYPE(chem_emis_att_type) ::  chem_emission_att  !< chemistry emission attributes
-    TYPE(chem_emis_val_type) ::  chem_emission      !< chemistry emission values
+
+    TYPE(chem_emis_val_type), DIMENSION(:), ALLOCATABLE ::  chem_emission  !< chemistry emissions
 
     TYPE(t_section), DIMENSION(:), ALLOCATABLE ::  aero  !< local aerosol properties
@@ -683,5 +703,5 @@
     TYPE(match_surface), DIMENSION(0:3) ::  usm_to_depo_v  !< to match the deposition mod. and vertical USM surfaces
 !
-!-- SALSA variables: as x = x(k,j,i,bin). 
+!-- SALSA variables: as x = x(k,j,i,bin).
 !-- The 4th dimension contains all the size bins sequentially for each aerosol species  + water.
 !
@@ -689,24 +709,24 @@
 !
 !-- Number concentration (#/m3)
-    TYPE(salsa_variable), ALLOCATABLE, DIMENSION(:), TARGET ::  aerosol_number  !<
-    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:), TARGET ::  nconc_1  !<
-    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:), TARGET ::  nconc_2  !<
-    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:), TARGET ::  nconc_3  !<
+    TYPE(salsa_variable), DIMENSION(:), ALLOCATABLE, TARGET ::  aerosol_number  !<
+    REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE, TARGET ::  nconc_1  !<
+    REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE, TARGET ::  nconc_2  !<
+    REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE, TARGET ::  nconc_3  !<
 !
 !-- Mass concentration (kg/m3)
-    TYPE(salsa_variable), ALLOCATABLE, DIMENSION(:), TARGET ::  aerosol_mass  !<
-    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:), TARGET ::  mconc_1  !<
-    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:), TARGET ::  mconc_2  !<
-    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:), TARGET ::  mconc_3  !<
+    TYPE(salsa_variable), DIMENSION(:), ALLOCATABLE, TARGET ::  aerosol_mass  !<
+    REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE, TARGET ::  mconc_1  !<
+    REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE, TARGET ::  mconc_2  !<
+    REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE, TARGET ::  mconc_3  !<
 !
 !-- Gaseous concentrations (#/m3)
-    TYPE(salsa_variable), ALLOCATABLE, DIMENSION(:), TARGET ::  salsa_gas  !<
-    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:), TARGET ::  gconc_1  !<
-    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:), TARGET ::  gconc_2  !<
-    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:), TARGET ::  gconc_3  !<
+    TYPE(salsa_variable), DIMENSION(:), ALLOCATABLE, TARGET ::  salsa_gas  !<
+    REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE, TARGET ::  gconc_1  !<
+    REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE, TARGET ::  gconc_2  !<
+    REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE, TARGET ::  gconc_3  !<
 !
 !-- Diagnostic tracers
-    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) ::  sedim_vd  !< sedimentation velocity per bin (m/s)
-    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) ::  ra_dry    !< aerosol dry radius (m)
+    REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE ::  sedim_vd  !< sedimentation velocity per bin (m/s)
+    REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE ::  ra_dry    !< aerosol dry radius (m)
 
 !-- Particle component index tables
@@ -717,142 +737,135 @@
 !
 !-- Gases:
-    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  g_h2so4_av  !< H2SO4
-    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  g_hno3_av   !< HNO3
-    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  g_nh3_av    !< NH3
-    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  g_ocnv_av   !< non-volatile OC
-    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  g_ocsv_av   !< semi-volatile OC
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  g_h2so4_av  !< H2SO4
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  g_hno3_av   !< HNO3
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  g_nh3_av    !< NH3
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  g_ocnv_av   !< non-volatile OC
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  g_ocsv_av   !< semi-volatile OC
 !
 !-- Integrated:
-    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  ldsa_av  !< lung-deposited surface area
-    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  ntot_av  !< total number concentration
-    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  pm25_av  !< PM2.5
-    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  pm10_av  !< PM10
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  ldsa_av  !< lung-deposited surface area
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  ntot_av  !< total number concentration
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  nufp_av  !< ultrafine particles (UFP)
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  pm01_av  !< PM0.1
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  pm25_av  !< PM2.5
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  pm10_av  !< PM10
 !
 !-- In the particle phase:
-    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  s_bc_av   !< black carbon
-    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  s_du_av   !< dust
-    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  s_h2o_av  !< liquid water
-    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  s_nh_av   !< ammonia
-    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  s_no_av   !< nitrates
-    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  s_oc_av   !< org. carbon
-    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  s_so4_av  !< sulphates
-    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  s_ss_av   !< sea salt
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  s_bc_av   !< black carbon
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  s_du_av   !< dust
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  s_h2o_av  !< liquid water
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  s_nh_av   !< ammonia
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  s_no_av   !< nitrates
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  s_oc_av   !< org. carbon
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  s_so4_av  !< sulphates
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  s_ss_av   !< sea salt
 !
 !-- Bin specific mass and number concentrations:
-    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:), TARGET ::  mbins_av  !< bin mas
-    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:), TARGET ::  nbins_av  !< bin number
+    REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE, TARGET ::  mbins_av  !< bin mas
+    REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE, TARGET ::  nbins_av  !< bin number
 
 !
 !-- PALM interfaces:
-!
-!-- Boundary conditions:
+
+    INTERFACE salsa_actions
+       MODULE PROCEDURE salsa_actions
+       MODULE PROCEDURE salsa_actions_ij
+    END INTERFACE salsa_actions
+
+    INTERFACE salsa_3d_data_averaging
+       MODULE PROCEDURE salsa_3d_data_averaging
+    END INTERFACE salsa_3d_data_averaging
+
     INTERFACE salsa_boundary_conds
        MODULE PROCEDURE salsa_boundary_conds
        MODULE PROCEDURE salsa_boundary_conds_decycle
     END INTERFACE salsa_boundary_conds
-!
-!-- Data output checks for 2D/3D data to be done in check_parameters
+
     INTERFACE salsa_check_data_output
        MODULE PROCEDURE salsa_check_data_output
     END INTERFACE salsa_check_data_output
-!
-!-- Input parameter checks to be done in check_parameters
+
+    INTERFACE salsa_check_data_output_pr
+       MODULE PROCEDURE salsa_check_data_output_pr
+    END INTERFACE salsa_check_data_output_pr
+
     INTERFACE salsa_check_parameters
        MODULE PROCEDURE salsa_check_parameters
     END INTERFACE salsa_check_parameters
-!
-!-- Averaging of 3D data for output
-    INTERFACE salsa_3d_data_averaging
-       MODULE PROCEDURE salsa_3d_data_averaging
-    END INTERFACE salsa_3d_data_averaging
-!
-!-- Data output of 2D quantities
+
     INTERFACE salsa_data_output_2d
        MODULE PROCEDURE salsa_data_output_2d
     END INTERFACE salsa_data_output_2d
-!
-!-- Data output of 3D data
+
     INTERFACE salsa_data_output_3d
        MODULE PROCEDURE salsa_data_output_3d
     END INTERFACE salsa_data_output_3d
-!
-!-- Data output of 3D data
+
     INTERFACE salsa_data_output_mask
        MODULE PROCEDURE salsa_data_output_mask
     END INTERFACE salsa_data_output_mask
-!
-!-- Definition of data output quantities
+
     INTERFACE salsa_define_netcdf_grid
        MODULE PROCEDURE salsa_define_netcdf_grid
     END INTERFACE salsa_define_netcdf_grid
-!
-!-- Output of information to the header file
+
+    INTERFACE salsa_driver
+       MODULE PROCEDURE salsa_driver
+    END INTERFACE salsa_driver
+
+    INTERFACE salsa_emission_update
+       MODULE PROCEDURE salsa_emission_update
+    END INTERFACE salsa_emission_update
+
+    INTERFACE salsa_exchange_horiz_bounds
+       MODULE PROCEDURE salsa_exchange_horiz_bounds
+    END INTERFACE salsa_exchange_horiz_bounds
+
     INTERFACE salsa_header
        MODULE PROCEDURE salsa_header
     END INTERFACE salsa_header
-!
-!-- Initialization actions
+
     INTERFACE salsa_init
        MODULE PROCEDURE salsa_init
     END INTERFACE salsa_init
-!
-!-- Initialization of arrays
+
     INTERFACE salsa_init_arrays
        MODULE PROCEDURE salsa_init_arrays
     END INTERFACE salsa_init_arrays
-!
-!-- Writing of binary output for restart runs  !!! renaming?!
-    INTERFACE salsa_wrd_local
-       MODULE PROCEDURE salsa_wrd_local
-    END INTERFACE salsa_wrd_local
-!
-!-- Reading of NAMELIST parameters
-    INTERFACE salsa_parin
-       MODULE PROCEDURE salsa_parin
-    END INTERFACE salsa_parin
-!
-!-- Reading of parameters for restart runs
-    INTERFACE salsa_rrd_local
-       MODULE PROCEDURE salsa_rrd_local
-    END INTERFACE salsa_rrd_local
-!
-!-- Swapping of time levels (required for prognostic variables)
-    INTERFACE salsa_swap_timelevel
-       MODULE PROCEDURE salsa_swap_timelevel
-    END INTERFACE salsa_swap_timelevel
-!
-!-- Interface between PALM and salsa
-    INTERFACE salsa_driver
-       MODULE PROCEDURE salsa_driver
-    END INTERFACE salsa_driver
-
-!-- Actions salsa variables
-    INTERFACE salsa_actions
-       MODULE PROCEDURE salsa_actions
-       MODULE PROCEDURE salsa_actions_ij
-    END INTERFACE salsa_actions
-!
-!-- Non-advective processes (i.e. aerosol dynamic reactions) for salsa variables
+
     INTERFACE salsa_non_advective_processes
        MODULE PROCEDURE salsa_non_advective_processes
        MODULE PROCEDURE salsa_non_advective_processes_ij
     END INTERFACE salsa_non_advective_processes
-!
-!-- Exchange horiz for salsa variables
-    INTERFACE salsa_exchange_horiz_bounds
-       MODULE PROCEDURE salsa_exchange_horiz_bounds
-    END INTERFACE salsa_exchange_horiz_bounds
-!
-!-- Prognostics equations for salsa variables
+
+    INTERFACE salsa_parin
+       MODULE PROCEDURE salsa_parin
+    END INTERFACE salsa_parin
+
     INTERFACE salsa_prognostic_equations
        MODULE PROCEDURE salsa_prognostic_equations
        MODULE PROCEDURE salsa_prognostic_equations_ij
     END INTERFACE salsa_prognostic_equations
-!
-!-- Tendency salsa variables
+
+    INTERFACE salsa_rrd_local
+       MODULE PROCEDURE salsa_rrd_local
+    END INTERFACE salsa_rrd_local
+
+    INTERFACE salsa_statistics
+       MODULE PROCEDURE salsa_statistics
+    END INTERFACE salsa_statistics
+
+    INTERFACE salsa_swap_timelevel
+       MODULE PROCEDURE salsa_swap_timelevel
+    END INTERFACE salsa_swap_timelevel
+
     INTERFACE salsa_tendency
        MODULE PROCEDURE salsa_tendency
        MODULE PROCEDURE salsa_tendency_ij
     END INTERFACE salsa_tendency
+
+    INTERFACE salsa_wrd_local
+       MODULE PROCEDURE salsa_wrd_local
+    END INTERFACE salsa_wrd_local
 
 
@@ -867,5 +880,6 @@
            salsa_emission_update, salsa_header, salsa_init, salsa_init_arrays, salsa_parin,        &
            salsa_rrd_local, salsa_swap_timelevel, salsa_prognostic_equations, salsa_wrd_local,     &
-           salsa_actions, salsa_non_advective_processes, salsa_exchange_horiz_bounds
+           salsa_actions, salsa_non_advective_processes, salsa_exchange_horiz_bounds,              &
+           salsa_check_data_output_pr, salsa_statistics
 !
 !-- Public parameters, constants and initial values
@@ -888,22 +902,68 @@
  SUBROUTINE salsa_parin
 
+    USE control_parameters,                                                                        &
+        ONLY:  data_output_pr
+
     IMPLICIT NONE
 
-    CHARACTER(LEN=80) ::  line   !< dummy string that contains the current line
-                                  !< of the parameter file
-
-    NAMELIST /salsa_parameters/      aerosol_flux_dpg, aerosol_flux_mass_fracs_a,                  &
-                                     aerosol_flux_mass_fracs_b, aerosol_flux_sigmag,               &
-                                     advect_particle_water, bc_salsa_b, bc_salsa_t,                &
-                                     decycle_salsa_lr, decycle_method_salsa, decycle_salsa_ns,     &
-                                     depo_pcm_par, depo_pcm_type,                                  &
-                                     depo_surf_par, dpg, dt_salsa, feedback_to_palm, h2so4_init,   &
-                                     hno3_init, init_gases_type, init_aerosol_type, listspec,      &
-                                     mass_fracs_a, mass_fracs_b, n_lognorm, nbin, nest_salsa, nf2a,&
-                                     nh3_init, nj3, nlcnd, nlcndgas, nlcndh2oae, nlcoag, nldepo,   &
-                                     nldepo_pcm,  nldepo_surf, nldistupdate, nsnucl, ocnv_init,    &
-                                     ocsv_init, read_restart_data_salsa, reglim, salsa,            &
-                                     salsa_emission_mode, sigmag, skip_time_do_salsa,              &
-                                     surface_aerosol_flux, van_der_waals_coagc, write_binary_salsa
+    CHARACTER(LEN=80) ::  line   !< dummy string that contains the current line of parameter file
+
+    INTEGER(iwp) ::  i                 !< loop index
+    INTEGER(iwp) ::  max_pr_salsa_tmp  !< dummy variable
+
+    NAMELIST /salsa_parameters/      aerosol_flux_dpg,                         &
+                                     aerosol_flux_mass_fracs_a,                &
+                                     aerosol_flux_mass_fracs_b,                &
+                                     aerosol_flux_sigmag,                      &
+                                     advect_particle_water,                    &
+                                     bc_salsa_b,                               &
+                                     bc_salsa_t,                               &
+                                     decycle_salsa_lr,                         &
+                                     decycle_method_salsa,                     &
+                                     decycle_salsa_ns,                         &
+                                     depo_pcm_par,                             &
+                                     depo_pcm_type,                            &
+                                     depo_surf_par,                            &
+                                     dpg,                                      &
+                                     dt_salsa,                                 &
+                                     emiss_factor_main,                        &
+                                     emiss_factor_side,                        &
+                                     feedback_to_palm,                         &
+                                     h2so4_init,                               &
+                                     hno3_init,                                &
+                                     init_gases_type,                          &
+                                     init_aerosol_type,                        &
+                                     listspec,                                 &
+                                     main_street_id,                           &
+                                     mass_fracs_a,                             &
+                                     mass_fracs_b,                             &
+                                     max_street_id,                            &
+                                     n_lognorm,                                &
+                                     nbin,                                     &
+                                     nest_salsa,                               &
+                                     nf2a,                                     &
+                                     nh3_init,                                 &
+                                     nj3,                                      &
+                                     nlcnd,                                    &
+                                     nlcndgas,                                 &
+                                     nlcndh2oae,                               &
+                                     nlcoag,                                   &
+                                     nldepo,                                   &
+                                     nldepo_pcm,                               &
+                                     nldepo_surf,                              &
+                                     nldistupdate,                             &
+                                     nsnucl,                                   &
+                                     ocnv_init,                                &
+                                     ocsv_init,                                &
+                                     read_restart_data_salsa,                  &
+                                     reglim,                                   &
+                                     salsa,                                    &
+                                     salsa_emission_mode,                      &
+                                     sigmag,                                   &
+                                     side_street_id,                           &
+                                     skip_time_do_salsa,                       &
+                                     surface_aerosol_flux,                     &
+                                     van_der_waals_coagc,                      &
+                                     write_binary_salsa
 
     line = ' '
@@ -924,4 +984,13 @@
 
  10 CONTINUE
+!
+!-- Update the number of output profiles
+    max_pr_salsa_tmp = 0
+    i = 1
+    DO WHILE ( data_output_pr(i) /= ' '  .AND.  i <= 100 )
+       IF ( TRIM( data_output_pr(i)(1:6) ) == 'salsa_' )  max_pr_salsa_tmp = max_pr_salsa_tmp + 1
+       i = i + 1
+    ENDDO
+    IF ( max_pr_salsa_tmp > 0 )  max_pr_salsa = max_pr_salsa_tmp
 
  END SUBROUTINE salsa_parin
@@ -1003,29 +1072,5 @@
 !-- Check for the grid
 
-    IF ( var(1:2) == 'g_' )  THEN
-       grid_x = 'x'
-       grid_y = 'y'
-       grid_z = 'zu'
-    ELSEIF ( var(1:4) == 'LDSA' )  THEN
-       grid_x = 'x'
-       grid_y = 'y'
-       grid_z = 'zu'
-    ELSEIF ( var(1:5) == 'm_bin' )  THEN
-       grid_x = 'x'
-       grid_y = 'y'
-       grid_z = 'zu'
-    ELSEIF ( var(1:5) == 'N_bin' )  THEN
-       grid_x = 'x'
-       grid_y = 'y'
-       grid_z = 'zu'
-    ELSEIF ( var(1:4) == 'Ntot' ) THEN
-       grid_x = 'x'
-       grid_y = 'y'
-       grid_z = 'zu'
-    ELSEIF ( var(1:2) == 'PM' )  THEN
-       grid_x = 'x'
-       grid_y = 'y'
-       grid_z = 'zu'
-    ELSEIF ( var(1:2) == 's_' )  THEN
+    IF ( var(1:6) == 'salsa_' )  THEN  ! same grid for all salsa output variables
        grid_x = 'x'
        grid_y = 'y'
@@ -1163,4 +1208,5 @@
     INTEGER(iwp) ::  gases_available !< Number of available gas components in the chemistry model
     INTEGER(iwp) ::  i               !< loop index for allocating
+    INTEGER(iwp) ::  ii              !< index for indexing chemical components
     INTEGER(iwp) ::  l               !< loop index for allocating: surfaces
     INTEGER(iwp) ::  lsp             !< loop index for chem species in the chemistry model
@@ -1194,310 +1240,5 @@
 
     ncomponents_mass = ncc
-    IF ( advect_particle_water )  ncomponents_mass = ncc + 1  ! Add water 
-
-!
-!-- Allocate:
-    ALLOCATE( aero(nbins_aerosol), bc_am_t_val(nbins_aerosol*ncomponents_mass),                    &
-              bc_an_t_val(nbins_aerosol), bc_gt_t_val(ngases_salsa), bin_low_limits(nbins_aerosol),&
-              nsect(nbins_aerosol), massacc(nbins_aerosol) )
-    ALLOCATE( k_topo_top(nysg:nyng,nxlg:nxrg) )
-    IF ( nldepo ) ALLOCATE( sedim_vd(nzb:nzt+1,nysg:nyng,nxlg:nxrg,nbins_aerosol) )
-    ALLOCATE( ra_dry(nzb:nzt+1,nysg:nyng,nxlg:nxrg,nbins_aerosol) )
-
-!
-!-- Aerosol number concentration
-    ALLOCATE( aerosol_number(nbins_aerosol) )
-    ALLOCATE( nconc_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg,nbins_aerosol),                                &
-              nconc_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg,nbins_aerosol),                                &
-              nconc_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg,nbins_aerosol) )
-    nconc_1 = 0.0_wp
-    nconc_2 = 0.0_wp
-    nconc_3 = 0.0_wp
-
-    DO i = 1, nbins_aerosol
-       aerosol_number(i)%conc(nzb:nzt+1,nysg:nyng,nxlg:nxrg)    => nconc_1(:,:,:,i)
-       aerosol_number(i)%conc_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg)  => nconc_2(:,:,:,i)
-       aerosol_number(i)%tconc_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg) => nconc_3(:,:,:,i)
-       ALLOCATE( aerosol_number(i)%flux_s(nzb+1:nzt,0:threads_per_task-1),                         &
-                 aerosol_number(i)%diss_s(nzb+1:nzt,0:threads_per_task-1),                         &
-                 aerosol_number(i)%flux_l(nzb+1:nzt,nys:nyn,0:threads_per_task-1),                 &
-                 aerosol_number(i)%diss_l(nzb+1:nzt,nys:nyn,0:threads_per_task-1),                 &
-                 aerosol_number(i)%init(nzb:nzt+1),                                                &
-                 aerosol_number(i)%sums_ws_l(nzb:nzt+1,0:threads_per_task-1) )
-       aerosol_number(i)%init = nclim
-       IF ( include_emission  .OR.  ( nldepo  .AND.  nldepo_surf ) )  THEN
-          ALLOCATE( aerosol_number(i)%source(nys:nyn,nxl:nxr) )
-       ENDIF
-    ENDDO
-
-!
-!-- Aerosol mass concentration
-    ALLOCATE( aerosol_mass(ncomponents_mass*nbins_aerosol) )
-    ALLOCATE( mconc_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg,ncomponents_mass*nbins_aerosol),               &
-              mconc_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg,ncomponents_mass*nbins_aerosol),               &
-              mconc_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg,ncomponents_mass*nbins_aerosol) )
-    mconc_1 = 0.0_wp
-    mconc_2 = 0.0_wp
-    mconc_3 = 0.0_wp
-
-    DO i = 1, ncomponents_mass*nbins_aerosol
-       aerosol_mass(i)%conc(nzb:nzt+1,nysg:nyng,nxlg:nxrg)    => mconc_1(:,:,:,i)
-       aerosol_mass(i)%conc_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg)  => mconc_2(:,:,:,i)
-       aerosol_mass(i)%tconc_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg) => mconc_3(:,:,:,i)
-       ALLOCATE( aerosol_mass(i)%flux_s(nzb+1:nzt,0:threads_per_task-1),                           &
-                 aerosol_mass(i)%diss_s(nzb+1:nzt,0:threads_per_task-1),                           &
-                 aerosol_mass(i)%flux_l(nzb+1:nzt,nys:nyn,0:threads_per_task-1),                   &
-                 aerosol_mass(i)%diss_l(nzb+1:nzt,nys:nyn,0:threads_per_task-1),                   &
-                 aerosol_mass(i)%init(nzb:nzt+1),                                                  &
-                 aerosol_mass(i)%sums_ws_l(nzb:nzt+1,0:threads_per_task-1)  )
-       aerosol_mass(i)%init = mclim
-       IF ( include_emission  .OR.  ( nldepo  .AND.  nldepo_surf ) )  THEN
-          ALLOCATE( aerosol_mass(i)%source(nys:nyn,nxl:nxr) )
-       ENDIF
-    ENDDO
-
-!
-!-- Surface fluxes: answs = aerosol number, amsws = aerosol mass
-!
-!-- Horizontal surfaces: default type
-    DO  l = 0, 2   ! upward (l=0), downward (l=1) and model top (l=2)
-       ALLOCATE( surf_def_h(l)%answs( 1:surf_def_h(l)%ns, nbins_aerosol ) )
-       ALLOCATE( surf_def_h(l)%amsws( 1:surf_def_h(l)%ns, nbins_aerosol*ncomponents_mass ) )
-       surf_def_h(l)%answs = 0.0_wp
-       surf_def_h(l)%amsws = 0.0_wp
-    ENDDO
-!
-!-- Horizontal surfaces: natural type
-    ALLOCATE( surf_lsm_h%answs( 1:surf_lsm_h%ns, nbins_aerosol ) )
-    ALLOCATE( surf_lsm_h%amsws( 1:surf_lsm_h%ns, nbins_aerosol*ncomponents_mass ) )
-    surf_lsm_h%answs = 0.0_wp
-    surf_lsm_h%amsws = 0.0_wp
-!
-!-- Horizontal surfaces: urban type
-    ALLOCATE( surf_usm_h%answs( 1:surf_usm_h%ns, nbins_aerosol ) )
-    ALLOCATE( surf_usm_h%amsws( 1:surf_usm_h%ns, nbins_aerosol*ncomponents_mass ) )
-    surf_usm_h%answs = 0.0_wp
-    surf_usm_h%amsws = 0.0_wp
-
-!
-!-- Vertical surfaces: northward (l=0), southward (l=1), eastward (l=2) and westward (l=3) facing
-    DO  l = 0, 3
-       ALLOCATE( surf_def_v(l)%answs( 1:surf_def_v(l)%ns, nbins_aerosol ) )
-       surf_def_v(l)%answs = 0.0_wp
-       ALLOCATE( surf_def_v(l)%amsws( 1:surf_def_v(l)%ns, nbins_aerosol*ncomponents_mass ) )
-       surf_def_v(l)%amsws = 0.0_wp
-
-       ALLOCATE( surf_lsm_v(l)%answs( 1:surf_lsm_v(l)%ns, nbins_aerosol ) )
-       surf_lsm_v(l)%answs = 0.0_wp
-       ALLOCATE( surf_lsm_v(l)%amsws( 1:surf_lsm_v(l)%ns, nbins_aerosol*ncomponents_mass ) )
-       surf_lsm_v(l)%amsws = 0.0_wp
-
-       ALLOCATE( surf_usm_v(l)%answs( 1:surf_usm_v(l)%ns, nbins_aerosol ) )
-       surf_usm_v(l)%answs = 0.0_wp
-       ALLOCATE( surf_usm_v(l)%amsws( 1:surf_usm_v(l)%ns, nbins_aerosol*ncomponents_mass ) )
-       surf_usm_v(l)%amsws = 0.0_wp
-
-    ENDDO
-
-!
-!-- Concentration of gaseous tracers (1. SO4, 2. HNO3, 3. NH3, 4. OCNV, 5. OCSV)
-!-- (number concentration (#/m3) )
-!
-!-- If chemistry is on, read gas phase concentrations from there. Otherwise, 
-!-- allocate salsa_gas array.
-
-    IF ( air_chemistry )  THEN
-       DO  lsp = 1, nvar
-          SELECT CASE ( TRIM( chem_species(lsp)%name ) )
-             CASE ( 'H2SO4', 'h2so4' )
-                gases_available = gases_available + 1
-                gas_index_chem(1) = lsp
-             CASE ( 'HNO3', 'hno3' )
-                gases_available = gases_available + 1
-                gas_index_chem(2) = lsp
-             CASE ( 'NH3', 'nh3' )
-                gases_available = gases_available + 1
-                gas_index_chem(3) = lsp
-             CASE ( 'OCNV', 'ocnv' )
-                gases_available = gases_available + 1
-                gas_index_chem(4) = lsp
-             CASE ( 'OCSV', 'ocsv' )
-                gases_available = gases_available + 1
-                gas_index_chem(5) = lsp
-          END SELECT
-       ENDDO
-
-       IF ( gases_available == ngases_salsa )  THEN
-          salsa_gases_from_chem = .TRUE.
-       ELSE
-          WRITE( message_string, * ) 'SALSA is run together with chemistry but not all gaseous '// &
-                                     'components are provided by kpp (H2SO4, HNO3, NH3, OCNV, OCSV)'
-       CALL message( 'check_parameters', 'PA0599', 1, 2, 0, 6, 0 )
-       ENDIF
-
-    ELSE
-
-       ALLOCATE( salsa_gas(ngases_salsa) )
-       ALLOCATE( gconc_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg,ngases_salsa),                 &
-                 gconc_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg,ngases_salsa),                 &
-                 gconc_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg,ngases_salsa) )
-       gconc_1 = 0.0_wp
-       gconc_2 = 0.0_wp
-       gconc_3 = 0.0_wp
-
-       DO i = 1, ngases_salsa
-          salsa_gas(i)%conc(nzb:nzt+1,nysg:nyng,nxlg:nxrg)    => gconc_1(:,:,:,i)
-          salsa_gas(i)%conc_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg)  => gconc_2(:,:,:,i)
-          salsa_gas(i)%tconc_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg) => gconc_3(:,:,:,i)
-          ALLOCATE( salsa_gas(i)%flux_s(nzb+1:nzt,0:threads_per_task-1),       &
-                    salsa_gas(i)%diss_s(nzb+1:nzt,0:threads_per_task-1),       &
-                    salsa_gas(i)%flux_l(nzb+1:nzt,nys:nyn,0:threads_per_task-1),&
-                    salsa_gas(i)%diss_l(nzb+1:nzt,nys:nyn,0:threads_per_task-1),&
-                    salsa_gas(i)%init(nzb:nzt+1),                              &
-                    salsa_gas(i)%sums_ws_l(nzb:nzt+1,0:threads_per_task-1) )
-          salsa_gas(i)%init = nclim
-          IF ( include_emission )  ALLOCATE( salsa_gas(i)%source(nys:nys,nxl:nxr) )
-       ENDDO
-!
-!--    Surface fluxes: gtsws = gaseous tracer flux
-!
-!--    Horizontal surfaces: default type
-       DO  l = 0, 2   ! upward (l=0), downward (l=1) and model top (l=2)
-          ALLOCATE( surf_def_h(l)%gtsws( 1:surf_def_h(l)%ns, ngases_salsa ) )
-          surf_def_h(l)%gtsws = 0.0_wp
-       ENDDO
-!--    Horizontal surfaces: natural type
-       ALLOCATE( surf_lsm_h%gtsws( 1:surf_lsm_h%ns, ngases_salsa ) )
-       surf_lsm_h%gtsws = 0.0_wp
-!--    Horizontal surfaces: urban type
-       ALLOCATE( surf_usm_h%gtsws( 1:surf_usm_h%ns, ngases_salsa ) )
-       surf_usm_h%gtsws = 0.0_wp
-!
-!--    Vertical surfaces: northward (l=0), southward (l=1), eastward (l=2) and 
-!--    westward (l=3) facing
-       DO  l = 0, 3
-          ALLOCATE( surf_def_v(l)%gtsws( 1:surf_def_v(l)%ns, ngases_salsa ) )
-          surf_def_v(l)%gtsws = 0.0_wp
-          ALLOCATE( surf_lsm_v(l)%gtsws( 1:surf_lsm_v(l)%ns, ngases_salsa ) )
-          surf_lsm_v(l)%gtsws = 0.0_wp
-          ALLOCATE( surf_usm_v(l)%gtsws( 1:surf_usm_v(l)%ns, ngases_salsa ) )
-          surf_usm_v(l)%gtsws = 0.0_wp
-       ENDDO
-    ENDIF
-
-    IF ( ws_scheme_sca )  THEN
-
-       IF ( salsa )  THEN
-          ALLOCATE( sums_salsa_ws_l(nzb:nzt+1,0:threads_per_task-1) )
-          sums_salsa_ws_l = 0.0_wp
-       ENDIF
-
-    ENDIF
-!
-!-- Set control flags for decycling only at lateral boundary cores. Within the inner cores the
-!-- decycle flag is set to .FALSE.. Even though it does not affect the setting of chemistry boundary
-!-- conditions, this flag is used to set advection control flags appropriately.
-    decycle_salsa_lr = MERGE( decycle_salsa_lr, .FALSE., nxl == 0  .OR.  nxr == nx )
-    decycle_salsa_ns = MERGE( decycle_salsa_ns, .FALSE., nys == 0  .OR.  nyn == ny )
-!
-!-- Decycling can be applied separately for aerosol variables, while wind and other scalars may have
-!-- cyclic or nested boundary conditions. However, large gradients near the boundaries may produce
-!-- stationary numerical oscillations near the lateral boundaries when a higher-order scheme is
-!-- applied near these boundaries. To get rid-off this, set-up additional flags that control the
-!-- order of the scalar advection scheme near the lateral boundaries for passive scalars with
-!-- decycling.
-    IF ( scalar_advec == 'ws-scheme' )  THEN
-       ALLOCATE( salsa_advc_flags_s(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-!
-!--    In case of decycling, set Neuman boundary conditions for wall_flags_0 bit 31 instead of
-!--    cyclic boundary conditions. Bit 31 is used to identify extended degradation zones (please see
-!--    the following comment). Note, since several also other modules may access this bit but may
-!--    have other boundary conditions, the original value of wall_flags_0 bit 31 must not be
-!--    modified. Hence, store the boundary conditions directly on salsa_advc_flags_s.
-!--    salsa_advc_flags_s will be later overwritten in ws_init_flags_scalar and bit 31 won't be used
-!--    to control the numerical order.
-!--    Initialize with flag 31 only.
-       salsa_advc_flags_s = 0
-       salsa_advc_flags_s = MERGE( IBSET( salsa_advc_flags_s, 31 ), 0, BTEST( wall_flags_0, 31 ) )
-
-       IF ( decycle_salsa_ns )  THEN
-          IF ( nys == 0 )  THEN
-             DO  i = 1, nbgp
-                salsa_advc_flags_s(:,nys-i,:) = MERGE( IBSET( salsa_advc_flags_s(:,nys,:), 31 ),   &
-                                                       IBCLR( salsa_advc_flags_s(:,nys,:), 31 ),   &
-                                                       BTEST( salsa_advc_flags_s(:,nys,:), 31 ) )
-             ENDDO
-          ENDIF
-          IF ( nyn == ny )  THEN
-             DO  i = 1, nbgp
-                salsa_advc_flags_s(:,nyn+i,:) = MERGE( IBSET( salsa_advc_flags_s(:,nyn,:), 31 ),   &
-                                                       IBCLR( salsa_advc_flags_s(:,nyn,:), 31 ),   &
-                                                       BTEST( salsa_advc_flags_s(:,nyn,:), 31 ) )
-             ENDDO
-          ENDIF
-       ENDIF
-       IF ( decycle_salsa_lr )  THEN
-          IF ( nxl == 0 )  THEN
-             DO  i = 1, nbgp
-                salsa_advc_flags_s(:,:,nxl-i) = MERGE( IBSET( salsa_advc_flags_s(:,:,nxl), 31 ),   &
-                                                       IBCLR( salsa_advc_flags_s(:,:,nxl), 31 ),   &
-                                                       BTEST( salsa_advc_flags_s(:,:,nxl), 31 ) )
-             ENDDO
-          ENDIF
-          IF ( nxr == nx )  THEN
-             DO  i = 1, nbgp
-                salsa_advc_flags_s(:,:,nxr+i) = MERGE( IBSET( salsa_advc_flags_s(:,:,nxr), 31 ),   &
-                                                       IBCLR( salsa_advc_flags_s(:,:,nxr), 31 ),   &
-                                                       BTEST( salsa_advc_flags_s(:,:,nxr), 31 ) )
-             ENDDO
-          ENDIF
-       ENDIF
-!
-!--    To initialise the advection flags appropriately, pass the boundary flags to
-!--    ws_init_flags_scalar. The last argument in ws_init_flags_scalar indicates that a passive
-!--    scalar is being treated and the horizontal advection terms are degraded already 2 grid points
-!--    before the lateral boundary. Also, extended degradation zones are applied, where
-!--    horizontal advection of scalars is discretised by the first-order scheme at all grid points
-!--    in the vicinity of buildings (<= 3 grid points). Even though no building is within the
-!--    numerical stencil, the first-order scheme is used. At fourth and fifth grid points, the order
-!--    of the horizontal advection scheme is successively upgraded.
-!--    These degradations of the advection scheme are done to avoid stationary numerical
-!--    oscillations, which are responsible for high concentration maxima that may appear e.g. under
-!--    shear-free stable conditions.
-       CALL ws_init_flags_scalar( bc_dirichlet_l  .OR.  bc_radiation_l  .OR.  decycle_salsa_lr,    &
-                                  bc_dirichlet_n  .OR.  bc_radiation_n  .OR.  decycle_salsa_ns,    &
-                                  bc_dirichlet_r  .OR.  bc_radiation_r  .OR.  decycle_salsa_lr,    &
-                                  bc_dirichlet_s  .OR.  bc_radiation_s  .OR.  decycle_salsa_ns,    &
-                                  salsa_advc_flags_s, .TRUE. )
-    ENDIF
-
-
- END SUBROUTINE salsa_init_arrays
-
-!------------------------------------------------------------------------------!
-! Description:
-! ------------
-!> Initialization of SALSA. Based on salsa_initialize in UCLALES-SALSA.
-!> Subroutines salsa_initialize, SALSAinit and DiagInitAero in UCLALES-SALSA are
-!> also merged here.
-!------------------------------------------------------------------------------!
- SUBROUTINE salsa_init
-
-    IMPLICIT NONE
-
-    INTEGER(iwp) :: i   !<
-    INTEGER(iwp) :: ib  !< loop index for aerosol number bins
-    INTEGER(iwp) :: ic  !< loop index for aerosol mass bins
-    INTEGER(iwp) :: ig  !< loop index for gases
-    INTEGER(iwp) :: ii  !< index for indexing
-    INTEGER(iwp) :: j   !<
-
-    IF ( debug_output )  CALL debug_message( 'salsa_init', 'start' )
-
-    bin_low_limits = 0.0_wp
-    k_topo_top     = 0
-    nsect          = 0.0_wp
-    massacc        = 1.0_wp
-
+    IF ( advect_particle_water )  ncomponents_mass = ncc + 1  ! Add water
 !
 !-- Indices for chemical components used (-1 = not used)
@@ -1538,18 +1279,314 @@
     ENDIF
 !
-!-- Partition and dissolutional growth by gaseous HNO3 and NH3
-    IF ( index_no > 0  .AND.  index_nh > 0  .AND.  index_so4 > 0 )  lspartition = .TRUE.
+!-- Allocate:
+    ALLOCATE( aero(nbins_aerosol), bc_am_t_val(nbins_aerosol*ncomponents_mass),                    &
+              bc_an_t_val(nbins_aerosol), bc_gt_t_val(ngases_salsa), bin_low_limits(nbins_aerosol),&
+              nsect(nbins_aerosol), massacc(nbins_aerosol) )
+    ALLOCATE( k_topo_top(nysg:nyng,nxlg:nxrg) )
+    IF ( nldepo ) ALLOCATE( sedim_vd(nzb:nzt+1,nysg:nyng,nxlg:nxrg,nbins_aerosol) )
+    ALLOCATE( ra_dry(nzb:nzt+1,nysg:nyng,nxlg:nxrg,nbins_aerosol) )
+!
+!-- Initialise the sectional particle size distribution
+    CALL set_sizebins
+!
+!-- Aerosol number concentration
+    ALLOCATE( aerosol_number(nbins_aerosol) )
+    ALLOCATE( nconc_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg,nbins_aerosol),                                &
+              nconc_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg,nbins_aerosol),                                &
+              nconc_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg,nbins_aerosol) )
+    nconc_1 = 0.0_wp
+    nconc_2 = 0.0_wp
+    nconc_3 = 0.0_wp
+
+    DO i = 1, nbins_aerosol
+       aerosol_number(i)%conc(nzb:nzt+1,nysg:nyng,nxlg:nxrg)    => nconc_1(:,:,:,i)
+       aerosol_number(i)%conc_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg)  => nconc_2(:,:,:,i)
+       aerosol_number(i)%tconc_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg) => nconc_3(:,:,:,i)
+       ALLOCATE( aerosol_number(i)%flux_s(nzb+1:nzt,0:threads_per_task-1),                         &
+                 aerosol_number(i)%diss_s(nzb+1:nzt,0:threads_per_task-1),                         &
+                 aerosol_number(i)%flux_l(nzb+1:nzt,nys:nyn,0:threads_per_task-1),                 &
+                 aerosol_number(i)%diss_l(nzb+1:nzt,nys:nyn,0:threads_per_task-1),                 &
+                 aerosol_number(i)%init(nzb:nzt+1),                                                &
+                 aerosol_number(i)%sums_ws_l(nzb:nzt+1,0:threads_per_task-1) )
+       aerosol_number(i)%init = nclim
+       IF ( include_emission  .OR.  ( nldepo  .AND.  nldepo_surf ) )  THEN
+          ALLOCATE( aerosol_number(i)%source(nys:nyn,nxl:nxr) )
+          aerosol_number(i)%source = 0.0_wp
+       ENDIF
+    ENDDO
+
+!
+!-- Aerosol mass concentration
+    ALLOCATE( aerosol_mass(ncomponents_mass*nbins_aerosol) )
+    ALLOCATE( mconc_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg,ncomponents_mass*nbins_aerosol),               &
+              mconc_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg,ncomponents_mass*nbins_aerosol),               &
+              mconc_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg,ncomponents_mass*nbins_aerosol) )
+    mconc_1 = 0.0_wp
+    mconc_2 = 0.0_wp
+    mconc_3 = 0.0_wp
+
+    DO i = 1, ncomponents_mass*nbins_aerosol
+       aerosol_mass(i)%conc(nzb:nzt+1,nysg:nyng,nxlg:nxrg)    => mconc_1(:,:,:,i)
+       aerosol_mass(i)%conc_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg)  => mconc_2(:,:,:,i)
+       aerosol_mass(i)%tconc_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg) => mconc_3(:,:,:,i)
+       ALLOCATE( aerosol_mass(i)%flux_s(nzb+1:nzt,0:threads_per_task-1),                           &
+                 aerosol_mass(i)%diss_s(nzb+1:nzt,0:threads_per_task-1),                           &
+                 aerosol_mass(i)%flux_l(nzb+1:nzt,nys:nyn,0:threads_per_task-1),                   &
+                 aerosol_mass(i)%diss_l(nzb+1:nzt,nys:nyn,0:threads_per_task-1),                   &
+                 aerosol_mass(i)%init(nzb:nzt+1),                                                  &
+                 aerosol_mass(i)%sums_ws_l(nzb:nzt+1,0:threads_per_task-1)  )
+       aerosol_mass(i)%init = mclim
+       IF ( include_emission  .OR.  ( nldepo  .AND.  nldepo_surf ) )  THEN
+          ALLOCATE( aerosol_mass(i)%source(nys:nyn,nxl:nxr) )
+          aerosol_mass(i)%source = 0.0_wp
+       ENDIF
+    ENDDO
+
+!
+!-- Surface fluxes: answs = aerosol number, amsws = aerosol mass
+!
+!-- Horizontal surfaces: default type
+    DO  l = 0, 2   ! upward (l=0), downward (l=1) and model top (l=2)
+       ALLOCATE( surf_def_h(l)%answs( 1:surf_def_h(l)%ns, nbins_aerosol ) )
+       ALLOCATE( surf_def_h(l)%amsws( 1:surf_def_h(l)%ns, nbins_aerosol*ncomponents_mass ) )
+       surf_def_h(l)%answs = 0.0_wp
+       surf_def_h(l)%amsws = 0.0_wp
+    ENDDO
+!
+!-- Horizontal surfaces: natural type
+    ALLOCATE( surf_lsm_h%answs( 1:surf_lsm_h%ns, nbins_aerosol ) )
+    ALLOCATE( surf_lsm_h%amsws( 1:surf_lsm_h%ns, nbins_aerosol*ncomponents_mass ) )
+    surf_lsm_h%answs = 0.0_wp
+    surf_lsm_h%amsws = 0.0_wp
+!
+!-- Horizontal surfaces: urban type
+    ALLOCATE( surf_usm_h%answs( 1:surf_usm_h%ns, nbins_aerosol ) )
+    ALLOCATE( surf_usm_h%amsws( 1:surf_usm_h%ns, nbins_aerosol*ncomponents_mass ) )
+    surf_usm_h%answs = 0.0_wp
+    surf_usm_h%amsws = 0.0_wp
+
+!
+!-- Vertical surfaces: northward (l=0), southward (l=1), eastward (l=2) and westward (l=3) facing
+    DO  l = 0, 3
+       ALLOCATE( surf_def_v(l)%answs( 1:surf_def_v(l)%ns, nbins_aerosol ) )
+       surf_def_v(l)%answs = 0.0_wp
+       ALLOCATE( surf_def_v(l)%amsws( 1:surf_def_v(l)%ns, nbins_aerosol*ncomponents_mass ) )
+       surf_def_v(l)%amsws = 0.0_wp
+
+       ALLOCATE( surf_lsm_v(l)%answs( 1:surf_lsm_v(l)%ns, nbins_aerosol ) )
+       surf_lsm_v(l)%answs = 0.0_wp
+       ALLOCATE( surf_lsm_v(l)%amsws( 1:surf_lsm_v(l)%ns, nbins_aerosol*ncomponents_mass ) )
+       surf_lsm_v(l)%amsws = 0.0_wp
+
+       ALLOCATE( surf_usm_v(l)%answs( 1:surf_usm_v(l)%ns, nbins_aerosol ) )
+       surf_usm_v(l)%answs = 0.0_wp
+       ALLOCATE( surf_usm_v(l)%amsws( 1:surf_usm_v(l)%ns, nbins_aerosol*ncomponents_mass ) )
+       surf_usm_v(l)%amsws = 0.0_wp
+
+    ENDDO
+
+!
+!-- Concentration of gaseous tracers (1. SO4, 2. HNO3, 3. NH3, 4. OCNV, 5. OCSV)
+!-- (number concentration (#/m3) )
+!
+!-- If chemistry is on, read gas phase concentrations from there. Otherwise, 
+!-- allocate salsa_gas array.
+
+    IF ( air_chemistry )  THEN
+       DO  lsp = 1, nvar
+          SELECT CASE ( TRIM( chem_species(lsp)%name ) )
+             CASE ( 'H2SO4', 'h2so4' )
+                gases_available = gases_available + 1
+                gas_index_chem(1) = lsp
+             CASE ( 'HNO3', 'hno3' )
+                gases_available = gases_available + 1
+                gas_index_chem(2) = lsp
+             CASE ( 'NH3', 'nh3' )
+                gases_available = gases_available + 1
+                gas_index_chem(3) = lsp
+             CASE ( 'OCNV', 'ocnv' )
+                gases_available = gases_available + 1
+                gas_index_chem(4) = lsp
+             CASE ( 'OCSV', 'ocsv' )
+                gases_available = gases_available + 1
+                gas_index_chem(5) = lsp
+          END SELECT
+       ENDDO
+
+       IF ( gases_available == ngases_salsa )  THEN
+          salsa_gases_from_chem = .TRUE.
+       ELSE
+          WRITE( message_string, * ) 'SALSA is run together with chemistry but not all gaseous '// &
+                                     'components are provided by kpp (H2SO4, HNO3, NH3, OCNV, OCSV)'
+       CALL message( 'check_parameters', 'PA0599', 1, 2, 0, 6, 0 )
+       ENDIF
+
+    ELSE
+
+       ALLOCATE( salsa_gas(ngases_salsa) )
+       ALLOCATE( gconc_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg,ngases_salsa),                 &
+                 gconc_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg,ngases_salsa),                 &
+                 gconc_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg,ngases_salsa) )
+       gconc_1 = 0.0_wp
+       gconc_2 = 0.0_wp
+       gconc_3 = 0.0_wp
+
+       DO i = 1, ngases_salsa
+          salsa_gas(i)%conc(nzb:nzt+1,nysg:nyng,nxlg:nxrg)    => gconc_1(:,:,:,i)
+          salsa_gas(i)%conc_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg)  => gconc_2(:,:,:,i)
+          salsa_gas(i)%tconc_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg) => gconc_3(:,:,:,i)
+          ALLOCATE( salsa_gas(i)%flux_s(nzb+1:nzt,0:threads_per_task-1),       &
+                    salsa_gas(i)%diss_s(nzb+1:nzt,0:threads_per_task-1),       &
+                    salsa_gas(i)%flux_l(nzb+1:nzt,nys:nyn,0:threads_per_task-1),&
+                    salsa_gas(i)%diss_l(nzb+1:nzt,nys:nyn,0:threads_per_task-1),&
+                    salsa_gas(i)%init(nzb:nzt+1),                              &
+                    salsa_gas(i)%sums_ws_l(nzb:nzt+1,0:threads_per_task-1) )
+          salsa_gas(i)%init = nclim
+          IF ( include_emission )  THEN
+             ALLOCATE( salsa_gas(i)%source(nys:nys,nxl:nxr) )
+             salsa_gas(i)%source = 0.0_wp
+          ENDIF
+       ENDDO
+!
+!--    Surface fluxes: gtsws = gaseous tracer flux
+!
+!--    Horizontal surfaces: default type
+       DO  l = 0, 2   ! upward (l=0), downward (l=1) and model top (l=2)
+          ALLOCATE( surf_def_h(l)%gtsws( 1:surf_def_h(l)%ns, ngases_salsa ) )
+          surf_def_h(l)%gtsws = 0.0_wp
+       ENDDO
+!--    Horizontal surfaces: natural type
+       ALLOCATE( surf_lsm_h%gtsws( 1:surf_lsm_h%ns, ngases_salsa ) )
+       surf_lsm_h%gtsws = 0.0_wp
+!--    Horizontal surfaces: urban type
+       ALLOCATE( surf_usm_h%gtsws( 1:surf_usm_h%ns, ngases_salsa ) )
+       surf_usm_h%gtsws = 0.0_wp
+!
+!--    Vertical surfaces: northward (l=0), southward (l=1), eastward (l=2) and 
+!--    westward (l=3) facing
+       DO  l = 0, 3
+          ALLOCATE( surf_def_v(l)%gtsws( 1:surf_def_v(l)%ns, ngases_salsa ) )
+          surf_def_v(l)%gtsws = 0.0_wp
+          ALLOCATE( surf_lsm_v(l)%gtsws( 1:surf_lsm_v(l)%ns, ngases_salsa ) )
+          surf_lsm_v(l)%gtsws = 0.0_wp
+          ALLOCATE( surf_usm_v(l)%gtsws( 1:surf_usm_v(l)%ns, ngases_salsa ) )
+          surf_usm_v(l)%gtsws = 0.0_wp
+       ENDDO
+    ENDIF
+
+    IF ( ws_scheme_sca )  THEN
+
+       IF ( salsa )  THEN
+          ALLOCATE( sums_salsa_ws_l(nzb:nzt+1,0:threads_per_task-1) )
+          sums_salsa_ws_l = 0.0_wp
+       ENDIF
+
+    ENDIF
+!
+!-- Set control flags for decycling only at lateral boundary cores. Within the inner cores the
+!-- decycle flag is set to .FALSE.. Even though it does not affect the setting of chemistry boundary
+!-- conditions, this flag is used to set advection control flags appropriately.
+    decycle_salsa_lr = MERGE( decycle_salsa_lr, .FALSE., nxl == 0  .OR.  nxr == nx )
+    decycle_salsa_ns = MERGE( decycle_salsa_ns, .FALSE., nys == 0  .OR.  nyn == ny )
+!
+!-- Decycling can be applied separately for aerosol variables, while wind and other scalars may have
+!-- cyclic or nested boundary conditions. However, large gradients near the boundaries may produce
+!-- stationary numerical oscillations near the lateral boundaries when a higher-order scheme is
+!-- applied near these boundaries. To get rid-off this, set-up additional flags that control the
+!-- order of the scalar advection scheme near the lateral boundaries for passive scalars with
+!-- decycling.
+    IF ( scalar_advec == 'ws-scheme' )  THEN
+       ALLOCATE( salsa_advc_flags_s(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+!
+!--    In case of decycling, set Neuman boundary conditions for wall_flags_0 bit 31 instead of
+!--    cyclic boundary conditions. Bit 31 is used to identify extended degradation zones (please see
+!--    the following comment). Note, since several also other modules may access this bit but may
+!--    have other boundary conditions, the original value of wall_flags_0 bit 31 must not be
+!--    modified. Hence, store the boundary conditions directly on salsa_advc_flags_s.
+!--    salsa_advc_flags_s will be later overwritten in ws_init_flags_scalar and bit 31 won't be used
+!--    to control the numerical order.
+!--    Initialize with flag 31 only.
+       salsa_advc_flags_s = 0
+       salsa_advc_flags_s = MERGE( IBSET( salsa_advc_flags_s, 31 ), 0, BTEST( wall_flags_0, 31 ) )
+
+       IF ( decycle_salsa_ns )  THEN
+          IF ( nys == 0 )  THEN
+             DO  i = 1, nbgp
+                salsa_advc_flags_s(:,nys-i,:) = MERGE( IBSET( salsa_advc_flags_s(:,nys,:), 31 ),   &
+                                                       IBCLR( salsa_advc_flags_s(:,nys,:), 31 ),   &
+                                                       BTEST( salsa_advc_flags_s(:,nys,:), 31 ) )
+             ENDDO
+          ENDIF
+          IF ( nyn == ny )  THEN
+             DO  i = 1, nbgp
+                salsa_advc_flags_s(:,nyn+i,:) = MERGE( IBSET( salsa_advc_flags_s(:,nyn,:), 31 ),   &
+                                                       IBCLR( salsa_advc_flags_s(:,nyn,:), 31 ),   &
+                                                       BTEST( salsa_advc_flags_s(:,nyn,:), 31 ) )
+             ENDDO
+          ENDIF
+       ENDIF
+       IF ( decycle_salsa_lr )  THEN
+          IF ( nxl == 0 )  THEN
+             DO  i = 1, nbgp
+                salsa_advc_flags_s(:,:,nxl-i) = MERGE( IBSET( salsa_advc_flags_s(:,:,nxl), 31 ),   &
+                                                       IBCLR( salsa_advc_flags_s(:,:,nxl), 31 ),   &
+                                                       BTEST( salsa_advc_flags_s(:,:,nxl), 31 ) )
+             ENDDO
+          ENDIF
+          IF ( nxr == nx )  THEN
+             DO  i = 1, nbgp
+                salsa_advc_flags_s(:,:,nxr+i) = MERGE( IBSET( salsa_advc_flags_s(:,:,nxr), 31 ),   &
+                                                       IBCLR( salsa_advc_flags_s(:,:,nxr), 31 ),   &
+                                                       BTEST( salsa_advc_flags_s(:,:,nxr), 31 ) )
+             ENDDO
+          ENDIF
+       ENDIF
+!
+!--    To initialise the advection flags appropriately, pass the boundary flags to
+!--    ws_init_flags_scalar. The last argument in ws_init_flags_scalar indicates that a passive
+!--    scalar is being treated and the horizontal advection terms are degraded already 2 grid points
+!--    before the lateral boundary. Also, extended degradation zones are applied, where
+!--    horizontal advection of scalars is discretised by the first-order scheme at all grid points
+!--    in the vicinity of buildings (<= 3 grid points). Even though no building is within the
+!--    numerical stencil, the first-order scheme is used. At fourth and fifth grid points, the order
+!--    of the horizontal advection scheme is successively upgraded.
+!--    These degradations of the advection scheme are done to avoid stationary numerical
+!--    oscillations, which are responsible for high concentration maxima that may appear e.g. under
+!--    shear-free stable conditions.
+       CALL ws_init_flags_scalar( bc_dirichlet_l  .OR.  bc_radiation_l  .OR.  decycle_salsa_lr,    &
+                                  bc_dirichlet_n  .OR.  bc_radiation_n  .OR.  decycle_salsa_ns,    &
+                                  bc_dirichlet_r  .OR.  bc_radiation_r  .OR.  decycle_salsa_lr,    &
+                                  bc_dirichlet_s  .OR.  bc_radiation_s  .OR.  decycle_salsa_ns,    &
+                                  salsa_advc_flags_s, .TRUE. )
+    ENDIF
+
+
+ END SUBROUTINE salsa_init_arrays
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialization of SALSA. Based on salsa_initialize in UCLALES-SALSA.
+!> Subroutines salsa_initialize, SALSAinit and DiagInitAero in UCLALES-SALSA are
+!> also merged here.
+!------------------------------------------------------------------------------!
+ SUBROUTINE salsa_init
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) :: i   !<
+    INTEGER(iwp) :: ib  !< loop index for aerosol number bins
+    INTEGER(iwp) :: ic  !< loop index for aerosol mass bins
+    INTEGER(iwp) :: ig  !< loop index for gases
+    INTEGER(iwp) :: j   !<
+
+    IF ( debug_output )  CALL debug_message( 'salsa_init', 'start' )
+
+    bin_low_limits = 0.0_wp
+    k_topo_top     = 0
+    nsect          = 0.0_wp
+    massacc        = 1.0_wp
 !
 !-- Initialise
-!
-!-- Aerosol size distribution (TYPE t_section)
-    aero(:)%dwet     = 1.0E-10_wp
-    aero(:)%veqh2o   = 1.0E-10_wp
-    aero(:)%numc     = nclim
-    aero(:)%core     = 1.0E-10_wp
-    DO ic = 1, maxspec+1    ! 1:SO4, 2:OC, 3:BC, 4:DU, 5:SS, 6:NO, 7:NH, 8:H2O
-       aero(:)%volc(ic) = 0.0_wp
-    ENDDO
-
     IF ( nldepo )  sedim_vd = 0.0_wp
 
@@ -1583,14 +1620,4 @@
 !-- Aerosol radius in each bin: dry and wet (m)
     ra_dry = 1.0E-10_wp
-!
-!-- Initialise aerosol tracers
-    aero(:)%vhilim   = 0.0_wp
-    aero(:)%vlolim   = 0.0_wp
-    aero(:)%vratiohi = 0.0_wp
-    aero(:)%vratiolo = 0.0_wp
-    aero(:)%dmid     = 0.0_wp
-!
-!-- Initialise the sectional particle size distribution
-    CALL set_sizebins
 !
 !-- Initialise location-dependent aerosol size distributions and chemical compositions:
@@ -1639,4 +1666,7 @@
        ENDIF
     ENDIF
+!
+!-- Partition and dissolutional growth by gaseous HNO3 and NH3
+    IF ( index_no > 0  .AND.  index_nh > 0  .AND.  index_so4 > 0 )  lspartition = .TRUE.
 
     IF ( debug_output )  CALL debug_message( 'salsa_init', 'end' )
@@ -1676,4 +1706,12 @@
 
     REAL(wp) ::  ratio_d  !< ratio of the upper and lower diameter of subranges
+
+    aero(:)%dwet     = 1.0E-10_wp
+    aero(:)%veqh2o   = 1.0E-10_wp
+    aero(:)%numc     = nclim
+    aero(:)%core     = 1.0E-10_wp
+    DO  cc = 1, maxspec+1    ! 1:SO4, 2:OC, 3:BC, 4:DU, 5:SS, 6:NO, 7:NH, 8:H2O
+       aero(:)%volc(cc) = 0.0_wp
+    ENDDO
 !
 !-- vlolim&vhilim: min & max *dry* volumes [fxm]
@@ -1737,10 +1775,12 @@
 
     USE netcdf_data_input_mod,                                                                     &
-        ONLY:  close_input_file, get_attribute, get_variable,                                      &
+        ONLY:  check_existence, close_input_file, get_attribute, get_variable,                     &
+               inquire_num_variables, inquire_variable_names,                                      &
                netcdf_data_input_get_dimension_length, open_read_file
 
     IMPLICIT NONE
 
-    CHARACTER(LEN=25), DIMENSION(:), ALLOCATABLE :: cc_name  !< chemical component name
+    CHARACTER(LEN=25),  DIMENSION(:), ALLOCATABLE ::  cc_name    !< chemical component name
+    CHARACTER(LEN=100), DIMENSION(:), ALLOCATABLE ::  var_names  !< variable names
 
     INTEGER(iwp) ::  ee        !< index: end
@@ -1753,11 +1793,12 @@
     INTEGER(iwp) ::  k         !< loop index: z-direction
     INTEGER(iwp) ::  lod_aero  !< level of detail of inital aerosol concentrations
-    INTEGER(iwp) ::  pr_nbins  !< Number of aerosol size bins in file
-    INTEGER(iwp) ::  pr_ncc    !< Number of aerosol chemical components in file
-    INTEGER(iwp) ::  pr_nz     !< Number of vertical grid-points in file
+    INTEGER(iwp) ::  num_vars  !< number of variables
+    INTEGER(iwp) ::  pr_nbins  !< number of aerosol size bins in file
+    INTEGER(iwp) ::  pr_ncc    !< number of aerosol chemical components in file
+    INTEGER(iwp) ::  pr_nz     !< number of vertical grid-points in file
     INTEGER(iwp) ::  prunmode  !< running mode of SALSA
     INTEGER(iwp) ::  ss        !< index: start
 
-    INTEGER(iwp), DIMENSION(maxspec) ::  cc_input_to_model
+    INTEGER(iwp), DIMENSION(maxspec) ::  cc_in2mod
 
     LOGICAL  ::  netcdf_extend = .FALSE. !< Flag: netcdf file exists
@@ -1770,5 +1811,5 @@
     REAL(wp), DIMENSION(0:nz+1) ::  pmfoc1a !< mass fraction of OC in 1a
 
-    REAL(wp), DIMENSION(0:nz+1,nbins_aerosol)   ::  pndist  !< size dist as a function of height (#/m3)
+    REAL(wp), DIMENSION(0:nz+1,nbins_aerosol)   ::  pndist  !< vertical profile of size dist. (#/m3)
     REAL(wp), DIMENSION(0:nz+1,maxspec)         ::  pmf2a   !< mass distributions in subrange 2a
     REAL(wp), DIMENSION(0:nz+1,maxspec)         ::  pmf2b   !< mass distributions in subrange 2b
@@ -1780,9 +1821,8 @@
     REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  pr_mass_fracs_b  !< and b
 
-    cc_input_to_model = 0
+    cc_in2mod = 0
     prunmode = 1
 !
 !-- Bin mean aerosol particle volume (m3)
-    core(:) = 0.0_wp
     core(1:nbins_aerosol) = api6 * aero(1:nbins_aerosol)%dmid**3
 !
@@ -1806,5 +1846,12 @@
           CALL open_read_file( TRIM( input_file_dynamic ) // TRIM( coupling_char ), id_dyn )
 !
-!--       Inquire dimensions:
+!--       At first, inquire all variable names
+          CALL inquire_num_variables( id_dyn, num_vars )
+!
+!--       Allocate memory to store variable names
+          ALLOCATE( var_names(1:num_vars) )
+          CALL inquire_variable_names( id_dyn, var_names )
+!
+!--       Inquire vertical dimension and number of aerosol chemical components
           CALL netcdf_data_input_get_dimension_length( id_dyn, pr_nz, 'z' )
           IF ( pr_nz /= nz )  THEN
@@ -1824,26 +1871,33 @@
           CALL get_variable( id_dyn, 'z', pr_z )
 !
-!--       Read name and index of chemical components
-          CALL get_variable( id_dyn, 'composition_name', cc_name, pr_ncc )
+!--       Read the names of chemical components
+          IF ( check_existence( var_names, 'composition_name' ) )  THEN
+             CALL get_variable( id_dyn, 'composition_name', cc_name, pr_ncc )
+          ELSE
+             WRITE( message_string, * ) 'Missing composition_name in ' // TRIM( input_file_dynamic )
+             CALL message( 'aerosol_init', 'PA0655', 1, 2, 0, 6, 0 )
+          ENDIF
+!
+!--       Define the index of each chemical component in the model
           DO  ic = 1, pr_ncc
              SELECT CASE ( TRIM( cc_name(ic) ) )
                 CASE ( 'H2SO4', 'SO4', 'h2so4', 'so4' )
-                   cc_input_to_model(1) = ic
+                   cc_in2mod(1) = ic
                 CASE ( 'OC', 'oc' )
-                   cc_input_to_model(2) = ic
+                   cc_in2mod(2) = ic
                 CASE ( 'BC', 'bc' )
-                   cc_input_to_model(3) = ic
+                   cc_in2mod(3) = ic
                 CASE ( 'DU', 'du' )
-                   cc_input_to_model(4) = ic
+                   cc_in2mod(4) = ic
                 CASE ( 'SS', 'ss' )
-                   cc_input_to_model(5) = ic
+                   cc_in2mod(5) = ic
                 CASE ( 'HNO3', 'hno3', 'NO', 'no' )
-                   cc_input_to_model(6) = ic
+                   cc_in2mod(6) = ic
                 CASE ( 'NH3', 'nh3', 'NH', 'nh' )
-                   cc_input_to_model(7) = ic
+                   cc_in2mod(7) = ic
              END SELECT
           ENDDO
 
-          IF ( SUM( cc_input_to_model ) == 0 )  THEN
+          IF ( SUM( cc_in2mod ) == 0 )  THEN
              message_string = 'None of the aerosol chemical components in ' // TRIM(               &
                               input_file_dynamic ) // ' correspond to ones applied in SALSA.'
@@ -1852,6 +1906,12 @@
 !
 !--       Vertical profiles of mass fractions of different chemical components:
-          CALL get_variable( id_dyn, 'init_atmosphere_mass_fracs_a', pr_mass_fracs_a,              &
-                             0, pr_ncc-1, 0, pr_nz-1 )
+          IF ( check_existence( var_names, 'init_atmosphere_mass_fracs_a' ) )  THEN
+             CALL get_variable( id_dyn, 'init_atmosphere_mass_fracs_a', pr_mass_fracs_a,           &
+                                0, pr_ncc-1, 0, pr_nz-1 )
+          ELSE
+             WRITE( message_string, * ) 'Missing init_atmosphere_mass_fracs_a in ' //              &
+                                        TRIM( input_file_dynamic )
+             CALL message( 'aerosol_init', 'PA0656', 1, 2, 0, 6, 0 )
+          ENDIF
           CALL get_variable( id_dyn, 'init_atmosphere_mass_fracs_b', pr_mass_fracs_b,              &
                              0, pr_ncc-1, 0, pr_nz-1  )
@@ -1859,5 +1919,5 @@
 !--       Match the input data with the chemical composition applied in the model
           DO  ic = 1, maxspec
-             ss = cc_input_to_model(ic)
+             ss = cc_in2mod(ic)
              IF ( ss == 0 )  CYCLE
              pmf2a(nzb+1:nzt+1,ic) = pr_mass_fracs_a(nzb:nzt,ss)
@@ -1865,5 +1925,5 @@
           ENDDO
 !
-!--       Aerosol concentrations: lod=1 (total PM) or lod=2 (sectional number size distribution)
+!--       Aerosol concentrations: lod=1 (vertical profile of sectional number size distribution)
           CALL get_attribute( id_dyn, 'lod', lod_aero, .FALSE., 'init_atmosphere_aerosol' )
           IF ( lod_aero /= 1 )  THEN
@@ -3020,5 +3080,5 @@
 !--    Condensation
        IF ( lscnd )   THEN
-          CALL condensation( lo_aero, zgso4, zgocnv, zgocsv,  zghno3, zgnh3, in_cw(k), in_cs(k),      &
+          CALL condensation( lo_aero, zgso4, zgocnv, zgocsv,  zghno3, zgnh3, in_cw(k), in_cs(k),   &
                              in_t(k), in_p(k), dt_salsa, prtcl )
        ENDIF
@@ -3026,5 +3086,5 @@
 !--    Deposition
        IF ( lsdepo )  THEN
-          CALL deposition( lo_aero, in_t(k), in_adn(k), in_u(k), in_lad, kvis(k), schmidt_num(k,:),   &
+          CALL deposition( lo_aero, in_t(k), in_adn(k), in_u(k), in_lad, kvis(k), schmidt_num(k,:),&
                            vd(k,:) )
        ENDIF
@@ -3258,6 +3318,5 @@
 ! Description:
 ! ------------
-!> Set logical switches according to the host model state and user-specified 
-!> NAMELIST options.
+!> Set logical switches according to the salsa_parameters options.
 !> Juha Tonttila, FMI, 2014
 !> Only aerosol processes included, Mona Kurppa, UHel, 2017
@@ -3832,9 +3891,10 @@
 !
 !--    Brownian diffusion
-       v_bd = mag_u * c_brownian_diff * schmidt_num**( -0.66666666_wp ) *                             &
+       v_bd = mag_u * c_brownian_diff * schmidt_num**( -0.66666666_wp ) *                          &
               ( mag_u * par_l / kvis_a )**( -0.5_wp )
 !
 !--    Interception
-       v_in = mag_u * c_interception * diameter / par_l * ( 2.0_wp + LOG( 2.0_wp * par_l / diameter ) )
+       v_in = mag_u * c_interception * diameter / par_l *                                          &
+              ( 2.0_wp + LOG( 2.0_wp * par_l / diameter ) )
 !
 !--    Impaction: Petroff (2009) Eq. 18
@@ -4179,5 +4239,5 @@
     REAL(wp), DIMENSION(maxspec+1)     ::  zplusterm  !< coagulation gain in a bin (for each
                                                       !< chemical compound)
-    REAL(wp), DIMENSION(nbins_aerosol,nbins_aerosol) ::  zcc  !< updated coagulation coefficients (m3/s)
+    REAL(wp), DIMENSION(nbins_aerosol,nbins_aerosol) ::  zcc  !< updated coagulation coeff. (m3/s)
 
     TYPE(t_section), DIMENSION(nbins_aerosol), INTENT(inout) ::  paero  !< Aerosol properties
@@ -4186,7 +4246,6 @@
     zdpart_nn = 0.0_wp
 !
-!-- 1) Coagulation to coarse mode calculated in a simplified way: 
-!--    CoagSink ~ Dp in continuum subrange, thus we calculate 'effective' 
-!--    number concentration of coarse particles
+!-- 1) Coagulation to coarse mode calculated in a simplified way:
+!--    CoagSink ~ Dp in continuum subrange --> 'effective' number conc. of coarse particles
 
 !-- 2) Updating coagulation coefficients 
@@ -4418,5 +4477,5 @@
     fmdist = SQRT( tva(1)**2 + tva(2)**2 )
 !
-!-- 5) Coagulation coefficient = coalescence efficiency * collision kernel (m3/s) (eq. 15.33). 
+!-- 5) Coagulation coefficient = coalescence efficiency * collision kernel (m3/s) (eq. 15.33).
 !--    Here assumed coalescence efficiency 1!!
     coagc = flux(1) / ( mdiam / ( mdiam + fmdist) + flux(1) / flux(2) )
@@ -4632,5 +4691,5 @@
 !
 !--    5.1.2) Semivolatile organic compound: all bins except subrange 1
-       zcs_ocsv = SUM( zcolrate(start_subrange_2a:end_subrange_2b) ) !< sink for semi-volatile organics
+       zcs_ocsv = SUM( zcolrate(start_subrange_2a:end_subrange_2b) ) !< sink for semi-volatile org.
        IF ( pcocsv > 1.0E+10_wp  .AND.  zcs_ocsv > 1.0E-30  .AND. is_used( prtcl,'OC') )  THEN
 !
@@ -4849,4 +4908,8 @@
     zkocnv = 0.0_wp
 
+    zc_h2so4 = pc_sa * 1.0E-6_wp   ! sulphuric acid conc. to #/cm3
+    zc_org   = pc_ocnv * 1.0E-6_wp   ! conc. of non-volatile OC to #/cm3
+    zmixnh3  = pc_nh3 * ptemp * argas / ( ppres * avo )
+
     SELECT CASE ( nsnucl )
 !
@@ -4854,67 +4917,113 @@
        CASE(1)
 
-          zc_h2so4 = pc_sa * 1.0E-6_wp   ! sulphuric acid conc. to #/cm3
           CALL binnucl( zc_h2so4, ptemp, prh, zjnuc, znsa, znoc, zdcrit,  zksa, zkocnv )
 !
-!--    Activation type nucleation
+!--    Activation type nucleation (See Riipinen et al. (2007), Atmos. Chem. Phys., 7(8), 1899-1914)
        CASE(2)
-
-          zc_h2so4 = pc_sa * 1.0E-6_wp   ! sulphuric acid conc. to #/cm3
-          CALL binnucl( zc_h2so4, ptemp, prh, zjnuc, znsa,  znoc, zdcrit, zksa, zkocnv )
-          CALL actnucl( pc_sa, zjnuc, zdcrit, znsa, znoc, zksa, zkocnv, act_coeff )
+!
+!--       Nucleation rate (#/(m3 s))
+          zc_h2so4  = MAX( zc_h2so4, 1.0E4_wp  )
+          zc_h2so4  = MIN( zc_h2so4, 1.0E11_wp )
+          zjnuc = act_coeff * pc_sa  ! (#/(m3 s))
+!
+!--       Organic compounds not involved when kinetic nucleation is assumed.
+          zdcrit  = 7.9375E-10_wp   ! (m)
+          zkocnv  = 0.0_wp
+          zksa    = 1.0_wp
+          znoc    = 0.0_wp
+          znsa    = 2.0_wp
 !
 !--    Kinetically limited nucleation of (NH4)HSO4 clusters
+!--    (See Sihto et al. (2006), Atmos. Chem. Phys., 6(12), 4079-4091.)
        CASE(3)
-
-          zc_h2so4 = pc_sa * 1.0E-6_wp   ! sulphuric acid conc. to #/cm3
-          CALL binnucl( zc_h2so4, ptemp, prh, zjnuc, znsa, znoc, zdcrit, zksa, zkocnv )
-          CALL kinnucl( zc_h2so4, zjnuc, zdcrit, znsa, znoc, zksa, zkocnv )
+!
+!--       Nucleation rate = coagcoeff*zpcsa**2 (#/(m3 s))
+          zc_h2so4  = MAX( zc_h2so4, 1.0E4_wp  )
+          zc_h2so4  = MIN( zc_h2so4, 1.0E11_wp )
+          zjnuc = 5.0E-13_wp * zc_h2so4**2.0_wp * 1.0E+6_wp
+!
+!--       Organic compounds not involved when kinetic nucleation is assumed.
+          zdcrit  = 7.9375E-10_wp   ! (m)
+          zkocnv  = 0.0_wp
+          zksa    = 1.0_wp
+          znoc    = 0.0_wp
+          znsa    = 2.0_wp
 !
 !--    Ternary H2SO4-H2O-NH3 nucleation
        CASE(4)
 
-          zmixnh3 = pc_nh3 * ptemp * argas / ( ppres * avo )
-          zc_h2so4 = pc_sa * 1.0E-6_wp   ! sulphuric acid conc. to #/cm3
           CALL ternucl( zc_h2so4, zmixnh3, ptemp, prh, zjnuc, znsa, znoc, zdcrit, zksa, zkocnv )
 !
 !--    Organic nucleation, J~[ORG] or J~[ORG]**2
+!--    (See Paasonen et al. (2010), Atmos. Chem. Phys., 10, 11223-11242.)
        CASE(5)
-
-          zc_org = pc_ocnv * 1.0E-6_wp   ! conc. of non-volatile OC to #/cm3
-          zc_h2so4 = pc_sa * 1.0E-6_wp   ! sulphuric acid conc. to #/cm3
-          CALL binnucl( zc_h2so4, ptemp, prh, zjnuc, znsa, znoc, zdcrit, zksa, zkocnv )
-          CALL orgnucl( pc_ocnv, zjnuc, zdcrit, znsa, znoc, zksa, zkocnv )
+!
+!--       Homomolecular nuleation rate
+          zjnuc = 1.3E-7_wp * pc_ocnv   ! (1/s) (Paasonen et al. Table 4: median a_org)
+!
+!--       H2SO4 not involved when pure organic nucleation is assumed.
+          zdcrit  = 1.5E-9  ! (m)
+          zkocnv  = 1.0_wp
+          zksa    = 0.0_wp
+          znoc    = 1.0_wp
+          znsa    = 0.0_wp
 !
 !--    Sum of H2SO4 and organic activation type nucleation, J~[H2SO4]+[ORG]
+!--    (See Paasonen et al. (2010), Atmos. Chem. Phys., 10, 11223-11242)
        CASE(6)
-
-          zc_h2so4 = pc_sa * 1.0E-6_wp   ! sulphuric acid conc. to #/cm3
-          CALL binnucl( zc_h2so4, ptemp, prh, zjnuc, znsa, znoc, zdcrit, zksa, zkocnv )
-          CALL sumnucl( pc_sa, pc_ocnv, zjnuc, zdcrit, znsa, znoc, zksa, zkocnv )
-!
-!--    Heteromolecular nucleation, J~[H2SO4]*[ORG]
+!
+!--       Nucleation rate  (#/m3/s)
+          zjnuc = 6.1E-7_wp * pc_sa + 0.39E-7_wp * pc_ocnv   ! (Paasonen et al. Table 3.)
+!
+!--       Both organic compounds and H2SO4 are involved when sumnucleation is assumed.
+          zdcrit  = 1.5E-9_wp   ! (m)
+          zkocnv  = 1.0_wp
+          zksa    = 1.0_wp
+          znoc    = 1.0_wp
+          znsa    = 1.0_wp
+!
+!--    Heteromolecular nucleation, J~[H2SO4]*[ORG] 
+!--    (See Paasonen et al. (2010), Atmos. Chem. Phys., 10, 11223-11242.)
        CASE(7)
-
-          zc_h2so4 = pc_sa * 1.0E-6_wp   ! sulphuric acid conc. to #/cm3
-          zc_org = pc_ocnv * 1.0E-6_wp   ! conc. of non-volatile OC to #/cm3
-          CALL binnucl( zc_h2so4, ptemp, prh, zjnuc, znsa, znoc, zdcrit, zksa, zkocnv )
-          CALL hetnucl( zc_h2so4, zc_org, zjnuc, zdcrit, znsa, znoc, zksa, zkocnv )
+!
+!--       Nucleation rate (#/m3/s)
+          zjnuc = 4.1E-14_wp * pc_sa * pc_ocnv * 1.0E6_wp   ! (Paasonen et al. Table 4: median)
+!
+!--       Both organic compounds and H2SO4 are involved when heteromolecular nucleation is assumed
+          zdcrit  = 1.5E-9_wp   ! (m)
+          zkocnv  = 1.0_wp
+          zksa    = 1.0_wp
+          znoc    = 1.0_wp
+          znsa    = 1.0_wp
 !
 !--    Homomolecular nucleation of H2SO4 and heteromolecular nucleation of H2SO4 and organic vapour,
 !--    J~[H2SO4]**2 + [H2SO4]*[ORG] (EUCAARI project)
+!--    (See Paasonen et al. (2010), Atmos. Chem. Phys., 10, 11223-11242)
        CASE(8)
-          zc_h2so4 = pc_sa * 1.0E-6_wp   ! sulphuric acid conc. to #/cm3
-          zc_org = pc_ocnv * 1.0E-6_wp   ! conc. of non-volatile OC to #/cm3
-          CALL binnucl( zc_h2so4, ptemp, prh, zjnuc, znsa, znoc, zdcrit, zksa, zkocnv )
-          CALL SAnucl( zc_h2so4, zc_org, zjnuc, zdcrit, znsa, znoc, zksa, zkocnv )
+!
+!--       Nucleation rate (#/m3/s)
+          zjnuc = ( 1.1E-14_wp * zc_h2so4**2 + 3.2E-14_wp * zc_h2so4 * zc_org ) * 1.0E+6_wp
+!
+!--       Both organic compounds and H2SO4 are involved when SAnucleation is assumed
+          zdcrit  = 1.5E-9_wp   ! (m)
+          zkocnv  = 1.0_wp
+          zksa    = 1.0_wp
+          znoc    = 1.0_wp
+          znsa    = 3.0_wp
 !
 !--    Homomolecular nucleation of H2SO4 and organic vapour and heteromolecular nucleation of H2SO4
 !--    and organic vapour, J~[H2SO4]**2 + [H2SO4]*[ORG]+[ORG]**2 (EUCAARI project)
        CASE(9)
-
-          zc_h2so4 = pc_sa * 1.0E-6_wp   ! sulphuric acid conc. to #/cm3
-          zc_org = pc_ocnv * 1.0E-6_wp   ! conc. of non-volatile OC to #/cm3
-          CALL binnucl( zc_h2so4, ptemp, prh, zjnuc, znsa, znoc, zdcrit, zksa, zkocnv )
-          CALL SAORGnucl( zc_h2so4, zc_org, zjnuc, zdcrit, znsa, znoc, zksa, zkocnv )
+!
+!--       Nucleation rate (#/m3/s)
+          zjnuc = ( 1.4E-14_wp * zc_h2so4**2 + 2.6E-14_wp * zc_h2so4 * zc_org + 0.037E-14_wp *     &
+                    zc_org**2 ) * 1.0E+6_wp
+!
+!--       Both organic compounds and H2SO4 are involved when SAORGnucleation is assumed
+          zdcrit  = 1.5E-9_wp   ! (m)
+          zkocnv  = 1.0_wp
+          zksa    = 1.0_wp
+          znoc    = 3.0_wp
+          znsa    = 3.0_wp
 
     END SELECT
@@ -5010,9 +5119,9 @@
 !
 !--    Defining the parameter m (zm_para) for calculating the coagulation sink onto background
-!--    particles (Eq. 5&6 in Lehtinen et al. 2007). The growth is investigated between 
+!--    particles (Eq. 5&6 in Lehtinen et al. 2007). The growth is investigated between
 !--    [d1,reglim(1)] = [zdcrit,3nm] and m = LOG( CoagS_dx / CoagX_zdcrit ) / LOG( reglim / zdcrit )
 !--    (Lehtinen et al. 2007, Eq. 6).
-!--    The steps for the coagulation sink for reglim = 3nm and zdcrit ~= 1nm are explained in 
-!--    Kulmala et al. (2001). The particles of diameter zdcrit ~1.14 nm  and reglim = 3nm are both 
+!--    The steps for the coagulation sink for reglim = 3nm and zdcrit ~= 1nm are explained in
+!--    Kulmala et al. (2001). The particles of diameter zdcrit ~1.14 nm  and reglim = 3nm are both
 !--    in turn the "number 1" variables (Kulmala et al. 2001).
 !--    c = critical (1nm), x = 3nm, 2 = wet or mean droplet
@@ -5129,5 +5238,5 @@
              z_gr_tot = z_gr_clust * 2.77777777E-7_wp +  1.5708E-6_wp * zlambda * zdcrit**3 *      &
                       ( z_n_nuc * 1.0E-6_wp ) * zcv_c * avo * 2.77777777E-7_wp ! (Eq. 3)
-             zeta = - zcoagstot / ( ( zm_para + 1.0_wp ) * z_gr_tot * ( zdcrit**zm_para ) ) ! (Eq. 7b)
+             zeta = - zcoagstot / ( ( zm_para + 1.0_wp ) * z_gr_tot * ( zdcrit**zm_para ) ) ! (Eq.7b)
 !
 !--          Calculate Eq. 7a (Taylor series for the number of particles between [d1,dx])
@@ -5139,5 +5248,5 @@
           z_gr_tot = z_gr_clust * 1.0E-9_wp / 3600.0_wp + 1.5708E-6_wp *  zlambda * zdcrit**3 *    &
                    ( z_n_nuc * 1.0E-6_wp ) * zcv_c * avo * 1.0E-9_wp / 3600.0_wp !< (m/s)
-          zj3 = zjnuc * EXP( MIN( 0.0_wp, -zgamma * zdcrit * zcoagstot / z_gr_tot ) ) ! (#/m3s, Eq. 5a)
+          zj3 = zjnuc * EXP( MIN( 0.0_wp, -zgamma * zdcrit * zcoagstot / z_gr_tot ) ) ! (#/m3s, Eq.5a)
 
        ENDIF
@@ -5145,6 +5254,6 @@
 !
 !-- If J3 very small (< 1 #/cm3), neglect particle formation. In real atmosphere this would mean
-!-- that clusters form but coagulate to pre-existing particles who gain sulphate. Since 
-!-- CoagS ~ CS (4piD*CS'), we do *not* update H2SO4 concentration here but let condensation take 
+!-- that clusters form but coagulate to pre-existing particles who gain sulphate. Since
+!-- CoagS ~ CS (4piD*CS'), we do *not* update H2SO4 concentration here but let condensation take
 !-- care of it. Formation mass rate of molecules (molec/m3s) for 1: H2SO4 and 2: organic vapour
     pj3n3(1) = zj3 * n3 * pxsa
@@ -5156,8 +5265,8 @@
 ! Description:
 ! ------------
-!> Calculate the nucleation rate and the size of critical clusters assuming 
+!> Calculate the nucleation rate and the size of critical clusters assuming
 !> binary nucleation.
-!> Parametrisation according to Vehkamaki et al. (2002), J. Geophys. Res., 
-!> 107(D22), 4622. Called from subroutine nucleation. 
+!> Parametrisation according to Vehkamaki et al. (2002), J. Geophys. Res.,
+!> 107(D22), 4622. Called from subroutine nucleation.
 !------------------------------------------------------------------------------!
  SUBROUTINE binnucl( pc_sa, ptemp, prh, pnuc_rate, pn_crit_sa, pn_crit_ocnv, pd_crit, pk_sa,       &
@@ -5519,257 +5628,4 @@
 
  END SUBROUTINE ternucl
-
-!------------------------------------------------------------------------------!
-! Description:
-! ------------
-!> Calculate the nucleation rate and the size of critical clusters assuming
-!> kinetic nucleation. Each sulphuric acid molecule forms an (NH4)HSO4 molecule
-!> in the atmosphere and two colliding (NH4)HSO4 molecules form a stable
-!> cluster. See Sihto et al. (2006), Atmos. Chem. Phys., 6(12), 4079-4091.
-!>
-!> Below the following assumption have been made:
-!>  nucrate = coagcoeff*zpcsa**2
-!>  coagcoeff = 8*sqrt(3*boltz*ptemp*r_abs/dens_abs)
-!>  r_abs = 0.315d-9 radius of bisulphate molecule [m]
-!>  dens_abs = 1465  density of - " - [kg/m3]
-!------------------------------------------------------------------------------!
- SUBROUTINE kinnucl( pc_sa, pnuc_rate, pd_crit, pn_crit_sa, pn_crit_ocnv, pk_sa, pk_ocnv )
-
-    IMPLICIT NONE
-
-    REAL(wp), INTENT(in) ::  pc_sa  !< H2SO4 conc. (#/m3)
-
-    REAL(wp), INTENT(out) ::  pd_crit  !< critical diameter of clusters (m)
-    REAL(wp), INTENT(out) ::  pk_ocnv  !< if pk_ocnv = 1, organic compounds participate in nucleation
-    REAL(wp), INTENT(out) ::  pk_sa    !< if pk_sa = 1, H2SO4 is participate in nucleation
-    REAL(wp), INTENT(out) ::  pn_crit_ocnv  !< number of organic molecules in cluster (#)
-    REAL(wp), INTENT(out) ::  pn_crit_sa    !< number of H2SO4 molecules in cluster (#)
-    REAL(wp), INTENT(out) ::  pnuc_rate     !< nucl. rate (#/(m3 s))
-!
-!-- Nucleation rate (#/(m3 s))
-    pnuc_rate = 5.0E-13_wp * pc_sa**2.0_wp * 1.0E+6_wp
-!
-!-- Organic compounds not involved when kinetic nucleation is assumed.
-    pn_crit_sa   = 2.0_wp
-    pn_crit_ocnv = 0.0_wp
-    pk_sa        = 1.0_wp
-    pk_ocnv      = 0.0_wp
-    pd_crit      = 7.9375E-10_wp   ! (m)
-
- END SUBROUTINE kinnucl
-
-!------------------------------------------------------------------------------!
-! Description:
-! ------------
-!> Calculate the nucleation rate and the size of critical clusters assuming 
-!> activation type nucleation.
-!> See Riipinen et al. (2007), Atmos. Chem. Phys., 7(8), 1899-1914.
-!------------------------------------------------------------------------------!
- SUBROUTINE actnucl( psa_conc, pnuc_rate, pd_crit, pn_crit_sa, pn_crit_ocnv, pk_sa, pk_ocnv, activ )
-
-    IMPLICIT NONE
-
-    REAL(wp), INTENT(in) ::  activ     !< activation coefficient (1e-7 by default)
-    REAL(wp), INTENT(in) ::  psa_conc  !< H2SO4 conc. (#/m3)
-
-    REAL(wp), INTENT(out) ::  pd_crit  !< critical diameter of clusters (m)
-    REAL(wp), INTENT(out) ::  pk_ocnv  !< if pk_ocnv = 1, organic compounds participate in nucleation
-    REAL(wp), INTENT(out) ::  pk_sa    !< if pk_sa = 1, H2SO4 participate in nucleation
-    REAL(wp), INTENT(out) ::  pn_crit_ocnv  !< number of organic molecules in cluster (#)
-    REAL(wp), INTENT(out) ::  pn_crit_sa    !< number of H2SO4 molecules in cluster (#)
-    REAL(wp), INTENT(out) ::  pnuc_rate     !< nucl. rate (#/(m3 s))
-!
-!-- Nucleation rate (#/(m3 s))
-    pnuc_rate = activ * psa_conc   ! (#/(m3 s))
-!
-!-- Organic compounds not involved when kinetic nucleation is assumed.
-    pn_crit_sa   = 2.0_wp
-    pn_crit_ocnv = 0.0_wp
-    pk_sa        = 1.0_wp
-    pk_ocnv      = 0.0_wp
-    pd_crit      = 7.9375E-10_wp   ! (m)
-
- END SUBROUTINE actnucl
-
-!------------------------------------------------------------------------------!
-! Description:
-! ------------
-!> Conciders only the organic matter in nucleation. Paasonen et al. (2010) 
-!> determined particle formation rates for 2 nm particles, J2, from different
-!> kind of combinations of sulphuric acid and organic matter concentration.
-!> See Paasonen et al. (2010), Atmos. Chem. Phys., 10, 11223-11242.
-!------------------------------------------------------------------------------!
- SUBROUTINE orgnucl( pc_org, pnuc_rate, pd_crit, pn_crit_sa, pn_crit_ocnv,     &
-                     pk_sa, pk_ocnv )
-
-    IMPLICIT NONE
-
-    REAL(wp) ::  a_org = 1.3E-7_wp  !< (1/s) (Paasonen et al. Table 4: median)
-
-    REAL(wp), INTENT(in) ::  pc_org   !< organic vapour concentration (#/m3)
-
-    REAL(wp), INTENT(out) ::  pd_crit  !< critical diameter of clusters (m)
-    REAL(wp), INTENT(out) ::  pk_ocnv  !< if pk_ocnv = 1, organic compounds participate in nucleation
-    REAL(wp), INTENT(out) ::  pk_sa    !< if pk_sa = 1, H2SO4 participate in nucleation
-    REAL(wp), INTENT(out) ::  pn_crit_ocnv  !< number of organic molecules in cluster (#)
-    REAL(wp), INTENT(out) ::  pn_crit_sa    !< number of H2SO4 molecules in cluster (#)
-    REAL(wp), INTENT(out) ::  pnuc_rate     !< nucl. rate (#/(m3 s))
-!
-!-- Homomolecular nuleation rate
-    pnuc_rate = a_org * pc_org
-!
-!-- H2SO4 not involved when pure organic nucleation is assumed.
-    pn_crit_sa   = 0.0_wp
-    pn_crit_ocnv = 1.0_wp
-    pk_sa        = 0.0_wp
-    pk_ocnv      = 1.0_wp
-    pd_crit      = 1.5E-9_wp   ! (m)
-
- END SUBROUTINE orgnucl
-
-!------------------------------------------------------------------------------!
-! Description:
-! ------------
-!> Conciders both the organic vapor and H2SO4 in nucleation - activation type 
-!> of nucleation. 
-!> See Paasonen et al. (2010), Atmos. Chem. Phys., 10, 11223-11242.
-!------------------------------------------------------------------------------!
- SUBROUTINE sumnucl( pc_sa, pc_org, pnuc_rate, pd_crit, pn_crit_sa, pn_crit_ocnv, pk_sa, pk_ocnv )
-
-    IMPLICIT NONE
-
-    REAL(wp) ::  a_s1 = 6.1E-7_wp   !< (1/s)
-    REAL(wp) ::  a_s2 = 0.39E-7_wp  !< (1/s) (Paasonen et al. Table 3.)
-
-    REAL(wp), INTENT(in) ::  pc_org   !< organic vapour concentration (#/m3)
-    REAL(wp), INTENT(in) ::  pc_sa    !< H2SO4 conc. (#/m3)
-
-    REAL(wp), INTENT(out) ::  pd_crit  !< critical diameter of clusters (m)
-    REAL(wp), INTENT(out) ::  pk_ocnv  !< if pk_ocnv = 1, organic compounds participate in nucleation
-    REAL(wp), INTENT(out) ::  pk_sa    !< if pk_sa = 1, H2SO4 participate in nucleation
-    REAL(wp), INTENT(out) ::  pn_crit_ocnv  !< number of organic molecules in cluster (#)
-    REAL(wp), INTENT(out) ::  pn_crit_sa    !< number of H2SO4 molecules in cluster (#)
-    REAL(wp), INTENT(out) ::  pnuc_rate     !< nucl. rate (#/(m3 s))
-!
-!-- Nucleation rate  (#/m3/s)
-    pnuc_rate = a_s1 * pc_sa + a_s2 * pc_org
-!
-!-- Both organic compounds and H2SO4 are involved when sumnucleation is assumed.
-    pn_crit_sa   = 1.0_wp
-    pn_crit_ocnv = 1.0_wp
-    pk_sa        = 1.0_wp
-    pk_ocnv      = 1.0_wp
-    pd_crit      = 1.5E-9_wp   ! (m)
-
- END SUBROUTINE sumnucl
-
-!------------------------------------------------------------------------------!
-! Description:
-! ------------
-!> Conciders both the organic vapor and H2SO4 in nucleation - heteromolecular 
-!> nucleation. 
-!> See Paasonen et al. (2010), Atmos. Chem. Phys., 10, 11223-11242.
-!------------------------------------------------------------------------------!
- SUBROUTINE hetnucl( pc_sa, pc_org, pnuc_rate, pd_crit, pn_crit_sa, pn_crit_ocnv, pk_sa, pk_ocnv )
-
-    IMPLICIT NONE
-
-    REAL(wp) ::  z_k_het = 4.1E-14_wp  !< (cm3/s) (Paasonen et al. Table 4: median)
-
-    REAL(wp), INTENT(in) ::  pc_org   !< organic vapour concentration (#/m3)
-    REAL(wp), INTENT(in) ::  pc_sa    !< H2SO4 conc. (#/m3)
-
-    REAL(wp), INTENT(out) ::  pd_crit  !< critical diameter of clusters (m)
-    REAL(wp), INTENT(out) ::  pk_ocnv  !< if pk_ocnv = 1, organic compounds participate in nucleation
-    REAL(wp), INTENT(out) ::  pk_sa    !< if pk_sa = 1, H2SO4 participate in nucleation
-    REAL(wp), INTENT(out) ::  pn_crit_ocnv  !< number of organic molecules in cluster (#)
-    REAL(wp), INTENT(out) ::  pn_crit_sa    !< number of H2SO4 molecules in cluster (#)
-    REAL(wp), INTENT(out) ::  pnuc_rate     !< nucl. rate (#/(m3 s))
-!
-!-- Nucleation rate (#/m3/s)
-    pnuc_rate = z_k_het * pc_sa * pc_org * 1.0E6_wp
-!
-!-- Both organic compounds and H2SO4 are involved when heteromolecular
-!-- nucleation is assumed.
-    pn_crit_sa   = 1.0_wp
-    pn_crit_ocnv = 1.0_wp
-    pk_sa        = 1.0_wp
-    pk_ocnv      = 1.0_wp
-    pd_crit      = 1.5E-9_wp   ! (m)
-
- END SUBROUTINE hetnucl
-
-!------------------------------------------------------------------------------!
-! Description:
-! ------------
-!> Takes into account the homomolecular nucleation of sulphuric acid H2SO4 with
-!> both of the available vapours.
-!> See Paasonen et al. (2010), Atmos. Chem. Phys., 10, 11223-11242.
-!------------------------------------------------------------------------------!
- SUBROUTINE SAnucl( pc_sa, pc_org, pnuc_rate, pd_crit, pn_crit_sa, pn_crit_ocnv, pk_sa, pk_ocnv )
-
-    IMPLICIT NONE
-
-    REAL(wp) ::  z_k_sa1 = 1.1E-14_wp  !< (cm3/s)
-    REAL(wp) ::  z_k_sa2 = 3.2E-14_wp  !< (cm3/s) (Paasonen et al. Table 3.)
-
-    REAL(wp), INTENT(in) ::  pc_org   !< organic vapour concentration (#/m3)
-    REAL(wp), INTENT(in) ::  pc_sa    !< H2SO4 conc. (#/m3)
-
-    REAL(wp), INTENT(out) ::  pd_crit  !< critical diameter of clusters (m)
-    REAL(wp), INTENT(out) ::  pk_ocnv  !< if pk_ocnv = 1, organic compounds participate nucleation
-    REAL(wp), INTENT(out) ::  pk_sa    !< if pk_sa = 1, H2SO4 participate in nucleation
-    REAL(wp), INTENT(out) ::  pn_crit_ocnv  !< number of organic molecules in cluster (#)
-    REAL(wp), INTENT(out) ::  pn_crit_sa    !< number of H2SO4 molecules in cluster (#)
-    REAL(wp), INTENT(out) ::  pnuc_rate     !< nucleation rate (#/(m3 s))
-!
-!-- Nucleation rate (#/m3/s)
-    pnuc_rate = ( z_k_sa1 * pc_sa**2 + z_k_sa2 * pc_sa * pc_org ) * 1.0E+6_wp
-!
-!-- Both organic compounds and H2SO4 are involved when SAnucleation is assumed.
-    pn_crit_sa   = 3.0_wp
-    pn_crit_ocnv = 1.0_wp 
-    pk_sa        = 1.0_wp
-    pk_ocnv      = 1.0_wp
-    pd_crit      = 1.5E-9_wp   ! (m)
-
- END SUBROUTINE SAnucl
-
-!------------------------------------------------------------------------------!
-! Description:
-! ------------
-!> Takes into account the homomolecular nucleation of both sulphuric acid and 
-!> Lorganic with heteromolecular nucleation.
-!> See Paasonen et al. (2010), Atmos. Chem. Phys., 10, 11223-11242.
-!------------------------------------------------------------------------------!
- SUBROUTINE SAORGnucl( pc_sa, pc_org, pnuc_rate, pd_crit, pn_crit_sa, pn_crit_ocnv, pk_sa, pk_ocnv )
-
-    IMPLICIT NONE
-
-    REAL(wp) ::  z_k_s1 = 1.4E-14_wp    !< (cm3/s])
-    REAL(wp) ::  z_k_s2 = 2.6E-14_wp    !< (cm3/s])
-    REAL(wp) ::  z_k_s3 = 0.037E-14_wp  !< (cm3/s]) (Paasonen et al. Table 3.)
-
-    REAL(wp), INTENT(in) ::  pc_org   !< organic vapour concentration (#/m3)
-    REAL(wp), INTENT(in) ::  pc_sa    !< H2SO4 conc. (#/m3)
-
-    REAL(wp), INTENT(out) ::  pd_crit  !< critical diameter of clusters (m)
-    REAL(wp), INTENT(out) ::  pk_ocnv  !< if pk_ocnv = 1, organic compounds participate in nucleation
-    REAL(wp), INTENT(out) ::  pk_sa    !< if pk_sa = 1, H2SO4 participate in nucleation
-    REAL(wp), INTENT(out) ::  pn_crit_ocnv  !< number of organic molecules in cluster (#)
-    REAL(wp), INTENT(out) ::  pn_crit_sa    !< number of H2SO4 molecules in cluster (#)
-    REAL(wp), INTENT(out) ::  pnuc_rate     !< nucl. rate (#/(m3 s))
-!
-!-- Nucleation rate (#/m3/s)
-    pnuc_rate = ( z_k_s1 * pc_sa**2 + z_k_s2 * pc_sa * pc_org + z_k_s3 * pc_org**2 ) * 1.0E+6_wp
-!
-!-- Organic compounds not involved when kinetic nucleation is assumed.
-    pn_crit_sa   = 3.0_wp
-    pn_crit_ocnv = 3.0_wp
-    pk_sa        = 1.0_wp
-    pk_ocnv      = 1.0_wp
-    pd_crit      = 1.5E-9_wp   ! (m)
-
- END SUBROUTINE SAORGnucl
 
 !------------------------------------------------------------------------------!
@@ -8237,9 +8093,9 @@
 
           DO  ib = 1, nbins_aerosol
-             aerosol_number(ib)%conc_p(nzt+1,:,:) = aerosol_number(ib)%conc_p(nzt,:,:) +              &
+             aerosol_number(ib)%conc_p(nzt+1,:,:) = aerosol_number(ib)%conc_p(nzt,:,:) +           &
                                                     bc_an_t_val(ib) * dzu(nzt+1)
              DO  ic = 1, ncomponents_mass
                 icc = ( ic - 1 ) * nbins_aerosol + ib
-                aerosol_mass(icc)%conc_p(nzt+1,:,:) = aerosol_mass(icc)%conc_p(nzt,:,:) +             &
+                aerosol_mass(icc)%conc_p(nzt+1,:,:) = aerosol_mass(icc)%conc_p(nzt,:,:) +          &
                                                       bc_am_t_val(icc) * dzu(nzt+1)
              ENDDO
@@ -8247,5 +8103,5 @@
           IF ( .NOT. salsa_gases_from_chem )  THEN
              DO  ig = 1, ngases_salsa
-                salsa_gas(ig)%conc_p(nzt+1,:,:) = salsa_gas(ig)%conc_p(nzt,:,:) +                     &
+                salsa_gas(ig)%conc_p(nzt+1,:,:) = salsa_gas(ig)%conc_p(nzt,:,:) +                  &
                                                   bc_gt_t_val(ig) * dzu(nzt+1)
              ENDDO
@@ -8550,5 +8406,5 @@
         ONLY:  check_existence, close_input_file, get_attribute, get_variable,                     &
                inquire_num_variables, inquire_variable_names,                                      &
-               netcdf_data_input_get_dimension_length, open_read_file
+               netcdf_data_input_get_dimension_length, open_read_file, street_type_f
 
     USE surface_mod,                                                                               &
@@ -8561,4 +8417,5 @@
     CHARACTER(LEN=25) ::  mod_name             !< name in the input file
 
+    INTEGER(iwp) ::  i         !< loop index
     INTEGER(iwp) ::  ib        !< loop index: aerosol number bins
     INTEGER(iwp) ::  ic        !< loop index: aerosol chemical components
@@ -8566,4 +8423,5 @@
     INTEGER(iwp) ::  in        !< loop index: emission category
     INTEGER(iwp) ::  inn       !< loop index
+    INTEGER(iwp) ::  j         !< loop index
     INTEGER(iwp) ::  ss        !< loop index
 
@@ -8579,19 +8437,8 @@
 
 !
-!-- Set source arrays to zero:
-    DO  ib = 1, nbins_aerosol
-       aerosol_number(ib)%source = 0.0_wp
-    ENDDO
-
-    DO  ic = 1, ncomponents_mass * nbins_aerosol
-       aerosol_mass(ic)%source = 0.0_wp
-    ENDDO
-
-!
 !-- Define emissions:
-
     SELECT CASE ( salsa_emission_mode )
 
-       CASE ( 'uniform' )
+       CASE ( 'uniform', 'parameterized' )
 
           IF ( init )  THEN  ! Do only once
@@ -8605,7 +8452,27 @@
              CALL size_distribution( surface_aerosol_flux, aerosol_flux_dpg, aerosol_flux_sigmag,  &
                                      nsect_emission )
-             DO  ib = 1, nbins_aerosol
-                source_array(:,:,ib) = nsect_emission(ib)
-             ENDDO
+             IF ( salsa_emission_mode == 'uniform' )  THEN
+                DO  ib = 1, nbins_aerosol
+                   source_array(:,:,ib) = nsect_emission(ib)
+                ENDDO
+             ELSE
+                IF ( street_type_f%from_file )  THEN
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn
+                         IF ( street_type_f%var(j,i) >= main_street_id  .AND.                      &
+                              street_type_f%var(j,i) < max_street_id )  THEN
+                            source_array(j,i,:) = nsect_emission(:) * emiss_factor_main
+                         ELSEIF ( street_type_f%var(j,i) >= side_street_id  .AND.                  &
+                                  street_type_f%var(j,i) < main_street_id )  THEN
+                            source_array(j,i,:) = nsect_emission(:) * emiss_factor_side
+                         ENDIF
+                      ENDDO
+                   ENDDO
+                ELSE
+                   WRITE( message_string, * ) 'salsa_emission_mode = "parameterized" but the '//  &
+                                              'street_type data is missing.'
+                   CALL message( 'salsa_emission_setup', 'PA0661', 1, 2, 0, 6, 0 )
+                ENDIF
+             ENDIF
 !
 !--          Check which chemical components are used
@@ -8622,14 +8489,16 @@
              aerosol_flux_mass_fracs_a = aerosol_flux_mass_fracs_a /                               &
                                          SUM( aerosol_flux_mass_fracs_a(1:ncc ) )
-!
-!--          Set uniform fluxes of default horizontal surfaces
-             CALL set_flux( surf_def_h(0), cc_i2m, aerosol_flux_mass_fracs_a, source_array )
+             IF ( salsa_emission_mode ==  'uniform' )  THEN
+!
+!--             Set uniform fluxes of default horizontal surfaces
+                CALL set_flux( surf_def_h(0), cc_i2m, aerosol_flux_mass_fracs_a, source_array )
+             ELSE
+!
+!--             Set fluxes normalised based on the street type on land surfaces
+                CALL set_flux( surf_lsm_h, cc_i2m, aerosol_flux_mass_fracs_a, source_array )
+             ENDIF
 
              DEALLOCATE( nsect_emission, source_array )
           ENDIF
-
-       CASE ( 'parameterized' )
-!
-!--       TO DO
 
        CASE ( 'read_from_file' )
@@ -8643,4 +8512,14 @@
           surf_usm_h%amsws = 0.0_wp
 
+!
+!--       Reset source arrays:
+          DO  ib = 1, nbins_aerosol
+             aerosol_number(ib)%source = 0.0_wp
+          ENDDO
+
+          DO  ic = 1, ncomponents_mass * nbins_aerosol
+             aerosol_mass(ic)%source = 0.0_wp
+          ENDDO
+
 #if defined( __netcdf )
 !
@@ -8658,4 +8537,9 @@
           IF ( init )  THEN
 !
+!--          Variable names
+             CALL inquire_num_variables( id_salsa, aero_emission_att%num_vars )
+             ALLOCATE( aero_emission_att%var_names(1:aero_emission_att%num_vars) )
+             CALL inquire_variable_names( id_salsa, aero_emission_att%var_names )
+!
 !--          Read the index and name of chemical components
              CALL netcdf_data_input_get_dimension_length( id_salsa, aero_emission_att%ncc,         &
@@ -8663,31 +8547,37 @@
              ALLOCATE( aero_emission_att%cc_index(1:aero_emission_att%ncc) )
              CALL get_variable( id_salsa, 'composition_index', aero_emission_att%cc_index )
-             CALL get_variable( id_salsa, 'composition_name', aero_emission_att%cc_name,           &
-                                aero_emission_att%ncc )
+
+             IF ( check_existence( aero_emission_att%var_names, 'composition_name' ) )  THEN
+                CALL get_variable( id_salsa, 'composition_name', aero_emission_att%cc_name,        &
+                                   aero_emission_att%ncc )
+             ELSE
+                message_string = 'Missing composition_name in ' // TRIM( input_file_salsa )
+                CALL message( 'salsa_emission_setup', 'PA0657', 1, 2, 0, 6, 0 )
+             ENDIF
 !
 !--          Find the corresponding chemical components in the model
-             aero_emission_att%cc_input_to_model = 0
+             aero_emission_att%cc_in2mod = 0
              DO  ic = 1, aero_emission_att%ncc
                 in_name = aero_emission_att%cc_name(ic)
                 SELECT CASE ( TRIM( in_name ) )
                    CASE ( 'H2SO4', 'h2so4', 'SO4', 'so4' )
-                      aero_emission_att%cc_input_to_model(1) = ic
+                      aero_emission_att%cc_in2mod(1) = ic
                    CASE ( 'OC', 'oc', 'organics' )
-                      aero_emission_att%cc_input_to_model(2) = ic
+                      aero_emission_att%cc_in2mod(2) = ic
                    CASE ( 'BC', 'bc' )
-                      aero_emission_att%cc_input_to_model(3) = ic
+                      aero_emission_att%cc_in2mod(3) = ic
                    CASE ( 'DU', 'du' )
-                      aero_emission_att%cc_input_to_model(4) = ic
+                      aero_emission_att%cc_in2mod(4) = ic
                    CASE ( 'SS', 'ss' )
-                      aero_emission_att%cc_input_to_model(5) = ic
+                      aero_emission_att%cc_in2mod(5) = ic
                    CASE ( 'HNO3', 'hno3', 'NO', 'no' )
-                      aero_emission_att%cc_input_to_model(6) = ic
+                      aero_emission_att%cc_in2mod(6) = ic
                    CASE ( 'NH3', 'nh3', 'NH', 'nh' )
-                      aero_emission_att%cc_input_to_model(7) = ic
+                      aero_emission_att%cc_in2mod(7) = ic
                 END SELECT
 
              ENDDO
 
-             IF ( SUM( aero_emission_att%cc_input_to_model ) == 0 )  THEN
+             IF ( SUM( aero_emission_att%cc_in2mod ) == 0 )  THEN
                 message_string = 'None of the aerosol chemical components in ' // TRIM(            &
                                  input_file_salsa ) // ' correspond to the ones applied in SALSA.'
@@ -8706,9 +8596,4 @@
              CALL get_attribute( id_salsa, 'lod', aero_emission_att%lod, .FALSE.,                  &
                                  'aerosol_emission_values' )
-!
-!--          Variable names
-             CALL inquire_num_variables( id_salsa, aero_emission_att%num_vars )
-             ALLOCATE( aero_emission_att%var_names(1:aero_emission_att%num_vars) )
-             CALL inquire_variable_names( id_salsa, aero_emission_att%var_names )
 
 !
@@ -8738,6 +8623,11 @@
 !
 !--             Get emission category names and indices
-                CALL get_variable( id_salsa, 'emission_category_name', aero_emission_att%cat_name, &
-                                   aero_emission_att%ncat)
+                IF ( check_existence( aero_emission_att%var_names, 'emission_category_name' ) )  THEN
+                   CALL get_variable( id_salsa, 'emission_category_name',                          &
+                                      aero_emission_att%cat_name,  aero_emission_att%ncat )
+                ELSE
+                   message_string = 'Missing emission_category_name in ' // TRIM( input_file_salsa )
+                   CALL message( 'salsa_emission_setup', 'PA0658', 1, 2, 0, 6, 0 )
+                ENDIF
                 CALL get_variable( id_salsa, 'emission_category_index', aero_emission_att%cat_index )
 !
@@ -8764,6 +8654,6 @@
 !--             For each hour of year:
                 IF ( check_existence( aero_emission_att%var_names, 'nhoursyear' ) )  THEN
-                   CALL netcdf_data_input_get_dimension_length( id_salsa, aero_emission_att%nhoursyear,&
-                                                                'nhoursyear' )
+                   CALL netcdf_data_input_get_dimension_length( id_salsa,                          &
+                                                        aero_emission_att%nhoursyear, 'nhoursyear' )
                    ALLOCATE( aero_emission_att%etf(1:aero_emission_att%ncat,                       &
                                                    1:aero_emission_att%nhoursyear) )
@@ -8790,26 +8680,31 @@
 !
 !--             Get chemical composition (i.e. mass fraction of different species) in aerosols
-                ALLOCATE( aero_emission%def_mass_fracs(1:aero_emission_att%ncat,                   &
-                                                       1:aero_emission_att%ncc) )
-                aero_emission%def_mass_fracs = 0.0_wp
-                CALL get_variable( id_salsa, 'emission_mass_fracs', aero_emission%def_mass_fracs,  &
-                                   0, aero_emission_att%ncc-1, 0, aero_emission_att%ncat-1 )
+                IF ( check_existence( aero_emission_att%var_names, 'emission_mass_fracs' ) )  THEN
+                   ALLOCATE( aero_emission%def_mass_fracs(1:aero_emission_att%ncat,                &
+                                                          1:aero_emission_att%ncc) )
+                   aero_emission%def_mass_fracs = 0.0_wp
+                   CALL get_variable( id_salsa, 'emission_mass_fracs', aero_emission%def_mass_fracs,&
+                                      0, aero_emission_att%ncc-1, 0, aero_emission_att%ncat-1 )
+                ELSE
+                   message_string = 'Missing emission_mass_fracs in ' //  TRIM( input_file_salsa )
+                   CALL message( 'salsa_emission_setup', 'PA0659', 1, 2, 0, 6, 0 )
+                ENDIF
 !
 !--             If the chemical component is not activated, set its mass fraction to 0 to avoid
 !--             inbalance between number and mass flux
-                cc_i2m = aero_emission_att%cc_input_to_model
-                IF ( index_so4 < 0  .AND.  cc_i2m(1) /= 0 )                                        &
+                cc_i2m = aero_emission_att%cc_in2mod
+                IF ( index_so4 < 0  .AND.  cc_i2m(1) > 0 )                                         &
                                                   aero_emission%def_mass_fracs(:,cc_i2m(1)) = 0.0_wp
-                IF ( index_oc  < 0  .AND.  cc_i2m(2) /= 0 )                                        &
+                IF ( index_oc  < 0  .AND.  cc_i2m(2) > 0 )                                         &
                                                   aero_emission%def_mass_fracs(:,cc_i2m(2)) = 0.0_wp
-                IF ( index_bc  < 0  .AND.  cc_i2m(3) /= 0 )                                        &
+                IF ( index_bc  < 0  .AND.  cc_i2m(3) > 0 )                                         &
                                                   aero_emission%def_mass_fracs(:,cc_i2m(3)) = 0.0_wp
-                IF ( index_du  < 0  .AND.  cc_i2m(4) /= 0 )                                        &
+                IF ( index_du  < 0  .AND.  cc_i2m(4) > 0 )                                         &
                                                   aero_emission%def_mass_fracs(:,cc_i2m(4)) = 0.0_wp
-                IF ( index_ss  < 0  .AND.  cc_i2m(5) /= 0 )                                        &
+                IF ( index_ss  < 0  .AND.  cc_i2m(5) > 0 )                                         &
                                                   aero_emission%def_mass_fracs(:,cc_i2m(5)) = 0.0_wp
-                IF ( index_no  < 0  .AND.  cc_i2m(6) /= 0 )                                        &
+                IF ( index_no  < 0  .AND.  cc_i2m(6) > 0 )                                         &
                                                   aero_emission%def_mass_fracs(:,cc_i2m(6)) = 0.0_wp
-                IF ( index_nh  < 0  .AND.  cc_i2m(7) /= 0 )                                        &
+                IF ( index_nh  < 0  .AND.  cc_i2m(7) > 0 )                                         &
                                                   aero_emission%def_mass_fracs(:,cc_i2m(7)) = 0.0_wp
 !
@@ -8886,11 +8781,22 @@
 !
 !--             Read time stamps:
-                CALL get_variable( id_salsa, 'time', aero_emission_att%time )
+                IF ( check_existence( aero_emission_att%var_names, 'time' ) )  THEN
+                   CALL get_variable( id_salsa, 'time', aero_emission_att%time )
+                ELSE
+                   message_string = 'Missing time in ' //  TRIM( input_file_salsa )
+                   CALL message( 'salsa_emission_setup', 'PA0660', 1, 2, 0, 6, 0 )
+                ENDIF
 !
 !--             Read emission mass fractions
-                CALL get_variable( id_salsa, 'emission_mass_fracs', aero_emission%preproc_mass_fracs )
+                IF ( check_existence( aero_emission_att%var_names, 'emission_mass_fracs' ) )  THEN
+                   CALL get_variable( id_salsa, 'emission_mass_fracs',                             &
+                                      aero_emission%preproc_mass_fracs )
+                ELSE
+                   message_string = 'Missing emission_mass_fracs in ' //  TRIM( input_file_salsa )
+                   CALL message( 'salsa_emission_setup', 'PA0659', 1, 2, 0, 6, 0 )
+                ENDIF
 !
 !--             If the chemical component is not activated, set its mass fraction to 0
-                cc_i2m = aero_emission_att%cc_input_to_model
+                cc_i2m = aero_emission_att%cc_in2mod
                 IF ( index_so4 < 0  .AND.  cc_i2m(1) /= 0 )                                        &
                    aero_emission%preproc_mass_fracs(cc_i2m(1)) = 0.0_wp
@@ -8970,10 +8876,10 @@
 !--             only for either default, land or urban surface.
                 IF ( .NOT. land_surface  .AND.  .NOT. urban_surface )  THEN
-                   CALL set_flux( surf_def_h(0), aero_emission_att%cc_input_to_model,              &
+                   CALL set_flux( surf_def_h(0), aero_emission_att%cc_in2mod,                      &
                                   aero_emission%def_mass_fracs(in,:), source_array )
                 ELSE
-                   CALL set_flux( surf_usm_h, aero_emission_att%cc_input_to_model,                 &
+                   CALL set_flux( surf_usm_h, aero_emission_att%cc_in2mod,                         &
                                   aero_emission%def_mass_fracs(in,:), source_array )
-                   CALL set_flux( surf_lsm_h, aero_emission_att%cc_input_to_model,                 &
+                   CALL set_flux( surf_lsm_h, aero_emission_att%cc_in2mod,                         &
                                   aero_emission%def_mass_fracs(in,:), source_array )
                 ENDIF
@@ -9004,10 +8910,10 @@
 !--          for either default, land and urban surface.
              IF ( .NOT. land_surface  .AND.  .NOT. urban_surface )  THEN
-                CALL set_flux( surf_def_h(0), aero_emission_att%cc_input_to_model,                 &
+                CALL set_flux( surf_def_h(0), aero_emission_att%cc_in2mod,                         &
                                aero_emission%preproc_mass_fracs, aero_emission%preproc_data )
              ELSE
-                CALL set_flux( surf_usm_h, aero_emission_att%cc_input_to_model,                    &
+                CALL set_flux( surf_usm_h, aero_emission_att%cc_in2mod,                            &
                                aero_emission%preproc_mass_fracs, aero_emission%preproc_data )
-                CALL set_flux( surf_lsm_h, aero_emission_att%cc_input_to_model,                    &
+                CALL set_flux( surf_lsm_h, aero_emission_att%cc_in2mod,                            &
                                aero_emission%preproc_mass_fracs, aero_emission%preproc_data )
              ENDIF
@@ -9249,6 +9155,8 @@
 
     INTEGER(iwp) ::  id_chem        !< NetCDF id of chemistry emission file
+    INTEGER(iwp) ::  i              !< loop index
     INTEGER(iwp) ::  ig             !< loop index
     INTEGER(iwp) ::  in             !< running index for emission categories
+    INTEGER(iwp) ::  j              !< loop index
     INTEGER(iwp) ::  num_vars       !< number of variables
 
@@ -9258,4 +9166,8 @@
 
     REAL(wp), DIMENSION(:), ALLOCATABLE ::  time_factor  !< emission time factor
+
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  dum_var_3d  !<
+
+    REAL(wp), DIMENSION(:,:,:,:,:), ALLOCATABLE ::  dum_var_5d  !<
 
 !
@@ -9280,14 +9192,17 @@
 !
 !--    Read the index and name of chemical components
-       CALL netcdf_data_input_get_dimension_length( id_chem, chem_emission_att%nspec,              &
+       CALL netcdf_data_input_get_dimension_length( id_chem, chem_emission_att%n_emiss_species,    &
                                                     'nspecies' )
-       ALLOCATE( chem_emission_att%species_index(1:chem_emission_att%nspec) )
+       ALLOCATE( chem_emission_att%species_index(1:chem_emission_att%n_emiss_species) )
        CALL get_variable( id_chem, 'emission_index', chem_emission_att%species_index )
        CALL get_variable( id_chem, 'emission_name', chem_emission_att%species_name,                &
-                          chem_emission_att%nspec )
+                          chem_emission_att%n_emiss_species )
+!
+!--    Allocate emission data
+       ALLOCATE( chem_emission(1:chem_emission_att%n_emiss_species) )
 !
 !--    Find the corresponding indices in the model
        emission_index_chem = 0
-       DO  ig = 1, chem_emission_att%nspec
+       DO  ig = 1, chem_emission_att%n_emiss_species
           in_name = chem_emission_att%species_name(ig)
           SELECT CASE ( TRIM( in_name ) )
@@ -9366,9 +9281,20 @@
 !--       Allocate and read surface emission data (in total PM) (NOTE that "preprocessed" input data
 !--       array is applied now here)
-          ALLOCATE( chem_emission%preproc_emission_data(nys:nyn,nxl:nxr, 1:chem_emission_att%nspec,&
-                                                        1:chem_emission_att%ncat) )
-          CALL get_variable( id_chem, 'emission_values', chem_emission%preproc_emission_data,      &
-                             0, chem_emission_att%ncat-1, 0, chem_emission_att%nspec-1,            &
-                             nxl, nxr, nys, nyn )
+          ALLOCATE( dum_var_5d(1,nys:nyn,nxl:nxr,1:chem_emission_att%n_emiss_species,              &
+                               1:chem_emission_att%ncat) )
+          CALL get_variable( id_chem, 'emission_values', dum_var_5d, 0, chem_emission_att%ncat-1,  &
+                             0, chem_emission_att%n_emiss_species-1, nxl, nxr, nys, nyn, 0, 0 )
+          DO  ig = 1, chem_emission_att%n_emiss_species
+             ALLOCATE( chem_emission(ig)%default_emission_data(nys:nyn,nxl:nxr,                    &
+                                                               1:chem_emission_att%ncat) )
+             DO  in = 1, chem_emission_att%ncat
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      chem_emission(ig)%default_emission_data(j,i,in) = dum_var_5d(1,j,i,ig,in)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDDO
+          DEALLOCATE( dum_var_5d )
 !
 !--    Pre-processed mode:
@@ -9412,17 +9338,23 @@
 !
 !--    Set gas emissions for each emission category
+       ALLOCATE( dum_var_3d(nys:nyn,nxl:nxr,1:chem_emission_att%n_emiss_species) )
+
        DO  in = 1, chem_emission_att%ncat
+          DO  ig = 1, chem_emission_att%n_emiss_species
+             dum_var_3d(:,:,ig) = chem_emission(ig)%default_emission_data(:,:,in)
+          ENDDO
 !
 !--       Set surface fluxes only for either default, land or urban surface
           IF ( .NOT. land_surface  .AND.  .NOT. urban_surface )  THEN
              CALL set_gas_flux( surf_def_h(0), emission_index_chem, chem_emission_att%units,       &
-                                chem_emission%preproc_emission_data(:,:,:,in), time_factor(in) )
+                                dum_var_3d(:,:,in), time_factor(in) )
           ELSE
              CALL set_gas_flux( surf_usm_h, emission_index_chem, chem_emission_att%units,          &
-                                chem_emission%preproc_emission_data(:,:,:,in), time_factor(in) )
+                                dum_var_3d(:,:,in), time_factor(in) )
              CALL set_gas_flux( surf_lsm_h, emission_index_chem, chem_emission_att%units,          &
-                                chem_emission%preproc_emission_data(:,:,:,in), time_factor(in) )
+                                dum_var_3d(:,:,in), time_factor(in) )
           ENDIF
        ENDDO
+       DEALLOCATE( dum_var_3d )
 !
 !--    The next emission update is again after one hour
@@ -9438,25 +9370,26 @@
 !--    Allocate the data input array always before reading in the data and deallocate after (NOTE 
 !--    that "preprocessed" input data array is applied now here)
-       ALLOCATE( chem_emission%default_emission_data(nys:nyn,nxl:nxr,1:nbins_aerosol) )
+       ALLOCATE( dum_var_5d(1,1,nys:nyn,nxl:nxr,1:chem_emission_att%n_emiss_species) )
 !
 !--    Read in the next time step
-       CALL get_variable( id_chem, 'emission_values', chem_emission%default_emission_data,         &
-                          chem_emission_att%i_hour, 0, chem_emission_att%nspec-1, nxl, nxr, nys, nyn )
+       CALL get_variable( id_chem, 'emission_values', dum_var_5d,                                  &
+                          0, chem_emission_att%n_emiss_species-1, nxl, nxr, nys, nyn, 0, 0,        &
+                          chem_emission_att%i_hour, chem_emission_att%i_hour )
 !
 !--    Set surface fluxes only for either default, land or urban surface
        IF ( .NOT. land_surface  .AND.  .NOT. urban_surface )  THEN
           CALL set_gas_flux( surf_def_h(0), emission_index_chem, chem_emission_att%units,          &
-                             chem_emission%default_emission_data )
+                             dum_var_5d(1,1,:,:,:) )
        ELSE
           CALL set_gas_flux( surf_usm_h, emission_index_chem, chem_emission_att%units,             &
-                             chem_emission%default_emission_data )
+                             dum_var_5d(1,1,:,:,:) )
           CALL set_gas_flux( surf_lsm_h, emission_index_chem, chem_emission_att%units,             &
-                             chem_emission%default_emission_data )
-       ENDIF
+                             dum_var_5d(1,1,:,:,:) )
+       ENDIF
+       DEALLOCATE ( dum_var_5d )
 !
 !--    Determine the next emission update
        next_gas_emission_update = gas_emission_time(chem_emission_att%i_hour+2)
 
-       DEALLOCATE( chem_emission%default_emission_data )
     ENDIF
 !
@@ -9506,5 +9439,5 @@
        REAL(wp), DIMENSION(ngases_salsa) ::  conv     !< unit conversion factor
 
-       REAL(wp), DIMENSION(nys:nyn,nxl:nxr,chem_emission_att%nspec), INTENT(in) ::  source_array  !<
+       REAL(wp), DIMENSION(nys:nyn,nxl:nxr,chem_emission_att%n_emiss_species), INTENT(in) ::  source_array  !<
 
        TYPE(surf_type), INTENT(inout) :: surface  !< respective surface type
@@ -9581,41 +9514,138 @@
     CHARACTER(LEN=*) ::  var      !<
 
-    SELECT CASE ( TRIM( var ) )
-
-       CASE ( 'g_H2SO4', 'g_HNO3', 'g_NH3', 'g_OCNV',  'g_OCSV' )
-          IF (  .NOT.  salsa )  THEN
-             message_string = 'output of "' // TRIM( var ) // '" requires salsa = .TRUE.'
-             CALL message( 'check_parameters', 'PA0652', 1, 2, 0, 6, 0 )
-          ENDIF
-          IF (  salsa_gases_from_chem )  THEN
-             message_string = 'gases are imported from the chemistry module and thus output of "'  &
-                               // TRIM( var ) // '" is not allowed'
-             CALL message( 'check_parameters', 'PA0653', 1, 2, 0, 6, 0 )
-          ENDIF
+    INTEGER(iwp) ::  char_to_int   !< for converting character to integer
+
+    IF ( var(1:6) /= 'salsa_' )  THEN
+       unit = 'illegal'
+       RETURN
+    ENDIF
+!
+!-- Treat bin-specific outputs separately
+    IF ( var(7:11) ==  'N_bin' )  THEN
+       READ( var(12:),* ) char_to_int
+       IF ( char_to_int >= 1  .AND. char_to_int <= SUM( nbin ) )  THEN
           unit = '#/m3'
-
-       CASE ( 'LDSA' )
-          IF (  .NOT.  salsa )  THEN
-             message_string = 'output of "' // TRIM( var ) // '" requires salsa = .TRUE.'
-             CALL message( 'check_parameters', 'PA0646', 1, 2, 0, 6, 0 )
-          ENDIF
-          unit = 'mum2/cm3'
-
-       CASE ( 'm_bin1', 'm_bin2',  'm_bin3',  'm_bin4',  'm_bin5', 'm_bin6', 'm_bin7', 'm_bin8',   &
-              'm_bin9', 'm_bin10', 'm_bin11', 'm_bin12', 'PM2.5',  'PM10',   's_BC',   's_DU',     &
-              's_H2O',  's_NH',    's_NO',    's_OC',    's_SO4',  's_SS' )
-          IF (  .NOT.  salsa )  THEN
-             message_string = 'output of "' // TRIM( var ) // '" requires salsa = .TRUE.'
-             CALL message( 'check_parameters', 'PA0647', 1, 2, 0, 6, 0 )
-          ENDIF
+       ELSE
+          unit = 'illegal'
+          RETURN
+       ENDIF
+
+    ELSEIF ( var(7:11) ==  'm_bin' )  THEN
+       READ( var(12:),* ) char_to_int
+       IF ( char_to_int >= 1  .AND. char_to_int <= SUM( nbin ) )  THEN
           unit = 'kg/m3'
-
-       CASE ( 'N_bin1', 'N_bin2', 'N_bin3', 'N_bin4',  'N_bin5',  'N_bin6', 'N_bin7', 'N_bin8',    &
-              'N_bin9', 'N_bin10', 'N_bin11', 'N_bin12', 'Ntot' )
-          IF (  .NOT.  salsa )  THEN
-             message_string = 'output of "' // TRIM( var ) // '" requires salsa = .TRUE.'
-             CALL message( 'check_parameters', 'PA0645', 1, 2, 0, 6, 0 )
-          ENDIF
-          unit = '#/m3'
+       ELSE
+          unit = 'illegal'
+          RETURN
+       ENDIF
+
+    ELSE
+       SELECT CASE ( TRIM( var(7:) ) )
+
+          CASE ( 'g_H2SO4', 'g_HNO3', 'g_NH3', 'g_OCNV',  'g_OCSV' )
+             IF (  salsa_gases_from_chem )  THEN
+                message_string = 'gases are imported from the chemistry module and thus output '// &
+                                 'of "' // TRIM( var ) // '" is not allowed'
+                CALL message( 'check_parameters', 'PA0653', 1, 2, 0, 6, 0 )
+             ENDIF
+             unit = '#/m3'
+
+          CASE ( 'LDSA' )
+             unit = 'mum2/cm3'
+
+          CASE ( 'PM0.1', 'PM2.5', 'PM10', 's_BC', 's_DU', 's_H2O', 's_NH', 's_NO', 's_OC',        &
+                 's_SO4', 's_SS' )
+             unit = 'kg/m3'
+
+          CASE ( 'N_UFP', 'Ntot' )
+             unit = '#/m3'
+
+          CASE DEFAULT
+             unit = 'illegal'
+
+       END SELECT
+    ENDIF
+
+ END SUBROUTINE salsa_check_data_output
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check profile data output for salsa. Currently only for diagnostic variables
+!> Ntot, N_UFP, PM0.1, PM2.5, PM10 and LDSA
+!------------------------------------------------------------------------------!
+ SUBROUTINE salsa_check_data_output_pr( var, var_count, unit, dopr_unit )
+
+    USE arrays_3d,                                                                                 &
+        ONLY: zu
+
+    USE profil_parameter,                                                                          &
+        ONLY:  dopr_index
+
+    USE statistics,                                                                                &
+        ONLY:  hom, pr_palm, statistic_regions
+
+    IMPLICIT NONE
+
+    CHARACTER(LEN=*) ::  dopr_unit  !<
+    CHARACTER(LEN=*) ::  unit       !<
+    CHARACTER(LEN=*) ::  var        !<
+
+    INTEGER(iwp) ::  var_count     !<
+
+    IF ( var(1:6) /= 'salsa_' )  THEN
+       unit = 'illegal'
+       RETURN
+    ENDIF
+
+    SELECT CASE ( TRIM( var(7:) ) )
+
+       CASE( 'LDSA' )
+          salsa_pr_count = salsa_pr_count + 1
+          salsa_pr_index(salsa_pr_count) = 1
+          dopr_index(var_count) = pr_palm + salsa_pr_count
+          dopr_unit = 'mum2/cm3'
+          unit = dopr_unit
+          hom(:,2,dopr_index(var_count),:) = SPREAD( zu, 2, statistic_regions+1 )
+
+       CASE( 'N_UFP' )
+          salsa_pr_count = salsa_pr_count + 1
+          salsa_pr_index(salsa_pr_count) = 2
+          dopr_index(var_count) = pr_palm + salsa_pr_count
+          dopr_unit = '#/m3'
+          unit = dopr_unit
+          hom(:,2,dopr_index(var_count),:) = SPREAD( zu, 2, statistic_regions+1 )
+
+       CASE( 'Ntot' )
+          salsa_pr_count = salsa_pr_count + 1
+          salsa_pr_index(salsa_pr_count) = 3
+          dopr_index(var_count) = pr_palm + salsa_pr_count
+          dopr_unit = '#/m3'
+          unit = dopr_unit
+          hom(:,2,dopr_index(var_count),:) = SPREAD( zu, 2, statistic_regions+1 )
+
+       CASE( 'PM0.1' )
+          salsa_pr_count = salsa_pr_count + 1
+          salsa_pr_index(salsa_pr_count) = 4
+          dopr_index(var_count) = pr_palm + salsa_pr_count
+          dopr_unit = 'kg/m3'
+          unit = dopr_unit
+          hom(:,2,dopr_index(var_count),:) = SPREAD( zu, 2, statistic_regions+1 )
+
+       CASE( 'PM2.5' )
+          salsa_pr_count = salsa_pr_count + 1
+          salsa_pr_index(salsa_pr_count) = 5
+          dopr_index(var_count) = pr_palm + salsa_pr_count
+          dopr_unit = 'kg/m3'
+          unit = dopr_unit
+          hom(:,2,dopr_index(var_count),:) = SPREAD( zu, 2, statistic_regions+1 )
+
+       CASE( 'PM10' )
+          salsa_pr_count = salsa_pr_count + 1
+          salsa_pr_index(salsa_pr_count) = 6
+          dopr_index(var_count) = pr_palm + salsa_pr_count
+          dopr_unit = 'kg/m3'
+          unit = dopr_unit
+          hom(:,2,dopr_index(var_count),:) = SPREAD( zu, 2, statistic_regions+1 )
 
        CASE DEFAULT
@@ -9624,5 +9654,167 @@
     END SELECT
 
- END SUBROUTINE salsa_check_data_output
+
+ END SUBROUTINE salsa_check_data_output_pr
+
+!-------------------------------------------------------------------------------!
+!> Description:
+!> Calculation of horizontally averaged profiles for salsa.
+!-------------------------------------------------------------------------------!
+ SUBROUTINE salsa_statistics( mode, sr, tn )
+
+    USE control_parameters,                                                                        &
+        ONLY:  max_pr_user
+
+    USE chem_modules,                                                                              &
+        ONLY:  max_pr_cs
+
+    USE statistics,                                                                                &
+        ONLY:  pr_palm, rmask, sums_l
+
+    IMPLICIT NONE
+
+    CHARACTER(LEN=*) ::  mode  !<
+
+    INTEGER(iwp) ::  i    !< loop index
+    INTEGER(iwp) ::  ib   !< loop index
+    INTEGER(iwp) ::  ic   !< loop index
+    INTEGER(iwp) ::  ii   !< loop index
+    INTEGER(iwp) ::  ind  !< index in the statistical output
+    INTEGER(iwp) ::  j    !< loop index
+    INTEGER(iwp) ::  k    !< loop index
+    INTEGER(iwp) ::  sr   !< statistical region
+    INTEGER(iwp) ::  tn   !< thread number
+
+    REAL(wp) ::  df        !< For calculating LDSA: fraction of particles depositing in the alveolar
+                           !< (or tracheobronchial) region of the lung. Depends on the particle size
+    REAL(wp) ::  mean_d    !< Particle diameter in micrometres
+    REAL(wp) ::  temp_bin  !< temporary variable
+
+    IF ( mode == 'profiles' )  THEN
+       !$OMP DO
+       DO  ii = 1, salsa_pr_count
+
+          ind = pr_palm + max_pr_user + max_pr_cs + ii
+
+          SELECT CASE( salsa_pr_index(ii) )
+
+             CASE( 1 )  ! LDSA
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb, nzt+1
+                         temp_bin = 0.0_wp
+                         DO  ib = 1, nbins_aerosol
+   !
+   !--                      Diameter in micrometres
+                            mean_d = 1.0E+6_wp * ra_dry(k,j,i,ib) * 2.0_wp
+   !
+   !--                      Deposition factor: alveolar
+                            df = ( 0.01555_wp / mean_d ) * ( EXP( -0.416_wp * ( LOG( mean_d ) +    &
+                                   2.84_wp )**2 ) + 19.11_wp * EXP( -0.482_wp * ( LOG( mean_d ) -  &
+                                   1.362_wp )**2 ) )
+   !
+   !--                      Lung-deposited surface area LDSA (units mum2/cm3)
+                            temp_bin = temp_bin + pi * mean_d**2 * df * 1.0E-6_wp *                &
+                                       aerosol_number(ib)%conc(k,j,i)
+                         ENDDO
+                         sums_l(k,ind,tn) = sums_l(k,ind,tn) + temp_bin * rmask(j,i,sr)  *         &
+                                           MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 22 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+
+             CASE( 2 )  ! N_UFP
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb, nzt+1
+                         temp_bin = 0.0_wp
+                         DO  ib = 1, nbins_aerosol
+                            IF ( 2.0_wp * ra_dry(k,j,i,ib) <= 0.1E-6_wp )                          &
+                               temp_bin = temp_bin + aerosol_number(ib)%conc(k,j,i)
+                         ENDDO
+                         sums_l(k,ind,tn) = sums_l(k,ind,tn) + temp_bin * rmask(j,i,sr)  *         &
+                                           MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 22 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+
+             CASE( 3 )  ! Ntot
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb, nzt+1
+                         temp_bin = 0.0_wp
+                         DO  ib = 1, nbins_aerosol
+                            temp_bin = temp_bin + aerosol_number(ib)%conc(k,j,i)
+                         ENDDO
+                         sums_l(k,ind,tn) = sums_l(k,ind,tn) + temp_bin * rmask(j,i,sr)  *         &
+                                           MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 22 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+
+             CASE( 4 )  ! PM0.1
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb, nzt+1
+                         temp_bin = 0.0_wp
+                         DO  ib = 1, nbins_aerosol
+                            IF ( 2.0_wp * ra_dry(k,j,i,ib) <= 0.1E-6_wp )  THEN
+                               DO  ic = ib, nbins_aerosol * ncc, nbins_aerosol
+                                  temp_bin = temp_bin + aerosol_mass(ic)%conc(k,j,i)
+                               ENDDO
+                            ENDIF
+                         ENDDO
+                         sums_l(k,ind,tn) = sums_l(k,ind,tn) + temp_bin * rmask(j,i,sr)  *         &
+                                           MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 22 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+
+             CASE( 5 )  ! PM2.5
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb, nzt+1
+                         temp_bin = 0.0_wp
+                         DO  ib = 1, nbins_aerosol
+                            IF ( 2.0_wp * ra_dry(k,j,i,ib) <= 2.5E-6_wp )  THEN
+                               DO  ic = ib, nbins_aerosol * ncc, nbins_aerosol
+                                  temp_bin = temp_bin + aerosol_mass(ic)%conc(k,j,i)
+                               ENDDO
+                            ENDIF
+                         ENDDO
+                         sums_l(k,ind,tn) = sums_l(k,ind,tn) + temp_bin * rmask(j,i,sr)  *         &
+                                           MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 22 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+
+             CASE( 6 )  ! PM10
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb, nzt+1
+                         temp_bin = 0.0_wp
+                         DO  ib = 1, nbins_aerosol
+                            IF ( 2.0_wp * ra_dry(k,j,i,ib) <= 10.0E-6_wp )  THEN
+                               DO  ic = ib, nbins_aerosol * ncc, nbins_aerosol
+                                  temp_bin = temp_bin + aerosol_mass(ic)%conc(k,j,i)
+                               ENDDO
+                            ENDIF
+                         ENDDO
+                         sums_l(k,ind,tn) = sums_l(k,ind,tn) + temp_bin * rmask(j,i,sr)  *         &
+                                           MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 22 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+
+          END SELECT
+       ENDDO
+
+    ELSEIF ( mode == 'time_series' )  THEN
+!
+!--    TODO
+    ENDIF
+
+ END SUBROUTINE salsa_statistics
+
 
 !------------------------------------------------------------------------------!
@@ -9643,4 +9835,5 @@
     CHARACTER(LEN=*)  ::  variable   !<
 
+    INTEGER(iwp) ::  char_to_int  !< for converting character to integer
     INTEGER(iwp) ::  found_index  !<
     INTEGER(iwp) ::  i            !<
@@ -9653,5 +9846,4 @@
                           !< (or tracheobronchial) region of the lung. Depends on the particle size
     REAL(wp) ::  mean_d   !< Particle diameter in micrometres
-    REAL(wp) ::  nc       !< Particle number concentration in units 1/cm**3
     REAL(wp) ::  temp_bin !< temporary variable
 
@@ -9662,408 +9854,404 @@
     IF ( mode == 'allocate' )  THEN
 
-       SELECT CASE ( TRIM( variable ) )
-
-          CASE ( 'g_H2SO4' )
-             IF ( .NOT. ALLOCATED( g_h2so4_av ) )  THEN
-                ALLOCATE( g_h2so4_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-             ENDIF
-             g_h2so4_av = 0.0_wp
-
-          CASE ( 'g_HNO3' )
-             IF ( .NOT. ALLOCATED( g_hno3_av ) )  THEN
-                ALLOCATE( g_hno3_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-             ENDIF
-             g_hno3_av = 0.0_wp
-
-          CASE ( 'g_NH3' )
-             IF ( .NOT. ALLOCATED( g_nh3_av ) )  THEN
-                ALLOCATE( g_nh3_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-             ENDIF
-             g_nh3_av = 0.0_wp
-
-          CASE ( 'g_OCNV' )
-             IF ( .NOT. ALLOCATED( g_ocnv_av ) )  THEN
-                ALLOCATE( g_ocnv_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-             ENDIF
-             g_ocnv_av = 0.0_wp
-
-          CASE ( 'g_OCSV' )
-             IF ( .NOT. ALLOCATED( g_ocsv_av ) )  THEN
-                ALLOCATE( g_ocsv_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-             ENDIF
-             g_ocsv_av = 0.0_wp
-
-          CASE ( 'LDSA' )
-             IF ( .NOT. ALLOCATED( ldsa_av ) )  THEN
-                ALLOCATE( ldsa_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-             ENDIF
-             ldsa_av = 0.0_wp
-
-          CASE ( 'N_bin1', 'N_bin2', 'N_bin3', 'N_bin4', 'N_bin5', 'N_bin6', 'N_bin7', 'N_bin8',   &
-                 'N_bin9', 'N_bin10', 'N_bin11', 'N_bin12' )
-             IF ( .NOT. ALLOCATED( nbins_av ) )  THEN
-                ALLOCATE( nbins_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg,nbins_aerosol) )
-             ENDIF
-             nbins_av = 0.0_wp
-
-          CASE ( 'Ntot' )
-             IF ( .NOT. ALLOCATED( ntot_av ) )  THEN
-                ALLOCATE( ntot_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-             ENDIF
-             ntot_av = 0.0_wp
-
-          CASE ( 'm_bin1', 'm_bin2', 'm_bin3', 'm_bin4', 'm_bin5', 'm_bin6', 'm_bin7', 'm_bin8',   &
-                 'm_bin9', 'm_bin10', 'm_bin11', 'm_bin12' )
-             IF ( .NOT. ALLOCATED( mbins_av ) )  THEN
-                ALLOCATE( mbins_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg,nbins_aerosol) )
-             ENDIF
-             mbins_av = 0.0_wp
-
-          CASE ( 'PM2.5' )
-             IF ( .NOT. ALLOCATED( pm25_av ) )  THEN
-                ALLOCATE( pm25_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-             ENDIF
-             pm25_av = 0.0_wp
-
-          CASE ( 'PM10' )
-             IF ( .NOT. ALLOCATED( pm10_av ) )  THEN
-                ALLOCATE( pm10_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-             ENDIF
-             pm10_av = 0.0_wp
-
-          CASE ( 's_BC' )
-             IF ( .NOT. ALLOCATED( s_bc_av ) )  THEN
-                ALLOCATE( s_bc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-             ENDIF
-             s_bc_av = 0.0_wp
-
-          CASE ( 's_DU' )
-             IF ( .NOT. ALLOCATED( s_du_av ) )  THEN
-                ALLOCATE( s_du_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-             ENDIF
-             s_du_av = 0.0_wp
-
-          CASE ( 's_H2O' )
-             IF ( .NOT. ALLOCATED( s_h2o_av ) )  THEN
-                ALLOCATE( s_h2o_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-             ENDIF
-             s_h2o_av = 0.0_wp
-
-          CASE ( 's_NH' )
-             IF ( .NOT. ALLOCATED( s_nh_av ) )  THEN
-                ALLOCATE( s_nh_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-             ENDIF
-             s_nh_av = 0.0_wp
-
-          CASE ( 's_NO' )
-             IF ( .NOT. ALLOCATED( s_no_av ) )  THEN
-                ALLOCATE( s_no_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-             ENDIF
-             s_no_av = 0.0_wp
-
-          CASE ( 's_OC' )
-             IF ( .NOT. ALLOCATED( s_oc_av ) )  THEN
-                ALLOCATE( s_oc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-             ENDIF
-             s_oc_av = 0.0_wp
-
-          CASE ( 's_SO4' )
-             IF ( .NOT. ALLOCATED( s_so4_av ) )  THEN
-                ALLOCATE( s_so4_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-             ENDIF
-             s_so4_av = 0.0_wp   
-
-          CASE ( 's_SS' )
-             IF ( .NOT. ALLOCATED( s_ss_av ) )  THEN
-                ALLOCATE( s_ss_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
-             ENDIF
-             s_ss_av = 0.0_wp
-
-          CASE DEFAULT
-             CONTINUE
-
-       END SELECT
+       IF ( variable(7:11) ==  'N_bin' )  THEN
+          IF ( .NOT. ALLOCATED( nbins_av ) )  THEN
+             ALLOCATE( nbins_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg,nbins_aerosol) )
+          ENDIF
+          nbins_av = 0.0_wp
+
+       ELSEIF ( variable(7:11) ==  'm_bin' )  THEN
+          IF ( .NOT. ALLOCATED( mbins_av ) )  THEN
+             ALLOCATE( mbins_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg,nbins_aerosol) )
+          ENDIF
+          mbins_av = 0.0_wp
+
+       ELSE
+
+          SELECT CASE ( TRIM( variable(7:) ) )
+
+             CASE ( 'g_H2SO4' )
+                IF ( .NOT. ALLOCATED( g_h2so4_av ) )  THEN
+                   ALLOCATE( g_h2so4_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                g_h2so4_av = 0.0_wp
+
+             CASE ( 'g_HNO3' )
+                IF ( .NOT. ALLOCATED( g_hno3_av ) )  THEN
+                   ALLOCATE( g_hno3_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                g_hno3_av = 0.0_wp
+
+             CASE ( 'g_NH3' )
+                IF ( .NOT. ALLOCATED( g_nh3_av ) )  THEN
+                   ALLOCATE( g_nh3_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                g_nh3_av = 0.0_wp
+
+             CASE ( 'g_OCNV' )
+                IF ( .NOT. ALLOCATED( g_ocnv_av ) )  THEN
+                   ALLOCATE( g_ocnv_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                g_ocnv_av = 0.0_wp
+
+             CASE ( 'g_OCSV' )
+                IF ( .NOT. ALLOCATED( g_ocsv_av ) )  THEN
+                   ALLOCATE( g_ocsv_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                g_ocsv_av = 0.0_wp
+
+             CASE ( 'LDSA' )
+                IF ( .NOT. ALLOCATED( ldsa_av ) )  THEN
+                   ALLOCATE( ldsa_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                ldsa_av = 0.0_wp
+
+             CASE ( 'N_UFP' )
+                IF ( .NOT. ALLOCATED( nufp_av ) )  THEN
+                   ALLOCATE( nufp_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                nufp_av = 0.0_wp
+
+             CASE ( 'Ntot' )
+                IF ( .NOT. ALLOCATED( ntot_av ) )  THEN
+                   ALLOCATE( ntot_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                ntot_av = 0.0_wp
+
+             CASE ( 'PM0.1' )
+                IF ( .NOT. ALLOCATED( pm01_av ) )  THEN
+                   ALLOCATE( pm01_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                pm01_av = 0.0_wp
+
+             CASE ( 'PM2.5' )
+                IF ( .NOT. ALLOCATED( pm25_av ) )  THEN
+                   ALLOCATE( pm25_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                pm25_av = 0.0_wp
+
+             CASE ( 'PM10' )
+                IF ( .NOT. ALLOCATED( pm10_av ) )  THEN
+                   ALLOCATE( pm10_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                pm10_av = 0.0_wp
+
+             CASE ( 's_BC' )
+                IF ( .NOT. ALLOCATED( s_bc_av ) )  THEN
+                   ALLOCATE( s_bc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                s_bc_av = 0.0_wp
+
+             CASE ( 's_DU' )
+                IF ( .NOT. ALLOCATED( s_du_av ) )  THEN
+                   ALLOCATE( s_du_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                s_du_av = 0.0_wp
+
+             CASE ( 's_H2O' )
+                IF ( .NOT. ALLOCATED( s_h2o_av ) )  THEN
+                   ALLOCATE( s_h2o_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                s_h2o_av = 0.0_wp
+
+             CASE ( 's_NH' )
+                IF ( .NOT. ALLOCATED( s_nh_av ) )  THEN
+                   ALLOCATE( s_nh_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                s_nh_av = 0.0_wp
+
+             CASE ( 's_NO' )
+                IF ( .NOT. ALLOCATED( s_no_av ) )  THEN
+                   ALLOCATE( s_no_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                s_no_av = 0.0_wp
+
+             CASE ( 's_OC' )
+                IF ( .NOT. ALLOCATED( s_oc_av ) )  THEN
+                   ALLOCATE( s_oc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                s_oc_av = 0.0_wp
+
+             CASE ( 's_SO4' )
+                IF ( .NOT. ALLOCATED( s_so4_av ) )  THEN
+                   ALLOCATE( s_so4_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                s_so4_av = 0.0_wp
+
+             CASE ( 's_SS' )
+                IF ( .NOT. ALLOCATED( s_ss_av ) )  THEN
+                   ALLOCATE( s_ss_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                s_ss_av = 0.0_wp
+
+             CASE DEFAULT
+                CONTINUE
+
+          END SELECT
+
+       ENDIF
 
     ELSEIF ( mode == 'sum' )  THEN
 
-       SELECT CASE ( TRIM( variable ) )
-
-          CASE ( 'g_H2SO4', 'g_HNO3', 'g_NH3', 'g_OCNV', 'g_OCSV' )
-
-             vari = TRIM( variable(3:) )
-
-             SELECT CASE( vari )
-
-                CASE( 'H2SO4' )
-                   found_index = 1
-                   to_be_resorted => g_h2so4_av
-
-                CASE( 'HNO3' )
-                   found_index = 2
-                   to_be_resorted => g_hno3_av
-
-                CASE( 'NH3' )
-                   found_index = 3
-                   to_be_resorted => g_nh3_av
-
-                CASE( 'OCNV' )
-                   found_index = 4
-                   to_be_resorted => g_ocnv_av
-
-                CASE( 'OCSN' )
-                   found_index = 5
-                   to_be_resorted => g_ocsv_av
-
-             END SELECT
-
+       IF ( variable(7:11) ==  'N_bin' )  THEN
+          READ( variable(12:),* ) char_to_int
+          IF ( char_to_int >= 1  .AND. char_to_int <= SUM( nbin ) )  THEN
+             ib = char_to_int
              DO  i = nxlg, nxrg
                 DO  j = nysg, nyng
                    DO  k = nzb, nzt+1
-                      to_be_resorted(k,j,i) = to_be_resorted(k,j,i) +                              &
-                                              salsa_gas(found_index)%conc(k,j,i)
+                      nbins_av(k,j,i,ib) = nbins_av(k,j,i,ib) + aerosol_number(ib)%conc(k,j,i)
                    ENDDO
                 ENDDO
              ENDDO
-
-          CASE ( 'LDSA' )
+          ENDIF
+
+       ELSEIF ( variable(7:11) ==  'm_bin' )  THEN
+          READ( variable(12:),* ) char_to_int
+          IF ( char_to_int >= 1  .AND. char_to_int <= SUM( nbin ) )  THEN
+             ib = char_to_int
              DO  i = nxlg, nxrg
                 DO  j = nysg, nyng
                    DO  k = nzb, nzt+1
                       temp_bin = 0.0_wp
-                      DO  ib = 1, nbins_aerosol
-!
-!--                      Diameter in micrometres
-                         mean_d = 1.0E+6_wp * ra_dry(k,j,i,ib) * 2.0_wp
-!
-!--                      Deposition factor: alveolar (use ra_dry)
-                         df = ( 0.01555_wp / mean_d ) * ( EXP( -0.416_wp * ( LOG( mean_d ) +       &
-                                2.84_wp )**2 ) + 19.11_wp * EXP( -0.482_wp * ( LOG( mean_d ) -     &
-                                1.362_wp )**2 ) )
-!
-!--                      Number concentration in 1/cm3
-                         nc = 1.0E-6_wp * aerosol_number(ib)%conc(k,j,i)
-!
-!--                      Lung-deposited surface area LDSA (units mum2/cm3)
-                         temp_bin = temp_bin + pi * mean_d**2 * df * nc
+                      DO  ic = ib, nbins_aerosol * ncomponents_mass, nbins_aerosol
+                         temp_bin = temp_bin + aerosol_mass(ic)%conc(k,j,i)
                       ENDDO
-                      ldsa_av(k,j,i) = ldsa_av(k,j,i) + temp_bin
+                      mbins_av(k,j,i,ib) = mbins_av(k,j,i,ib) + temp_bin
                    ENDDO
                 ENDDO
              ENDDO
-
-          CASE ( 'N_bin1', 'N_bin2', 'N_bin3', 'N_bin4', 'N_bin5', 'N_bin6', 'N_bin7', 'N_bin8',   &
-                 'N_bin9', 'N_bin10', 'N_bin11', 'N_bin12' )
-             DO  i = nxlg, nxrg
-                DO  j = nysg, nyng
-                   DO  k = nzb, nzt+1
-                      DO  ib = 1, nbins_aerosol
-                         nbins_av(k,j,i,ib) = nbins_av(k,j,i,ib) + aerosol_number(ib)%conc(k,j,i)
+          ENDIF
+       ELSE
+
+          SELECT CASE ( TRIM( variable(7:) ) )
+
+             CASE ( 'g_H2SO4', 'g_HNO3', 'g_NH3', 'g_OCNV', 'g_OCSV' )
+
+                vari = TRIM( variable(9:) )  ! remove salsa_g_ from beginning
+
+                SELECT CASE( vari )
+
+                   CASE( 'H2SO4' )
+                      found_index = 1
+                      to_be_resorted => g_h2so4_av
+
+                   CASE( 'HNO3' )
+                      found_index = 2
+                      to_be_resorted => g_hno3_av
+
+                   CASE( 'NH3' )
+                      found_index = 3
+                      to_be_resorted => g_nh3_av
+
+                   CASE( 'OCNV' )
+                      found_index = 4
+                      to_be_resorted => g_ocnv_av
+
+                   CASE( 'OCSV' )
+                      found_index = 5
+                      to_be_resorted => g_ocsv_av
+
+                END SELECT
+
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         to_be_resorted(k,j,i) = to_be_resorted(k,j,i) +                           &
+                                                 salsa_gas(found_index)%conc(k,j,i)
                       ENDDO
                    ENDDO
                 ENDDO
-             ENDDO
-
-          CASE ( 'Ntot' )
-             DO  i = nxlg, nxrg
-                DO  j = nysg, nyng
-                   DO  k = nzb, nzt+1
-                      DO  ib = 1, nbins_aerosol
-                         ntot_av(k,j,i) = ntot_av(k,j,i) + aerosol_number(ib)%conc(k,j,i)
+
+             CASE ( 'LDSA' )
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         temp_bin = 0.0_wp
+                         DO  ib = 1, nbins_aerosol
+   !
+   !--                      Diameter in micrometres
+                            mean_d = 1.0E+6_wp * ra_dry(k,j,i,ib) * 2.0_wp
+   !
+   !--                      Deposition factor: alveolar (use ra_dry)
+                            df = ( 0.01555_wp / mean_d ) * ( EXP( -0.416_wp * ( LOG( mean_d ) +    &
+                                   2.84_wp )**2 ) + 19.11_wp * EXP( -0.482_wp * ( LOG( mean_d ) -  &
+                                   1.362_wp )**2 ) )
+   !
+   !--                      Lung-deposited surface area LDSA (units mum2/cm3)
+                            temp_bin = temp_bin + pi * mean_d**2 * df * 1.0E-6_wp *                &
+                                       aerosol_number(ib)%conc(k,j,i)
+                         ENDDO
+                         ldsa_av(k,j,i) = ldsa_av(k,j,i) + temp_bin
                       ENDDO
                    ENDDO
                 ENDDO
-             ENDDO
-
-          CASE ( 'm_bin1', 'm_bin2', 'm_bin3', 'm_bin4', 'm_bin5', 'm_bin6', 'm_bin7', 'm_bin8',   &
-                 'm_bin9', 'm_bin10', 'm_bin11', 'm_bin12' )
-             DO  i = nxlg, nxrg
-                DO  j = nysg, nyng
-                   DO  k = nzb, nzt+1
-                      DO  ib = 1, nbins_aerosol
-                         DO  ic = ib, nbins_aerosol * ncomponents_mass, nbins_aerosol
-                            mbins_av(k,j,i,ib) = mbins_av(k,j,i,ib) + aerosol_mass(ic)%conc(k,j,i)
+
+             CASE ( 'N_UFP' )
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         temp_bin = 0.0_wp
+                         DO  ib = 1, nbins_aerosol
+                            IF ( 2.0_wp * ra_dry(k,j,i,ib) <= 0.1E-6_wp )  THEN
+                               temp_bin = temp_bin + aerosol_number(ib)%conc(k,j,i)
+                            ENDIF
+                         ENDDO
+                         nufp_av(k,j,i) = nufp_av(k,j,i) + temp_bin
+                      ENDDO
+                   ENDDO
+                ENDDO
+
+             CASE ( 'Ntot' )
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         DO  ib = 1, nbins_aerosol
+                            ntot_av(k,j,i) = ntot_av(k,j,i) + aerosol_number(ib)%conc(k,j,i)
                          ENDDO
                       ENDDO
                    ENDDO
                 ENDDO
-             ENDDO
-
-          CASE ( 'PM2.5' )
-             DO  i = nxlg, nxrg
-                DO  j = nysg, nyng
-                   DO  k = nzb, nzt+1
-                      temp_bin = 0.0_wp
-                      DO  ib = 1, nbins_aerosol
-                         IF ( 2.0_wp * ra_dry(k,j,i,ib) <= 2.5E-6_wp )  THEN
-                            DO  ic = ib, nbins_aerosol * ncc, nbins_aerosol
-                               temp_bin = temp_bin + aerosol_mass(ic)%conc(k,j,i)
-                            ENDDO
-                         ENDIF
+
+             CASE ( 'PM0.1' )
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         temp_bin = 0.0_wp
+                         DO  ib = 1, nbins_aerosol
+                            IF ( 2.0_wp * ra_dry(k,j,i,ib) <= 0.1E-6_wp )  THEN
+                               DO  ic = ib, nbins_aerosol * ncc, nbins_aerosol
+                                  temp_bin = temp_bin + aerosol_mass(ic)%conc(k,j,i)
+                               ENDDO
+                            ENDIF
+                         ENDDO
+                         pm01_av(k,j,i) = pm01_av(k,j,i) + temp_bin
                       ENDDO
-                      pm25_av(k,j,i) = pm25_av(k,j,i) + temp_bin
                    ENDDO
                 ENDDO
-             ENDDO
-
-          CASE ( 'PM10' )
-             DO  i = nxlg, nxrg
-                DO  j = nysg, nyng
-                   DO  k = nzb, nzt+1
-                      temp_bin = 0.0_wp
-                      DO  ib = 1, nbins_aerosol
-                         IF ( 2.0_wp * ra_dry(k,j,i,ib) <= 10.0E-6_wp )  THEN
-                            DO  ic = ib, nbins_aerosol * ncc, nbins_aerosol
-                               temp_bin = temp_bin + aerosol_mass(ic)%conc(k,j,i)
-                            ENDDO
-                         ENDIF
+
+             CASE ( 'PM2.5' )
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         temp_bin = 0.0_wp
+                         DO  ib = 1, nbins_aerosol
+                            IF ( 2.0_wp * ra_dry(k,j,i,ib) <= 2.5E-6_wp )  THEN
+                               DO  ic = ib, nbins_aerosol * ncc, nbins_aerosol
+                                  temp_bin = temp_bin + aerosol_mass(ic)%conc(k,j,i)
+                               ENDDO
+                            ENDIF
+                         ENDDO
+                         pm25_av(k,j,i) = pm25_av(k,j,i) + temp_bin
                       ENDDO
-                      pm10_av(k,j,i) = pm10_av(k,j,i) + temp_bin
                    ENDDO
                 ENDDO
-             ENDDO
-
-          CASE ( 's_BC', 's_DU', 's_NH', 's_NO', 's_OC', 's_SO4', 's_SS' )
-             IF ( is_used( prtcl, TRIM( variable(3:) ) ) )  THEN
-                found_index = get_index( prtcl, TRIM( variable(3:) ) )
-                IF ( TRIM( variable(3:) ) == 'BC' )   to_be_resorted => s_bc_av
-                IF ( TRIM( variable(3:) ) == 'DU' )   to_be_resorted => s_du_av
-                IF ( TRIM( variable(3:) ) == 'NH' )   to_be_resorted => s_nh_av
-                IF ( TRIM( variable(3:) ) == 'NO' )   to_be_resorted => s_no_av
-                IF ( TRIM( variable(3:) ) == 'OC' )   to_be_resorted => s_oc_av
-                IF ( TRIM( variable(3:) ) == 'SO4' )  to_be_resorted => s_so4_av
-                IF ( TRIM( variable(3:) ) == 'SS' )   to_be_resorted => s_ss_av
+
+             CASE ( 'PM10' )
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         temp_bin = 0.0_wp
+                         DO  ib = 1, nbins_aerosol
+                            IF ( 2.0_wp * ra_dry(k,j,i,ib) <= 10.0E-6_wp )  THEN
+                               DO  ic = ib, nbins_aerosol * ncc, nbins_aerosol
+                                  temp_bin = temp_bin + aerosol_mass(ic)%conc(k,j,i)
+                               ENDDO
+                            ENDIF
+                         ENDDO
+                         pm10_av(k,j,i) = pm10_av(k,j,i) + temp_bin
+                      ENDDO
+                   ENDDO
+                ENDDO
+
+             CASE ( 's_BC', 's_DU', 's_NH', 's_NO', 's_OC', 's_SO4', 's_SS' )
+                IF ( is_used( prtcl, TRIM( variable(9:) ) ) )  THEN  ! 9: remove salsa_s_
+                   found_index = get_index( prtcl, TRIM( variable(9:) ) )
+                   IF ( TRIM( variable(9:) ) == 'BC' )   to_be_resorted => s_bc_av
+                   IF ( TRIM( variable(9:) ) == 'DU' )   to_be_resorted => s_du_av
+                   IF ( TRIM( variable(9:) ) == 'NH' )   to_be_resorted => s_nh_av
+                   IF ( TRIM( variable(9:) ) == 'NO' )   to_be_resorted => s_no_av
+                   IF ( TRIM( variable(9:) ) == 'OC' )   to_be_resorted => s_oc_av
+                   IF ( TRIM( variable(9:) ) == 'SO4' )  to_be_resorted => s_so4_av
+                   IF ( TRIM( variable(9:) ) == 'SS' )   to_be_resorted => s_ss_av
+                   DO  i = nxlg, nxrg
+                      DO  j = nysg, nyng
+                         DO  k = nzb, nzt+1
+                            DO  ic = ( found_index-1 ) * nbins_aerosol + 1, found_index * nbins_aerosol
+                               to_be_resorted(k,j,i) = to_be_resorted(k,j,i) +                     &
+                                                       aerosol_mass(ic)%conc(k,j,i)
+                            ENDDO
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ENDIF
+
+             CASE ( 's_H2O' )
+                found_index = get_index( prtcl,'H2O' )
+                to_be_resorted => s_h2o_av
                 DO  i = nxlg, nxrg
                    DO  j = nysg, nyng
                       DO  k = nzb, nzt+1
                          DO  ic = ( found_index-1 ) * nbins_aerosol + 1, found_index * nbins_aerosol
-                            to_be_resorted(k,j,i) = to_be_resorted(k,j,i) +                        &
-                                                    aerosol_mass(ic)%conc(k,j,i)
+                            s_h2o_av(k,j,i) = s_h2o_av(k,j,i) + aerosol_mass(ic)%conc(k,j,i)
                          ENDDO
                       ENDDO
                    ENDDO
                 ENDDO
-             ENDIF
-
-          CASE ( 's_H2O' )
-             found_index = get_index( prtcl,'H2O' )
-             to_be_resorted => s_h2o_av
+
+             CASE DEFAULT
+                CONTINUE
+
+          END SELECT
+
+       ENDIF
+
+    ELSEIF ( mode == 'average' )  THEN
+
+       IF ( variable(7:11) ==  'N_bin' )  THEN
+          READ( variable(12:),* ) char_to_int
+          IF ( char_to_int >= 1  .AND. char_to_int <= SUM( nbin ) )  THEN
+             ib = char_to_int
              DO  i = nxlg, nxrg
                 DO  j = nysg, nyng
                    DO  k = nzb, nzt+1
-                      DO  ic = ( found_index-1 ) * nbins_aerosol + 1, found_index * nbins_aerosol
-                         to_be_resorted(k,j,i) = to_be_resorted(k,j,i) +                           &
-                                                 aerosol_mass(ic)%conc(k,j,i)
-                      ENDDO
+                      nbins_av(k,j,i,ib) = nbins_av(k,j,i,ib) / REAL( average_count_3d, KIND=wp )
                    ENDDO
                 ENDDO
              ENDDO
-
-          CASE DEFAULT
-             CONTINUE
-
-       END SELECT
-
-    ELSEIF ( mode == 'average' )  THEN
-
-       SELECT CASE ( TRIM( variable ) )
-
-          CASE ( 'g_H2SO4', 'g_HNO3', 'g_NH3', 'g_OCNV', 'g_OCSV' )
-             IF ( TRIM( variable(3:) ) == 'H2SO4' )  THEN
-                found_index = 1
-                to_be_resorted => g_h2so4_av
-             ELSEIF ( TRIM( variable(3:) ) == 'HNO3' )  THEN
-                found_index = 2
-                to_be_resorted => g_hno3_av
-             ELSEIF ( TRIM( variable(3:) ) == 'NH3' )  THEN
-                found_index = 3
-                to_be_resorted => g_nh3_av
-             ELSEIF ( TRIM( variable(3:) ) == 'OCNV' )  THEN
-                found_index = 4
-                to_be_resorted => g_ocnv_av
-             ELSEIF ( TRIM( variable(3:) ) == 'OCSV' )  THEN
-                found_index = 5
-                to_be_resorted => g_ocsv_av
-             ENDIF
+          ENDIF
+
+       ELSEIF ( variable(7:11) ==  'm_bin' )  THEN
+          READ( variable(12:),* ) char_to_int
+          IF ( char_to_int >= 1  .AND. char_to_int <= SUM( nbin ) )  THEN
+             ib = char_to_int
              DO  i = nxlg, nxrg
                 DO  j = nysg, nyng
                    DO  k = nzb, nzt+1
-                      to_be_resorted(k,j,i) = to_be_resorted(k,j,i) /                              &
-                                              REAL( average_count_3d, KIND=wp )
+                      mbins_av(k,j,i,ib) = mbins_av(k,j,i,ib) / REAL( average_count_3d, KIND=wp)
                    ENDDO
                 ENDDO
              ENDDO
-
-          CASE ( 'LDSA' )
-             DO  i = nxlg, nxrg
-                DO  j = nysg, nyng
-                   DO  k = nzb, nzt+1
-                      ldsa_av(k,j,i) = ldsa_av(k,j,i) / REAL( average_count_3d, KIND=wp )
-                   ENDDO
-                ENDDO
-             ENDDO
-
-          CASE ( 'N_bin1', 'N_bin2', 'N_bin3', 'N_bin4', 'N_bin5', 'N_bin6', 'N_bin7', 'N_bin8',   &
-                 'N_bin9', 'N_bin10', 'N_bin11', 'N_bin12' )
-             DO  i = nxlg, nxrg
-                DO  j = nysg, nyng
-                   DO  k = nzb, nzt+1
-                      DO  ib = 1, nbins_aerosol
-                         nbins_av(k,j,i,ib) = nbins_av(k,j,i,ib) / REAL( average_count_3d, KIND=wp )
-                      ENDDO
-                   ENDDO
-                ENDDO
-             ENDDO
-
-          CASE ( 'Ntot' )
-             DO  i = nxlg, nxrg
-                DO  j = nysg, nyng
-                   DO  k = nzb, nzt+1
-                      ntot_av(k,j,i) = ntot_av(k,j,i) / REAL( average_count_3d, KIND=wp )
-                   ENDDO
-                ENDDO
-             ENDDO
-
-          CASE ( 'm_bin1', 'm_bin2', 'm_bin3', 'm_bin4', 'm_bin5', 'm_bin6', 'm_bin7', 'm_bin8',   &
-                 'm_bin9', 'm_bin10', 'm_bin11', 'm_bin12' )
-             DO  i = nxlg, nxrg
-                DO  j = nysg, nyng
-                   DO  k = nzb, nzt+1
-                      DO  ib = 1, nbins_aerosol
-                         DO  ic = ib, nbins_aerosol * ncomponents_mass, nbins_aerosol
-                            mbins_av(k,j,i,ib) = mbins_av(k,j,i,ib) /                              &
-                                                 REAL( average_count_3d, KIND=wp)
-                         ENDDO
-                      ENDDO
-                   ENDDO
-                ENDDO
-             ENDDO
-
-          CASE ( 'PM2.5' )
-             DO  i = nxlg, nxrg
-                DO  j = nysg, nyng
-                   DO  k = nzb, nzt+1
-                      pm25_av(k,j,i) = pm25_av(k,j,i) / REAL( average_count_3d, KIND=wp )
-                   ENDDO
-                ENDDO
-             ENDDO
-
-          CASE ( 'PM10' )
-             DO  i = nxlg, nxrg
-                DO  j = nysg, nyng
-                   DO  k = nzb, nzt+1
-                      pm10_av(k,j,i) = pm10_av(k,j,i) / REAL( average_count_3d, KIND=wp )
-                   ENDDO
-                ENDDO
-             ENDDO
-
-          CASE ( 's_BC', 's_DU', 's_NH', 's_NO', 's_OC', 's_SO4', 's_SS' )
-             IF ( is_used( prtcl, TRIM( variable(3:) ) ) )  THEN
-                IF ( TRIM( variable(3:) ) == 'BC' )   to_be_resorted => s_bc_av
-                IF ( TRIM( variable(3:) ) == 'DU' )   to_be_resorted => s_du_av
-                IF ( TRIM( variable(3:) ) == 'NH' )   to_be_resorted => s_nh_av
-                IF ( TRIM( variable(3:) ) == 'NO' )   to_be_resorted => s_no_av
-                IF ( TRIM( variable(3:) ) == 'OC' )   to_be_resorted => s_oc_av
-                IF ( TRIM( variable(3:) ) == 'SO4' )  to_be_resorted => s_so4_av
-                IF ( TRIM( variable(3:) ) == 'SS' )   to_be_resorted => s_ss_av 
+          ENDIF
+       ELSE
+
+          SELECT CASE ( TRIM( variable(7:) ) )
+
+             CASE ( 'g_H2SO4', 'g_HNO3', 'g_NH3', 'g_OCNV', 'g_OCSV' )
+                IF ( TRIM( variable(9:) ) == 'H2SO4' )  THEN  ! 9: remove salsa_g_ from beginning
+                   found_index = 1
+                   to_be_resorted => g_h2so4_av
+                ELSEIF ( TRIM( variable(9:) ) == 'HNO3' )  THEN
+                   found_index = 2
+                   to_be_resorted => g_hno3_av
+                ELSEIF ( TRIM( variable(9:) ) == 'NH3' )  THEN
+                   found_index = 3
+                   to_be_resorted => g_nh3_av
+                ELSEIF ( TRIM( variable(9:) ) == 'OCNV' )  THEN
+                   found_index = 4
+                   to_be_resorted => g_ocnv_av
+                ELSEIF ( TRIM( variable(9:) ) == 'OCSV' )  THEN
+                   found_index = 5
+                   to_be_resorted => g_ocsv_av
+                ENDIF
                 DO  i = nxlg, nxrg
                    DO  j = nysg, nyng
@@ -10074,19 +10262,93 @@
                    ENDDO
                 ENDDO
-             ENDIF
-
-          CASE ( 's_H2O' )
-             to_be_resorted => s_h2o_av
-             DO  i = nxlg, nxrg
-                DO  j = nysg, nyng
-                   DO  k = nzb, nzt+1
-                      to_be_resorted(k,j,i) = to_be_resorted(k,j,i) /                              &
-                                              REAL( average_count_3d, KIND=wp )
+
+             CASE ( 'LDSA' )
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         ldsa_av(k,j,i) = ldsa_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                      ENDDO
                    ENDDO
                 ENDDO
-             ENDDO
-
-       END SELECT
-
+
+             CASE ( 'N_UFP' )
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         nufp_av(k,j,i) = nufp_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+
+             CASE ( 'Ntot' )
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         ntot_av(k,j,i) = ntot_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+
+
+             CASE ( 'PM0.1' )
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         pm01_av(k,j,i) = pm01_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+
+             CASE ( 'PM2.5' )
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         pm25_av(k,j,i) = pm25_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+
+             CASE ( 'PM10' )
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         pm10_av(k,j,i) = pm10_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+
+             CASE ( 's_BC', 's_DU', 's_NH', 's_NO', 's_OC', 's_SO4', 's_SS' )
+                IF ( is_used( prtcl, TRIM( variable(9:) ) ) )  THEN  ! 9: remove salsa_s_
+                   IF ( TRIM( variable(9:) ) == 'BC' )   to_be_resorted => s_bc_av
+                   IF ( TRIM( variable(9:) ) == 'DU' )   to_be_resorted => s_du_av
+                   IF ( TRIM( variable(9:) ) == 'NH' )   to_be_resorted => s_nh_av
+                   IF ( TRIM( variable(9:) ) == 'NO' )   to_be_resorted => s_no_av
+                   IF ( TRIM( variable(9:) ) == 'OC' )   to_be_resorted => s_oc_av
+                   IF ( TRIM( variable(9:) ) == 'SO4' )  to_be_resorted => s_so4_av
+                   IF ( TRIM( variable(9:) ) == 'SS' )   to_be_resorted => s_ss_av 
+                   DO  i = nxlg, nxrg
+                      DO  j = nysg, nyng
+                         DO  k = nzb, nzt+1
+                            to_be_resorted(k,j,i) = to_be_resorted(k,j,i) /                        &
+                                                    REAL( average_count_3d, KIND=wp )
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ENDIF
+
+             CASE ( 's_H2O' )
+                to_be_resorted => s_h2o_av
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         to_be_resorted(k,j,i) = to_be_resorted(k,j,i) /                           &
+                                                 REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+
+          END SELECT
+
+       ENDIF
     ENDIF
 
@@ -10115,4 +10377,5 @@
 
     INTEGER(iwp) ::  av           !<
+    INTEGER(iwp) ::  char_to_int  !< for converting character to integer
     INTEGER(iwp) ::  found_index  !< index of a chemical compound
     INTEGER(iwp) ::  i            !<
@@ -10132,5 +10395,4 @@
     REAL(wp) ::  fill_value = -9999.0_wp  !< value for the _FillValue attribute
     REAL(wp) ::  mean_d                   !< Particle diameter in micrometres
-    REAL(wp) ::  nc                       !< Particle number concentration in units 1/cm**3
     REAL(wp) ::  temp_bin                 !< temporary array for calculating output variables
 
@@ -10145,98 +10407,10 @@
     temp_bin  = 0.0_wp
 
-    SELECT CASE ( TRIM( variable( 1:LEN( TRIM( variable ) ) - 3 ) ) )  ! cut out _xy, _xz or _yz
-
-       CASE ( 'g_H2SO4', 'g_HNO3', 'g_NH3', 'g_OCNV', 'g_OCSV' )
-          vari = TRIM( variable( 3:LEN( TRIM( variable ) ) - 3 ) )
-          IF ( av == 0 )  THEN
-             IF ( vari == 'H2SO4')  found_index = 1
-             IF ( vari == 'HNO3')   found_index = 2
-             IF ( vari == 'NH3')    found_index = 3
-             IF ( vari == 'OCNV')   found_index = 4
-             IF ( vari == 'OCSV')   found_index = 5
-             DO  i = nxl, nxr
-                DO  j = nys, nyn
-                   DO  k = nzb_do, nzt_do
-                      local_pf(i,j,k) = MERGE( salsa_gas(found_index)%conc(k,j,i), REAL( fill_value, &
-                                               KIND = wp ),  BTEST( wall_flags_0(k,j,i), 0 ) ) 
-                   ENDDO
-                ENDDO
-             ENDDO
-          ELSE
-             IF ( vari == 'H2SO4' )  to_be_resorted => g_h2so4_av
-             IF ( vari == 'HNO3' )   to_be_resorted => g_hno3_av
-             IF ( vari == 'NH3' )    to_be_resorted => g_nh3_av
-             IF ( vari == 'OCNV' )   to_be_resorted => g_ocnv_av
-             IF ( vari == 'OCSV' )   to_be_resorted => g_ocsv_av
-             DO  i = nxl, nxr
-                DO  j = nys, nyn
-                   DO  k = nzb_do, nzt_do
-                      local_pf(i,j,k) = MERGE( to_be_resorted(k,j,i), REAL( fill_value,            &
-                                               KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) )
-                   ENDDO
-                ENDDO
-             ENDDO
-          ENDIF
-
-          IF ( mode == 'xy' )  grid = 'zu'
-
-       CASE ( 'LDSA' )
-          IF ( av == 0 )  THEN
-             DO  i = nxl, nxr
-                DO  j = nys, nyn
-                   DO  k = nzb_do, nzt_do
-                      temp_bin = 0.0_wp
-                      DO  ib = 1, nbins_aerosol
-!
-!--                      Diameter in micrometres
-                         mean_d = 1.0E+6_wp * ra_dry(k,j,i,ib) * 2.0_wp 
-!
-!--                      Deposition factor: alveolar
-                         df = ( 0.01555_wp / mean_d ) * ( EXP( -0.416_wp * ( LOG( mean_d ) +       &
-                                2.84_wp )**2 ) + 19.11_wp * EXP( -0.482_wp * ( LOG( mean_d ) -     &
-                                1.362_wp )**2 ) )
-!
-!--                      Number concentration in 1/cm3
-                         nc = 1.0E-6_wp * aerosol_number(ib)%conc(k,j,i)
-!
-!--                      Lung-deposited surface area LDSA (units mum2/cm3)
-                         temp_bin = temp_bin + pi * mean_d**2 * df * nc
-                      ENDDO
-
-                      local_pf(i,j,k) = MERGE( temp_bin, REAL( fill_value, KIND = wp ),            &
-                                               BTEST( wall_flags_0(k,j,i), 0 ) )
-                   ENDDO
-                ENDDO
-             ENDDO
-          ELSE
-             DO  i = nxl, nxr
-                DO  j = nys, nyn
-                   DO  k = nzb_do, nzt_do
-                      local_pf(i,j,k) = MERGE( ldsa_av(k,j,i), REAL( fill_value, KIND = wp ),      &
-                                               BTEST( wall_flags_0(k,j,i), 0 ) )
-                   ENDDO
-                ENDDO
-             ENDDO
-          ENDIF
-
-          IF ( mode == 'xy' )  grid = 'zu'
-
-       CASE ( 'N_bin1', 'N_bin2', 'N_bin3', 'N_bin4',   'N_bin5',  'N_bin6', 'N_bin7', 'N_bin8',   &
-              'N_bin9', 'N_bin10' , 'N_bin11', 'N_bin12' )
-          vari = TRIM( variable( 6:LEN( TRIM( variable ) ) - 3 ) )
-
-          IF ( vari == '1' ) ib = 1
-          IF ( vari == '2' ) ib = 2
-          IF ( vari == '3' ) ib = 3
-          IF ( vari == '4' ) ib = 4
-          IF ( vari == '5' ) ib = 5
-          IF ( vari == '6' ) ib = 6
-          IF ( vari == '7' ) ib = 7
-          IF ( vari == '8' ) ib = 8
-          IF ( vari == '9' ) ib = 9
-          IF ( vari == '10' ) ib = 10
-          IF ( vari == '11' ) ib = 11
-          IF ( vari == '12' ) ib = 12
-
+    IF ( variable(7:11)  == 'N_bin' )  THEN
+
+       READ( variable( 12:LEN( TRIM( variable ) ) - 3 ), * ) char_to_int
+       IF ( char_to_int >= 1  .AND. char_to_int <= SUM( nbin ) )  THEN
+
+          ib = char_to_int
           IF ( av == 0 )  THEN
              DO  i = nxl, nxr
@@ -10258,52 +10432,13 @@
              ENDDO
           ENDIF
-
           IF ( mode == 'xy' )  grid = 'zu'
-
-       CASE ( 'Ntot' )
-
-          IF ( av == 0 )  THEN
-             DO  i = nxl, nxr
-                DO  j = nys, nyn
-                   DO  k = nzb_do, nzt_do
-                      temp_bin = 0.0_wp
-                      DO  ib = 1, nbins_aerosol
-                         temp_bin = temp_bin + aerosol_number(ib)%conc(k,j,i)
-                      ENDDO
-                      local_pf(i,j,k) = MERGE( temp_bin, REAL( fill_value, KIND = wp ),            &
-                                               BTEST( wall_flags_0(k,j,i), 0 ) )
-                   ENDDO
-                ENDDO
-             ENDDO
-          ELSE
-             DO  i = nxl, nxr
-                DO  j = nys, nyn
-                   DO  k = nzb_do, nzt_do
-                      local_pf(i,j,k) = MERGE( ntot_av(k,j,i), REAL( fill_value, KIND = wp ),      &
-                                               BTEST( wall_flags_0(k,j,i), 0 ) )
-                   ENDDO
-                ENDDO
-             ENDDO
-          ENDIF
-
-          IF ( mode == 'xy' )  grid = 'zu'
-
-       CASE ( 'm_bin1', 'm_bin2', 'm_bin3', 'm_bin4',   'm_bin5',  'm_bin6', 'm_bin7', 'm_bin8',   &
-              'm_bin9', 'm_bin10' , 'm_bin11', 'm_bin12' )
-          vari = TRIM( variable( 6:LEN( TRIM( variable ) ) - 3 ) )
-
-          IF ( vari == '1' ) ib = 1
-          IF ( vari == '2' ) ib = 2
-          IF ( vari == '3' ) ib = 3
-          IF ( vari == '4' ) ib = 4
-          IF ( vari == '5' ) ib = 5
-          IF ( vari == '6' ) ib = 6
-          IF ( vari == '7' ) ib = 7
-          IF ( vari == '8' ) ib = 8
-          IF ( vari == '9' ) ib = 9
-          IF ( vari == '10' ) ib = 10
-          IF ( vari == '11' ) ib = 11
-          IF ( vari == '12' ) ib = 12
-
+       ENDIF
+
+    ELSEIF ( variable(7:11)  == 'm_bin' )  THEN
+
+       READ( variable( 12:LEN( TRIM( variable ) ) - 3 ), * ) char_to_int
+       IF ( char_to_int >= 1  .AND. char_to_int <= SUM( nbin ) )  THEN
+
+          ib = char_to_int
           IF ( av == 0 )  THEN
              DO  i = nxl, nxr
@@ -10329,73 +10464,278 @@
              ENDDO
           ENDIF
-
           IF ( mode == 'xy' )  grid = 'zu'
-
-       CASE ( 'PM2.5' )
-          IF ( av == 0 )  THEN
-             DO  i = nxl, nxr
-                DO  j = nys, nyn
-                   DO  k = nzb_do, nzt_do
-                      temp_bin = 0.0_wp
-                      DO  ib = 1, nbins_aerosol
-                         IF ( 2.0_wp * ra_dry(k,j,i,ib) <= 2.5E-6_wp )  THEN
-                            DO  ic = ib, nbins_aerosol * ncc, nbins_aerosol
+       ENDIF
+
+    ELSE
+
+       SELECT CASE ( TRIM( variable( 7:LEN( TRIM( variable ) ) - 3 ) ) )  ! cut out _xy, _xz or _yz
+
+          CASE ( 'g_H2SO4', 'g_HNO3', 'g_NH3', 'g_OCNV', 'g_OCSV' )
+             vari = TRIM( variable( 9:LEN( TRIM( variable ) ) - 3 ) )  ! 9: remove salsa_g_
+             IF ( av == 0 )  THEN
+                IF ( vari == 'H2SO4')  found_index = 1
+                IF ( vari == 'HNO3')   found_index = 2
+                IF ( vari == 'NH3')    found_index = 3
+                IF ( vari == 'OCNV')   found_index = 4
+                IF ( vari == 'OCSV')   found_index = 5
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         local_pf(i,j,k) = MERGE( salsa_gas(found_index)%conc(k,j,i),              &
+                                                  REAL( fill_value,  KIND = wp ),                  &
+                                                  BTEST( wall_flags_0(k,j,i), 0 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ELSE
+                IF ( vari == 'H2SO4' )  to_be_resorted => g_h2so4_av
+                IF ( vari == 'HNO3' )   to_be_resorted => g_hno3_av
+                IF ( vari == 'NH3' )    to_be_resorted => g_nh3_av
+                IF ( vari == 'OCNV' )   to_be_resorted => g_ocnv_av
+                IF ( vari == 'OCSV' )   to_be_resorted => g_ocsv_av
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         local_pf(i,j,k) = MERGE( to_be_resorted(k,j,i), REAL( fill_value,         &
+                                                  KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+             IF ( mode == 'xy' )  grid = 'zu'
+
+          CASE ( 'LDSA' )
+             IF ( av == 0 )  THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         temp_bin = 0.0_wp
+                         DO  ib = 1, nbins_aerosol
+   !
+   !--                      Diameter in micrometres
+                            mean_d = 1.0E+6_wp * ra_dry(k,j,i,ib) * 2.0_wp 
+   !
+   !--                      Deposition factor: alveolar
+                            df = ( 0.01555_wp / mean_d ) * ( EXP( -0.416_wp * ( LOG( mean_d ) +    &
+                                   2.84_wp )**2 ) + 19.11_wp * EXP( -0.482_wp * ( LOG( mean_d ) -  &
+                                   1.362_wp )**2 ) )
+   !
+   !--                      Lung-deposited surface area LDSA (units mum2/cm3)
+                            temp_bin = temp_bin + pi * mean_d**2 * df * 1.0E-6_wp *                &
+                                       aerosol_number(ib)%conc(k,j,i)
+                         ENDDO
+
+                         local_pf(i,j,k) = MERGE( temp_bin, REAL( fill_value, KIND = wp ),         &
+                                                  BTEST( wall_flags_0(k,j,i), 0 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ELSE
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         local_pf(i,j,k) = MERGE( ldsa_av(k,j,i), REAL( fill_value, KIND = wp ),   &
+                                                  BTEST( wall_flags_0(k,j,i), 0 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+             IF ( mode == 'xy' )  grid = 'zu'
+
+          CASE ( 'N_UFP' )
+
+             IF ( av == 0 )  THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         temp_bin = 0.0_wp
+                         DO  ib = 1, nbins_aerosol
+                            IF ( 2.0_wp * ra_dry(k,j,i,ib) <= 0.1E-6_wp )  THEN
+                               temp_bin = temp_bin + aerosol_number(ib)%conc(k,j,i)
+                            ENDIF
+                         ENDDO
+                         local_pf(i,j,k) = MERGE( temp_bin, REAL( fill_value, KIND = wp ),         &
+                                                  BTEST( wall_flags_0(k,j,i), 0 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ELSE
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         local_pf(i,j,k) = MERGE( nufp_av(k,j,i), REAL( fill_value, KIND = wp ),   &
+                                                  BTEST( wall_flags_0(k,j,i), 0 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+             IF ( mode == 'xy' )  grid = 'zu'
+
+          CASE ( 'Ntot' )
+
+             IF ( av == 0 )  THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         temp_bin = 0.0_wp
+                         DO  ib = 1, nbins_aerosol
+                            temp_bin = temp_bin + aerosol_number(ib)%conc(k,j,i)
+                         ENDDO
+                         local_pf(i,j,k) = MERGE( temp_bin, REAL( fill_value, KIND = wp ),         &
+                                                  BTEST( wall_flags_0(k,j,i), 0 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ELSE
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         local_pf(i,j,k) = MERGE( ntot_av(k,j,i), REAL( fill_value, KIND = wp ),   &
+                                                  BTEST( wall_flags_0(k,j,i), 0 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+             IF ( mode == 'xy' )  grid = 'zu'
+
+          CASE ( 'PM0.1' )
+             IF ( av == 0 )  THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         temp_bin = 0.0_wp
+                         DO  ib = 1, nbins_aerosol
+                            IF ( 2.0_wp * ra_dry(k,j,i,ib) <= 0.1E-6_wp )  THEN
+                               DO  ic = ib, nbins_aerosol * ncc, nbins_aerosol
+                                  temp_bin = temp_bin + aerosol_mass(ic)%conc(k,j,i)
+                               ENDDO
+                            ENDIF
+                         ENDDO
+                         local_pf(i,j,k) = MERGE( temp_bin, REAL( fill_value, KIND = wp ),         &
+                                                  BTEST( wall_flags_0(k,j,i), 0 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ELSE
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         local_pf(i,j,k) = MERGE( pm01_av(k,j,i), REAL( fill_value, KIND = wp ),   &
+                                                  BTEST( wall_flags_0(k,j,i), 0 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+             IF ( mode == 'xy' )  grid = 'zu'
+
+          CASE ( 'PM2.5' )
+             IF ( av == 0 )  THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         temp_bin = 0.0_wp
+                         DO  ib = 1, nbins_aerosol
+                            IF ( 2.0_wp * ra_dry(k,j,i,ib) <= 2.5E-6_wp )  THEN
+                               DO  ic = ib, nbins_aerosol * ncc, nbins_aerosol
+                                  temp_bin = temp_bin + aerosol_mass(ic)%conc(k,j,i)
+                               ENDDO
+                            ENDIF
+                         ENDDO
+                         local_pf(i,j,k) = MERGE( temp_bin, REAL( fill_value, KIND = wp ),         &
+                                                  BTEST( wall_flags_0(k,j,i), 0 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ELSE
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         local_pf(i,j,k) = MERGE( pm25_av(k,j,i), REAL( fill_value, KIND = wp ),   &
+                                                  BTEST( wall_flags_0(k,j,i), 0 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+             IF ( mode == 'xy' )  grid = 'zu'
+
+          CASE ( 'PM10' )
+             IF ( av == 0 )  THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         temp_bin = 0.0_wp
+                         DO  ib = 1, nbins_aerosol
+                            IF ( 2.0_wp * ra_dry(k,j,i,ib) <= 10.0E-6_wp )  THEN
+                               DO  ic = ib, nbins_aerosol * ncc, nbins_aerosol
+                                  temp_bin = temp_bin + aerosol_mass(ic)%conc(k,j,i)
+                               ENDDO
+                            ENDIF
+                         ENDDO
+                         local_pf(i,j,k) = MERGE( temp_bin,  REAL( fill_value, KIND = wp ),        &
+                                                  BTEST( wall_flags_0(k,j,i), 0 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ELSE
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         local_pf(i,j,k) = MERGE( pm10_av(k,j,i), REAL( fill_value, KIND = wp ),   &
+                                                  BTEST( wall_flags_0(k,j,i), 0 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+             IF ( mode == 'xy' )  grid = 'zu'
+
+          CASE ( 's_BC', 's_DU', 's_NH', 's_NO', 's_OC', 's_SO4', 's_SS' )
+             vari = TRIM( variable( 9:LEN( TRIM( variable ) ) - 3 ) )  ! 9: remove salsa_s_
+             IF ( is_used( prtcl, vari ) )  THEN
+                found_index = get_index( prtcl, vari )
+                IF ( av == 0 )  THEN
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn
+                         DO  k = nzb_do, nzt_do
+                            temp_bin = 0.0_wp
+                            DO  ic = ( found_index-1 ) * nbins_aerosol+1, found_index * nbins_aerosol
                                temp_bin = temp_bin + aerosol_mass(ic)%conc(k,j,i)
                             ENDDO
-                         ENDIF
+                            local_pf(i,j,k) = MERGE( temp_bin, REAL( fill_value, KIND = wp ),      &
+                                                     BTEST( wall_flags_0(k,j,i), 0 ) )
+                         ENDDO
                       ENDDO
-                      local_pf(i,j,k) = MERGE( temp_bin, REAL( fill_value, KIND = wp ),            &
-                                               BTEST( wall_flags_0(k,j,i), 0 ) )
                    ENDDO
-                ENDDO
-             ENDDO
-          ELSE
-             DO  i = nxl, nxr
-                DO  j = nys, nyn
-                   DO  k = nzb_do, nzt_do
-                      local_pf(i,j,k) = MERGE( pm25_av(k,j,i), REAL( fill_value, KIND = wp ),      &
-                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                ELSE
+                   IF ( vari == 'BC' )   to_be_resorted => s_bc_av
+                   IF ( vari == 'DU' )   to_be_resorted => s_du_av
+                   IF ( vari == 'NH' )   to_be_resorted => s_nh_av
+                   IF ( vari == 'NO' )   to_be_resorted => s_no_av
+                   IF ( vari == 'OC' )   to_be_resorted => s_oc_av
+                   IF ( vari == 'SO4' )  to_be_resorted => s_so4_av
+                   IF ( vari == 'SS' )   to_be_resorted => s_ss_av
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn
+                         DO  k = nzb_do, nzt_do
+                            local_pf(i,j,k) = MERGE( to_be_resorted(k,j,i), REAL( fill_value,      &
+                                                     KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) )
+                         ENDDO
+                      ENDDO
                    ENDDO
-                ENDDO
-             ENDDO
-          ENDIF
-
-          IF ( mode == 'xy' )  grid = 'zu'
-
-       CASE ( 'PM10' )
-          IF ( av == 0 )  THEN
-             DO  i = nxl, nxr
-                DO  j = nys, nyn
-                   DO  k = nzb_do, nzt_do
-                      temp_bin = 0.0_wp
-                      DO  ib = 1, nbins_aerosol
-                         IF ( 2.0_wp * ra_dry(k,j,i,ib) <= 10.0E-6_wp )  THEN
-                            DO  ic = ib, nbins_aerosol * ncc, nbins_aerosol
-                               temp_bin = temp_bin + aerosol_mass(ic)%conc(k,j,i)
-                            ENDDO
-                         ENDIF
-                      ENDDO
-                      local_pf(i,j,k) = MERGE( temp_bin,  REAL( fill_value, KIND = wp ),           &
-                                               BTEST( wall_flags_0(k,j,i), 0 ) )
-                   ENDDO
-                ENDDO
-             ENDDO
-          ELSE
-             DO  i = nxl, nxr
-                DO  j = nys, nyn
-                   DO  k = nzb_do, nzt_do
-                      local_pf(i,j,k) = MERGE( pm10_av(k,j,i), REAL( fill_value, KIND = wp ),      &
-                                               BTEST( wall_flags_0(k,j,i), 0 ) )
-                   ENDDO
-                ENDDO
-             ENDDO
-          ENDIF
-
-          IF ( mode == 'xy' )  grid = 'zu'
-
-       CASE ( 's_BC', 's_DU', 's_NH', 's_NO', 's_OC', 's_SO4', 's_SS' )
-          vari = TRIM( variable( 3:LEN( TRIM( variable ) ) - 3 ) )
-          IF ( is_used( prtcl, vari ) )  THEN
-             found_index = get_index( prtcl, vari )
+                ENDIF
+             ELSE
+                local_pf = fill_value
+             ENDIF
+
+             IF ( mode == 'xy' )  grid = 'zu'
+
+          CASE ( 's_H2O' )
+             found_index = get_index( prtcl, 'H2O' )
              IF ( av == 0 )  THEN
                 DO  i = nxl, nxr
@@ -10412,11 +10752,5 @@
                 ENDDO
              ELSE
-                IF ( vari == 'BC' )   to_be_resorted => s_bc_av
-                IF ( vari == 'DU' )   to_be_resorted => s_du_av
-                IF ( vari == 'NH' )   to_be_resorted => s_nh_av
-                IF ( vari == 'NO' )   to_be_resorted => s_no_av
-                IF ( vari == 'OC' )   to_be_resorted => s_oc_av
-                IF ( vari == 'SO4' )  to_be_resorted => s_so4_av
-                IF ( vari == 'SS' )   to_be_resorted => s_ss_av
+                to_be_resorted => s_h2o_av
                 DO  i = nxl, nxr
                    DO  j = nys, nyn
@@ -10428,44 +10762,14 @@
                 ENDDO
              ENDIF
-          ELSE
-             local_pf = fill_value
-          ENDIF
-
-          IF ( mode == 'xy' )  grid = 'zu'
-
-       CASE ( 's_H2O' )
-          found_index = get_index( prtcl, 'H2O' )
-          IF ( av == 0 )  THEN
-             DO  i = nxl, nxr
-                DO  j = nys, nyn
-                   DO  k = nzb_do, nzt_do
-                      temp_bin = 0.0_wp
-                      DO  ic = ( found_index-1 ) * nbins_aerosol+1, found_index * nbins_aerosol
-                         temp_bin = temp_bin + aerosol_mass(ic)%conc(k,j,i)
-                      ENDDO
-                      local_pf(i,j,k) = MERGE( temp_bin, REAL( fill_value, KIND = wp ),         &
-                                               BTEST( wall_flags_0(k,j,i), 0 ) )
-                   ENDDO
-                ENDDO
-             ENDDO
-          ELSE
-             to_be_resorted => s_h2o_av
-             DO  i = nxl, nxr
-                DO  j = nys, nyn
-                   DO  k = nzb_do, nzt_do
-                      local_pf(i,j,k) = MERGE( to_be_resorted(k,j,i), REAL( fill_value,         &
-                                               KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) )
-                   ENDDO
-                ENDDO
-             ENDDO
-          ENDIF
-
-          IF ( mode == 'xy' )  grid = 'zu'
-
-       CASE DEFAULT
-          found = .FALSE.
-          grid  = 'none'
-
-    END SELECT
+
+             IF ( mode == 'xy' )  grid = 'zu'
+
+          CASE DEFAULT
+             found = .FALSE.
+             grid  = 'none'
+
+       END SELECT
+
+    ENDIF
 
  END SUBROUTINE salsa_data_output_2d
@@ -10489,4 +10793,5 @@
 
     INTEGER(iwp) ::  av           !<
+    INTEGER(iwp) ::  char_to_int  !< for converting character to integer
     INTEGER(iwp) ::  found_index  !< index of a chemical compound
     INTEGER(iwp) ::  ib           !< running index: size bins
@@ -10505,5 +10810,4 @@
     REAL(wp) ::  fill_value = -9999.0_wp  !< value for the _FillValue attribute
     REAL(wp) ::  mean_d                   !< Particle diameter in micrometres
-    REAL(wp) ::  nc                       !< Particle number concentration in units 1/cm**3
     REAL(wp) ::  temp_bin                 !< temporary array for calculating output variables
 
@@ -10515,92 +10819,9 @@
     temp_bin  = 0.0_wp
 
-    SELECT CASE ( TRIM( variable ) )
-
-       CASE ( 'g_H2SO4', 'g_HNO3', 'g_NH3', 'g_OCNV',  'g_OCSV' )
-          IF ( av == 0 )  THEN
-             IF ( TRIM( variable ) == 'g_H2SO4')  found_index = 1
-             IF ( TRIM( variable ) == 'g_HNO3')   found_index = 2
-             IF ( TRIM( variable ) == 'g_NH3')    found_index = 3
-             IF ( TRIM( variable ) == 'g_OCNV')   found_index = 4
-             IF ( TRIM( variable ) == 'g_OCSV')   found_index = 5
-
-             DO  i = nxl, nxr
-                DO  j = nys, nyn
-                   DO  k = nzb_do, nzt_do
-                      local_pf(i,j,k) = MERGE( salsa_gas(found_index)%conc(k,j,i),                 &
-                                               REAL( fill_value, KIND = wp ),                      &
-                                               BTEST( wall_flags_0(k,j,i), 0 ) )
-                   ENDDO
-                ENDDO
-             ENDDO
-          ELSE
-             IF ( TRIM( variable(3:) ) == 'H2SO4' ) to_be_resorted => g_h2so4_av
-             IF ( TRIM( variable(3:) ) == 'HNO3' )  to_be_resorted => g_hno3_av
-             IF ( TRIM( variable(3:) ) == 'NH3' )   to_be_resorted => g_nh3_av
-             IF ( TRIM( variable(3:) ) == 'OCNV' )  to_be_resorted => g_ocnv_av
-             IF ( TRIM( variable(3:) ) == 'OCSV' )  to_be_resorted => g_ocsv_av
-             DO  i = nxl, nxr
-                DO  j = nys, nyn
-                   DO  k = nzb_do, nzt_do
-                      local_pf(i,j,k) = MERGE( to_be_resorted(k,j,i), REAL( fill_value,            &
-                                               KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) )
-                   ENDDO
-                ENDDO
-             ENDDO
-          ENDIF
-
-       CASE ( 'LDSA' )
-          IF ( av == 0 )  THEN
-             DO  i = nxl, nxr
-                DO  j = nys, nyn
-                   DO  k = nzb_do, nzt_do
-                      temp_bin = 0.0_wp
-                      DO  ib = 1, nbins_aerosol
-!
-!--                      Diameter in micrometres
-                         mean_d = 1.0E+6_wp * ra_dry(k,j,i,ib) * 2.0_wp
-!
-!--                      Deposition factor: alveolar
-                         df = ( 0.01555_wp / mean_d ) * ( EXP( -0.416_wp * ( LOG( mean_d ) +       &
-                                2.84_wp )**2 ) + 19.11_wp * EXP( -0.482_wp * ( LOG( mean_d ) -     &
-                                1.362_wp )**2 ) )
-!
-!--                      Number concentration in 1/cm3
-                         nc = 1.0E-6_wp * aerosol_number(ib)%conc(k,j,i)
-!
-!--                      Lung-deposited surface area LDSA (units mum2/cm3)
-                         temp_bin = temp_bin + pi * mean_d**2 * df * nc 
-                      ENDDO
-                      local_pf(i,j,k) = MERGE( temp_bin, REAL( fill_value, KIND = wp ),            &
-                                               BTEST( wall_flags_0(k,j,i), 0 ) )
-                   ENDDO
-                ENDDO
-             ENDDO
-          ELSE
-             DO  i = nxl, nxr
-                DO  j = nys, nyn
-                   DO  k = nzb_do, nzt_do
-                      local_pf(i,j,k) = MERGE( ldsa_av(k,j,i), REAL( fill_value, KIND = wp ),      &
-                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
-                   ENDDO
-                ENDDO
-             ENDDO
-          ENDIF
-
-       CASE ( 'N_bin1', 'N_bin2', 'N_bin3', 'N_bin4', 'N_bin5', 'N_bin6', 'N_bin7', 'N_bin8',      &
-              'N_bin9', 'N_bin10', 'N_bin11', 'N_bin12' )
-          IF ( TRIM( variable(6:) ) == '1' ) ib = 1
-          IF ( TRIM( variable(6:) ) == '2' ) ib = 2
-          IF ( TRIM( variable(6:) ) == '3' ) ib = 3
-          IF ( TRIM( variable(6:) ) == '4' ) ib = 4
-          IF ( TRIM( variable(6:) ) == '5' ) ib = 5
-          IF ( TRIM( variable(6:) ) == '6' ) ib = 6
-          IF ( TRIM( variable(6:) ) == '7' ) ib = 7
-          IF ( TRIM( variable(6:) ) == '8' ) ib = 8
-          IF ( TRIM( variable(6:) ) == '9' ) ib = 9
-          IF ( TRIM( variable(6:) ) == '10' ) ib = 10
-          IF ( TRIM( variable(6:) ) == '11' ) ib = 11
-          IF ( TRIM( variable(6:) ) == '12' ) ib = 12
-
+    IF ( variable(7:11) == 'N_bin' )  THEN
+       READ( variable(12:),* ) char_to_int
+       IF ( char_to_int >= 1  .AND. char_to_int <= SUM( nbin ) )  THEN
+
+          ib = char_to_int
           IF ( av == 0 )  THEN
              DO  i = nxl, nxr
@@ -10622,45 +10843,11 @@
              ENDDO
           ENDIF
-
-       CASE ( 'Ntot' )
-          IF ( av == 0 )  THEN
-             DO  i = nxl, nxr
-                DO  j = nys, nyn
-                   DO  k = nzb_do, nzt_do
-                      temp_bin = 0.0_wp
-                      DO  ib = 1, nbins_aerosol
-                         temp_bin = temp_bin + aerosol_number(ib)%conc(k,j,i)
-                      ENDDO
-                      local_pf(i,j,k) = MERGE( temp_bin, REAL( fill_value, KIND = wp ),            &
-                                               BTEST( wall_flags_0(k,j,i), 0 ) )
-                   ENDDO
-                ENDDO
-             ENDDO
-          ELSE
-             DO  i = nxl, nxr
-                DO  j = nys, nyn
-                   DO  k = nzb_do, nzt_do
-                      local_pf(i,j,k) = MERGE( ntot_av(k,j,i), REAL( fill_value, KIND = wp ),      &
-                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
-                   ENDDO
-                ENDDO
-             ENDDO
-          ENDIF
-
-       CASE ( 'm_bin1', 'm_bin2', 'm_bin3', 'm_bin4', 'm_bin5', 'm_bin6', 'm_bin7', 'm_bin8',      &
-              'm_bin9', 'm_bin10' , 'm_bin11', 'm_bin12' )
-          IF ( TRIM( variable(6:) ) == '1' ) ib = 1
-          IF ( TRIM( variable(6:) ) == '2' ) ib = 2
-          IF ( TRIM( variable(6:) ) == '3' ) ib = 3
-          IF ( TRIM( variable(6:) ) == '4' ) ib = 4
-          IF ( TRIM( variable(6:) ) == '5' ) ib = 5
-          IF ( TRIM( variable(6:) ) == '6' ) ib = 6
-          IF ( TRIM( variable(6:) ) == '7' ) ib = 7
-          IF ( TRIM( variable(6:) ) == '8' ) ib = 8
-          IF ( TRIM( variable(6:) ) == '9' ) ib = 9
-          IF ( TRIM( variable(6:) ) == '10' ) ib = 10
-          IF ( TRIM( variable(6:) ) == '11' ) ib = 11
-          IF ( TRIM( variable(6:) ) == '12' ) ib = 12
-
+       ENDIF
+
+    ELSEIF ( variable(7:11) == 'm_bin' )  THEN
+       READ( variable(12:),* ) char_to_int
+       IF ( char_to_int >= 1  .AND. char_to_int <= SUM( nbin ) )  THEN
+
+          ib = char_to_int
           IF ( av == 0 )  THEN
              DO  i = nxl, nxr
@@ -10686,66 +10873,258 @@
              ENDDO
           ENDIF
-
-       CASE ( 'PM2.5' )
-          IF ( av == 0 )  THEN
-             DO  i = nxl, nxr
-                DO  j = nys, nyn
-                   DO  k = nzb_do, nzt_do
-                      temp_bin = 0.0_wp
-                      DO  ib = 1, nbins_aerosol
-                         IF ( 2.0_wp * ra_dry(k,j,i,ib) <= 2.5E-6_wp )  THEN
-                            DO  ic = ib, nbins_aerosol * ncc, nbins_aerosol
+       ENDIF
+
+    ELSE
+       SELECT CASE ( TRIM( variable(7:) ) )
+
+          CASE ( 'g_H2SO4', 'g_HNO3', 'g_NH3', 'g_OCNV',  'g_OCSV' )
+             IF ( av == 0 )  THEN
+                IF ( TRIM( variable(7:) ) == 'g_H2SO4')  found_index = 1
+                IF ( TRIM( variable(7:) ) == 'g_HNO3')   found_index = 2
+                IF ( TRIM( variable(7:) ) == 'g_NH3')    found_index = 3
+                IF ( TRIM( variable(7:) ) == 'g_OCNV')   found_index = 4
+                IF ( TRIM( variable(7:) ) == 'g_OCSV')   found_index = 5
+
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         local_pf(i,j,k) = MERGE( salsa_gas(found_index)%conc(k,j,i),              &
+                                                  REAL( fill_value, KIND = wp ),                   &
+                                                  BTEST( wall_flags_0(k,j,i), 0 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ELSE
+!
+!--             9: remove salsa_g_ from the beginning
+                IF ( TRIM( variable(9:) ) == 'H2SO4' ) to_be_resorted => g_h2so4_av
+                IF ( TRIM( variable(9:) ) == 'HNO3' )  to_be_resorted => g_hno3_av
+                IF ( TRIM( variable(9:) ) == 'NH3' )   to_be_resorted => g_nh3_av
+                IF ( TRIM( variable(9:) ) == 'OCNV' )  to_be_resorted => g_ocnv_av
+                IF ( TRIM( variable(9:) ) == 'OCSV' )  to_be_resorted => g_ocsv_av
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         local_pf(i,j,k) = MERGE( to_be_resorted(k,j,i), REAL( fill_value,         &
+                                                  KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'LDSA' )
+             IF ( av == 0 )  THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         temp_bin = 0.0_wp
+                         DO  ib = 1, nbins_aerosol
+   !
+   !--                      Diameter in micrometres
+                            mean_d = 1.0E+6_wp * ra_dry(k,j,i,ib) * 2.0_wp
+   !
+   !--                      Deposition factor: alveolar
+                            df = ( 0.01555_wp / mean_d ) * ( EXP( -0.416_wp * ( LOG( mean_d ) +    &
+                                   2.84_wp )**2 ) + 19.11_wp * EXP( -0.482_wp * ( LOG( mean_d ) -  &
+                                   1.362_wp )**2 ) )
+   !
+   !--                      Lung-deposited surface area LDSA (units mum2/cm3)
+                            temp_bin = temp_bin + pi * mean_d**2 * df * 1.0E-6_wp *                &
+                                       aerosol_number(ib)%conc(k,j,i)
+                         ENDDO
+                         local_pf(i,j,k) = MERGE( temp_bin, REAL( fill_value, KIND = wp ),         &
+                                                  BTEST( wall_flags_0(k,j,i), 0 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ELSE
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         local_pf(i,j,k) = MERGE( ldsa_av(k,j,i), REAL( fill_value, KIND = wp ),   &
+                                                  BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'N_UFP' )
+             IF ( av == 0 )  THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         temp_bin = 0.0_wp
+                         DO  ib = 1, nbins_aerosol
+                            IF ( 2.0_wp * ra_dry(k,j,i,ib) <= 0.1E-6_wp )  THEN
+                               temp_bin = temp_bin + aerosol_number(ib)%conc(k,j,i)
+                            ENDIF
+                         ENDDO
+                         local_pf(i,j,k) = MERGE( temp_bin, REAL( fill_value, KIND = wp ),         &
+                                                  BTEST( wall_flags_0(k,j,i), 0 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ELSE
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         local_pf(i,j,k) = MERGE( nufp_av(k,j,i), REAL( fill_value, KIND = wp ),   &
+                                                  BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'Ntot' )
+             IF ( av == 0 )  THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         temp_bin = 0.0_wp
+                         DO  ib = 1, nbins_aerosol
+                            temp_bin = temp_bin + aerosol_number(ib)%conc(k,j,i)
+                         ENDDO
+                         local_pf(i,j,k) = MERGE( temp_bin, REAL( fill_value, KIND = wp ),         &
+                                                  BTEST( wall_flags_0(k,j,i), 0 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ELSE
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         local_pf(i,j,k) = MERGE( ntot_av(k,j,i), REAL( fill_value, KIND = wp ),   &
+                                                  BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'PM0.1' )
+             IF ( av == 0 )  THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         temp_bin = 0.0_wp
+                         DO  ib = 1, nbins_aerosol
+                            IF ( 2.0_wp * ra_dry(k,j,i,ib) <= 0.1E-6_wp )  THEN
+                               DO  ic = ib, nbins_aerosol * ncc, nbins_aerosol
+                                  temp_bin = temp_bin + aerosol_mass(ic)%conc(k,j,i)
+                               ENDDO
+                            ENDIF
+                         ENDDO
+                         local_pf(i,j,k) = MERGE( temp_bin, REAL( fill_value, KIND = wp ),         &
+                                                  BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ELSE
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         local_pf(i,j,k) = MERGE( pm01_av(k,j,i), REAL( fill_value, KIND = wp ),   &
+                                                  BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'PM2.5' )
+             IF ( av == 0 )  THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         temp_bin = 0.0_wp
+                         DO  ib = 1, nbins_aerosol
+                            IF ( 2.0_wp * ra_dry(k,j,i,ib) <= 2.5E-6_wp )  THEN
+                               DO  ic = ib, nbins_aerosol * ncc, nbins_aerosol
+                                  temp_bin = temp_bin + aerosol_mass(ic)%conc(k,j,i)
+                               ENDDO
+                            ENDIF
+                         ENDDO
+                         local_pf(i,j,k) = MERGE( temp_bin, REAL( fill_value, KIND = wp ),         &
+                                                  BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ELSE
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         local_pf(i,j,k) = MERGE( pm25_av(k,j,i), REAL( fill_value, KIND = wp ),   &
+                                                  BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'PM10' )
+             IF ( av == 0 )  THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         temp_bin = 0.0_wp
+                         DO  ib = 1, nbins_aerosol
+                            IF ( 2.0_wp * ra_dry(k,j,i,ib) <= 10.0E-6_wp )  THEN
+                               DO  ic = ib, nbins_aerosol * ncc, nbins_aerosol
+                                  temp_bin = temp_bin + aerosol_mass(ic)%conc(k,j,i)
+                               ENDDO
+                            ENDIF
+                         ENDDO
+                         local_pf(i,j,k) = MERGE( temp_bin, REAL( fill_value, KIND = wp ),         &
+                                                  BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ELSE
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         local_pf(i,j,k) = MERGE( pm10_av(k,j,i), REAL( fill_value, KIND = wp ),   &
+                                                  BTEST( wall_flags_0(k,j,i), 0 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 's_BC', 's_DU', 's_NH', 's_NO', 's_OC', 's_SO4', 's_SS' )
+             IF ( is_used( prtcl, TRIM( variable(9:) ) ) )  THEN  ! 9: remove salsa_s_
+                found_index = get_index( prtcl, TRIM( variable(9:) ) )
+                IF ( av == 0 )  THEN
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn
+                         DO  k = nzb_do, nzt_do
+                            temp_bin = 0.0_wp
+                            DO  ic = ( found_index-1 ) * nbins_aerosol + 1, found_index * nbins_aerosol
                                temp_bin = temp_bin + aerosol_mass(ic)%conc(k,j,i)
                             ENDDO
-                         ENDIF
+                            local_pf(i,j,k) = MERGE( temp_bin, REAL( fill_value, KIND = wp ),      &
+                                                     BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                         ENDDO
                       ENDDO
-                      local_pf(i,j,k) = MERGE( temp_bin, REAL( fill_value, KIND = wp ),            &
-                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
                    ENDDO
-                ENDDO
-             ENDDO
-          ELSE
-             DO  i = nxl, nxr
-                DO  j = nys, nyn
-                   DO  k = nzb_do, nzt_do
-                      local_pf(i,j,k) = MERGE( pm25_av(k,j,i), REAL( fill_value, KIND = wp ),      &
-                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ELSE
+!
+!--                9: remove salsa_s_ from the beginning
+                   IF ( TRIM( variable(9:) ) == 'BC' )   to_be_resorted => s_bc_av
+                   IF ( TRIM( variable(9:) ) == 'DU' )   to_be_resorted => s_du_av
+                   IF ( TRIM( variable(9:) ) == 'NH' )   to_be_resorted => s_nh_av
+                   IF ( TRIM( variable(9:) ) == 'NO' )   to_be_resorted => s_no_av
+                   IF ( TRIM( variable(9:) ) == 'OC' )   to_be_resorted => s_oc_av
+                   IF ( TRIM( variable(9:) ) == 'SO4' )  to_be_resorted => s_so4_av
+                   IF ( TRIM( variable(9:) ) == 'SS' )   to_be_resorted => s_ss_av
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn
+                         DO  k = nzb_do, nzt_do
+                            local_pf(i,j,k) = MERGE( to_be_resorted(k,j,i), REAL( fill_value,      &
+                                                     KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) )
+                         ENDDO
+                      ENDDO
                    ENDDO
-                ENDDO
-             ENDDO
-          ENDIF
-
-       CASE ( 'PM10' )
-          IF ( av == 0 )  THEN
-             DO  i = nxl, nxr
-                DO  j = nys, nyn
-                   DO  k = nzb_do, nzt_do
-                      temp_bin = 0.0_wp
-                      DO  ib = 1, nbins_aerosol
-                         IF ( 2.0_wp * ra_dry(k,j,i,ib) <= 10.0E-6_wp )  THEN
-                            DO  ic = ib, nbins_aerosol * ncc, nbins_aerosol
-                               temp_bin = temp_bin + aerosol_mass(ic)%conc(k,j,i)
-                            ENDDO
-                         ENDIF
-                      ENDDO
-                      local_pf(i,j,k) = MERGE( temp_bin, REAL( fill_value, KIND = wp ),            &
-                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
-                   ENDDO
-                ENDDO
-             ENDDO
-          ELSE
-             DO  i = nxl, nxr
-                DO  j = nys, nyn
-                   DO  k = nzb_do, nzt_do
-                      local_pf(i,j,k) = MERGE( pm10_av(k,j,i), REAL( fill_value, KIND = wp ),      &
-                                               BTEST( wall_flags_0(k,j,i), 0 ) )
-                   ENDDO
-                ENDDO
-             ENDDO
-          ENDIF
-
-       CASE ( 's_BC', 's_DU', 's_NH', 's_NO', 's_OC', 's_SO4', 's_SS' )
-          IF ( is_used( prtcl, TRIM( variable(3:) ) ) )  THEN
-             found_index = get_index( prtcl, TRIM( variable(3:) ) )
+                ENDIF
+             ENDIF
+
+          CASE ( 's_H2O' )
+             found_index = get_index( prtcl, 'H2O' )
              IF ( av == 0 )  THEN
                 DO  i = nxl, nxr
@@ -10762,11 +11141,5 @@
                 ENDDO
              ELSE
-                IF ( TRIM( variable(3:) ) == 'BC' )   to_be_resorted => s_bc_av
-                IF ( TRIM( variable(3:) ) == 'DU' )   to_be_resorted => s_du_av
-                IF ( TRIM( variable(3:) ) == 'NH' )   to_be_resorted => s_nh_av
-                IF ( TRIM( variable(3:) ) == 'NO' )   to_be_resorted => s_no_av
-                IF ( TRIM( variable(3:) ) == 'OC' )   to_be_resorted => s_oc_av
-                IF ( TRIM( variable(3:) ) == 'SO4' )  to_be_resorted => s_so4_av
-                IF ( TRIM( variable(3:) ) == 'SS' )   to_be_resorted => s_ss_av
+                to_be_resorted => s_h2o_av
                 DO  i = nxl, nxr
                    DO  j = nys, nyn
@@ -10778,37 +11151,10 @@
                 ENDDO
              ENDIF
-          ENDIF
-
-       CASE ( 's_H2O' )
-          found_index = get_index( prtcl, 'H2O' )
-          IF ( av == 0 )  THEN
-             DO  i = nxl, nxr
-                DO  j = nys, nyn
-                   DO  k = nzb_do, nzt_do
-                      temp_bin = 0.0_wp
-                      DO  ic = ( found_index-1 ) * nbins_aerosol + 1, found_index * nbins_aerosol
-                         temp_bin = temp_bin + aerosol_mass(ic)%conc(k,j,i)
-                      ENDDO
-                      local_pf(i,j,k) = MERGE( temp_bin, REAL( fill_value, KIND = wp ),            &
-                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
-                   ENDDO
-                ENDDO
-             ENDDO
-          ELSE
-             to_be_resorted => s_h2o_av
-             DO  i = nxl, nxr
-                DO  j = nys, nyn
-                   DO  k = nzb_do, nzt_do
-                      local_pf(i,j,k) = MERGE( to_be_resorted(k,j,i), REAL( fill_value,            &
-                                               KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) )
-                   ENDDO
-                ENDDO
-             ENDDO
-          ENDIF
-
-       CASE DEFAULT
-          found = .FALSE.
-
-    END SELECT
+
+          CASE DEFAULT
+             found = .FALSE.
+
+       END SELECT
+    ENDIF
 
  END SUBROUTINE salsa_data_output_3d
@@ -10837,117 +11183,39 @@
     CHARACTER(LEN=7) ::  vari      !< trimmed format of variable
 
-    INTEGER(iwp) ::  av              !<
-    INTEGER(iwp) ::  found_index     !< index of a chemical compound
-    INTEGER(iwp) ::  ib              !< loop index for aerosol size number bins
-    INTEGER(iwp) ::  ic              !< loop index for chemical components
-    INTEGER(iwp) ::  i               !< loop index in x-direction
-    INTEGER(iwp) ::  j               !< loop index in y-direction
-    INTEGER(iwp) ::  k               !< loop index in z-direction
+    INTEGER(iwp) ::  av             !<
+    INTEGER(iwp) ::  char_to_int    !< for converting character to integer
+    INTEGER(iwp) ::  found_index    !< index of a chemical compound
+    INTEGER(iwp) ::  ib             !< loop index for aerosol size number bins
+    INTEGER(iwp) ::  ic             !< loop index for chemical components
+    INTEGER(iwp) ::  i              !< loop index in x-direction
+    INTEGER(iwp) ::  j              !< loop index in y-direction
+    INTEGER(iwp) ::  k              !< loop index in z-direction
     INTEGER(iwp) ::  mid            !< masked output running index
-    INTEGER(iwp) ::  topo_top_ind    !< k index of highest horizontal surface
+    INTEGER(iwp) ::  topo_top_ind   !< k index of highest horizontal surface
 
     LOGICAL ::  found      !<
     LOGICAL ::  resorted   !<
 
-    REAL(wp) ::  df        !< For calculating LDSA: fraction of particles 
-                           !< depositing in the alveolar (or tracheobronchial)
-                           !< region of the lung. Depends on the particle size 
+    REAL(wp) ::  df        !< For calculating LDSA: fraction of particles depositing in the alveolar
+                           !< (or tracheobronchial) region of the lung. Depends on the particle size
     REAL(wp) ::  mean_d    !< Particle diameter in micrometres
-    REAL(wp) ::  nc        !< Particle number concentration in units 1/cm**3
     REAL(wp) ::  temp_bin  !< temporary array for calculating output variables
 
     REAL(wp), DIMENSION(mask_size_l(mid,1),mask_size_l(mid,2),mask_size_l(mid,3)) ::  local_pf   !<
 
+    REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg), TARGET ::  temp_array  !< temporary array
+
     REAL(wp), DIMENSION(:,:,:), POINTER ::  to_be_resorted  !< pointer
 
-    found     = .TRUE.
-    resorted  = .FALSE.
-    grid      = 's'
-    temp_bin  = 0.0_wp
-
-    SELECT CASE ( TRIM( variable ) )
-
-       CASE ( 'g_H2SO4', 'g_HNO3', 'g_NH3', 'g_OCNV',  'g_OCSV' )
-          vari = TRIM( variable )
-          IF ( av == 0 )  THEN
-             IF ( vari == 'g_H2SO4')  to_be_resorted => salsa_gas(1)%conc
-             IF ( vari == 'g_HNO3')   to_be_resorted => salsa_gas(2)%conc
-             IF ( vari == 'g_NH3')    to_be_resorted => salsa_gas(3)%conc
-             IF ( vari == 'g_OCNV')   to_be_resorted => salsa_gas(4)%conc
-             IF ( vari == 'g_OCSV')   to_be_resorted => salsa_gas(5)%conc
-          ELSE
-             IF ( vari == 'g_H2SO4') to_be_resorted => g_h2so4_av
-             IF ( vari == 'g_HNO3')  to_be_resorted => g_hno3_av
-             IF ( vari == 'g_NH3')   to_be_resorted => g_nh3_av
-             IF ( vari == 'g_OCNV')  to_be_resorted => g_ocnv_av
-             IF ( vari == 'g_OCSV')  to_be_resorted => g_ocsv_av
-          ENDIF
-
-       CASE ( 'LDSA' )
-          IF ( av == 0 )  THEN
-             DO  i = nxl, nxr
-                DO  j = nys, nyn
-                   DO  k = nzb, nz_do3d
-                      temp_bin = 0.0_wp
-                      DO  ib = 1, nbins_aerosol
-!
-!--                      Diameter in micrometres
-                         mean_d = 1.0E+6_wp * ra_dry(k,j,i,ib) * 2.0_wp
-!
-!--                      Deposition factor: alveolar
-                         df = ( 0.01555_wp / mean_d ) * ( EXP( -0.416_wp * ( LOG( mean_d ) +       &
-                                2.84_wp )**2 ) + 19.11_wp * EXP( -0.482_wp * ( LOG( mean_d ) -     &
-                                1.362_wp )**2 ) )
-!
-!--                      Number concentration in 1/cm3
-                         nc = 1.0E-6_wp * aerosol_number(ib)%conc(k,j,i)
-!
-!--                      Lung-deposited surface area LDSA (units mum2/cm3)
-                         temp_bin = temp_bin + pi * mean_d**2 * df * nc
-                      ENDDO
-                      tend(k,j,i) = temp_bin
-                   ENDDO
-                ENDDO
-             ENDDO
-             IF ( .NOT. mask_surface(mid) )  THEN   
-                DO  i = 1, mask_size_l(mid,1)
-                   DO  j = 1, mask_size_l(mid,2)
-                      DO  k = 1, mask_size_l(mid,3)
-                         local_pf(i,j,k) = tend( mask_k(mid,k),  mask_j(mid,j), mask_i(mid,i) )
-                      ENDDO
-                   ENDDO
-                ENDDO
-             ELSE 
-                DO  i = 1, mask_size_l(mid,1)
-                   DO  j = 1, mask_size_l(mid,2)
-                      topo_top_ind = get_topography_top_index_ji( mask_j(mid,j), mask_i(mid,i),    &
-                                                                  grid )
-                      DO  k = 1, mask_size_l(mid,3)
-                         local_pf(i,j,k) = tend( MIN( topo_top_ind+mask_k(mid,k), nzt+1 ),         &
-                                                 mask_j(mid,j), mask_i(mid,i) )
-                      ENDDO
-                   ENDDO
-                ENDDO
-             ENDIF
-             resorted = .TRUE.
-          ELSE
-             to_be_resorted => ldsa_av
-          ENDIF
-
-       CASE ( 'N_bin1', 'N_bin2', 'N_bin3', 'N_bin4',   'N_bin5',  'N_bin6', 'N_bin7', 'N_bin8',   &
-              'N_bin9', 'N_bin10' , 'N_bin11', 'N_bin12' )
-          IF ( TRIM( variable(6:) ) == '1' ) ib = 1
-          IF ( TRIM( variable(6:) ) == '2' ) ib = 2
-          IF ( TRIM( variable(6:) ) == '3' ) ib = 3
-          IF ( TRIM( variable(6:) ) == '4' ) ib = 4
-          IF ( TRIM( variable(6:) ) == '5' ) ib = 5
-          IF ( TRIM( variable(6:) ) == '6' ) ib = 6
-          IF ( TRIM( variable(6:) ) == '7' ) ib = 7
-          IF ( TRIM( variable(6:) ) == '8' ) ib = 8
-          IF ( TRIM( variable(6:) ) == '9' ) ib = 9
-          IF ( TRIM( variable(6:) ) == '10' ) ib = 10
-          IF ( TRIM( variable(6:) ) == '11' ) ib = 11
-          IF ( TRIM( variable(6:) ) == '12' ) ib = 12
-
+    found      = .TRUE.
+    resorted   = .FALSE.
+    grid       = 's'
+    temp_array = 0.0_wp
+    temp_bin   = 0.0_wp
+
+    IF ( variable(7:11) == 'N_bin' )  THEN
+       READ( variable(12:),* ) char_to_int
+       IF ( char_to_int >= 1  .AND. char_to_int <= SUM( nbin ) )  THEN
+          ib = char_to_int
           IF ( av == 0 )  THEN
              IF ( .NOT. mask_surface(mid) )  THEN
@@ -10975,60 +11243,15 @@
              resorted = .TRUE.
           ELSE
-             to_be_resorted => nbins_av(:,:,:,ib)
+             temp_array = nbins_av(:,:,:,ib)
+             to_be_resorted => temp_array
           ENDIF
-
-       CASE ( 'Ntot' )
-          IF ( av == 0 )  THEN
-             DO  i = nxl, nxr
-                DO  j = nys, nyn
-                   DO  k = nzb, nz_do3d
-                      temp_bin = 0.0_wp
-                      DO  ib = 1, nbins_aerosol
-                         temp_bin = temp_bin + aerosol_number(ib)%conc(k,j,i)
-                      ENDDO
-                      tend(k,j,i) = temp_bin
-                   ENDDO
-                ENDDO
-             ENDDO 
-             IF ( .NOT. mask_surface(mid) )  THEN   
-                DO  i = 1, mask_size_l(mid,1)
-                   DO  j = 1, mask_size_l(mid,2)
-                      DO  k = 1, mask_size_l(mid,3)
-                         local_pf(i,j,k) = tend( mask_k(mid,k),  mask_j(mid,j), mask_i(mid,i) )
-                      ENDDO
-                   ENDDO
-                ENDDO
-             ELSE 
-                DO  i = 1, mask_size_l(mid,1)
-                   DO  j = 1, mask_size_l(mid,2)
-                      topo_top_ind = get_topography_top_index_ji( mask_j(mid,j), mask_i(mid,i),    &
-                                                                  grid )
-                      DO  k = 1, mask_size_l(mid,3)
-                         local_pf(i,j,k) = tend( MIN( topo_top_ind+mask_k(mid,k), nzt+1 ),         &
-                                                 mask_j(mid,j), mask_i(mid,i) )
-                      ENDDO
-                   ENDDO
-                ENDDO
-             ENDIF
-             resorted = .TRUE.
-          ELSE
-             to_be_resorted => ntot_av
-          ENDIF
-
-       CASE ( 'm_bin1', 'm_bin2', 'm_bin3', 'm_bin4', 'm_bin5', 'm_bin6', 'm_bin7', 'm_bin8',      &
-              'm_bin9', 'm_bin10', 'm_bin11', 'm_bin12' )
-          IF ( TRIM( variable(6:) ) == '1' ) ib = 1
-          IF ( TRIM( variable(6:) ) == '2' ) ib = 2
-          IF ( TRIM( variable(6:) ) == '3' ) ib = 3
-          IF ( TRIM( variable(6:) ) == '4' ) ib = 4
-          IF ( TRIM( variable(6:) ) == '5' ) ib = 5
-          IF ( TRIM( variable(6:) ) == '6' ) ib = 6
-          IF ( TRIM( variable(6:) ) == '7' ) ib = 7
-          IF ( TRIM( variable(6:) ) == '8' ) ib = 8
-          IF ( TRIM( variable(6:) ) == '9' ) ib = 9
-          IF ( TRIM( variable(6:) ) == '10' ) ib = 10
-          IF ( TRIM( variable(6:) ) == '11' ) ib = 11
-          IF ( TRIM( variable(6:) ) == '12' ) ib = 12
-
+       ENDIF
+
+    ELSEIF ( variable(7:11) == 'm_bin' )  THEN
+
+       READ( variable(12:),* ) char_to_int
+       IF ( char_to_int >= 1  .AND. char_to_int <= SUM( nbin ) )  THEN
+
+          ib = char_to_int
           IF ( av == 0 )  THEN
              DO  i = nxl, nxr
@@ -11065,95 +11288,335 @@
              resorted = .TRUE.
           ELSE
-             to_be_resorted => mbins_av(:,:,:,ib)
+             temp_array = mbins_av(:,:,:,ib)
+             to_be_resorted => temp_array
           ENDIF
-
-       CASE ( 'PM2.5' )
-          IF ( av == 0 )  THEN
-             DO  i = nxl, nxr
-                DO  j = nys, nyn
-                   DO  k = nzb, nz_do3d
-                      temp_bin = 0.0_wp
-                      DO  ib = 1, nbins_aerosol
-                         IF ( 2.0_wp * ra_dry(k,j,i,ib) <= 2.5E-6_wp )  THEN
-                            DO  ic = ib, nbins_aerosol * ncc, nbins_aerosol
-                               temp_bin = temp_bin + aerosol_mass(ic)%conc(k,j,i)
-                            ENDDO
-                         ENDIF
-                      ENDDO
-                      tend(k,j,i) = temp_bin
-                   ENDDO
-                ENDDO
-             ENDDO 
-             IF ( .NOT. mask_surface(mid) )  THEN
-                DO  i = 1, mask_size_l(mid,1)
-                   DO  j = 1, mask_size_l(mid,2)
-                      DO  k = 1, mask_size_l(mid,3)
-                         local_pf(i,j,k) = tend( mask_k(mid,k),  mask_j(mid,j), mask_i(mid,i) )
+       ENDIF
+
+    ELSE
+       SELECT CASE ( TRIM( variable(7:) ) )
+
+          CASE ( 'g_H2SO4', 'g_HNO3', 'g_NH3', 'g_OCNV',  'g_OCSV' )
+             vari = TRIM( variable(7:) )
+             IF ( av == 0 )  THEN
+                IF ( vari == 'g_H2SO4')  to_be_resorted => salsa_gas(1)%conc
+                IF ( vari == 'g_HNO3')   to_be_resorted => salsa_gas(2)%conc
+                IF ( vari == 'g_NH3')    to_be_resorted => salsa_gas(3)%conc
+                IF ( vari == 'g_OCNV')   to_be_resorted => salsa_gas(4)%conc
+                IF ( vari == 'g_OCSV')   to_be_resorted => salsa_gas(5)%conc
+             ELSE
+                IF ( vari == 'g_H2SO4') to_be_resorted => g_h2so4_av
+                IF ( vari == 'g_HNO3')  to_be_resorted => g_hno3_av
+                IF ( vari == 'g_NH3')   to_be_resorted => g_nh3_av
+                IF ( vari == 'g_OCNV')  to_be_resorted => g_ocnv_av
+                IF ( vari == 'g_OCSV')  to_be_resorted => g_ocsv_av
+             ENDIF
+
+          CASE ( 'LDSA' )
+             IF ( av == 0 )  THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb, nz_do3d
+                         temp_bin = 0.0_wp
+                         DO  ib = 1, nbins_aerosol
+   !
+   !--                      Diameter in micrometres
+                            mean_d = 1.0E+6_wp * ra_dry(k,j,i,ib) * 2.0_wp
+   !
+   !--                      Deposition factor: alveolar
+                            df = ( 0.01555_wp / mean_d ) * ( EXP( -0.416_wp * ( LOG( mean_d ) +    &
+                                   2.84_wp )**2 ) + 19.11_wp * EXP( -0.482_wp * ( LOG( mean_d ) -  &
+                                   1.362_wp )**2 ) )
+   !
+   !--                      Lung-deposited surface area LDSA (units mum2/cm3)
+                            temp_bin = temp_bin + pi * mean_d**2 * df * 1.0E-6_wp *                &
+                                       aerosol_number(ib)%conc(k,j,i)
+                         ENDDO
+                         tend(k,j,i) = temp_bin
                       ENDDO
                    ENDDO
                 ENDDO
-             ELSE 
-                DO  i = 1, mask_size_l(mid,1)
-                   DO  j = 1, mask_size_l(mid,2)
-                      topo_top_ind = get_topography_top_index_ji( mask_j(mid,j), mask_i(mid,i),    &
-                                                                  grid )
-                      DO  k = 1, mask_size_l(mid,3)
-                         local_pf(i,j,k) = tend( MIN( topo_top_ind+mask_k(mid,k), nzt+1 ),         &
-                                                 mask_j(mid,j), mask_i(mid,i) )
+                IF ( .NOT. mask_surface(mid) )  THEN
+                   DO  i = 1, mask_size_l(mid,1)
+                      DO  j = 1, mask_size_l(mid,2)
+                         DO  k = 1, mask_size_l(mid,3)
+                            local_pf(i,j,k) = tend( mask_k(mid,k),  mask_j(mid,j), mask_i(mid,i) )
+                         ENDDO
                       ENDDO
                    ENDDO
-                ENDDO
+                ELSE 
+                   DO  i = 1, mask_size_l(mid,1)
+                      DO  j = 1, mask_size_l(mid,2)
+                         topo_top_ind = get_topography_top_index_ji( mask_j(mid,j), mask_i(mid,i), &
+                                                                     grid )
+                         DO  k = 1, mask_size_l(mid,3)
+                            local_pf(i,j,k) = tend( MIN( topo_top_ind+mask_k(mid,k), nzt+1 ),      &
+                                                    mask_j(mid,j), mask_i(mid,i) )
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ENDIF
+                resorted = .TRUE.
+             ELSE
+                to_be_resorted => ldsa_av
              ENDIF
-             resorted = .TRUE.
-          ELSE
-             to_be_resorted => pm25_av
-          ENDIF
-
-       CASE ( 'PM10' )
-          IF ( av == 0 )  THEN
-             DO  i = nxl, nxr
-                DO  j = nys, nyn
-                   DO  k = nzb, nz_do3d
-                      temp_bin = 0.0_wp
-                      DO  ib = 1, nbins_aerosol
-                         IF ( 2.0_wp * ra_dry(k,j,i,ib) <= 10.0E-6_wp )  THEN
-                            DO  ic = ib, nbins_aerosol * ncc, nbins_aerosol
+
+          CASE ( 'N_UFP' )
+             IF ( av == 0 )  THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb, nz_do3d
+                         temp_bin = 0.0_wp
+                         DO  ib = 1, nbins_aerosol
+                            IF ( 2.0_wp * ra_dry(k,j,i,ib) <= 0.1E-6_wp )  THEN
+                               temp_bin = temp_bin + aerosol_number(ib)%conc(k,j,i)
+                            ENDIF
+                         ENDDO
+                         tend(k,j,i) = temp_bin
+                      ENDDO
+                   ENDDO
+                ENDDO 
+                IF ( .NOT. mask_surface(mid) )  THEN
+                   DO  i = 1, mask_size_l(mid,1)
+                      DO  j = 1, mask_size_l(mid,2)
+                         DO  k = 1, mask_size_l(mid,3)
+                            local_pf(i,j,k) = tend( mask_k(mid,k),  mask_j(mid,j), mask_i(mid,i) )
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ELSE 
+                   DO  i = 1, mask_size_l(mid,1)
+                      DO  j = 1, mask_size_l(mid,2)
+                         topo_top_ind = get_topography_top_index_ji( mask_j(mid,j), mask_i(mid,i), &
+                                                                     grid )
+                         DO  k = 1, mask_size_l(mid,3)
+                            local_pf(i,j,k) = tend( MIN( topo_top_ind+mask_k(mid,k), nzt+1 ),      &
+                                                    mask_j(mid,j), mask_i(mid,i) )
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ENDIF
+                resorted = .TRUE.
+             ELSE
+                to_be_resorted => nufp_av
+             ENDIF
+
+          CASE ( 'Ntot' )
+             IF ( av == 0 )  THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb, nz_do3d
+                         temp_bin = 0.0_wp
+                         DO  ib = 1, nbins_aerosol
+                            temp_bin = temp_bin + aerosol_number(ib)%conc(k,j,i)
+                         ENDDO
+                         tend(k,j,i) = temp_bin
+                      ENDDO
+                   ENDDO
+                ENDDO 
+                IF ( .NOT. mask_surface(mid) )  THEN
+                   DO  i = 1, mask_size_l(mid,1)
+                      DO  j = 1, mask_size_l(mid,2)
+                         DO  k = 1, mask_size_l(mid,3)
+                            local_pf(i,j,k) = tend( mask_k(mid,k),  mask_j(mid,j), mask_i(mid,i) )
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ELSE 
+                   DO  i = 1, mask_size_l(mid,1)
+                      DO  j = 1, mask_size_l(mid,2)
+                         topo_top_ind = get_topography_top_index_ji( mask_j(mid,j), mask_i(mid,i), &
+                                                                     grid )
+                         DO  k = 1, mask_size_l(mid,3)
+                            local_pf(i,j,k) = tend( MIN( topo_top_ind+mask_k(mid,k), nzt+1 ),      &
+                                                    mask_j(mid,j), mask_i(mid,i) )
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ENDIF
+                resorted = .TRUE.
+             ELSE
+                to_be_resorted => ntot_av
+             ENDIF
+
+          CASE ( 'PM0.1' )
+             IF ( av == 0 )  THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb, nz_do3d
+                         temp_bin = 0.0_wp
+                         DO  ib = 1, nbins_aerosol
+                            IF ( 2.0_wp * ra_dry(k,j,i,ib) <= 0.1E-6_wp )  THEN
+                               DO  ic = ib, nbins_aerosol * ncc, nbins_aerosol
+                                  temp_bin = temp_bin + aerosol_mass(ic)%conc(k,j,i)
+                               ENDDO
+                            ENDIF
+                         ENDDO
+                         tend(k,j,i) = temp_bin
+                      ENDDO
+                   ENDDO
+                ENDDO 
+                IF ( .NOT. mask_surface(mid) )  THEN
+                   DO  i = 1, mask_size_l(mid,1)
+                      DO  j = 1, mask_size_l(mid,2)
+                         DO  k = 1, mask_size_l(mid,3)
+                            local_pf(i,j,k) = tend( mask_k(mid,k),  mask_j(mid,j), mask_i(mid,i) )
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ELSE 
+                   DO  i = 1, mask_size_l(mid,1)
+                      DO  j = 1, mask_size_l(mid,2)
+                         topo_top_ind = get_topography_top_index_ji( mask_j(mid,j), mask_i(mid,i), &
+                                                                     grid )
+                         DO  k = 1, mask_size_l(mid,3)
+                            local_pf(i,j,k) = tend( MIN( topo_top_ind+mask_k(mid,k), nzt+1 ),      &
+                                                    mask_j(mid,j), mask_i(mid,i) )
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ENDIF
+                resorted = .TRUE.
+             ELSE
+                to_be_resorted => pm01_av
+             ENDIF
+
+          CASE ( 'PM2.5' )
+             IF ( av == 0 )  THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb, nz_do3d
+                         temp_bin = 0.0_wp
+                         DO  ib = 1, nbins_aerosol
+                            IF ( 2.0_wp * ra_dry(k,j,i,ib) <= 2.5E-6_wp )  THEN
+                               DO  ic = ib, nbins_aerosol * ncc, nbins_aerosol
+                                  temp_bin = temp_bin + aerosol_mass(ic)%conc(k,j,i)
+                               ENDDO
+                            ENDIF
+                         ENDDO
+                         tend(k,j,i) = temp_bin
+                      ENDDO
+                   ENDDO
+                ENDDO 
+                IF ( .NOT. mask_surface(mid) )  THEN
+                   DO  i = 1, mask_size_l(mid,1)
+                      DO  j = 1, mask_size_l(mid,2)
+                         DO  k = 1, mask_size_l(mid,3)
+                            local_pf(i,j,k) = tend( mask_k(mid,k),  mask_j(mid,j), mask_i(mid,i) )
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ELSE 
+                   DO  i = 1, mask_size_l(mid,1)
+                      DO  j = 1, mask_size_l(mid,2)
+                         topo_top_ind = get_topography_top_index_ji( mask_j(mid,j), mask_i(mid,i), &
+                                                                     grid )
+                         DO  k = 1, mask_size_l(mid,3)
+                            local_pf(i,j,k) = tend( MIN( topo_top_ind+mask_k(mid,k), nzt+1 ),      &
+                                                    mask_j(mid,j), mask_i(mid,i) )
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ENDIF
+                resorted = .TRUE.
+             ELSE
+                to_be_resorted => pm25_av
+             ENDIF
+
+          CASE ( 'PM10' )
+             IF ( av == 0 )  THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb, nz_do3d
+                         temp_bin = 0.0_wp
+                         DO  ib = 1, nbins_aerosol
+                            IF ( 2.0_wp * ra_dry(k,j,i,ib) <= 10.0E-6_wp )  THEN
+                               DO  ic = ib, nbins_aerosol * ncc, nbins_aerosol
+                                  temp_bin = temp_bin + aerosol_mass(ic)%conc(k,j,i)
+                               ENDDO
+                            ENDIF
+                         ENDDO
+                         tend(k,j,i) = temp_bin
+                      ENDDO
+                   ENDDO
+                ENDDO 
+                IF ( .NOT. mask_surface(mid) )  THEN
+                   DO  i = 1, mask_size_l(mid,1)
+                      DO  j = 1, mask_size_l(mid,2)
+                         DO  k = 1, mask_size_l(mid,3)
+                            local_pf(i,j,k) = tend( mask_k(mid,k),  mask_j(mid,j), mask_i(mid,i) )
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ELSE 
+                   DO  i = 1, mask_size_l(mid,1)
+                      DO  j = 1, mask_size_l(mid,2)
+                         topo_top_ind = get_topography_top_index_ji( mask_j(mid,j), mask_i(mid,i), &
+                                                                     grid )
+                         DO  k = 1, mask_size_l(mid,3)
+                            local_pf(i,j,k) = tend( MIN( topo_top_ind+mask_k(mid,k), nzt+1 ),      &
+                                                    mask_j(mid,j), mask_i(mid,i) )
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ENDIF
+                resorted = .TRUE.
+             ELSE
+                to_be_resorted => pm10_av
+             ENDIF
+
+          CASE ( 's_BC', 's_DU', 's_NH', 's_NO', 's_OC', 's_SO4', 's_SS' )
+             IF ( av == 0 )  THEN
+                IF ( is_used( prtcl, TRIM( variable(3:) ) ) )  THEN
+                   found_index = get_index( prtcl, TRIM( variable(3:) ) )
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn
+                         DO  k = nzb, nz_do3d
+                            temp_bin = 0.0_wp
+                            DO  ic = ( found_index-1 ) * nbins_aerosol + 1, found_index * nbins_aerosol
                                temp_bin = temp_bin + aerosol_mass(ic)%conc(k,j,i)
                             ENDDO
-                         ENDIF
-                      ENDDO
-                      tend(k,j,i) = temp_bin
-                   ENDDO
-                ENDDO
-             ENDDO 
-             IF ( .NOT. mask_surface(mid) )  THEN
-                DO  i = 1, mask_size_l(mid,1)
-                   DO  j = 1, mask_size_l(mid,2)
-                      DO  k = 1, mask_size_l(mid,3)
-                         local_pf(i,j,k) = tend( mask_k(mid,k),  mask_j(mid,j), mask_i(mid,i) )
+                            tend(k,j,i) = temp_bin
+                         ENDDO
                       ENDDO
                    ENDDO
-                ENDDO
-             ELSE 
-                DO  i = 1, mask_size_l(mid,1)
-                   DO  j = 1, mask_size_l(mid,2)
-                      topo_top_ind = get_topography_top_index_ji( mask_j(mid,j), mask_i(mid,i),    &
-                                                                  grid )
-                      DO  k = 1, mask_size_l(mid,3)
-                         local_pf(i,j,k) = tend( MIN( topo_top_ind+mask_k(mid,k), nzt+1 ),         &
-                                                 mask_j(mid,j), mask_i(mid,i) )
+                ELSE
+                   tend = 0.0_wp
+                ENDIF
+                IF ( .NOT. mask_surface(mid) )  THEN
+                   DO  i = 1, mask_size_l(mid,1)
+                      DO  j = 1, mask_size_l(mid,2)
+                         DO  k = 1, mask_size_l(mid,3)
+                            local_pf(i,j,k) = tend( mask_k(mid,k), mask_j(mid,j), mask_i(mid,i) )
+                         ENDDO
                       ENDDO
                    ENDDO
-                ENDDO
+                ELSE
+                   DO  i = 1, mask_size_l(mid,1)
+                      DO  j = 1, mask_size_l(mid,2)
+                         topo_top_ind = get_topography_top_index_ji( mask_j(mid,j), mask_i(mid,i), &
+                                                                     grid )
+                         DO  k = 1, mask_size_l(mid,3)
+                            local_pf(i,j,k) = tend( MIN( topo_top_ind+mask_k(mid,k), nzt+1 ),      &
+                                                    mask_j(mid,j), mask_i(mid,i) )
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ENDIF
+                resorted = .TRUE.
+             ELSE
+!
+!--             9: remove salsa_s_ from the beginning
+                IF ( TRIM( variable(9:) ) == 'BC' )   to_be_resorted => s_bc_av
+                IF ( TRIM( variable(9:) ) == 'DU' )   to_be_resorted => s_du_av
+                IF ( TRIM( variable(9:) ) == 'NH' )   to_be_resorted => s_nh_av
+                IF ( TRIM( variable(9:) ) == 'NO' )   to_be_resorted => s_no_av
+                IF ( TRIM( variable(9:) ) == 'OC' )   to_be_resorted => s_oc_av
+                IF ( TRIM( variable(9:) ) == 'SO4' )  to_be_resorted => s_so4_av
+                IF ( TRIM( variable(9:) ) == 'SS' )   to_be_resorted => s_ss_av
              ENDIF
-             resorted = .TRUE.
-          ELSE
-             to_be_resorted => pm10_av
-          ENDIF
-
-       CASE ( 's_BC', 's_DU', 's_NH', 's_NO', 's_OC', 's_SO4', 's_SS' )
-          IF ( av == 0 )  THEN
-             IF ( is_used( prtcl, TRIM( variable(3:) ) ) )  THEN
-                found_index = get_index( prtcl, TRIM( variable(3:) ) )
+
+          CASE ( 's_H2O' )
+             IF ( av == 0 )  THEN
+                found_index = get_index( prtcl, 'H2O' )
                 DO  i = nxl, nxr
                    DO  j = nys, nyn
@@ -11167,81 +11630,34 @@
                    ENDDO
                 ENDDO
-             ELSE
-                tend = 0.0_wp
-             ENDIF
-             IF ( .NOT. mask_surface(mid) )  THEN
-                DO  i = 1, mask_size_l(mid,1)
-                   DO  j = 1, mask_size_l(mid,2)
-                      DO  k = 1, mask_size_l(mid,3)
-                         local_pf(i,j,k) = tend( mask_k(mid,k), mask_j(mid,j), mask_i(mid,i) )
+                IF ( .NOT. mask_surface(mid) )  THEN
+                   DO  i = 1, mask_size_l(mid,1)
+                      DO  j = 1, mask_size_l(mid,2)
+                         DO  k = 1, mask_size_l(mid,3)
+                            local_pf(i,j,k) = tend( mask_k(mid,k), mask_j(mid,j), mask_i(mid,i) )
+                         ENDDO
                       ENDDO
                    ENDDO
-                ENDDO
-             ELSE
-                DO  i = 1, mask_size_l(mid,1)
-                   DO  j = 1, mask_size_l(mid,2)
-                      topo_top_ind = get_topography_top_index_ji( mask_j(mid,j), mask_i(mid,i),    &
-                                                                  grid )
-                      DO  k = 1, mask_size_l(mid,3)
-                         local_pf(i,j,k) = tend( MIN( topo_top_ind+mask_k(mid,k), nzt+1 ),         &
-                                                 mask_j(mid,j), mask_i(mid,i) )
+                ELSE
+                   DO  i = 1, mask_size_l(mid,1)
+                      DO  j = 1, mask_size_l(mid,2)
+                         topo_top_ind = get_topography_top_index_ji( mask_j(mid,j), mask_i(mid,i), &
+                                                                     grid )
+                         DO  k = 1, mask_size_l(mid,3)
+                            local_pf(i,j,k) = tend( MIN( topo_top_ind+mask_k(mid,k), nzt+1 ),      &
+                                                    mask_j(mid,j), mask_i(mid,i) )
+                         ENDDO
                       ENDDO
                    ENDDO
-                ENDDO
+                ENDIF
+                resorted = .TRUE.
+             ELSE
+                to_be_resorted => s_h2o_av
              ENDIF
-             resorted = .TRUE.
-          ELSE
-             IF ( TRIM( variable(3:) ) == 'BC' )   to_be_resorted => s_bc_av
-             IF ( TRIM( variable(3:) ) == 'DU' )   to_be_resorted => s_du_av
-             IF ( TRIM( variable(3:) ) == 'NH' )   to_be_resorted => s_nh_av
-             IF ( TRIM( variable(3:) ) == 'NO' )   to_be_resorted => s_no_av
-             IF ( TRIM( variable(3:) ) == 'OC' )   to_be_resorted => s_oc_av
-             IF ( TRIM( variable(3:) ) == 'SO4' )  to_be_resorted => s_so4_av
-             IF ( TRIM( variable(3:) ) == 'SS' )   to_be_resorted => s_ss_av
-          ENDIF
-
-       CASE ( 's_H2O' )
-          IF ( av == 0 )  THEN
-             found_index = get_index( prtcl, 'H2O' )
-             DO  i = nxl, nxr
-                DO  j = nys, nyn
-                   DO  k = nzb, nz_do3d
-                      temp_bin = 0.0_wp
-                      DO  ic = ( found_index-1 ) * nbins_aerosol + 1, found_index * nbins_aerosol
-                         temp_bin = temp_bin + aerosol_mass(ic)%conc(k,j,i)
-                      ENDDO
-                      tend(k,j,i) = temp_bin
-                   ENDDO
-                ENDDO
-             ENDDO
-             IF ( .NOT. mask_surface(mid) )  THEN
-                DO  i = 1, mask_size_l(mid,1)
-                   DO  j = 1, mask_size_l(mid,2)
-                      DO  k = 1, mask_size_l(mid,3)
-                         local_pf(i,j,k) = tend( mask_k(mid,k), mask_j(mid,j), mask_i(mid,i) )
-                      ENDDO
-                   ENDDO
-                ENDDO
-             ELSE
-                DO  i = 1, mask_size_l(mid,1)
-                   DO  j = 1, mask_size_l(mid,2)
-                      topo_top_ind = get_topography_top_index_ji( mask_j(mid,j), mask_i(mid,i),    &
-                                                                  grid )
-                      DO  k = 1, mask_size_l(mid,3)
-                         local_pf(i,j,k) = tend( MIN( topo_top_ind+mask_k(mid,k), nzt+1 ),         &
-                                                 mask_j(mid,j), mask_i(mid,i) )
-                      ENDDO
-                   ENDDO
-                ENDDO
-             ENDIF
-             resorted = .TRUE.
-          ELSE
-             to_be_resorted => s_h2o_av
-          ENDIF
-
-       CASE DEFAULT
-          found = .FALSE.
-
-    END SELECT
+
+          CASE DEFAULT
+             found = .FALSE.
+
+       END SELECT
+    ENDIF
 
     IF ( .NOT. resorted )  THEN
@@ -11252,5 +11668,5 @@
              DO  j = 1, mask_size_l(mid,2)
                 DO  k = 1, mask_size_l(mid,3)
-                   local_pf(i,j,k) = to_be_resorted( mask_k(mid,k), mask_j(mid,j),mask_i(mid,i) )
+                   local_pf(i,j,k) = to_be_resorted( mask_k(mid,k), mask_j(mid,j), mask_i(mid,i) )
                 ENDDO
              ENDDO
@@ -11293,5 +11709,5 @@
     INTEGER(iwp), INTENT(inout) ::  ncomp  !< Number of components
 
-    CHARACTER(len=3), INTENT(in) ::  listcomp(nlist)  !< List cof component names
+    CHARACTER(LEN=3), INTENT(in) ::  listcomp(nlist)  !< List cof component names
 
     TYPE(component_index), INTENT(inout) ::  self  !< Object containing the indices of different
@@ -11329,5 +11745,5 @@
     IMPLICIT NONE
 
-    CHARACTER(len=*), INTENT(in) ::  incomp !< Component name
+    CHARACTER(LEN=*), INTENT(in) ::  incomp !< Component name
 
     INTEGER(iwp) ::  ii  !< index
@@ -11359,5 +11775,5 @@
     IMPLICIT NONE
 
-    CHARACTER(len=*), INTENT(in) ::  icomp !< Component name
+    CHARACTER(LEN=*), INTENT(in) ::  icomp !< Component name
 
     TYPE(component_index), INTENT(in) ::  self  !< Object containing the indices of different
Index: palm/trunk/TESTS/cases/urban_environment_salsa/INPUT/urban_environment_salsa_p3d
===================================================================
--- palm/trunk/TESTS/cases/urban_environment_salsa/INPUT/urban_environment_salsa_p3d	(revision 4130)
+++ palm/trunk/TESTS/cases/urban_environment_salsa/INPUT/urban_environment_salsa_p3d	(revision 4131)
@@ -94,4 +94,6 @@
                             '#theta', 'theta*2', 'wtheta', 'w*theta*', 'w"theta"',
                             '#q',  'q*2', 
+                            'salsa_Ntot', 'salsa_N_UFP', 'salsa_LDSA', 
+                            'salsa_PM0.1', 'salsa_PM2.5', 'salsa_PM10', 
 !
 !-- 2D/3D output settings
