Changeset 4785 for palm/trunk/SOURCE
- Timestamp:
- Nov 15, 2020 8:11:14 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/salsa_mod.f90
r4768 r4785 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Fixing a segmentation fault in initialising aerosol and gas emissions 29 ! 30 ! 4768 2020-11-02 19:11:23Z suehring 28 31 ! Enable 3D data output also with 64-bit precision 29 32 ! … … 9816 9819 !-- If the chemical component is not activated, set its mass fraction to 0 to avoid 9817 9820 !-- inbalance between number and mass flux 9818 cc_i2m = aero_emission_att%cc_in2mod 9819 IF ( index_so4 < 0 .AND. cc_i2m(1) > 0 ) & 9820 aero_emission%mass_fracs(:,cc_i2m(1)) = 0.0_wp 9821 IF ( index_oc < 0 .AND. cc_i2m(2) > 0 ) & 9822 aero_emission%mass_fracs(:,cc_i2m(2)) = 0.0_wp 9823 IF ( index_bc < 0 .AND. cc_i2m(3) > 0 ) & 9824 aero_emission%mass_fracs(:,cc_i2m(3)) = 0.0_wp 9825 IF ( index_du < 0 .AND. cc_i2m(4) > 0 ) & 9826 aero_emission%mass_fracs(:,cc_i2m(4)) = 0.0_wp 9827 IF ( index_ss < 0 .AND. cc_i2m(5) > 0 ) & 9828 aero_emission%mass_fracs(:,cc_i2m(5)) = 0.0_wp 9829 IF ( index_no < 0 .AND. cc_i2m(6) > 0 ) & 9830 aero_emission%mass_fracs(:,cc_i2m(6)) = 0.0_wp 9831 IF ( index_nh < 0 .AND. cc_i2m(7) > 0 ) & 9832 aero_emission%mass_fracs(:,cc_i2m(7)) = 0.0_wp 9821 IF ( index_so4 < 0 .AND. aero_emission_att%cc_in2mod(1) > 0 ) THEN 9822 aero_emission%mass_fracs(:,aero_emission_att%cc_in2mod(1)) = 0.0_wp 9823 aero_emission_att%cc_in2mod(1) = 0 9824 ENDIF 9825 IF ( index_oc < 0 .AND. aero_emission_att%cc_in2mod(2) > 0 ) THEN 9826 aero_emission%mass_fracs(:,aero_emission_att%cc_in2mod(2)) = 0.0_wp 9827 aero_emission_att%cc_in2mod(2) = 0 9828 ENDIF 9829 IF ( index_bc < 0 .AND. aero_emission_att%cc_in2mod(3) > 0 ) THEN 9830 aero_emission%mass_fracs(:,aero_emission_att%cc_in2mod(3)) = 0.0_wp 9831 aero_emission_att%cc_in2mod(3) = 0 9832 ENDIF 9833 IF ( index_du < 0 .AND. aero_emission_att%cc_in2mod(4) > 0 ) THEN 9834 aero_emission%mass_fracs(:,aero_emission_att%cc_in2mod(4)) = 0.0_wp 9835 aero_emission_att%cc_in2mod(4) = 0 9836 ENDIF 9837 IF ( index_ss < 0 .AND. aero_emission_att%cc_in2mod(5) > 0 ) THEN 9838 aero_emission%mass_fracs(:,aero_emission_att%cc_in2mod(5)) = 0.0_wp 9839 aero_emission_att%cc_in2mod(5) = 0 9840 ENDIF 9841 IF ( index_no < 0 .AND. aero_emission_att%cc_in2mod(6) > 0 ) THEN 9842 aero_emission%mass_fracs(:,aero_emission_att%cc_in2mod(6)) = 0.0_wp 9843 aero_emission_att%cc_in2mod(6) = 0 9844 ENDIF 9845 IF ( index_nh < 0 .AND. aero_emission_att%cc_in2mod(7) > 0 ) THEN 9846 aero_emission%mass_fracs(:,aero_emission_att%cc_in2mod(7)) = 0.0_wp 9847 aero_emission_att%cc_in2mod(7) = 0 9848 ENDIF 9833 9849 ! 9834 9850 !-- Then normalise the mass fraction so that SUM = 1 … … 10251 10267 ! 10252 10268 !-- Sulphate 10253 IF ( index_so4> 0 ) THEN10269 IF ( cc_i_mod(1) > 0 ) THEN 10254 10270 ic = cc_i_mod(1) 10255 10271 CALL set_mass_flux( surface, m, ib, index_so4, mass_fracs(ic), arhoh2so4, & … … 10258 10274 ! 10259 10275 !-- Organic carbon 10260 IF ( index_oc> 0 ) THEN10276 IF ( cc_i_mod(2) > 0 ) THEN 10261 10277 ic = cc_i_mod(2) 10262 10278 CALL set_mass_flux( surface, m, ib, index_oc, mass_fracs(ic),arhooc, & … … 10265 10281 ! 10266 10282 !-- Black carbon 10267 IF ( index_bc> 0 ) THEN10283 IF ( cc_i_mod(3) > 0 ) THEN 10268 10284 ic = cc_i_mod(3) 10269 10285 CALL set_mass_flux( surface, m, ib, index_bc, mass_fracs(ic), arhobc, & … … 10272 10288 ! 10273 10289 !-- Dust 10274 IF ( index_du> 0 ) THEN10290 IF ( cc_i_mod(4) > 0 ) THEN 10275 10291 ic = cc_i_mod(4) 10276 10292 CALL set_mass_flux( surface, m, ib, index_du, mass_fracs(ic), arhodu, & … … 10279 10295 ! 10280 10296 !-- Sea salt 10281 IF ( index_ss> 0 ) THEN10297 IF ( cc_i_mod(5) > 0 ) THEN 10282 10298 ic = cc_i_mod(5) 10283 10299 CALL set_mass_flux( surface, m, ib, index_ss, mass_fracs(ic), arhoss, & … … 10286 10302 ! 10287 10303 !-- Nitric acid 10288 IF ( index_no> 0 ) THEN10304 IF ( cc_i_mod(6) > 0 ) THEN 10289 10305 ic = cc_i_mod(6) 10290 10306 CALL set_mass_flux( surface, m, ib, index_no, mass_fracs(ic), arhohno3, & … … 10293 10309 ! 10294 10310 !-- Ammonia 10295 IF ( index_nh> 0 ) THEN10311 IF ( cc_i_mod(7) > 0 ) THEN 10296 10312 ic = cc_i_mod(7) 10297 10313 CALL set_mass_flux( surface, m, ib, index_nh, mass_fracs(ic), arhonh3, & … … 10741 10757 10742 10758 DO ig = 1, ngases_salsa 10759 IF (cc_i_mod(ig) < 1) CYCLE 10743 10760 IF ( use_time_fac ) THEN 10744 10761 surface%gtsws(m,ig) = surface%gtsws(m,ig) + rho_air_zw(k-1) * conv(ig) * time_fac &
Note: See TracChangeset
for help on using the changeset viewer.