Index: /palm/trunk/SOURCE/salsa_mod.f90
===================================================================
--- /palm/trunk/SOURCE/salsa_mod.f90	(revision 4379)
+++ /palm/trunk/SOURCE/salsa_mod.f90	(revision 4380)
@@ -26,4 +26,10 @@
 ! -----------------
 ! $Id$
+! - Error in saving the surface fluxes in an array that is applied in the
+!   deposition scheme
+! - Corrections in the header: aerosol bin diameters and lower bin limits not
+!   printed correctly
+! 
+! 4364 2020-01-08 02:12:31Z monakurppa
 ! Set time coordinate in the input data relative to origin_time rather than to
 ! 00:00:00 UTC
@@ -1281,5 +1287,6 @@
     IF ( lspartition )  WRITE( io, 11 )
     IF ( nldepo )       WRITE( io, 12 ) nldepo_pcm, nldepo_surf
-    WRITE( io, 13 )  reglim, nbin, bin_low_limits
+    WRITE( io, 13 )  reglim, nbin, ( aero(:)%vlolim / api6 )**0.33333333_wp
+    WRITE( io, 25 )  aero(:)%dmid
     IF ( init_aerosol_type == 0 )  WRITE( io, 14 ) nsect
     WRITE( io, 15 ) ncc, listspec, mass_fracs_a, mass_fracs_b
@@ -1310,8 +1317,8 @@
 3   FORMAT  (/'    Timestep: dt_salsa = ', F6.2, '  s')
 4   FORMAT  (/'    Array shape (z,y,x,bins):'/                                                     &
-              '       aerosol_number:  ', 4(I3)) 
-5   FORMAT  (/'       aerosol_mass:    ', 4(I3),/                                                  &
+              '       aerosol_number:  ', 4(I5)) 
+5   FORMAT  (/'       aerosol_mass:    ', 4(I5),/                                                  &
               '       (advect_particle_water = ', L1, ')')
-6   FORMAT   ('       salsa_gas: ', 4(I3),/                                                        &
+6   FORMAT   ('       salsa_gas: ', 4(I5),/                                                        &
               '       (salsa_gases_from_chem = ', L1, ')')
 7   FORMAT  (/'    Aerosol dynamic processes included: ')
@@ -1323,5 +1330,6 @@
 13  FORMAT  (/'    Aerosol bin subrange limits (in metres): ',  3(ES10.2E3), /                     &
               '    Number of size bins for each aerosol subrange: ', 2I3,/                         &
-              '    Aerosol bin limits (in metres): ', 9(ES10.2E3))
+              '    Aerosol bin lower limits (in metres): ', 12(ES10.2E3))
+25  FORMAT  (/'    Bin geometric mean diameters (in metres): ', 12(ES10.2E3))
 14  FORMAT   ('    Initial number concentration in bins at the lowest level (#/m**3):', 9(ES10.2E3))
 15  FORMAT  (/'    Number of chemical components used: ', I1,/                                     &
@@ -9331,5 +9339,5 @@
 !--          Save number fluxes in the end
              surface%answs(m,ib) = surface%answs(m,ib) + source_array(j,i,ib) * rho_air_zw(k-1)
-             aerosol_number(ib)%source(j,i) = aerosol_number(ib)%source(j,i) + surface%answs(m,ib)
+             aerosol_number(ib)%source(j,i) = surface%answs(m,ib)
 
           ENDDO  ! ib
@@ -9377,5 +9385,5 @@
        surface%amsws(surf_num,ic) = surface%amsws(surf_num,ic) + mass_frac * nsource *             &
                                     aero(ib)%core * prho * rho_air_zw(k-1)
-       aerosol_mass(ic)%source(j,i) = aerosol_mass(ic)%source(j,i) + surface%amsws(surf_num,ic)
+       aerosol_mass(ic)%source(j,i) = surface%amsws(surf_num,ic)
 
     END SUBROUTINE set_mass_flux
Index: /palm/trunk/TESTS/cases/urban_environment_salsa/MONITORING/urban_environment_salsa_rc
===================================================================
--- /palm/trunk/TESTS/cases/urban_environment_salsa/MONITORING/urban_environment_salsa_rc	(revision 4379)
+++ /palm/trunk/TESTS/cases/urban_environment_salsa/MONITORING/urban_environment_salsa_rc	(revision 4380)
@@ -1,9 +1,9 @@
 
  ******************************    --------------------------------------------
- * PALM 6.0  Rev: 4363M       *    atmosphere - run without 1D - prerun
+ * PALM 6.0  Rev: 4379M       *    atmosphere - run without 1D - prerun
  ******************************    --------------------------------------------
 
- Date:               2020-01-07    Run:       urban_environment_salsa           
- Time:                 21:00:12    Run-No.:   00
+ Date:               2020-01-17    Run:       urban_environment_salsa           
+ Time:                 18:25:39    Run-No.:   00
  Run on host:           default
  Number of PEs:               4    Processor grid (x,y): (   2,   2) calculated
@@ -259,9 +259,9 @@
 
     Array shape (z,y,x,bins):
-       aerosol_number:   60 19 19  8
-
-       aerosol_mass:     60 19 19 32
+       aerosol_number:     60   19   19    8
+
+       aerosol_mass:       60   19   19   32
        (advect_particle_water = T)
-       salsa_gas:  60 19 19  5
+       salsa_gas:    60   19   19    5
        (salsa_gases_from_chem = F)
 
@@ -272,5 +272,7 @@
     Aerosol bin subrange limits (in metres):  3.00E-009 1.00E-008 2.50E-006
     Number of size bins for each aerosol subrange:   1  7
-    Aerosol bin limits (in metres):  0.00E+000 0.00E+000 0.00E+000 0.00E+000 0.00E+000 0.00E+000 0.00E+000 0.00E+000
+    Aerosol bin lower limits (in metres):  3.00E-009 1.00E-008 2.20E-008 4.84E-008 1.07E-007 2.35E-007 5.16E-007 1.14E-006
+
+    Bin geometric mean diameters (in metres):  5.48E-009 1.48E-008 3.26E-008 7.18E-008 1.58E-007 3.48E-007 7.66E-007 1.69E-006
 
     Number of chemical components used: 3
