14 #include "macro_thermodyn.h" 27 mwwat => const_mvap, &
28 dnwat => const_dwatr, &
32 stdatmpa => const_pstd, &
33 stdtemp => const_tem00, &
62 real(RP),
public,
allocatable ::
ae_dens(:)
64 real(RP),
parameter :: avo = 6.0221367e23_rp
65 real(RP),
parameter :: boltz = 1.38048e-23_rp
66 real(RP),
parameter :: conv_n2m = 1.e6_rp/avo*1.e6_rp &
68 real(RP),
parameter :: conv_m2n = 1._rp/conv_n2m
69 real(RP),
parameter :: rhod_ae = 1.83_rp
70 real(RP),
parameter :: rho_kg = rhod_ae*1.e3_rp
71 real(RP),
parameter :: grav = 9.80622_rp
72 real(RP),
parameter :: conv_ms_vl = 1.e-12_rp/rhod_ae
73 real(RP),
parameter :: conv_vl_ms = rhod_ae/1.e-12_rp
74 real(RP),
parameter :: mwrat_s6 = 96._rp/98._rp
75 real(RP),
parameter :: mwrat_s6_i = 1._rp/mwrat_s6
76 real(RP),
parameter :: diffsulf = 9.36e-6_rp
77 real(RP),
parameter :: mwh2so4 = 98._rp
78 real(RP) :: logk_aenucl = -12.4_rp
83 real(RP),
parameter :: c1=1.425e-6_rp, c2=0.5039_rp, c3=108.3_rp
85 integer :: nbins_out = 1024
96 integer,
parameter :: ia_m0 = 1
97 integer,
parameter :: ia_m2 = 2
98 integer,
parameter :: ia_m3 = 3
99 integer,
parameter :: ia_ms = 4
100 integer,
parameter :: ia_kp = 5
101 integer,
parameter :: ik_out = 1
104 integer,
allocatable :: n_siz(:)
105 real(RP),
allocatable :: d_min(:)
106 real(RP),
allocatable :: d_max(:)
107 integer,
allocatable :: n_kap(:)
108 real(RP),
allocatable :: k_min(:)
109 real(RP),
allocatable :: k_max(:)
113 real(RP),
allocatable :: d_lw(:,:), d_ct(:,:), d_up(:,:)
114 real(RP),
allocatable :: k_lw(:,:), k_ct(:,:), k_up(:,:)
115 real(RP) :: dlogd, dk
119 integer,
allocatable :: is_i(:), is_j(:), is_k(:)
120 integer,
allocatable :: ik_i(:), ik_j(:), ik_k(:)
121 integer,
allocatable :: ic_i(:), ic_j(:), ic_k(:)
123 integer :: is1, is2, mc, ik, is0, ic, ia0
125 logical :: flag_npf = .false.
126 logical :: flag_cond = .true.
127 logical :: flag_coag = .true.
128 logical :: flag_ccn_interactive = .true.
129 logical :: flag_regeneration = .true.
133 real(RP) :: h2so4dt = 5.e-6_rp
134 real(RP) :: ocgasdt = 8.e-5_rp
136 real(RP) :: c_kappa = 0.3_rp
137 real(RP) :: t_npf = 21600.0_rp
142 integer,
allocatable :: it_procs2trans(:,:,:,:)
143 integer,
allocatable :: ia_trans2procs(:)
144 integer,
allocatable :: is_trans2procs(:)
145 integer,
allocatable :: ik_trans2procs(:)
146 integer,
allocatable :: ic_trans2procs(:)
147 real(RP),
allocatable :: rnum_out(:)
148 real(RP) :: dg_reg = 5.e-7_rp
149 real(RP) :: sg_reg = 1.6_rp
151 character(len=H_SHORT),
allocatable :: ctg_name(:)
152 real(RP),
parameter :: cleannumber = 1.e-3
165 character(len=*),
intent(in) :: AE_TYPE
166 real(RP),
allocatable :: d_min_inp(:)
167 real(RP),
allocatable :: d_max_inp(:)
168 real(RP),
allocatable :: k_min_inp(:)
169 real(RP),
allocatable :: k_max_inp(:)
170 integer ,
allocatable :: n_kap_inp(:)
172 real(RP),
parameter :: d_min_def = 1.e-9_rp
173 real(RP),
parameter :: d_max_def = 1.e-5_rp
174 integer ,
parameter :: n_kap_def = 1
175 real(RP),
parameter :: k_min_def = 0.e0_rp
176 real(RP),
parameter :: k_max_def = 1.e0_rp
178 namelist / param_atmos_phy_ae_kajino13 / &
192 flag_ccn_interactive, &
203 if(
io_l )
write(
io_fid_log,*)
'++++++ Module[AEROSOL] / Categ[ATMOS PHYSICS] / Origin[SCALElib]' 211 if ( ae_type /=
'KAJINO13' .AND. ae_type /=
'NONE' )
then 212 write(*,*)
'xxx ATMOS_PHY_AE_TYPE is not KAJINO13. Check!' 218 allocate( rnum_out(nbins_out) )
219 allocate( n_siz(n_ctg) )
220 allocate( d_min(n_ctg) )
221 allocate( d_max(n_ctg) )
222 allocate( n_kap(n_ctg) )
223 allocate( k_min(n_ctg) )
224 allocate( k_max(n_ctg) )
225 allocate( d_min_inp(n_ctg) )
226 allocate( d_max_inp(n_ctg) )
227 allocate( n_kap_inp(n_ctg) )
228 allocate( k_min_inp(n_ctg) )
229 allocate( k_max_inp(n_ctg) )
230 allocate( ctg_name(n_ctg) )
232 n_siz(1:n_ctg) =
nsiz(1:n_ctg)
233 d_min(1:n_ctg) = d_min_def
234 d_max(1:n_ctg) = d_max_def
235 n_kap(1:n_ctg) = n_kap_def
236 k_min(1:n_ctg) = k_min_def
237 k_max(1:n_ctg) = k_max_def
240 if( n_ctg == 1 )
then 241 write(ctg_name(it),
'(a)')
"Sulfate" 242 elseif( n_ctg == 2 )
then 243 write(ctg_name(it),
'(a)')
"Seasalt" 244 elseif( n_ctg == 3 )
then 245 write(ctg_name(it),
'(a)')
"Dust" 251 read(
io_fid_conf,nml=param_atmos_phy_ae_kajino13,iostat=ierr)
253 if(
io_l )
write(
io_fid_log,*)
'*** Not found namelist. Default used.' 254 elseif( ierr > 0 )
then 255 write(*,*)
'xxx Not appropriate names in namelist PARAM_ATMOS_PHY_AE_KAJINO13. Check!' 273 n_trans = n_trans + n_siz(ic) * n_kap(ic) *
n_atr 274 n_siz_max = max(n_siz_max, n_siz(ic))
275 n_kap_max = max(n_kap_max, n_kap(ic))
279 allocate(d_lw(n_siz_max,n_ctg))
280 allocate(d_ct(n_siz_max,n_ctg))
281 allocate(d_up(n_siz_max,n_ctg))
282 allocate(k_lw(n_kap_max,n_ctg))
283 allocate(k_ct(n_kap_max,n_ctg))
284 allocate(k_up(n_kap_max,n_ctg))
293 dlogd = (
log(d_max(ic)) -
log(d_min(ic)))/
float(n_siz(ic))
294 do is0 = 1, n_siz(ic)
295 d_lw(is0,ic) = exp(
log(d_min(ic))+dlogd*
float(is0-1) )
296 d_ct(is0,ic) = exp(
log(d_min(ic))+dlogd*(
float(is0)-0.5_rp))
297 d_up(is0,ic) = exp(
log(d_min(ic))+dlogd*
float(is0) )
300 dk = (k_max(ic) - k_min(ic))/
float(n_kap(ic))
302 k_lw(ik,ic) = k_min(ic) + dk *
float(ik-1)
303 k_ct(ik,ic) = k_min(ic) + dk *(
float(ik)-0.5_rp)
304 k_up(ik,ic) = k_min(ic) + dk *
float(ik)
311 if (dg_reg >= d_lw(is0,
ic_mix) .AND. &
312 dg_reg < d_up(is0,
ic_mix) )
then 324 do is2 = 1, n_siz(ic)
325 do is1 = 1, n_siz(ic)
326 if ( d_ct(is2,ic) >= d_ct(is1,ic) )
then 334 allocate(is_i(mcomb))
335 allocate(is_j(mcomb))
336 allocate(is_k(mcomb))
337 allocate(ik_i(mcomb))
338 allocate(ik_j(mcomb))
339 allocate(ik_k(mcomb))
340 allocate(ic_i(mcomb))
341 allocate(ic_j(mcomb))
342 allocate(ic_k(mcomb))
347 do is2 = 1, n_siz(ic)
348 do is1 = 1, n_siz(ic)
349 if ( d_ct(is2,ic) >= d_ct(is1,ic) )
then 370 allocate( it_procs2trans(
n_atr,n_siz_max,n_kap_max,n_ctg) )
371 allocate( ia_trans2procs(n_trans) )
372 allocate( is_trans2procs(n_trans) )
373 allocate( ik_trans2procs(n_trans) )
374 allocate( ic_trans2procs(n_trans) )
376 it_procs2trans(:,:,:,:)= -999
377 ia_trans2procs(:) = 0
378 is_trans2procs(:) = 0
379 ik_trans2procs(:) = 0
380 ic_trans2procs(:) = 0
386 do is0 = 1, n_siz(ic)
389 it_procs2trans(ia0,is0,ik,ic)= it
390 ia_trans2procs(it) = ia0
391 is_trans2procs(it) = is0
392 ik_trans2procs(it) = ik
393 ic_trans2procs(it) = ic
431 pres2qsat_liq => atmos_saturation_pres2qsat_liq
437 real(RP),
intent(inout) :: DENS(
ka,
ia,
ja)
438 real(RP),
intent(inout) :: MOMZ(
ka,
ia,
ja)
439 real(RP),
intent(inout) :: MOMX(
ka,
ia,
ja)
440 real(RP),
intent(inout) :: MOMY(
ka,
ia,
ja)
441 real(RP),
intent(inout) :: RHOT(
ka,
ia,
ja)
443 real(RP),
intent(in) :: NREG(
ka,
ia,
ja)
444 real(RP),
intent(inout) :: QTRC(
ka,
ia,
ja,
qa)
445 real(RP),
intent(out) :: CN(
ka,
ia,
ja)
446 real(RP),
intent(out) :: CCN(
ka,
ia,
ja)
447 real(RP),
intent(inout) :: RHOQ_t_AE(
ka,
ia,
ja,
qa)
448 real(RP),
allocatable :: QTRC0(:,:,:,:)
449 real(RP),
allocatable :: QTRC1(:,:,:,:)
452 real(RP) :: pres_ae(
ka,
ia,
ja)
453 real(RP) :: temp_ae(
ka,
ia,
ja)
454 real(RP) :: qv_ae(
ka,
ia,
ja)
455 real(RP) :: ssliq_ae(
ka,
ia,
ja)
458 real(RP) :: qdry(
ka,
ia,
ja)
459 real(RP) :: rrhog(
ka,
ia,
ja)
462 real(RP) :: t_ccn, t_cn
465 real(RP) :: m0_reg, m2_reg, m3_reg
467 real(RP) :: reg_factor_m2,reg_factor_m3
469 real(RP),
allocatable :: aerosol_procs(:,:,:,:)
470 real(RP),
allocatable :: aerosol_activ(:,:,:,:)
471 real(RP),
allocatable :: emis_procs(:,:,:,:)
472 real(RP),
allocatable :: emis_gas(:)
473 real(RP) :: total_aerosol_mass(
ka,
ia,
ja,n_ctg)
474 real(RP) :: total_aerosol_number(
ka,
ia,
ja,n_ctg)
475 real(RP) :: total_emit_aerosol_mass(
ka,
ia,
ja,n_ctg)
476 real(RP) :: total_emit_aerosol_number(
ka,
ia,
ja,n_ctg)
481 character(len=H_LONG) :: ofilename
482 integer :: i, j, k, iq, it
484 if(
io_l )
write(
io_fid_log,*)
'*** Physics step: Aerosol(kajino13)' 492 do is0 = 1, n_siz(ic)
493 if (qtrc(k,i,j,
qaes-1+it_procs2trans(ia_m0,is0,ik,ic)) < 0.0_rp .or. &
494 qtrc(k,i,j,
qaes-1+it_procs2trans(ia_m2,is0,ik,ic)) < 0.0_rp .or. &
495 qtrc(k,i,j,
qaes-1+it_procs2trans(ia_m3,is0,ik,ic)) < 0.0_rp .or. &
496 qtrc(k,i,j,
qaes-1+it_procs2trans(ia_ms,is0,ik,ic)) < 0.0_rp .or. &
497 qtrc(k,i,j,
qaes-1+it_procs2trans(ia_kp,is0,ik,ic)) < 0.0_rp )
then 498 qtrc(k,i,j,
qaes-1+it_procs2trans(1:
n_atr,is0,ik,ic)) = 0.0_rp
512 qtrc0(k,i,j,iq) = qtrc(k,i,j,iq)
518 allocate( aerosol_procs(
n_atr,n_siz_max,n_kap_max,n_ctg) )
519 allocate( aerosol_activ(
n_atr,n_siz_max,n_kap_max,n_ctg) )
520 allocate( emis_procs(
n_atr,n_siz_max,n_kap_max,n_ctg) )
523 reg_factor_m2 = dg_reg**2._rp * exp( 2.0_rp *(
log(sg_reg)**2._rp))
524 reg_factor_m3 = dg_reg**3._rp * exp( 4.5_rp *(
log(sg_reg)**2._rp))
528 aerosol_procs(:,:,:,:) = 0.0_rp
529 aerosol_activ(:,:,:,:) = 0.0_rp
530 emis_procs(:,:,:,:) = 0.0_rp
532 pres_ae(:,:,:) = 0.0_rp
533 temp_ae(:,:,:) = 0.0_rp
534 qv_ae(:,:,:) = 0.0_rp
540 rrhog(k,i,j) = 1.0_rp / dens(k,i,j)
541 th(k,i,j) = rhot(k,i,j) * rrhog(k,i,j)
544 calc_qdry( qdry(k,i,j), qtrc, k, i, j, iq )
547 calc_cv( cva(k,i,j), qdry(k,i,j), qtrc, k, i, j, iq,
const_cvdry,
aq_cv )
551 cpa(k,i,j) = cva(k,i,j) + rmoist
552 calc_pre( pres_ae(k,i,j), dens(k,i,j), th(k,i,j), rmoist, cpa(k,i,j),
const_pre00 )
553 temp_ae(k,i,j) = pres_ae(k,i,j) / ( dens(k,i,j) * rmoist )
554 qv_ae(k,i,j) = qtrc(k,i,j,
i_qv)
556 call pres2qsat_liq( qsat_tmp,temp_ae(k,i,j),pres_ae(k,i,j) )
557 ssliq_ae(k,i,j) = qv_ae(k,i,j)/qsat_tmp - 1.0_rp
569 do is0 = 1, n_siz(ic)
570 if (qtrc0(k,i,j,
qaes-1+it_procs2trans(ia_m0,is0,ik,ic))*dens(k,i,j) < cleannumber)
then 572 qtrc0(k,i,j,
qaes-1+it_procs2trans(ia0,is0,ik,ic)) = 0._rp
586 qtrc1(k,i,j,iq) = qtrc0(k,i,j,iq)
602 aerosol_procs(ia_trans2procs(it), &
603 is_trans2procs(it), &
604 ik_trans2procs(it), &
605 ic_trans2procs(it)) = qtrc1(k,i,j,
qaes-1+it)*dens(k,i,j)
606 emis_procs(ia_trans2procs(it), &
607 is_trans2procs(it), &
608 ik_trans2procs(it), &
609 ic_trans2procs(it)) = emit(k,i,j,it)*dens(k,i,j)
622 flag_npf, flag_cond, flag_coag,&
630 if (flag_ccn_interactive)
then 633 aerosol_activ(ia0,is0,ik_out,
ic_mix) = min(max(0._rp, aerosol_activ(ia0,is0,ik_out,
ic_mix)), &
634 aerosol_procs(ia0,is0,ik_out,
ic_mix) )
635 aerosol_procs(ia0,is0,ik_out,
ic_mix) = &
636 aerosol_procs(ia0,is0,ik_out,
ic_mix) - aerosol_activ(ia0,is0,ik_out,
ic_mix)
643 if (flag_regeneration)
then 647 m2_reg = m0_reg * reg_factor_m2
648 m3_reg = m0_reg * reg_factor_m3
649 ms_reg = m3_reg * pi6 * conv_vl_ms
650 aerosol_procs(ia_m0,is0_reg,ik_out,
ic_mix) = &
651 aerosol_procs(ia_m0,is0_reg,ik_out,
ic_mix) + m0_reg
652 aerosol_procs(ia_m2,is0_reg,ik_out,
ic_mix) = &
653 aerosol_procs(ia_m2,is0_reg,ik_out,
ic_mix) + m2_reg
654 aerosol_procs(ia_m3,is0_reg,ik_out,
ic_mix) = &
655 aerosol_procs(ia_m3,is0_reg,ik_out,
ic_mix) + m3_reg
656 aerosol_procs(ia_ms,is0_reg,ik_out,
ic_mix) = &
657 aerosol_procs(ia_ms,is0_reg,ik_out,
ic_mix) + ms_reg
663 ccn(k,i,j) = ccn(k,i,j) + aerosol_activ(ia_m0,is0,ik_out,
ic_mix)
664 cn(k,i,j) = cn(k,i,j) + aerosol_procs(ia_m0,is0,ik_out,
ic_mix)
678 do is0 = 1, n_siz(ic)
680 qtrc1(k,i,j,
qaes-1+it_procs2trans(ia0,is0,ik,ic)) = aerosol_procs(ia0,is0,ik,ic) / dens(k,i,j)
687 = conc_gas(1:
gas_ctg) / dens(k,i,j)*1.e-9_rp
692 do is0 = 1, n_siz(ic)
693 if (qtrc1(k,i,j,
qaes-1+it_procs2trans(ia_m0,is0,ik,ic))*dens(k,i,j) < cleannumber)
then 695 qtrc1(k,i,j,
qaes-1+it_procs2trans(ia0,is0,ik,ic)) = 0._rp
705 do is0 = 1, n_siz(ic)
706 if (qtrc(k,i,j,
qaes-1+it_procs2trans(ia_m0,is0,ik,ic)) < 0.0_rp .or. &
707 qtrc(k,i,j,
qaes-1+it_procs2trans(ia_m2,is0,ik,ic)) < 0.0_rp .or. &
708 qtrc(k,i,j,
qaes-1+it_procs2trans(ia_m3,is0,ik,ic)) < 0.0_rp .or. &
709 qtrc(k,i,j,
qaes-1+it_procs2trans(ia_ms,is0,ik,ic)) < 0.0_rp .or. &
710 qtrc(k,i,j,
qaes-1+it_procs2trans(ia_kp,is0,ik,ic)) < 0.0_rp )
then 711 qtrc(k,i,j,
qaes-1+it_procs2trans(1:
n_atr,is0,ik,ic)) = 0.0_rp
718 total_aerosol_mass(k,i,j,:) = 0.0_rp
719 total_aerosol_number(k,i,j,:) = 0.0_rp
720 total_emit_aerosol_mass(k,i,j,:) = 0.0_rp
721 total_emit_aerosol_number(k,i,j,:) = 0.0_rp
724 do is0 = 1, n_siz(ic)
725 total_aerosol_mass(k,i,j,ic) = total_aerosol_mass(k,i,j,ic) &
726 + qtrc1(k,i,j,
qaes-1+it_procs2trans(ia_ms,is0,ik,ic))
727 total_aerosol_number(k,i,j,ic) = total_aerosol_number(k,i,j,ic) &
728 + qtrc1(k,i,j,
qaes-1+it_procs2trans(ia_m0,is0,ik,ic))
729 total_emit_aerosol_mass(k,i,j,ic) = total_emit_aerosol_mass(k,i,j,ic) &
730 + emit(k,i,j,it_procs2trans(ia_ms,is0,ik,ic))
731 total_emit_aerosol_number(k,i,j,ic) = total_emit_aerosol_number(k,i,j,ic) &
732 + emit(k,i,j,it_procs2trans(ia_m0,is0,ik,ic))
742 write(ofilename,
'(a,a)') trim(ctg_name(ic)),
'mass' 743 call hist_in( total_aerosol_mass(:,:,:,ic), trim(ofilename),
'Total mass mixing ratio of aerosol',
'kg/kg' )
744 write(ofilename,
'(a,a)') trim(ctg_name(ic)),
'number' 745 call hist_in( total_aerosol_number(:,:,:,ic), trim(ofilename),
'Total number mixing ratio of aerosol',
'num/kg' )
746 write(ofilename,
'(a,a)') trim(ctg_name(ic)),
'mass_emit' 747 call hist_in( total_emit_aerosol_mass(:,:,:,ic), trim(ofilename),
'Total mass mixing ratio of emitted aerosol',
'kg/kg' )
748 write(ofilename,
'(a,a)') trim(ctg_name(ic)),
'number_emit' 749 call hist_in( total_emit_aerosol_number(:,:,:,ic), trim(ofilename),
'Total number mixing ratio of emitted aerosol',
'num/kg' )
753 write(ofilename,
'(a,a)') trim(ctg_name(ic)),
'mass' 754 call hist_in( total_aerosol_mass(:,:,:,ic), trim(ofilename),
'Total mass mixing ratio of aerosol',
'kg/kg' )
755 write(ofilename,
'(a,a)') trim(ctg_name(ic)),
'number' 756 call hist_in( total_aerosol_number(:,:,:,ic), trim(ofilename),
'Total number mixing ratio of aerosol',
'num/kg' )
757 write(ofilename,
'(a,a)') trim(ctg_name(ic)),
'mass_emit' 758 call hist_in( total_emit_aerosol_mass(:,:,:,ic), trim(ofilename),
'Total mass mixing ratio of emitted aerosol',
'kg/kg' )
759 write(ofilename,
'(a,a)') trim(ctg_name(ic)),
'number_emit' 760 call hist_in( total_emit_aerosol_number(:,:,:,ic), trim(ofilename),
'Total number mixing ratio of emitted aerosol',
'num/kg' )
763 call hist_in( emit(:,:,:,
qa_ae-
gas_ctg+
ig_h2so4),
'H2SO4_emit',
'Emission ratio of H2SO4 gas',
'ug/m3/s' )
764 call hist_in( emit(:,:,:,
qa_ae-
gas_ctg+
ig_cgas),
'CGAS_emit',
'Emission ratio of Condensabule gas',
'ug/m3/s' )
766 deallocate( aerosol_procs )
767 deallocate( aerosol_activ )
768 deallocate( emis_procs )
769 deallocate( emis_gas )
775 rhoq_t_ae(k,i,j,iq) = ( qtrc1(k,i,j,iq) - qtrc0(k,i,j,iq) ) * dens(k,i,j) /
time_dtsec_atmos_phy_ae 781 deallocate( qtrc0, qtrc1 )
790 temp_k, pres_pa, super, & !--- in
791 ! h2so4dt, c_ratio, c_kappa, & !--- in
792 flag_npf, flag_cond, flag_coag,& !--- in
793 aerosol_procs, & !--- inout
794 conc_gas, & !--- inout
795 emis_procs, & !--- out
805 real(DP),
intent(in) :: deltt
806 real(RP),
intent(in) :: temp_k
807 real(RP),
intent(in) :: pres_pa
808 real(RP),
intent(in) :: super
812 logical,
intent(in) :: flag_npf
813 logical,
intent(in) :: flag_cond
814 logical,
intent(in) :: flag_coag
815 real(RP),
intent(inout) :: aerosol_procs(
n_atr,n_siz_max,n_kap_max,n_ctg)
816 real(RP),
intent(inout) :: conc_gas(
gas_ctg)
817 real(RP),
intent(out) :: aerosol_activ(
n_atr,n_siz_max,n_kap_max,n_ctg)
818 real(RP),
intent(in) :: emis_procs(
n_atr,n_siz_max,n_kap_max,n_ctg)
819 real(RP),
intent(in) :: emis_gas(
gas_ctg)
825 real(RP) :: c_ratio, t_elaps
834 do is0 = 1, n_siz(ic)
835 aerosol_procs(ia_ms,is0,ik,ic) = aerosol_procs(ia_ms,is0,ik,ic) * 1.e+9_rp
843 do is0 = 1, n_siz(ic)
845 aerosol_procs(ia0,is0,ik,ic) = aerosol_procs(ia0,is0,ik,ic) &
846 + emis_procs(ia0,is0,ik,ic) * deltt
855 do is0 = 1, n_siz(ic)
856 if (aerosol_procs(ia_m0,is0,ik,ic) < cleannumber)
then 858 aerosol_procs(ia0,is0,ik,ic) = 0._rp
888 if( t_elaps <= t_npf )
then 899 call aerosol_condensation(j_1nm, temp_k, pres_pa, deltt, &
900 ic_nuc, ik_nuc, is_nuc, n_ctg, n_kap, n_siz,
n_atr, &
901 n_siz_max, n_kap_max, ia_m0, ia_m2, ia_m3, ia_ms, &
904 conc_gas(
ig_h2so4), c_ratio, aerosol_procs )
911 call aerosol_coagulation(deltt, temp_k, pres_pa, &
912 mcomb,is_i,is_j,is_k,ik_i,ik_j,ik_k,ic_i,ic_j,ic_k, &
913 n_atr,n_siz_max,n_kap_max,n_ctg,ia_m0,ia_m2,ia_m3,ia_ms, &
914 n_siz,n_kap,d_lw,d_ct,d_up,aerosol_procs)
918 call aerosol_activation(c_kappa, super, temp_k, ia_m0, ia_m2, ia_m3, &
919 n_atr,n_siz_max,n_kap_max,n_ctg,n_siz,n_kap, &
920 d_ct,aerosol_procs, aerosol_activ)
927 do is0 = 1, n_siz(ic)
928 aerosol_procs(ia_ms,is0,ik,ic) = aerosol_procs(ia_ms,is0,ik,ic) * 1.e-9_rp
941 real(RP),
intent(in) :: conc_h2so4
942 real(RP),
intent(inout) :: J_1nm
944 real(RP) :: conc_num_h2so4
948 conc_num_h2so4 = conc_h2so4 * conv_m2n
951 j_1nm = (10._rp**(logk_aenucl)) * conc_num_h2so4 ** 2._rp
958 subroutine aerosol_condensation(J_1nm, temp_k, pres_pa, deltt, &
959 ic_nuc, ik_nuc, is_nuc, n_ctg, n_kap, n_siz, n_atr, &
960 n_siz_max, n_kap_max, ia_m0, ia_m2, ia_m3, ia_ms, &
961 ! d_lw, d_ct, d_up, k_lw, k_ct, k_up, &
963 conc_h2so4, c_ratio, aerosol_procs )
967 real(RP),
intent(in) :: J_1nm
968 real(RP),
intent(in) :: temp_k
969 real(RP),
intent(in) :: pres_pa
970 real(DP),
intent(in) :: deltt
971 integer,
intent(in) :: ic_nuc
972 integer,
intent(in) :: ik_nuc
973 integer,
intent(in) :: is_nuc
974 integer,
intent(in) :: n_ctg
975 integer,
intent(in) :: n_kap(n_ctg)
976 integer,
intent(in) :: n_siz(n_ctg)
977 integer,
intent(in) :: n_atr
978 integer,
intent(in) :: n_siz_max
979 integer,
intent(in) :: n_kap_max
980 integer,
intent(in) :: ia_m0
981 integer,
intent(in) :: ia_m2
982 integer,
intent(in) :: ia_m3
983 integer,
intent(in) :: ia_ms
984 real(RP),
intent(in) :: c_ratio
985 real(RP),
intent(in) :: d_lw(n_siz_max,n_ctg), d_ct(n_siz_max,n_ctg), d_up(n_siz_max,n_ctg)
987 real(RP),
intent(inout) :: conc_h2so4
988 real(RP),
intent(inout) :: aerosol_procs(n_atr,n_siz_max,n_kap_max,n_ctg)
990 real(RP),
parameter :: alpha = 0.1_rp
991 real(RP),
parameter :: cour = 0.5_rp
994 real(RP) :: sq_cbar_h2so4
995 real(RP) :: cbar_h2so4
998 real(RP) :: dm0dt_npf, dm2dt_npf, dm3dt_npf, dmsdt_npf
999 real(RP) :: dm0dt_cnd(n_siz_max,n_kap_max,n_ctg)
1000 real(RP) :: dm2dt_cnd(n_siz_max,n_kap_max,n_ctg)
1001 real(RP) :: dm3dt_cnd(n_siz_max,n_kap_max,n_ctg)
1002 real(RP) :: dmsdt_cnd(n_siz_max,n_kap_max,n_ctg)
1003 real(RP) :: rm0_pls(n_siz_max), rm0_mns(n_siz_max)
1004 real(RP) :: rm2_pls(n_siz_max), rm2_mns(n_siz_max)
1005 real(RP) :: rm3_pls(n_siz_max), rm3_mns(n_siz_max)
1006 real(RP) :: rms_pls(n_siz_max), rms_mns(n_siz_max)
1007 real(RP) :: m0t,m1t,m2t,m3t,dgt,sgt,dm2
1008 real(RP) :: gnc2,gnc3,gfm2,gfm3,harm2,harm3
1009 real(RP) :: lossrate,tmps6
1010 integer :: ic, ik, is0, i, is1, is2
1013 if (conc_h2so4 <= 0.0_rp)
return 1016 drive = conc_h2so4 * mwrat_s6 * conv_ms_vl
1017 sq_cbar_h2so4 = 8.0_rp*rgas*temp_k/(pi*mwh2so4*1.e-3_rp)
1018 cbar_h2so4 = sqrt( sq_cbar_h2so4 )
1019 dv_h2so4 = diffsulf*(stdatmpa/pres_pa)*(temp_k/stdtemp)**1.75_rp
1031 dm0dt_npf = j_1nm * 1.e6_rp
1032 dm2dt_npf = dm0dt_npf * 1.e-18_rp
1033 dm3dt_npf = dm0dt_npf * 1.e-27_rp
1034 dmsdt_npf = dm3dt_npf * pi6 * conv_vl_ms
1038 do ik = 1, n_kap(ic)
1039 do is0 = 1, n_siz(ic)
1041 dm2dt_cnd(is0,ik,ic) = 0._rp
1042 dm3dt_cnd(is0,ik,ic) = 0._rp
1044 if (aerosol_procs(ia_m0,is0,ik,ic) &
1045 *aerosol_procs(ia_m2,is0,ik,ic) &
1046 *aerosol_procs(ia_m3,is0,ik,ic) > 0._rp)
then 1047 m0t = aerosol_procs(ia_m0,is0,ik,ic)
1048 m2t = aerosol_procs(ia_m2,is0,ik,ic)
1049 m3t = aerosol_procs(ia_m3,is0,ik,ic)
1050 call diag_ds(m0t,m2t,m3t,dgt,sgt,dm2)
1051 if (dgt <= 0._rp) dgt = d_ct(is0,ic)
1052 if (sgt <= 0._rp) sgt = 1.3_rp
1053 m1t = m0t*dgt*exp(0.5_rp*(
log(sgt)**2._rp))
1055 gnc2 = 8._rp * dv_h2so4 * m0t
1056 gnc3 = 12._rp * dv_h2so4 * m1t
1058 gfm2 = alpha * cbar_h2so4 * m1t
1059 gfm3 = 1.5_rp * alpha * cbar_h2so4 * m2t
1061 harm2 = gnc2 * gfm2 / ( gnc2 + gfm2 )
1062 harm3 = gnc3 * gfm3 / ( gnc3 + gfm3 )
1064 dm2dt_cnd(is0,ik,ic) = harm2*drive
1065 dm3dt_cnd(is0,ik,ic) = harm3*drive
1066 dmsdt_cnd(is0,ik,ic) = dm3dt_cnd(is0,ik,ic)*pi6*conv_vl_ms
1076 lossrate = dmsdt_npf
1079 do ik = 1, n_kap(ic)
1080 do is0 = 1, n_siz(ic)
1081 lossrate = lossrate + dmsdt_cnd(is0,ik,ic)
1086 if (lossrate<=0._rp)
return 1088 isplt = int( (lossrate*deltt) / (cour*conc_h2so4) )+1
1089 dtsplt = deltt/
float(isplt)
1092 loop_split:
do i = 1, isplt
1094 conc_h2so4 = conc_h2so4 - (lossrate * dtsplt) * mwrat_s6_i
1096 if (conc_h2so4 < 0._rp)
then 1097 dtsplt = tmps6 * mwrat_s6 / lossrate
1102 aerosol_procs(ia_m0,is_nuc,ik_nuc,ic_nuc) = &
1103 aerosol_procs(ia_m0,is_nuc,ik_nuc,ic_nuc) + dm0dt_npf * dtsplt
1104 aerosol_procs(ia_m2,is_nuc,ik_nuc,ic_nuc) = &
1105 aerosol_procs(ia_m2,is_nuc,ik_nuc,ic_nuc) + dm2dt_npf * dtsplt
1106 aerosol_procs(ia_m3,is_nuc,ik_nuc,ic_nuc) = &
1107 aerosol_procs(ia_m3,is_nuc,ik_nuc,ic_nuc) + dm3dt_npf * dtsplt
1108 aerosol_procs(ia_ms,is_nuc,ik_nuc,ic_nuc) = &
1109 aerosol_procs(ia_ms,is_nuc,ik_nuc,ic_nuc) + dmsdt_npf * dtsplt
1113 do ik = 1, n_kap(ic)
1114 do is0 = 1, n_siz(ic)
1116 aerosol_procs(ia_m2,is0,ik,ic) = &
1117 aerosol_procs(ia_m2,is0,ik,ic) + dm2dt_cnd(is0,ik,ic) * dtsplt &
1119 aerosol_procs(ia_m3,is0,ik,ic) = &
1120 aerosol_procs(ia_m3,is0,ik,ic) + dm3dt_cnd(is0,ik,ic) * dtsplt &
1122 aerosol_procs(ia_ms,is0,ik,ic) = &
1123 aerosol_procs(ia_ms,is0,ik,ic) + dmsdt_cnd(is0,ik,ic) * dtsplt &
1131 if (conc_h2so4 <= 0.0_rp)
exit loop_split
1137 conc_h2so4 = max(conc_h2so4, 0._rp)
1141 do ik = 1, n_kap(ic)
1152 do is1 = 1, n_siz(ic)
1154 if (aerosol_procs(ia_m0,is1,ik,ic) &
1155 *aerosol_procs(ia_m2,is1,ik,ic) &
1156 *aerosol_procs(ia_m3,is1,ik,ic) > 0._rp)
then 1157 m0t = aerosol_procs(ia_m0,is1,ik,ic)
1158 m2t = aerosol_procs(ia_m2,is1,ik,ic)
1159 m3t = aerosol_procs(ia_m3,is1,ik,ic)
1160 call diag_ds(m0t,m2t,m3t,dgt,sgt,dm2)
1161 if (dgt <= 0._rp) dgt = d_ct(is1,ic)
1162 if (sgt <= 0._rp) sgt = 1.3_rp
1164 do is2 = 1, n_siz(ic)
1165 if (dgt >= d_lw(is2,ic) .AND. dgt < d_up(is2,ic))
then 1166 rm0_pls(is2) = rm0_pls(is2) + aerosol_procs(ia_m0,is1,ik,ic)
1167 rm0_mns(is1) = aerosol_procs(ia_m0,is1,ik,ic)
1168 rm2_pls(is2) = rm2_pls(is2) + aerosol_procs(ia_m2,is1,ik,ic)
1169 rm2_mns(is1) = aerosol_procs(ia_m2,is1,ik,ic)
1170 rm3_pls(is2) = rm3_pls(is2) + aerosol_procs(ia_m3,is1,ik,ic)
1171 rm3_mns(is1) = aerosol_procs(ia_m3,is1,ik,ic)
1172 rms_pls(is2) = rms_pls(is2) + aerosol_procs(ia_ms,is1,ik,ic)
1173 rms_mns(is1) = aerosol_procs(ia_ms,is1,ik,ic)
1182 do is0 = 1, n_siz(ic)
1183 aerosol_procs(ia_m0,is0,ik,ic) = aerosol_procs(ia_m0,is0,ik,ic) &
1184 + rm0_pls(is0) - rm0_mns(is0)
1185 aerosol_procs(ia_m2,is0,ik,ic) = aerosol_procs(ia_m2,is0,ik,ic) &
1186 + rm2_pls(is0) - rm2_mns(is0)
1187 aerosol_procs(ia_m3,is0,ik,ic) = aerosol_procs(ia_m3,is0,ik,ic) &
1188 + rm3_pls(is0) - rm3_mns(is0)
1189 aerosol_procs(ia_ms,is0,ik,ic) = aerosol_procs(ia_ms,is0,ik,ic) &
1190 + rms_pls(is0) - rms_mns(is0)
1197 end subroutine aerosol_condensation
1201 subroutine aerosol_coagulation(deltt, temp_k, pres_pa, &
1202 mcomb,is_i,is_j,is_k,ik_i,ik_j,ik_k,ic_i,ic_j,ic_k, &
1203 n_atr,n_siz_max,n_kap_max,n_ctg,ia_m0,ia_m2,ia_m3,ia_ms, &
1204 n_siz,n_kap,d_lw,d_ct,d_up,aerosol_procs)
1207 real(DP),
intent(in) :: deltt
1208 real(RP),
intent(in) :: temp_k
1209 real(RP),
intent(in) :: pres_pa
1210 integer,
intent(in) :: mcomb
1211 integer,
intent(in) :: is_i(mcomb), is_j(mcomb), is_k(mcomb)
1212 integer,
intent(in) :: ik_i(mcomb), ik_j(mcomb), ik_k(mcomb)
1213 integer,
intent(in) :: ic_i(mcomb), ic_j(mcomb), ic_k(mcomb)
1214 integer,
intent(in) :: n_ctg
1215 integer,
intent(in) :: n_atr
1216 integer,
intent(in) :: n_siz_max
1217 integer,
intent(in) :: n_kap_max
1218 integer,
intent(in) :: ia_m0
1219 integer,
intent(in) :: ia_m2
1220 integer,
intent(in) :: ia_m3
1221 integer,
intent(in) :: ia_ms
1222 integer,
intent(in) :: n_siz(n_ctg)
1223 integer,
intent(in) :: n_kap(n_ctg)
1224 real(RP),
intent(in):: d_lw(n_siz_max,n_ctg), d_ct(n_siz_max,n_ctg), d_up(n_siz_max,n_ctg)
1225 real(RP),
intent(inout) :: aerosol_procs(n_atr,n_siz_max,n_kap_max,n_ctg)
1227 real(RP) :: dt_m0(n_siz_max,n_kap_max,n_ctg)
1228 real(RP) :: dt_m3(n_siz_max,n_kap_max,n_ctg)
1229 real(RP) :: dt_m6(n_siz_max,n_kap_max,n_ctg)
1230 real(RP) :: dt_ms(n_siz_max,n_kap_max,n_ctg)
1231 real(RP) :: sixth(n_siz_max,n_kap_max,n_ctg)
1232 real(RP) :: rm0_pls(n_siz_max), rm0_mns(n_siz_max)
1233 real(RP) :: rm2_pls(n_siz_max), rm2_mns(n_siz_max)
1234 real(RP) :: rm3_pls(n_siz_max), rm3_mns(n_siz_max)
1235 real(RP) :: rms_pls(n_siz_max), rms_mns(n_siz_max)
1238 real(RP) :: rkfm,rknc
1239 real(RP) :: m0i,m0j,m2i,m2j,m3i,m3j,msi,msj,dgi,dgj,sgi,sgj,dm2,m6i,m6j
1240 real(RP) :: dm0i,dm0j,dm0k,dm3i,dm3j,dm3k,dm6i,dm6j,dm6k,dmsi,dmsj,dmsk
1241 real(RP) :: m0t,m3t,m6t,dgt,sgt,m2t
1242 integer :: mc, ic, ik, is0, is1, is2
1244 dt_m0(:,:,:) = 0._rp
1245 dt_m3(:,:,:) = 0._rp
1246 dt_m6(:,:,:) = 0._rp
1247 dt_ms(:,:,:) = 0._rp
1248 sixth(:,:,:) = 0._rp
1250 visair=c1*temp_k**c2/(1._rp+c3/temp_k)
1251 rkfm=(3._rp*boltz*temp_k /rho_kg)**0.5_rp
1252 rknc= 2._rp*boltz*temp_k /(3._rp*visair)
1253 c4 = pi*boltz*temp_k/(8._rp*mwair/avo*1.e-3_rp)
1254 lambda = visair/(0.499_rp*pres_pa)*c4**0.5_rp*1.e2_rp
1259 m0i = aerosol_procs(ia_m0,is_i(mc),ik_i(mc),ic_i(mc))
1260 m0j = aerosol_procs(ia_m0,is_j(mc),ik_j(mc),ic_j(mc))
1261 m2i = aerosol_procs(ia_m2,is_i(mc),ik_i(mc),ic_i(mc))
1262 m2j = aerosol_procs(ia_m2,is_j(mc),ik_j(mc),ic_j(mc))
1263 m3i = aerosol_procs(ia_m3,is_i(mc),ik_i(mc),ic_i(mc))
1264 m3j = aerosol_procs(ia_m3,is_j(mc),ik_j(mc),ic_j(mc))
1265 msi = aerosol_procs(ia_ms,is_i(mc),ik_i(mc),ic_i(mc))
1266 msj = aerosol_procs(ia_ms,is_j(mc),ik_j(mc),ic_j(mc))
1268 if (m0i*m2i*m3i <= 0._rp .OR. m0j*m2j*m3j <= 0._rp) cycle
1270 call diag_ds(m0i,m2i,m3i,dgi,sgi,dm2)
1271 if (dgi <= 0._rp) dgi = d_ct(is_i(mc),ic_i(mc))
1272 if (sgi <= 0._rp) sgi = 1.3_rp
1273 call diag_ds(m0j,m2j,m3j,dgj,sgj,dm2)
1274 if (dgj <= 0._rp) dgj = d_ct(is_j(mc),ic_j(mc))
1275 if (sgj <= 0._rp) sgj = 1.3_rp
1277 m6i = m0i*dgi**6._rp*exp(18._rp*(
log(sgi)**2._rp))
1278 m6j = m0j*dgj**6._rp*exp(18._rp*(
log(sgj)**2._rp))
1279 sixth(is_i(mc),ik_i(mc),ic_i(mc)) = m6i
1280 sixth(is_j(mc),ik_j(mc),ic_j(mc)) = m6j
1283 if ( is_i(mc) == is_j(mc) .AND. &
1284 ik_i(mc) == ik_j(mc) .AND. &
1285 ic_i(mc) == ic_j(mc) )
then 1286 call aero_intra(m0i, m3i, &
1298 call aero_inter(m0i ,m3i ,m6i , &
1300 dm0i,dm3i,dm6i,dmsi, &
1301 dm0j,dm3j,dm6j,dmsj, &
1302 dm0k,dm3k,dm6k,dmsk, &
1303 dgi ,sgi, rhod_ae, &
1304 dgj ,sgj, rhod_ae, &
1305 rknc, rkfm, lambda, &
1309 dt_m0(is_i(mc),ik_i(mc),ic_i(mc)) = dt_m0(is_i(mc),ik_i(mc),ic_i(mc)) + dm0i
1310 dt_m0(is_j(mc),ik_j(mc),ic_j(mc)) = dt_m0(is_j(mc),ik_j(mc),ic_j(mc)) + dm0j
1311 dt_m0(is_k(mc),ik_k(mc),ic_k(mc)) = dt_m0(is_k(mc),ik_k(mc),ic_k(mc)) + dm0k
1312 dt_m3(is_i(mc),ik_i(mc),ic_i(mc)) = dt_m3(is_i(mc),ik_i(mc),ic_i(mc)) + dm3i
1313 dt_m3(is_j(mc),ik_j(mc),ic_j(mc)) = dt_m3(is_j(mc),ik_j(mc),ic_j(mc)) + dm3j
1314 dt_m3(is_k(mc),ik_k(mc),ic_k(mc)) = dt_m3(is_k(mc),ik_k(mc),ic_k(mc)) + dm3k
1315 dt_m6(is_i(mc),ik_i(mc),ic_i(mc)) = dt_m6(is_i(mc),ik_i(mc),ic_i(mc)) + dm6i
1316 dt_m6(is_j(mc),ik_j(mc),ic_j(mc)) = dt_m6(is_j(mc),ik_j(mc),ic_j(mc)) + dm6j
1317 dt_m6(is_k(mc),ik_k(mc),ic_k(mc)) = dt_m6(is_k(mc),ik_k(mc),ic_k(mc)) + dm6k
1318 dt_ms(is_i(mc),ik_i(mc),ic_i(mc)) = dt_ms(is_i(mc),ik_i(mc),ic_i(mc)) + dmsi
1319 dt_ms(is_j(mc),ik_j(mc),ic_j(mc)) = dt_ms(is_j(mc),ik_j(mc),ic_j(mc)) + dmsj
1320 dt_ms(is_k(mc),ik_k(mc),ic_k(mc)) = dt_ms(is_k(mc),ik_k(mc),ic_k(mc)) + dmsk
1327 do ik = 1, n_kap(ic)
1328 do is0 = 1, n_siz(ic)
1329 if (aerosol_procs(ia_m0,is0,ik,ic) > 0._rp .AND. &
1330 dt_m0(is0,ik,ic)/aerosol_procs(ia_m0,is0,ik,ic) < 1._rp )
then 1331 aerosol_procs(ia_m0,is0,ik,ic)=aerosol_procs(ia_m0,is0,ik,ic) &
1332 *exp( dt_m0(is0,ik,ic)/aerosol_procs(ia_m0,is0,ik,ic) )
1334 aerosol_procs(ia_m0,is0,ik,ic)=aerosol_procs(ia_m0,is0,ik,ic) + dt_m0(is0,ik,ic)
1336 if (aerosol_procs(ia_m3,is0,ik,ic) > 0._rp .AND. &
1337 dt_m3(is0,ik,ic)/aerosol_procs(ia_m3,is0,ik,ic) < 1._rp )
then 1338 aerosol_procs(ia_m3,is0,ik,ic)=aerosol_procs(ia_m3,is0,ik,ic) &
1339 *exp( dt_m3(is0,ik,ic)/aerosol_procs(ia_m3,is0,ik,ic) )
1341 aerosol_procs(ia_m3,is0,ik,ic)=aerosol_procs(ia_m3,is0,ik,ic) + dt_m3(is0,ik,ic)
1343 if (sixth(is0,ik,ic) > 0._rp .AND. &
1344 dt_m6(is0,ik,ic)/sixth(is0,ik,ic) < 1._rp )
then 1345 sixth(is0,ik,ic) =sixth(is0,ik,ic) &
1346 *exp( dt_m6(is0,ik,ic)/sixth(is0,ik,ic) )
1348 sixth(is0,ik,ic) =sixth(is0,ik,ic) + dt_m6(is0,ik,ic)
1350 if (aerosol_procs(ia_ms,is0,ik,ic) > 0._rp .AND. &
1351 dt_ms(is0,ik,ic)/aerosol_procs(ia_ms,is0,ik,ic) < 1._rp )
then 1352 aerosol_procs(ia_ms,is0,ik,ic)=aerosol_procs(ia_ms,is0,ik,ic) &
1353 *exp( dt_ms(is0,ik,ic)/aerosol_procs(ia_ms,is0,ik,ic) )
1355 aerosol_procs(ia_ms,is0,ik,ic)=aerosol_procs(ia_ms,is0,ik,ic) + dt_ms(is0,ik,ic)
1357 m0t = aerosol_procs(ia_m0,is0,ik,ic)
1358 m3t = aerosol_procs(ia_m3,is0,ik,ic)
1359 m6t = sixth(is0,ik,ic)
1360 call diag_ds6(m0t,m3t,m6t, &
1362 if (dgt <= 0._rp) dgt = d_ct(is0,ic)
1363 if (sgt <= 0._rp) sgt = 1.3_rp
1364 if (m3t == 0._rp) aerosol_procs(ia_ms,is0,ik,ic)=0._rp
1365 aerosol_procs(ia_m2,is0,ik,ic)=m2t
1367 aerosol_procs(ia_m0,is0,ik,ic)=m0t
1368 aerosol_procs(ia_m3,is0,ik,ic)=m3t
1375 do ik = 1, n_kap(ic)
1386 do is1 = 1, n_siz(ic)
1388 if (aerosol_procs(ia_m0,is1,ik,ic) &
1389 *aerosol_procs(ia_m2,is1,ik,ic) &
1390 *aerosol_procs(ia_m3,is1,ik,ic) > 0._rp)
then 1391 m0t = aerosol_procs(ia_m0,is1,ik,ic)
1392 m2t = aerosol_procs(ia_m2,is1,ik,ic)
1393 m3t = aerosol_procs(ia_m3,is1,ik,ic)
1394 call diag_ds(m0t,m2t,m3t,dgt,sgt,dm2)
1395 if (dgt <= 0._rp) dgt = d_ct(is1,ic)
1396 if (sgt <= 0._rp) sgt = 1.3_rp
1398 do is2 = 1, n_siz(ic)
1399 if (dgt >= d_lw(is2,ic) .AND. dgt < d_up(is2,ic))
then 1400 rm0_pls(is2) = rm0_pls(is2) + aerosol_procs(ia_m0,is1,ik,ic)
1401 rm0_mns(is1) = aerosol_procs(ia_m0,is1,ik,ic)
1402 rm2_pls(is2) = rm2_pls(is2) + aerosol_procs(ia_m2,is1,ik,ic)
1403 rm2_mns(is1) = aerosol_procs(ia_m2,is1,ik,ic)
1404 rm3_pls(is2) = rm3_pls(is2) + aerosol_procs(ia_m3,is1,ik,ic)
1405 rm3_mns(is1) = aerosol_procs(ia_m3,is1,ik,ic)
1406 rms_pls(is2) = rms_pls(is2) + aerosol_procs(ia_ms,is1,ik,ic)
1407 rms_mns(is1) = aerosol_procs(ia_ms,is1,ik,ic)
1416 do is0 = 1, n_siz(ic)
1417 aerosol_procs(ia_m0,is0,ik,ic) = aerosol_procs(ia_m0,is0,ik,ic) &
1418 + rm0_pls(is0) - rm0_mns(is0)
1419 aerosol_procs(ia_m2,is0,ik,ic) = aerosol_procs(ia_m2,is0,ik,ic) &
1420 + rm2_pls(is0) - rm2_mns(is0)
1421 aerosol_procs(ia_m3,is0,ik,ic) = aerosol_procs(ia_m3,is0,ik,ic) &
1422 + rm3_pls(is0) - rm3_mns(is0)
1423 aerosol_procs(ia_ms,is0,ik,ic) = aerosol_procs(ia_ms,is0,ik,ic) &
1424 + rms_pls(is0) - rms_mns(is0)
1432 end subroutine aerosol_coagulation
1438 subroutine aerosol_activation(c_kappa, super, temp_k, ia_m0, ia_m2, ia_m3, &
1439 n_atr,n_siz_max,n_kap_max,n_ctg,n_siz,n_kap, &
1440 d_ct, aerosol_procs, aerosol_activ)
1444 real(RP),
intent(in) :: super
1445 real(RP),
intent(in) :: c_kappa
1446 real(RP),
intent(in) :: temp_k
1447 integer,
intent(in) :: ia_m0, ia_m2, ia_m3
1448 integer,
intent(in) :: n_atr
1449 integer,
intent(in) :: n_siz_max
1450 integer,
intent(in) :: n_kap_max
1451 integer,
intent(in) :: n_ctg
1452 real(RP),
intent(in) :: d_ct(n_siz_max,n_ctg)
1453 real(RP) :: aerosol_procs(n_atr,n_siz_max,n_kap_max,n_ctg)
1454 real(RP) :: aerosol_activ(n_atr,n_siz_max,n_kap_max,n_ctg)
1455 integer,
intent(in) :: n_siz(n_ctg), n_kap(n_ctg)
1457 real(RP),
parameter :: two3 = 2._rp/3._rp
1458 real(RP),
parameter :: rt2 = sqrt(2._rp)
1459 real(RP),
parameter :: twort2 = rt2
1460 real(RP),
parameter :: thrrt2 = 3._rp/rt2
1461 real(RP) :: smax_inv
1462 real(RP) :: am,scrit_am,aa,tc,st,bb,ac
1463 real(RP) :: m0t,m2t,m3t,dgt,sgt,dm2
1465 real(RP) :: tmp1, tmp2, tmp3
1466 real(RP) :: ccn_frc,cca_frc,ccv_frc
1467 integer :: is0, ik, ic
1469 aerosol_activ(:,:,:,:) = 0._rp
1471 if (super<=0._rp)
return 1473 smax_inv = 1._rp / super
1476 tc = temp_k - stdtemp
1477 if (tc >= 0._rp )
then 1478 st = 75.94_rp-0.1365_rp*tc-0.3827e-3_rp*tc**2._rp
1480 st = 75.93_rp +0.115_rp*tc &
1481 + 6.818e-2_rp*tc**2._rp+6.511e-3_rp*tc**3._rp &
1482 + 2.933e-4_rp*tc**4._rp+6.283e-6_rp*tc**5._rp &
1483 + 5.285e-8_rp*tc**6._rp
1489 aa = 2._rp * st * mwwat * 1.e-3_rp / (dnwat * rgas * temp_k )
1492 do ik = 1, n_kap(ic)
1493 do is0 = 1, n_siz(ic)
1494 m0t = aerosol_procs(ia_m0,is0,ik,ic)
1495 m2t = aerosol_procs(ia_m2,is0,ik,ic)
1496 m3t = aerosol_procs(ia_m3,is0,ik,ic)
1497 call diag_ds(m0t,m2t,m3t,dgt,sgt,dm2)
1498 if (dgt <= 0._rp) dgt = d_ct(is0,ic)
1499 if (sgt <= 0._rp) sgt = 1.3_rp
1502 if (bb > 0._rp .AND. am > 0._rp )
then 1503 scrit_am = 2._rp/sqrt(bb)*(aa/(3._rp*am))**1.5_rp
1507 ac = am * (scrit_am * smax_inv)**two3
1509 tmp1 =
log(d_crit) -
log(dgt)
1510 tmp2 = 1._rp/(rt2*
log(sgt))
1512 ccn_frc= 0.5_rp*(1._rp-erf(tmp1*tmp2))
1513 cca_frc= 0.5_rp*(1._rp-erf(tmp1*tmp2-twort2*tmp3))
1514 ccv_frc= 0.5_rp*(1._rp-erf(tmp1*tmp2-thrrt2*tmp3))
1515 ccn_frc=min(max(ccn_frc,0.0_rp),1.0_rp)
1516 cca_frc=min(max(cca_frc,0.0_rp),1.0_rp)
1517 ccv_frc=min(max(ccv_frc,0.0_rp),1.0_rp)
1518 aerosol_activ(ia_m0,is0,ik,ic) = ccn_frc * aerosol_procs(ia_m0,is0,ik,ic)
1519 aerosol_activ(ia_m2,is0,ik,ic) = cca_frc * aerosol_procs(ia_m2,is0,ik,ic)
1520 aerosol_activ(ia_m3,is0,ik,ic) = ccv_frc * aerosol_procs(ia_m3,is0,ik,ic)
1521 aerosol_activ(ia_ms,is0,ik,ic) = ccv_frc * aerosol_procs(ia_ms,is0,ik,ic)
1527 end subroutine aerosol_activation
1531 subroutine diag_ds(m0,m2,m3, & !i
1534 real(RP) :: m0,m2,m3,dg,sg,m3_bar,m2_bar
1535 real(RP) :: m2_new,m2_old,dm2
1536 real(RP),
parameter :: sgmax=2.5_rp
1537 real(RP),
parameter :: rk1=2._rp
1538 real(RP),
parameter :: rk2=3._rp
1539 real(RP),
parameter :: ratio =rk1/rk2
1540 real(RP),
parameter :: rk1_hat=1._rp/(ratio*(rk2-rk1))
1541 real(RP),
parameter :: rk2_hat=ratio/(rk1-rk2)
1542 real(DP),
parameter :: tiny=1.e-50_dp
1546 if (m0 <= tiny .OR. m2 <= tiny .OR. m3 <= tiny)
then 1558 dg = m2_bar**rk1_hat*m3_bar**rk2_hat
1560 if (m2_bar/m3_bar**ratio < 1._rp)
then 1561 sg = exp(sqrt(2._rp/(rk1*(rk1-rk2)) &
1562 *
log(m2_bar/m3_bar**ratio) ))
1565 if (sg > sgmax)
then 1568 call diag_d2(m0,m3,sg, &
1573 if (m2_bar/m3_bar**ratio >= 1._rp)
then 1575 call diag_d2(m0,m3,sg, &
1581 dm2 = m2_old - m2_new
1584 end subroutine diag_ds
1588 subroutine diag_d2(m0,m3,sg, & !i
1591 real(RP) :: dg,sg,m0,m2,m3,aaa
1592 real(RP),
parameter :: one3=1._rp/3._rp
1593 aaa = m0 * exp( 4.5_rp * (
log(sg)**2._rp) )
1595 m2 = m0 * dg ** 2._rp * exp( 2.0_rp * (
log(sg)**2._rp) )
1598 end subroutine diag_d2
1602 subroutine aero_intra(m0, m3, & !input
1603 dm0,dm3,dm6, & !output
1604 dg, sg, lambda, & !input
1611 real(RP),
intent(in) :: m0
1612 real(RP),
intent(in) :: m3
1614 real(RP),
intent(out) :: dm0
1615 real(RP),
intent(out) :: dm3
1616 real(RP),
intent(out) :: dm6
1617 real(RP),
intent(in) :: dg
1618 real(RP),
intent(in) :: sg
1619 real(RP),
intent(in) :: lambda
1620 real(RP),
intent(in) :: rknc, rkfm
1621 real(DP),
intent(in) :: dt
1624 real(RP) :: mm2,mm1,m1,m4,m2,mm1p5,mm0p5,m0p5,m3p5,m1p5,m5,m2p5
1625 real(RP) :: dm0dt,dm6dt,dm0dt_nc,dm6dt_nc,dm0dt_fm,dm6dt_fm,bbb
1628 real(RP),
parameter :: rk1=3._rp
1629 real(RP),
parameter :: rk2=6._rp
1630 real(RP),
parameter :: ratio=rk1/rk2
1631 real(RP),
parameter :: rk1_hat=1._rp/(ratio*(rk2-rk1))
1632 real(RP),
parameter :: rk2_hat=ratio/(rk1-rk2)
1643 mm2 =m0*dg**(-2._rp) *exp(2.0_rp *(
log(sg)**2._rp))
1644 mm1 =m0*dg**(-1._rp) *exp(0.5_rp *(
log(sg)**2._rp))
1645 m1 =m0*dg** 1._rp *exp(0.5_rp *(
log(sg)**2._rp))
1646 m2 =m0*dg** 2._rp *exp(2.0_rp *(
log(sg)**2._rp))
1647 m4 =m0*dg** 4._rp *exp(8.0_rp *(
log(sg)**2._rp))
1650 dm0dt_nc=-1._rp*rknc*(m0*m0+m1*mm1+2.492e-2_rp*lambda*(m0*mm1+m1*mm2))
1651 dm6dt_nc= 2._rp*rknc*(m3*m3+m4*m2 +2.492e-2_rp*lambda*(m3*m2 +m4*m1 ))
1655 mm1p5=m0*dg**(-1.5_rp)*exp(1.125_rp*(
log(sg)**2._rp))
1656 mm0p5=m0*dg**(-0.5_rp)*exp(0.125_rp*(
log(sg)**2._rp))
1657 m0p5 =m0*dg** 0.5_rp *exp(0.125_rp*(
log(sg)**2._rp))
1658 m3p5 =m0*dg**( 3.5_rp)*exp(6.125_rp*(
log(sg)**2._rp))
1659 m1p5 =m0*dg**( 1.5_rp)*exp(1.125_rp*(
log(sg)**2._rp))
1660 m5 =m0*dg** 5._rp *exp(12.50_rp*(
log(sg)**2._rp))
1661 m2p5 =m0*dg** 2.5_rp *exp(3.125_rp*(
log(sg)**2._rp))
1663 bbb =1._rp+1.2_rp *exp(-2._rp*sg)-0.646_rp*exp(-0.35_rp*sg**2._rp)
1665 dm0dt_fm= -1._rp*bbb*rkfm*(m0*m0p5+m2*mm1p5+2._rp*m1*mm0p5)
1666 dm6dt_fm= 2._rp*bbb*rkfm*(m3p5*m3+m1p5*m5 +2._rp*m2p5*m4 )
1669 if (dm0dt_fm+dm0dt_nc /= 0._rp) dm0dt = dm0dt_fm*dm0dt_nc/(dm0dt_fm+dm0dt_nc)
1670 if (dm6dt_fm+dm6dt_nc /= 0._rp) dm6dt = dm6dt_fm*dm6dt_nc/(dm6dt_fm+dm6dt_nc)
1677 end subroutine aero_intra
1681 subroutine aero_inter(m0i ,m3i ,m6i , & !input unchanged
1682 m0j ,m3j ,m6j , & !input unchanged
1683 dm0i,dm3i,dm6i,dmsi, & !output
1684 dm0j,dm3j,dm6j,dmsj, & !output
1685 dm0k,dm3k,dm6k,dmsk, & !output
1686 dgi ,sgi, rhoi, & !input unchanged
1687 dgj ,sgj, rhoj, & !input unchanged
1688 rknc, rkfm, lambda, & !input unchanged
1695 real(RP),
intent(in) :: m0i,m0j
1696 real(RP),
intent(in) :: m3i,m3j
1697 real(RP),
intent(in) :: m6i,m6j
1698 real(RP),
intent(out) :: dm0i,dm0j,dm0k
1699 real(RP),
intent(out) :: dm3i,dm3j,dm3k
1700 real(RP),
intent(out) :: dm6i,dm6j,dm6k
1701 real(RP),
intent(out) :: dmsi,dmsj,dmsk
1702 real(RP),
intent(in) :: dgi,sgi,rhoi
1703 real(RP),
intent(in) :: dgj,sgj,rhoj
1704 real(RP),
intent(in) :: rknc, rkfm
1705 real(RP),
intent(in) :: lambda
1709 real(RP) :: dm0dt_i,dm3dt_i,dm6dt_i
1710 real(RP) :: dm0dt_j,dm3dt_j,dm6dt_j
1711 real(RP) :: dm0dt_k,dm3dt_k,dm6dt_k
1712 real(RP) :: mm2i,mm1i,m1i,m2i,m4i,m5i,m7i,m8i
1713 real(RP) :: mm2j,mm1j,m1j,m2j,m4j,m5j,m7j,m8j
1714 real(RP) :: mm1p5i,mm0p5i,m0p5i,m1p5i,m2p5i,m3p5i,m4p5i,m5p5i,m6p5i
1715 real(RP) :: mm1p5j,mm0p5j,m0p5j,m1p5j,m2p5j,m3p5j,m4p5j,m5p5j,m6p5j
1716 real(RP) :: dm6dt_nc_i,dm3dt_nc_i,dm0dt_nc_i
1717 real(RP) :: dm6dt_nc_j,dm3dt_nc_j,dm0dt_nc_j
1718 real(RP) :: dm6dt_nc_k,dm3dt_nc_k,dm0dt_nc_k
1719 real(RP) :: dm6dt_fm_i,dm3dt_fm_i,dm0dt_fm_i
1720 real(RP) :: dm6dt_fm_j,dm3dt_fm_j,dm0dt_fm_j
1721 real(RP) :: dm6dt_fm_k,dm3dt_fm_k,dm0dt_fm_k
1722 real(RP) :: bbb,gamma1,gamma2,alpha,beta
1749 mm2i=m0i*dgi**(-2._rp)*exp( 2.0_rp*(
log(sgi)**2._rp))
1750 mm1i=m0i*dgi**(-1._rp)*exp( 0.5_rp*(
log(sgi)**2._rp))
1751 m1i =m0i*dgi** 1._rp *exp( 0.5_rp*(
log(sgi)**2._rp))
1752 m2i =m0i*dgi** 2._rp *exp( 2.0_rp*(
log(sgi)**2._rp))
1754 m4i =m0i*dgi** 4._rp *exp( 8.0_rp*(
log(sgi)**2._rp))
1755 m5i =m0i*dgi** 5._rp *exp(12.5_rp*(
log(sgi)**2._rp))
1757 m7i =m0i*dgi** 7._rp *exp(24.5_rp*(
log(sgi)**2._rp))
1759 mm2j=m0j*dgj**(-2._rp)*exp( 2.0_rp*(
log(sgj)**2._rp))
1760 mm1j=m0j*dgj**(-1._rp)*exp( 0.5_rp*(
log(sgj)**2._rp))
1761 m1j =m0j*dgj** 1._rp *exp( 0.5_rp*(
log(sgj)**2._rp))
1762 m2j =m0j*dgj** 2._rp *exp( 2.0_rp*(
log(sgj)**2._rp))
1764 m4j =m0j*dgj** 4._rp *exp( 8.0_rp*(
log(sgj)**2._rp))
1765 m5j =m0j*dgj** 5._rp *exp(12.5_rp*(
log(sgj)**2._rp))
1767 m7j =m0j*dgj** 7._rp *exp(24.5_rp*(
log(sgj)**2._rp))
1769 dm0dt_nc_i = -rknc*(2._rp*m0i*m0j+ mm1i*m1j &
1771 +2.492e-2_rp*lambda*(m0i *mm1j+m1i*mm2j &
1772 + m0j *mm1i+m1j*mm2i) )
1773 dm3dt_nc_i = -rknc*(2._rp*m3i*m0j+ m2i *m1j &
1775 +2.492e-2_rp*lambda*(m3i *mm1j+m4i*mm2j &
1776 + m0j *m2i +m1j*m1i ) )
1777 dm6dt_nc_i = -rknc*(2._rp*m6i*m0j+ m5i *m1j &
1779 +2.492e-2_rp*lambda*(m6i *mm1j+m7i*mm2j &
1780 + m0j *m5i +m1j*m4i ) )
1781 dm0dt_nc_j = -rknc*(2._rp*m0i*m0j+ mm1i*m1j &
1783 +2.492e-2_rp*lambda*(m0i *mm1j+m1i*mm2j &
1784 + m0j *mm1i+m1j*mm2i) )
1785 dm3dt_nc_j = -rknc*(2._rp*m0i*m3j+ mm1i*m4j &
1787 +2.492e-2_rp*lambda*(m0i *m2j +m1i*m1j &
1788 + m3j *mm1i+m4j*mm2i) )
1789 dm6dt_nc_j = -rknc*(2._rp*m0i*m6j+ mm1i*m7j &
1791 +2.492e-2_rp*lambda*(m0i *m5j +m1i*m4j &
1792 + m6j *mm1i+m7j*mm2i) )
1793 dm0dt_nc_k = -dm0dt_nc_i
1794 dm3dt_nc_k = -dm3dt_nc_i-dm3dt_nc_j
1795 dm6dt_nc_k = -dm6dt_nc_i-dm6dt_nc_j &
1796 +2._rp*rknc*(2._rp*m3i*m3j+ m2i *m4j &
1798 +2.492e-2_rp*lambda*(m3i *m2j +m4i*m1j &
1799 + m3j *m2i +m4j*m1i) )
1803 mm1p5i=m0i*dgi**(-1.5_rp)*exp( 1.125_rp*(
log(sgi)**2._rp) )
1804 mm0p5i=m0i*dgi**(-0.5_rp)*exp( 0.125_rp*(
log(sgi)**2._rp) )
1805 m0p5i =m0i*dgi** 0.5_rp *exp( 0.125_rp*(
log(sgi)**2._rp) )
1806 m1p5i =m0i*dgi** 1.5_rp *exp( 1.125_rp*(
log(sgi)**2._rp) )
1807 m2p5i =m0i*dgi** 2.5_rp *exp( 3.125_rp*(
log(sgi)**2._rp) )
1808 m3p5i =m0i*dgi** 3.5_rp *exp( 6.125_rp*(
log(sgi)**2._rp) )
1809 m4p5i =m0i*dgi** 4.5_rp *exp(10.125_rp*(
log(sgi)**2._rp) )
1810 m5p5i =m0i*dgi** 5.5_rp *exp(15.125_rp*(
log(sgi)**2._rp) )
1811 m6p5i =m0i*dgi** 6.5_rp *exp(21.125_rp*(
log(sgi)**2._rp) )
1812 m8i =m0i*dgi** 8._rp *exp(32.000_rp*(
log(sgi)**2._rp) )
1815 mm1p5j=m0j*dgj**(-1.5_rp)*exp( 1.125_rp*(
log(sgj)**2._rp) )
1816 mm0p5j=m0j*dgj**(-0.5_rp)*exp( 0.125_rp*(
log(sgj)**2._rp) )
1817 m0p5j =m0j*dgj** 0.5_rp *exp( 0.125_rp*(
log(sgj)**2._rp) )
1818 m1p5j =m0j*dgj** 1.5_rp *exp( 1.125_rp*(
log(sgj)**2._rp) )
1819 m2p5j =m0j*dgj** 2.5_rp *exp( 3.125_rp*(
log(sgj)**2._rp) )
1820 m3p5j =m0j*dgj** 3.5_rp *exp( 6.125_rp*(
log(sgj)**2._rp) )
1821 m4p5j =m0j*dgj** 4.5_rp *exp(10.125_rp*(
log(sgj)**2._rp) )
1822 m5p5j =m0j*dgj** 5.5_rp *exp(15.125_rp*(
log(sgj)**2._rp) )
1823 m6p5j =m0j*dgj** 6.5_rp *exp(21.125_rp*(
log(sgj)**2._rp) )
1824 m8j =m0j*dgj** 8._rp *exp(32.000_rp*(
log(sgj)**2._rp) )
1828 beta =(1._rp-(sqrt(1._rp+alpha**3._rp)/(1._rp+sqrt(alpha**3._rp))))/(1._rp-1._rp/sqrt(2._rp))
1829 gamma1 =(sgi +alpha*sgj )/(1._rp+alpha)
1830 gamma2 =(sgi**2._rp +alpha*sgj**2._rp)/(1._rp+alpha)
1831 bbb = 1._rp+1.2_rp*beta*dexp(
real(-2._rp*gamma1,kind=
dp))-0.646_rp*beta*dexp(
real(-0.35_rp*gamma2,kind=
dp))
1833 dm0dt_fm_i=-bbb*rkfm*( &
1834 m0i *m0p5j +m2i *mm1p5j +2._rp*m1i *mm0p5j &
1835 + m0j *m0p5i +m2j *mm1p5i +2._rp*m1j *mm0p5i )
1836 dm3dt_fm_i=-bbb*rkfm*( &
1837 m3i *m0p5j +m5i *mm1p5j +2._rp*m4i *mm0p5j &
1838 + m0j *m3p5i +m2j *m1p5i +2._rp*m1j *m2p5i )
1839 dm6dt_fm_i=-bbb*rkfm*( &
1840 m6i *m0p5j +m8i *mm1p5j +2._rp*m7i *mm0p5j &
1841 + m0j *m6p5i +m2j *m4p5i +2._rp*m1j *m5p5i )
1842 dm0dt_fm_j= dm0dt_fm_i
1843 dm3dt_fm_j=-bbb*rkfm*( &
1844 m0i *m3p5j +m2i *m1p5j +2._rp*m1i *m2p5j &
1845 + m3j *m0p5i +m5j *mm1p5i +2._rp*m4j *mm0p5i )
1846 dm6dt_fm_j=-bbb*rkfm*( &
1847 m0i *m6p5j +m2i *m4p5j +2._rp*m1i *m5p5j &
1848 + m6j *m0p5i +m8j *mm1p5i +2._rp*m7j *mm0p5i )
1849 dm0dt_fm_k=-dm0dt_fm_i
1850 dm3dt_fm_k=-dm3dt_fm_i-dm3dt_fm_j
1851 dm6dt_fm_k=-dm6dt_fm_i-dm6dt_fm_j &
1852 +2._rp * bbb*rkfm*( &
1853 m3i *m3p5j +m5i *m1p5j +2._rp*m4i *m2p5j &
1854 + m3j *m3p5i +m5j *m1p5i +2._rp*m4j *m2p5i )
1857 if (dm0dt_fm_i+dm0dt_nc_i/=0._rp) &
1858 dm0dt_i = dm0dt_fm_i*dm0dt_nc_i/(dm0dt_fm_i+dm0dt_nc_i)
1859 if (dm3dt_fm_i+dm3dt_nc_i/=0._rp) &
1860 dm3dt_i = dm3dt_fm_i*dm3dt_nc_i/(dm3dt_fm_i+dm3dt_nc_i)
1861 if (dm6dt_fm_i+dm6dt_nc_i/=0._rp) &
1862 dm6dt_i = dm6dt_fm_i*dm6dt_nc_i/(dm6dt_fm_i+dm6dt_nc_i)
1863 if (dm0dt_fm_j+dm0dt_nc_j/=0._rp) &
1864 dm0dt_j = dm0dt_fm_j*dm0dt_nc_j/(dm0dt_fm_j+dm0dt_nc_j)
1865 if (dm3dt_fm_j+dm3dt_nc_j/=0._rp) &
1866 dm3dt_j = dm3dt_fm_j*dm3dt_nc_j/(dm3dt_fm_j+dm3dt_nc_j)
1867 if (dm6dt_fm_j+dm6dt_nc_j/=0._rp) &
1868 dm6dt_j = dm6dt_fm_j*dm6dt_nc_j/(dm6dt_fm_j+dm6dt_nc_j)
1869 if (dm0dt_fm_k+dm0dt_nc_k/=0._rp) &
1870 dm0dt_k = dm0dt_fm_k*dm0dt_nc_k/(dm0dt_fm_k+dm0dt_nc_k)
1873 if (dm6dt_fm_k+dm6dt_nc_k/=0._rp) &
1874 dm6dt_k = dm6dt_fm_k*dm6dt_nc_k/(dm6dt_fm_k+dm6dt_nc_k)
1876 dm0i = dm0dt_i * dtrest
1877 dm3i = dm3dt_i * dtrest
1878 dm6i = dm6dt_i * dtrest
1879 dmsi = dm3i * rhoi *pi6*1.e12_rp
1880 dm0j = dm0dt_j * dtrest
1881 dm3j = dm3dt_j * dtrest
1882 dm6j = dm6dt_j * dtrest
1883 dmsj = dm3j * rhoj *pi6*1.e12_rp
1884 dm0k = dm0dt_k * dtrest
1886 dm6k = dm6dt_k * dtrest
1891 end subroutine aero_inter
1895 subroutine diag_ds6(m0,m3,m6,m2,dg,sg,dm2)
1897 real(RP) :: m0,m2,m3,m6,dg,sg,m3_bar,m6_bar
1898 real(RP) :: m2_new,m2_old,dm2
1899 real(RP),
parameter :: sgmax=2.5_rp
1900 real(RP),
parameter :: rk1=3._rp
1901 real(RP),
parameter :: rk2=6._rp
1902 real(RP),
parameter :: ratio =rk1/rk2
1903 real(RP),
parameter :: rk1_hat=1._rp/(ratio*(rk2-rk1))
1904 real(RP),
parameter :: rk2_hat=ratio/(rk1-rk2)
1905 real(DP),
parameter :: tiny=1.e-50_dp
1908 if (m0 <= tiny .OR. m3 <= tiny .OR. m6 <= tiny)
then 1920 dg = m3_bar**rk1_hat*m6_bar**rk2_hat
1922 if (m3_bar/m6_bar**ratio < 1._rp)
then 1923 sg = exp(dsqrt(
real(2._RP/(rk1*(rk1-rk2)) &
1924 * log(m3_bar/m6_bar**ratio), kind=
dp )))
1925 m2 = m0*dg**2._rp*exp(2._rp*(log(sg)**2._rp))
1929 if (sg > sgmax)
then 1932 call diag_d2(m0,m3,sg, &
1937 if (m3_bar/m6_bar**ratio >= 1._rp)
then 1939 call diag_d2(m0,m3,sg, &
1945 dm2 = m2_old - m2_new
1949 end subroutine diag_ds6
1951 subroutine trans_ccn(aerosol_procs, aerosol_activ, t_ccn, t_cn, &
1952 n_ctg, n_kap_max, n_siz_max, n_atr, &
1953 ic_out, ia_m0, ia_m2, ia_m3, ik_out, n_siz, &
1954 ! rnum_out, nbins_out, dlog10d_out)
1955 rnum_out, nbins_out)
1959 integer,
intent(in) :: n_ctg, n_kap_max, n_siz_max, n_atr
1960 integer,
intent(in) :: ic_out, ik_out
1961 integer,
intent(in) :: ia_m0, ia_m2, ia_m3
1962 integer,
intent(in) :: n_siz(n_ctg)
1963 real(RP),
intent(in) :: aerosol_procs(n_atr,n_siz_max,n_kap_max,n_ctg)
1964 real(RP),
intent(in) :: aerosol_activ(n_atr,n_siz_max,n_kap_max,n_ctg)
1965 integer,
intent(in) :: nbins_out
1966 real(RP),
intent(out):: rnum_out(nbins_out)
1968 real(RP),
intent(out):: t_ccn
1969 real(RP),
intent(out):: t_cn
1970 real(RP) :: dlog10d_out
1972 real(RP) :: m0t,m2t,m3t,dgt,sgt,dm2
1973 real(RP) :: d_lw2,d_up2,dg2,sg2,fnum0,fnum1
1975 integer :: is0, is_out
1976 real(RP),
parameter :: d_max = 1.e-5_rp
1977 real(RP),
parameter :: d_min = 1.e-9_rp
1978 real(RP) :: d_lw(nbins_out), d_up(nbins_out)
1992 do is0 = 1, n_siz(ic_out)
2014 t_ccn = t_ccn + aerosol_activ(ia_m0,is0,ik_out,ic_out)
2015 t_cn = t_cn + aerosol_procs(ia_m0,is0,ik_out,ic_out)
2020 end subroutine trans_ccn
2034 real(RP),
intent(in) :: QTRC(
ka,
ia,
ja,
qa)
2035 real(RP),
intent(in) :: RH (
ka,
ia,
ja)
integer, public is
start point of inner domain: x, local
real(rp), public const_cvdry
specific heat (dry air,constant volume) [J/kg/K]
integer, public je
end point of inner domain: y, local
real(rp), public const_cpdry
specific heat (dry air,constant pressure) [J/kg/K]
module ATMOSPHERE / Saturation adjustment
subroutine, public prc_mpistop
Abort MPI.
real(dp), public time_nowsec
subday part of current time [sec]
real(rp), dimension(:), allocatable, public aq_cp
CP for each hydrometeors [J/kg/K].
subroutine, public atmos_phy_ae_kajino13(DENS, MOMZ, MOMX, MOMY, RHOT, EMIT, NREG, QTRC, CN, CCN, RHOQ_t_AE)
Aerosol Microphysics.
logical, public io_l
output log or not? (this process)
subroutine, public atmos_phy_ae_kajino13_setup(AE_TYPE)
Setup.
real(dp), public time_startdaysec
second of start time [sec]
integer, public ke
end point of inner domain: z, local
real(rp), public const_rdry
specific gas constant (dry air) [J/kg/K]
real(rp), public const_undef
integer, public ia
of x whole cells (local, with HALO)
integer, public ka
of z whole cells (local, with HALO)
integer, parameter, public dp
real(rp), public const_pre00
pressure reference [Pa]
integer, public js
start point of inner domain: y, local
real(rp), dimension(:), allocatable, public ae_dens
integer, dimension(:), allocatable, public nsiz
subroutine, public log(type, message)
real(dp), public time_dtsec_atmos_phy_ae
time interval of physics(aerosol ) [sec]
real(rp), parameter, public const_rvap
specific gas constant (water vapor) [J/kg/K]
real(rp), dimension(:), allocatable, public aq_cv
CV for each hydrometeors [J/kg/K].
subroutine aerosol_zerochem(deltt, temp_k, pres_pa, super, flag_npf, flag_cond, flag_coag, aerosol_procs, conc_gas, emis_procs, emis_gas, aerosol_activ)
integer, public ks
start point of inner domain: z, local
subroutine, public atmos_phy_ae_kajino13_effectiveradius(Re, QTRC, RH)
Calculate Effective Radius.
subroutine, public prof_rapstart(rapname_base, level)
Start raptime.
integer, public ie
end point of inner domain: x, local
module ATMOSPHERE / Thermodynamics
logical, public io_lnml
output log or not? (for namelist, this process)
module ATMOSPHERE / Physics Aerosol Microphysics
integer, public io_fid_conf
Config file ID.
integer, public io_fid_log
Log file ID.
real(rp), public const_mdry
mass weight (dry air) [g/mol]
subroutine, public prof_rapend(rapname_base, level)
Save raptime.
subroutine aerosol_nucleation(conc_h2so4, J_1nm)
integer, public ja
of y whole cells (local, with HALO)