m7_delcoa.F90 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808
  1. #include "tm5.inc"
  2. #ifdef with_budgets
  3. SUBROUTINE m7_delcoa(kproma, kbdim, klev, paerml, &
  4. paernl, pm6rp, pa4delt, panew, &
  5. pa, pb, pbfract1, pbfract2, &
  6. pbfract5, pso4_5, pso4_6, pso4_7, ptime, &
  7. pprocess)
  8. #else
  9. SUBROUTINE m7_delcoa(kproma, kbdim, klev, paerml, &
  10. paernl, pm6rp, pa4delt, panew, &
  11. pa, pb, pbfract1, pbfract2, &
  12. pbfract5, pso4_5, pso4_6, pso4_7, ptime )
  13. #endif
  14. !
  15. ! Authors:
  16. ! ---------
  17. ! E. Vignati and J. Wilson, JRC/EI (original source) 09/2000
  18. ! P. Stier, MPI (f90-version, changes, comments) 2001
  19. !
  20. ! Version/History:
  21. ! ----------------
  22. ! equivalent to the version delco_n2 of the m7 boxmodel
  23. ! + use of the analytical solution
  24. !
  25. ! Purpose
  26. ! ---------
  27. ! This routine calculates changes in number concentration of
  28. ! each aerosol mode over the time step, due to coagulation with
  29. ! the current mode and all higher ones.
  30. !
  31. ! Method:
  32. ! -----------
  33. ! *delcoa* integrates for each mode dn/dt=c -a*n^2 -b*n over ztmst
  34. !
  35. ! The resulting particles are assumed to reside in the
  36. ! mode of highest mode of the pair of particles colliding.
  37. ! 1+1=>1 1+2=>2 1+3=>3, 2+2=>2 2+3=>3, 3+3=>3.
  38. ! zc is now non zero for mode 1 only (nucleation).
  39. ! All formation of higher mode particles is handled in dconc.
  40. !
  41. ! For climatological studies, 5 day accumulation mode concs are
  42. ! within a factor of 2 of the full model.
  43. !
  44. ! Interface
  45. ! -----------
  46. ! *m7_delcoa* is called from *m7_dnum*
  47. !
  48. ! Externals
  49. ! -----------
  50. ! none
  51. !
  52. ! USE mo_time_control, ONLY: time_step_len
  53. USE mo_aero_m7, ONLY: nmod, nsol, naermod, &
  54. iaiti, ibcki, iocki, ibcks, &
  55. iocks, ibcas, iocas, ibccs, &
  56. ioccs, iduci, iduai, iacci, &
  57. icoai, iaits
  58. USE mo_aero_m7, ONLY: m7_coat
  59. #ifdef with_budgets
  60. Use M7_Data, only: nm7procs
  61. #endif
  62. IMPLICIT NONE
  63. !--- Parameter list:
  64. !
  65. ! paerml = total aerosol mass for each compound
  66. ! [molec. cm-3 for sulphate; ug m-3 for others]
  67. ! paernl = aerosol number for each mode [cm-3]
  68. ! pm6rp = mean mode actual radius (wet radius for soluble modes
  69. ! and dry radius for insoluble modes) [cm]
  70. ! pa4delt(:,:,:) = change in H2SO4 mass of the respective mode over one timstep
  71. ! due to:
  72. ! - nucleation of H2SO4 (calculated in m7_nuck)
  73. ! - coagulation (calculated in m7_concoag)
  74. ! panew = number of nucleated particles (during 1 timestep) [1]
  75. ! pa = unimodal coagulation coefficient (zcom(mod)) []
  76. ! pb = inter-modal coagulation with higher modes
  77. ! (zcom(mod) * n(jmod+1)) []
  78. ! pbfractx(:,:,y) = fraction of the total number of particles removed by
  79. ! coagulation from mode x that is moved to mode y+1 [1]
  80. ! pso4_x = mass of sulphate condensed on insoluble mode x [molec. cm-3]
  81. !
  82. !--- Local variables:
  83. !
  84. ! zansum = aerosol number in the respective mode [cm-3]
  85. ! zxxsum = aerosol mass for compound xx in the respective
  86. ! mode, e.g. xx = bc, oc, a4 (sulfate)
  87. ! [g cm-3 for bc,oc and molec. cm-3 for sulfate]
  88. ! zxxav = average mass of a sulfate particle in the respective
  89. ! mode [molecules]
  90. ! zxxavy = average mass of species xx in mode y []
  91. ! where xx is ss, du, bc, oc, or a4 for sulfate
  92. ! [molecules for sulfate and ug for others]
  93. ! zanli(:,:,:) = Number of particles moved by the inter-modal
  94. ! coagulation []
  95. ! zansq(:,:,:) = Number of particles moved by the intra-modal
  96. ! coagulation []
  97. ! zaernt(:,:,:) = New particle number n(t+dt) after the integration
  98. ! of the aerosol dynamics equation [cm-3]
  99. !--- Parameters:
  100. INTEGER :: kproma, kbdim, klev
  101. REAL :: ptime, time_step_len
  102. REAL :: paerml(kbdim,klev,naermod), paernl(kbdim,klev,nmod), &
  103. pa4delt(kbdim,klev,naermod), panew(kbdim,klev), &
  104. pm6rp(kbdim,klev,nmod)
  105. REAL :: pbfract1(kbdim,klev,nmod-1), pbfract2(kbdim,klev,nmod-1), &
  106. pbfract5(kbdim,klev,3)
  107. REAL :: pa(kbdim,klev,nmod), pb(kbdim,klev,nmod)
  108. REAL :: pso4_5(kbdim,klev), pso4_6(kbdim,klev), &
  109. pso4_7(kbdim,klev)
  110. #ifdef with_budgets
  111. Real :: pprocess(kbdim,klev,nm7procs)
  112. #endif
  113. ! Local variables:
  114. INTEGER :: jmod, jl, jk, kmod
  115. REAL :: za4av1(kbdim,klev), za4av2(kbdim,klev), &
  116. zbcav2(kbdim,klev), zocav2(kbdim,klev), &
  117. zbcav3(kbdim,klev), zocav3(kbdim,klev), &
  118. zbcav4(kbdim,klev), zocav4(kbdim,klev), &
  119. zbcav5(kbdim,klev), zocav5(kbdim,klev), &
  120. zduav6(kbdim,klev), zduav7(kbdim,klev)
  121. REAL :: zanli(kbdim,klev,nmod), zansq(kbdim,klev,nmod), &
  122. zaernt(kbdim,klev,nmod)
  123. REAL :: zm6rp(nmod), zcrtcst(nmod)
  124. ! Auxiliary variables:
  125. REAL :: zansum, zbcsum, zocsum, za4sum, za4av, &
  126. ztop, zbot, zatot, zanse, zanle, &
  127. ze1, zf1, zf2, zf3, zf4, zr1, &
  128. ztmst, zc
  129. REAL :: zamloss5, zamloss6, zamloss7, zanloss5, &
  130. zanloss6, zanloss7, ztloss, zbfofac, zms, &
  131. zbfnfac, zbftot, zaerni, zanytnt, &
  132. zanytni, zanytns, zanytnm, ztotn, &
  133. zaerns
  134. !--- m7_box:
  135. REAL :: zaernl_diff(kbdim,klev,nmod), zaerml_diff(kbdim,klev,naermod), &
  136. zaernl_0(kbdim,klev,nmod), zaerml_0(kbdim,klev,naermod)
  137. REAL :: zcrit_5, zcrit_6, zcrit_7
  138. zcrit_5=0.
  139. zcrit_6=0.
  140. zcrit_7=0.
  141. !--- END m7_box
  142. !--- 0) Initialisations: ------------------------------------------------
  143. time_step_len = ptime
  144. ztmst = time_step_len
  145. za4av = 0.
  146. za4av1(:,:) = 0.
  147. za4av2(:,:) = 0.
  148. zbcav2(:,:) = 0.
  149. zocav2(:,:) = 0.
  150. zbcav3(:,:) = 0.
  151. zocav3(:,:) = 0.
  152. zbcav4(:,:) = 0.
  153. zocav4(:,:) = 0.
  154. zbcav5(:,:) = 0.
  155. zocav5(:,:) = 0.
  156. !--- m7_box:
  157. zaernl_0=paernl
  158. zaerml_0=paerml
  159. !--- END m7_box
  160. !--- 1) Insoluble modes
  161. !
  162. DO jk=1,klev
  163. DO jl=1,kproma
  164. !--- Dust modes insoluble:
  165. ! Calculate average mass (used in concoag)
  166. IF(paernl(jl,jk,iacci) > 0.0) THEN
  167. zduav6(jl,jk) = (paerml(jl,jk,iduai)*1.E-6) / paernl(jl,jk,iacci)
  168. ELSE
  169. zduav6(jl,jk)=0.
  170. END IF
  171. IF(paernl(jl,jk,icoai) > 0.0) THEN
  172. zduav7(jl,jk) = (paerml(jl,jk,iduci)*1.E-6) / paernl(jl,jk,icoai)
  173. ELSE
  174. zduav7(jl,jk)=0.
  175. END IF
  176. !--- Aitken mode insoluble:
  177. ! Only considered process:
  178. ! Coagulation and transfer from the insoluble aitken mode
  179. ! to the soluble aitken and accumulation modes.
  180. zansum=paernl(jl,jk,iaiti)
  181. zbcsum=paerml(jl,jk,ibcki)*1.e-6
  182. zocsum=paerml(jl,jk,iocki)*1.e-6
  183. zaernt(jl,jk,iaiti)=zansum
  184. zanli(jl,jk,iaiti)=0.0
  185. zansq(jl,jk,iaiti)=0.0
  186. !--- Calculations only in presence of sufficient particles:
  187. IF (zansum > 1.E-10) THEN
  188. ! --- Average mass for a bc/oc particle in the aitken mode [ug]:
  189. zbcav5(jl,jk)=zbcsum/zansum
  190. zocav5(jl,jk)=zocsum/zansum
  191. !--- 1.1) Case of no coagulation:
  192. !
  193. ! (pa(jl,jk,iaiti) < 1.e-15 .AND. pb(jl,jk,iaiti) < 1.e-15)
  194. !
  195. ! => Nothing to be done
  196. !--- 1.2) Case with coagulation:
  197. IF (pa(jl,jk,iaiti) >= 1.e-15 .OR. pb(jl,jk,iaiti) >= 1.e-15) THEN
  198. !--- 1.2.1) Case of no inter-modal coagulation:
  199. ! dn/dt = -a*n**2 =>
  200. ! n(t) = n0/(1 + n0*a*(t-t0))
  201. IF (pb(jl,jk,iaiti) < 1.e-15) THEN
  202. zaernt(jl,jk,iaiti)=zansum/(1.0+zansum*pa(jl,jk,iaiti)*ztmst)
  203. zanli(jl,jk,iaiti)=0.0
  204. zansq(jl,jk,iaiti)=zansum-zaernt(jl,jk,iaiti)
  205. !--- 1.2.2) Case with inter- and intra-modal coagulation:
  206. ! dn/dt = -a*n**2 - b*n =>
  207. ! n(t) = (b*n0*exp(-b(t-t0)))/((n0*a)(1-exp(-b(t-t0)))+b)
  208. ELSE
  209. !--- Calculate n(t+dt):
  210. ze1=EXP(-pb(jl,jk,iaiti)*ztmst)
  211. ztop=pb(jl,jk,iaiti)*zansum*ze1
  212. zbot=zansum*pa(jl,jk,iaiti)*(1.0-ze1)+pb(jl,jk,iaiti)
  213. zaernt(jl,jk,iaiti)=ztop/zbot
  214. !--- Limit n(t+dt) to available particle in the mode:
  215. zaernt(jl,jk,iaiti)=MIN(zaernt(jl,jk,iaiti), zansum)
  216. !--- Total change in particle numbers of the mode due to coagulation:
  217. zatot=zansum-zaernt(jl,jk,iaiti)
  218. !--- Contribution of the intra-modal coagulation:
  219. zanse=zansum*zansum*pa(jl,jk,iaiti)
  220. !--- Contribution of the inter-modal coagulation:
  221. zanle=zansum*pb(jl,jk,iaiti)
  222. !--- Number of particles moved by the inter-modal coagulation:
  223. zanli(jl,jk,iaiti)=zatot*zanle/(zanse+zanle)
  224. !--- Number of particles moved by the intra-modal coagulation:
  225. zansq(jl,jk,iaiti)=zatot*zanse/(zanse+zanle)
  226. END IF
  227. !--- 1.2.3) Change masses of the insoluble aitken mode due to
  228. ! intra-modal coagulation and the coagulation with the
  229. ! nucleation mode (transfers to the soluble modes
  230. ! of the particles coagulating with the nucleation mode
  231. ! are done in m7_concoag):
  232. paerml(jl,jk,ibcki)=( zaernt(jl,jk,iaiti) + &
  233. zansq(jl,jk,iaiti) + &
  234. pbfract5(jl,jk,1)*zanli(jl,jk,iaiti) ) * &
  235. zbcav5(jl,jk)*1.e6
  236. paerml(jl,jk,iocki)=( zaernt(jl,jk,iaiti) + &
  237. zansq(jl,jk,iaiti) + &
  238. pbfract5(jl,jk,1)*zanli(jl,jk,iaiti) ) * &
  239. zocav5(jl,jk)*1.e6
  240. !--- 1.2.4) Change the numbers of the insoluble aitken mode due to
  241. ! intra-modal coagulation:
  242. paernl(jl,jk,iaiti)=zaernt(jl,jk,iaiti) + &
  243. pbfract5(jl,jk,1)*zanli(jl,jk,iaiti)
  244. !--- 1.2.5) Store changes in masses of compounds in the insoluble
  245. ! aitken mode due to inter-modal coagulation:
  246. ! (zanli(:,:,x) = total number of particles moved from mode x
  247. ! pbfract5(:,:,x)= fraction of the total number of particles
  248. ! moved from mode 5 that is moved to mode x )
  249. pa4delt(jl,jk,ibcks)=pbfract5(jl,jk,2)*zanli(jl,jk,iaiti)*zbcav5(jl,jk)*1.e6
  250. pa4delt(jl,jk,iocks)=pbfract5(jl,jk,2)*zanli(jl,jk,iaiti)*zocav5(jl,jk)*1.e6
  251. pa4delt(jl,jk,ibcas)=pbfract5(jl,jk,3)*zanli(jl,jk,iaiti)*zbcav5(jl,jk)*1.e6
  252. pa4delt(jl,jk,iocas)=pbfract5(jl,jk,3)*zanli(jl,jk,iaiti)*zocav5(jl,jk)*1.e6
  253. #ifdef with_budgets
  254. ! Here are some processes to notate
  255. #endif
  256. END IF
  257. END IF
  258. END DO
  259. END DO
  260. !
  261. !--- 2) Soluble modes: --------------------------------------------------
  262. !
  263. !CDIR unroll=5
  264. mode : DO jmod=1,nsol
  265. level : DO jk=1,klev
  266. longitude : DO jl=1,kproma
  267. !--- Nucleation mode:
  268. IF (jmod .EQ. 1) THEN
  269. zansum=paernl(jl,jk,jmod)+panew(jl,jk)
  270. za4sum=paerml(jl,jk,jmod)+pa4delt(jl,jk,1)
  271. !--- Others:
  272. ELSE
  273. zansum=paernl(jl,jk,jmod)
  274. za4sum=paerml(jl,jk,jmod)
  275. END IF
  276. IF (jmod.EQ.2) THEN
  277. zbcsum=paerml(jl,jk,ibcks)*1.e-6
  278. zocsum=paerml(jl,jk,iocks)*1.e-6
  279. END IF
  280. IF (jmod.EQ.3) THEN
  281. zbcsum=paerml(jl,jk,ibcas)*1.e-6
  282. zocsum=paerml(jl,jk,iocas)*1.e-6
  283. END IF
  284. IF (jmod.EQ.4) THEN
  285. zbcsum=paerml(jl,jk,ibccs)*1.e-6
  286. zocsum=paerml(jl,jk,ioccs)*1.e-6
  287. END IF
  288. zaernt(jl,jk,jmod)=zansum
  289. zanli(jl,jk,jmod)=0.0
  290. zansq(jl,jk,jmod)=0.0
  291. !--- Calculations only in presence of sufficient particles:
  292. IF (zansum > 1.E-10) THEN
  293. za4av=za4sum/zansum
  294. IF (jmod.EQ.1) THEN
  295. za4av1(jl,jk)=za4av
  296. ELSE IF (jmod.EQ.2) THEN
  297. zbcav2(jl,jk)=zbcsum/zansum
  298. zocav2(jl,jk)=zocsum/zansum
  299. za4av2(jl,jk)=za4av
  300. ELSE IF (jmod.EQ.3) THEN
  301. zbcav3(jl,jk)=zbcsum/zansum
  302. zocav3(jl,jk)=zocsum/zansum
  303. ELSE IF (jmod.EQ.4) THEN
  304. zbcav4(jl,jk)=zbcsum/zansum
  305. zocav4(jl,jk)=zocsum/zansum
  306. END IF
  307. !--- 2.1) Case of no coagulation:
  308. !
  309. IF (pa(jl,jk,jmod) < 1.e-15 .AND. pb(jl,jk,jmod) < 1e-15) THEN
  310. !--- Nucleation in mode 1 only.
  311. ! Nothing to be done for other modes.
  312. IF(jmod.EQ.1) THEN
  313. paerml(jl,jk,jmod)=za4sum
  314. paernl(jl,jk,jmod)=zansum
  315. END IF
  316. !--- 2.2) Case with coagulation:
  317. ELSE
  318. !--- 2.2.1) Case of no nucleation:
  319. !--- Not Mode 1 or Nucleation rate below 1/s:
  320. IF ( (jmod .NE. 1) .OR. (panew(jl,jk)/ztmst < 1.0) ) THEN
  321. paernl(jl,jk,jmod)=zansum
  322. !--- 2.2.1a) Case of no inter-modal coagulation:
  323. ! dn/dt = -a*n**2 =>
  324. ! n(t) = n0/(1 + n0*a*(t-t0))
  325. IF (pb(jl,jk,jmod) < 1.e-15) THEN
  326. zaernt(jl,jk,jmod)=zansum/(1.0+zansum*pa(jl,jk,jmod)*ztmst)
  327. zanli(jl,jk,jmod)=0.0
  328. zansq(jl,jk,jmod)=zansum-zaernt(jl,jk,jmod)
  329. !--- 2.2.1b) Case with inter- and intra-modal coagulation:
  330. ! dn/dt = -a*n**2 - b*n =>
  331. ! n(t) = (b*n0*exp(-b(t-t0)))/((n0*a)(1-exp(-b(t-t0)))+b)
  332. ELSE
  333. !--- Calculate n(t+dt):
  334. ze1=EXP(-pb(jl,jk,jmod)*ztmst)
  335. ztop=pb(jl,jk,jmod)*zansum*ze1
  336. zbot=zansum*pa(jl,jk,jmod)*(1.0-ze1)+pb(jl,jk,jmod)
  337. zaernt(jl,jk,jmod)=ztop/zbot
  338. !--- Limit n(t+dt) to available particle in the mode:
  339. zaernt(jl,jk,jmod)=MIN(zaernt(jl,jk,jmod), zansum)
  340. !--- Total change in particle numbers of the mode due to coagulation:
  341. zatot=zansum-zaernt(jl,jk,jmod)
  342. !--- Contribution of the intra-modal coagulation:
  343. zanse=zansum*zansum*pa(jl,jk,jmod)
  344. !--- Contribution of the inter-modal coagulation:
  345. zanle=zansum*pb(jl,jk,jmod)
  346. !--- Number of particles moved by the inter-modal coagulation:
  347. zanli(jl,jk,jmod)=zatot*zanle/(zanse+zanle)
  348. !--- Number of particles moved by the intra-modal coagulation:
  349. zansq(jl,jk,jmod)=zatot*zanse/(zanse+zanle)
  350. END IF
  351. !--- 2.2.2) Case with nucleation:
  352. ELSE IF ( (jmod .EQ. 1) .AND. (panew(jl,jk)/ztmst >= 1.0) ) THEN
  353. !--- 2.2.2a) Nucleation, inter- and intra-modal coagulation:
  354. ! dn/dt = -a*n**2 - b*n + c =>
  355. ! n(t) = -(b/(2a)) +
  356. ! R/2a * [ ((1 - (-2ax0-b+R)/(+2ax0+b+R))exp(-Rt)) /
  357. ! ((1 + (-2ax0-b+R)/(+2ax0+b+R))exp(-Rt)) ]
  358. ! where: R=SQRT(b**2+4ac)
  359. !
  360. ! If b/=0 then always a/=0. The only case where a would be 0
  361. ! and b unequal zero is the case of no pre-existing particles
  362. ! in the nucleation mode but pre-existing particles in other
  363. ! modes. For this case a is calculated for an assumed radius
  364. ! of a critical cluster in m7_coaset.
  365. IF (pb(jl,jk,jmod) >= 1.E-15) THEN
  366. !--- Calculate n(t):
  367. !--- c:
  368. zc=panew(jl,jk)/ztmst
  369. !--- R:
  370. zf1=pb(jl,jk,jmod)*pb(jl,jk,jmod)+4.0*pa(jl,jk,jmod)*zc
  371. zr1=SQRT(zf1)
  372. !--- exp(-Rt):
  373. ze1=EXP(-zr1*ztmst)
  374. !--- 2ax0+b:
  375. zf2=2.0*pa(jl,jk,jmod)*paernl(jl,jk,jmod)+pb(jl,jk,jmod)
  376. !--- Term in squared bracket:
  377. zf3=ze1*(zr1-zf2)/(zr1+zf2)
  378. zf4=(1.0-zf3)/(1.0+zf3)
  379. !--- n(t):
  380. zaernt(jl,jk,jmod)=(zr1*zf4-pb(jl,jk,jmod))/2.0/pa(jl,jk,jmod)
  381. !--- Limit n(t+dt) to available particle in the mode:
  382. zaernt(jl,jk,jmod)=MIN(zaernt(jl,jk,jmod), zansum)
  383. !--- Total change in particle numbers of the mode due to coagulation:
  384. zatot=zansum-zaernt(jl,jk,jmod)
  385. !--- Contribution of the intra-modal coagulation:
  386. zanse=zansum*zansum*pa(jl,jk,jmod)
  387. !--- Contribution of the inter-modal coagulation:
  388. zanle=zansum*pb(jl,jk,jmod)
  389. !--- Number of particles moved by the inter-modal coagulation:
  390. zanli(jl,jk,jmod)=zatot*zanle/(zanse+zanle)
  391. !--- Number of particles moved by the intra-modal coagulation:
  392. zansq(jl,jk,jmod)=zatot*zanse/(zanse+zanle)
  393. !--- 2.2.2b) Nucleation and intra-modal coagulation:
  394. ! dn/dt = -a*n**2 - b*n + c with b=0 =>
  395. ! dn/dt = -a*n**2 + c =>
  396. ! n(t) = R/2a * [ ((1 - (-2ax0+R)/(+2ax0+R))exp(-Rt)) /
  397. ! ((1 + (-2ax0+R)/(+2ax0+R))exp(-Rt)) ]
  398. ! where: R=SQRT(4ac)
  399. !
  400. ! Can be shown to be equivalent to:
  401. !
  402. ! n(t) = R1*((x0+R1)/(x0-R1)+exp(-SQRT(-4ac)t)) /
  403. ! ((x0+R1)/(x0-R1)-exp(-SQRT(-4ac)t))
  404. ! where R1=SQRT(c/a)
  405. ELSE IF (pb(jl,jk,jmod) < 1.E-15) THEN
  406. !--- c:
  407. zc=panew(jl,jk)/ztmst
  408. !--- R1:
  409. zr1=SQRT(zc/pa(jl,jk,jmod))
  410. !--- exp(-Rt):
  411. ze1=EXP(-zr1*2.0*pa(jl,jk,jmod)*ztmst)
  412. !--- n(t):
  413. zf1=(paernl(jl,jk,jmod)+zr1)/(paernl(jl,jk,jmod)-zr1)
  414. ztop=zr1*(zf1+ze1)
  415. zbot=zf1-ze1
  416. IF (zbot < 1.E-15) THEN
  417. zaernt(jl,jk,jmod)=zansum
  418. ELSE
  419. zaernt(jl,jk,jmod)=ztop/zbot
  420. END IF
  421. !--- Limit n(t+dt) to available particle in the mode:
  422. zaernt(jl,jk,jmod)=MIN(zaernt(jl,jk,jmod), zansum)
  423. !--- Number of particles moved by the inter-modal coagulation:
  424. zanli(jl,jk,jmod)=0.0
  425. !--- Number of particles moved by the intra-modal coagulation:
  426. zansq(jl,jk,jmod)=zansum-zaernt(jl,jk,jmod)
  427. END IF
  428. END IF
  429. !---2.2.3 New bit for insoluble/souble coagulation
  430. !--- sum total insoluble+soluble paticles in mode jmod JJNW
  431. IF (jmod .EQ. 1 .AND. zanli(jl,jk,jmod)>0.0) THEN
  432. zaerni=paernl(jl,jk,iaiti)+paernl(jl,jk,iacci)+paernl(jl,jk,icoai)
  433. zaerns=zansum+paernl(jl,jk,iaits)
  434. ! zaerns=zansum
  435. ztotn=zaerns+zaerni
  436. IF (zaerns .gt. zaerni .and. zaerni .gt. 0.0) THEN
  437. ! calculate analytical solution no of mixed particles for coagulation
  438. ! between paernl(jl,jk,jmod) soluble particles and zaerni insouble of
  439. ! the same dimensions
  440. IF (zaerni .gt. 1.0) then
  441. zanytni=4.0*zaerni/((2.0+pa(jl,jk,jmod)*ztmst*ztotn)* &
  442. (2.0+pa(jl,jk,jmod)*ztmst*(ztotn-zaerni)))
  443. ELSE
  444. zanytni = 0.0
  445. ENDIF
  446. zanytnt=2.0*ztotn/(2.0+pa(jl,jk,jmod)*ztmst*ztotn)
  447. zanytns=4.0*zaerns/((2.0+pa(jl,jk,jmod)*ztmst*ztotn)* &
  448. (2.0+pa(jl,jk,jmod)*ztmst*(ztotn-zaerns)))
  449. zanytnm=zanytnt-(zanytni+zanytns)
  450. zanytnm=min(zanytnm,zaerni)
  451. zanytni=zaerni-zanytnm
  452. zanytns=zaernt(jl,jk,jmod)
  453. !CDIR UNROLL=7
  454. DO kmod=1,nmod
  455. zm6rp(kmod)=pm6rp(jl,jk,kmod)
  456. END DO
  457. CALL m7_coat(zm6rp,zcrtcst)
  458. zamloss5=paernl(jl,jk,5)/zaerni*zanytnm*zcrtcst(5)
  459. zanloss5=zamloss5/za4av
  460. zamloss6=paernl(jl,jk,6)/zaerni*zanytnm*zcrtcst(6)
  461. zanloss6=zamloss6/za4av
  462. zamloss7=paernl(jl,jk,7)/zaerni*zanytnm*zcrtcst(7)
  463. zanloss7=zamloss7/za4av
  464. ztloss=zanloss5+zanloss6+zanloss7
  465. zms=zansq(jl,jk,jmod)*0.95
  466. ztloss=min(ztloss,zansq(jl,jk,jmod)*0.95)
  467. zbfofac=zanli(jl,jk,jmod)/(zanli(jl,jk,jmod)+ztloss)
  468. zbfnfac=ztloss/(zanli(jl,jk,jmod)+ztloss)
  469. zanli(jl,jk,jmod)=zanli(jl,jk,jmod)+ztloss
  470. zansq(jl,jk,jmod)=zansq(jl,jk,jmod)-ztloss
  471. zbftot=0.0
  472. !CDIR UNROLL=7
  473. DO kmod=1,nmod
  474. IF(kmod>jmod) THEN
  475. pbfract1(jl,jk,kmod-jmod)=pbfract1(jl,jk,kmod-jmod)*zbfofac
  476. IF (kmod.GE.5) THEN
  477. pbfract1(jl,jk,kmod-jmod)=pbfract1(jl,jk,kmod-jmod)+ &
  478. zbfnfac*paernl(jl,jk,kmod)/zaerni
  479. END IF
  480. zbftot=zbftot+pbfract1(jl,jk,kmod-jmod)
  481. END IF
  482. END DO
  483. !CDIR UNROLL=7
  484. DO kmod=1,nmod
  485. IF (kmod>jmod) THEN
  486. pbfract1(jl,jk,kmod-jmod)=pbfract1(jl,jk,kmod-jmod)/zbftot
  487. END IF
  488. END DO
  489. END IF
  490. END IF
  491. !---- End of new inslouble/soluble caogulation routine JJNW
  492. !--- 2.3) Change masses and numbers of the respective modes to account-----------
  493. ! for intra-modal coagulation (zansq) and coagulation with
  494. ! higher modes (zaernt):
  495. !
  496. !--- 2.3.1) Change mass of the sulfur compounds:
  497. paerml(jl,jk,jmod)=(zaernt(jl,jk,jmod)+zansq(jl,jk,jmod))*za4av
  498. !--- 2.3.2) Change mass of the carbon compounds:
  499. IF (jmod.EQ.2) THEN
  500. paerml(jl,jk,ibcks)=(zaernt(jl,jk,jmod)+zansq(jl,jk,jmod))*zbcav2(jl,jk)*1.e6
  501. paerml(jl,jk,iocks)=(zaernt(jl,jk,jmod)+zansq(jl,jk,jmod))*zocav2(jl,jk)*1.e6
  502. ELSE IF (jmod.EQ.3) THEN
  503. paerml(jl,jk,ibcas)=(zaernt(jl,jk,jmod)+zansq(jl,jk,jmod))*zbcav3(jl,jk)*1.e6
  504. paerml(jl,jk,iocas)=(zaernt(jl,jk,jmod)+zansq(jl,jk,jmod))*zocav3(jl,jk)*1.e6
  505. ELSE IF (jmod.EQ.4) THEN
  506. paerml(jl,jk,ibccs)=(zaernt(jl,jk,jmod)+zansq(jl,jk,jmod))*zbcav4(jl,jk)*1.e6
  507. paerml(jl,jk,ioccs)=(zaernt(jl,jk,jmod)+zansq(jl,jk,jmod))*zocav4(jl,jk)*1.e6
  508. END IF
  509. !--- 2.3.3) Particle numbers:
  510. paernl(jl,jk,jmod)=zaernt(jl,jk,jmod)!@@@+zansq(jl,jk,jmod)/2.0
  511. !--- 2.4) Calculate changes in particle masses due to inter-modal --------------
  512. ! coagulation:
  513. !--- 2.4.1) Transfer of mass from mode 1 to other modes:
  514. IF (jmod .EQ. 1) THEN
  515. ! Mass from 1 to 2:
  516. pa4delt(jl,jk,2)=pbfract1(jl,jk,1)*zanli(jl,jk,1)*za4av
  517. ! Mass from 1 to 2 due to coag. with 5:
  518. pa4delt(jl,jk,2)=pa4delt(jl,jk,2)+pbfract1(jl,jk,4)*zanli(jl,jk,1)*za4av
  519. ! Mass from 1 to 3:
  520. pa4delt(jl,jk,3)=pbfract1(jl,jk,2)*zanli(jl,jk,1)*za4av
  521. ! Mass from 1 to 3 due to coag. with 6:
  522. pa4delt(jl,jk,3)=pa4delt(jl,jk,3)+pbfract1(jl,jk,5)*zanli(jl,jk,1)*za4av
  523. ! Mass from 1 to 4:
  524. pa4delt(jl,jk,4)=pbfract1(jl,jk,3)*zanli(jl,jk,1)*za4av
  525. ! Mass from 1 to 4 due to coag. with 7:
  526. pa4delt(jl,jk,4)=pa4delt(jl,jk,4)+pbfract1(jl,jk,6)*zanli(jl,jk,1)*za4av
  527. !--- 2.4.2) Transfer of mass from mode 2 to other modes:
  528. ELSE IF (jmod .EQ. 2) THEN
  529. ! Mass from 2 to 3:
  530. pa4delt(jl,jk,3)=pa4delt(jl,jk,3)+pbfract2(jl,jk,2)*zanli(jl,jk,2)*za4av
  531. pa4delt(jl,jk,ibcas)=pa4delt(jl,jk,ibcas)+ &
  532. pbfract2(jl,jk,2)*zanli(jl,jk,2)*zbcav2(jl,jk)*1.e6
  533. pa4delt(jl,jk,iocas)=pa4delt(jl,jk,iocas)+ &
  534. pbfract2(jl,jk,2)*zanli(jl,jk,2)*zocav2(jl,jk)*1.e6
  535. ! Mass from 2 to 3 due to coag. with 6:
  536. pa4delt(jl,jk,3)=pa4delt(jl,jk,3)+pbfract2(jl,jk,5)*zanli(jl,jk,2)*za4av
  537. pa4delt(jl,jk,ibcas)=pa4delt(jl,jk,ibcas)+ &
  538. pbfract2(jl,jk,5)*zanli(jl,jk,2)*zbcav2(jl,jk)*1.e6
  539. pa4delt(jl,jk,iocas)=pa4delt(jl,jk,iocas)+ &
  540. pbfract2(jl,jk,5)*zanli(jl,jk,2)*zocav2(jl,jk)*1.e6
  541. ! Mass from 2 to 4:
  542. pa4delt(jl,jk,4)=pa4delt(jl,jk,4)+pbfract2(jl,jk,3)*zanli(jl,jk,2)*za4av
  543. pa4delt(jl,jk,ibccs)=pa4delt(jl,jk,ibccs)+ &
  544. pbfract2(jl,jk,3)*zanli(jl,jk,2)*zbcav2(jl,jk)*1.E6
  545. pa4delt(jl,jk,ioccs)=pa4delt(jl,jk,ioccs)+ &
  546. pbfract2(jl,jk,3)*zanli(jl,jk,2)*zocav2(jl,jk)*1.E6
  547. ! Mass from 2 to 4 due to coag. with 7:
  548. pa4delt(jl,jk,4)=pa4delt(jl,jk,4)+pbfract2(jl,jk,6)*zanli(jl,jk,2)*za4av
  549. pa4delt(jl,jk,ibccs)=pa4delt(jl,jk,ibccs)+ &
  550. pbfract2(jl,jk,6)*zanli(jl,jk,2)*zbcav2(jl,jk)*1.E6
  551. pa4delt(jl,jk,ioccs)=pa4delt(jl,jk,ioccs)+ &
  552. pbfract2(jl,jk,6)*zanli(jl,jk,2)*zocav2(jl,jk)*1.E6
  553. ! Mass from 2 due to coagulation of 2 with 5 remains in 2:
  554. !
  555. !@@@ No effect as pbfract2(:,:,4)=0.!
  556. !@@@ (Not needed as it is assumed that 5 coagulates with 2
  557. !@@@ and therefor the masses in 2 remain unchanged!)
  558. pa4delt(jl,jk,2)=pa4delt(jl,jk,2)+pbfract2(jl,jk,4)*zanli(jl,jk,2)*za4av
  559. pa4delt(jl,jk,ibcks)=pa4delt(jl,jk,ibcks)+ &
  560. pbfract2(jl,jk,4)*zanli(jl,jk,2)*zbcav2(jl,jk)*1.E6
  561. pa4delt(jl,jk,iocks)=pa4delt(jl,jk,iocks)+ &
  562. pbfract2(jl,jk,4)*zanli(jl,jk,2)*zocav2(jl,jk)*1.E6
  563. END IF
  564. END IF
  565. END IF
  566. END DO longitude
  567. END DO level
  568. END DO mode
  569. !--- 3) Calculate transfer from the insoluble to the soluble modes: -------------------------
  570. #ifdef with_budgets
  571. CALL m7_concoag (kproma, kbdim, klev, &
  572. paerml, paernl, pm6rp, pa4delt, zanli, &
  573. za4av1, za4av2, zbcav5, zocav5, zduav6, &
  574. zduav7, pso4_5, pso4_6, pso4_7, &
  575. pbfract1, pbfract2, &
  576. zcrit_5, zcrit_6, zcrit_7,pprocess ) !--- m7_box: Added for diagnostics
  577. #else
  578. CALL m7_concoag (kproma, kbdim, klev, &
  579. paerml, paernl, pm6rp, pa4delt, zanli, &
  580. za4av1, za4av2, zbcav5, zocav5, zduav6, &
  581. zduav7, pso4_5, pso4_6, pso4_7, &
  582. pbfract1, pbfract2, &
  583. zcrit_5, zcrit_6, zcrit_7 ) !--- m7_box: Added for diagnostics
  584. #endif
  585. !--- 4) Final change of the aerosol masses due to nucleation, -------------------------------
  586. ! inter-modal coagulation and condensation on the insoluble modes:
  587. ! (Nucleation mode already done above.)
  588. DO jmod=2,naermod
  589. paerml(1:kproma,:,jmod)=paerml(1:kproma,:,jmod)+pa4delt(1:kproma,:,jmod)
  590. END DO
  591. !--- m7_box: Include diagnostics for conservation of numbers:
  592. DO jmod=1,nmod
  593. DO jk=1,klev
  594. DO jl=1,kproma
  595. SELECT CASE(jmod)
  596. CASE(1)
  597. zaernl_diff(jl,jk,jmod) = zaernl_0(jl,jk,jmod) - &
  598. (paernl(jl,jk,jmod) - panew(jl,jk) + &
  599. zansq(jl,jk,jmod) + zanli(jl,jk,jmod))
  600. CASE(2)
  601. zaernl_diff(jl,jk,jmod) = zaernl_0(jl,jk,jmod) - &
  602. (paernl(jl,jk,jmod) + &
  603. zansq(jl,jk,jmod) + zanli(jl,jk,jmod) - &
  604. zcrit_5)
  605. CASE(3)
  606. zaernl_diff(jl,jk,jmod) = zaernl_0(jl,jk,jmod) - &
  607. (paernl(jl,jk,jmod) + &
  608. zansq(jl,jk,jmod) + zanli(jl,jk,jmod) - &
  609. zcrit_6)
  610. CASE(4)
  611. zaernl_diff(jl,jk,jmod) = zaernl_0(jl,jk,jmod) - &
  612. (paernl(jl,jk,jmod) + &
  613. zansq(jl,jk,jmod) + zanli(jl,jk,jmod) - &
  614. zcrit_7)
  615. CASE (5)
  616. zaernl_diff(jl,jk,jmod) = zaernl_0(jl,jk,jmod) - &
  617. (paernl(jl,jk,jmod) + &
  618. zansq(jl,jk,jmod) + zanli(jl,jk,jmod) + &
  619. zcrit_5)
  620. CASE (6)
  621. zansq(jl,jk,jmod)=0.
  622. zanli(jl,jk,jmod)=0.
  623. zaernl_diff(jl,jk,jmod) = zaernl_0(jl,jk,jmod) - &
  624. (paernl(jl,jk,jmod) + &
  625. zansq(jl,jk,jmod) + zanli(jl,jk,jmod) + &
  626. zcrit_6)
  627. CASE (7)
  628. zansq(jl,jk,jmod)=0.
  629. zanli(jl,jk,jmod)=0.
  630. zaernl_diff(jl,jk,jmod) = zaernl_0(jl,jk,jmod) - &
  631. (paernl(jl,jk,jmod) + &
  632. zansq(jl,jk,jmod) + zanli(jl,jk,jmod) + &
  633. zcrit_7)
  634. END SELECT
  635. zaerml_diff(jl,jk,jmod) = zaerml_0(jl,jk,jmod) - &
  636. (paerml(jl,jk,jmod)-panew(jl,jk)+zansq(jl,jk,jmod)+zanli(jl,jk,jmod))
  637. END DO
  638. END DO
  639. END DO
  640. #ifdef with_budgets
  641. pprocess(:,:,3) = zansq(:,:,1) ! Coagulation 1-1 N
  642. pprocess(:,:,4) = zanli(:,:,1)*pbfract1(:,:,1) ! The last 1 should be 2, but it is x+1 (clumsy), Coagulation 1-2 N
  643. pprocess(:,:,5) = zanli(:,:,1)*pbfract1(:,:,1)*za4av1 ! Coagulation 1-2 SU
  644. pprocess(:,:,6) = zanli(:,:,1)*pbfract1(:,:,2) ! Coagulation 1-3 N
  645. pprocess(:,:,7) = zanli(:,:,1)*pbfract1(:,:,2)*za4av1 ! Coagulation 1-3 SU
  646. pprocess(:,:,8) = zanli(:,:,1)*pbfract1(:,:,3) ! Coagulation 1-4 N
  647. pprocess(:,:,9) = zanli(:,:,1)*pbfract1(:,:,3)*za4av1 ! Coagulation 1-4 SU
  648. pprocess(:,:,10) = zanli(:,:,1)*pbfract1(:,:,4) ! Coagulation 1-5 N
  649. pprocess(:,:,11) = zanli(:,:,1)*pbfract1(:,:,4)*za4av1 ! Coagulation 1-5 SU
  650. pprocess(:,:,12) = zanli(:,:,1)*pbfract1(:,:,5) ! Coagulation 1-6 N
  651. pprocess(:,:,13) = zanli(:,:,1)*pbfract1(:,:,5)*za4av1 ! Coagulation 1-6 SU
  652. pprocess(:,:,14) = zanli(:,:,1)*pbfract1(:,:,6) ! Coagulation 1-7 N
  653. pprocess(:,:,15) = zanli(:,:,1)*pbfract1(:,:,6)*za4av1 ! Coagulation 1-7 SU
  654. pprocess(:,:,16) = zansq(:,:,2) ! Coagulation 2-2 N
  655. pprocess(:,:,17) = zanli(:,:,2)*pbfract2(:,:,2) ! Again, actually 3, Coagulation 2-3 N
  656. pprocess(:,:,18) = zanli(:,:,2)*pbfract2(:,:,2)*za4av2 ! Coagulation 2-3 SU
  657. pprocess(:,:,19) = zanli(:,:,2)*pbfract2(:,:,2)*zbcav2*1.e6 ! Coagulation 2-3 BC
  658. pprocess(:,:,20) = zanli(:,:,2)*pbfract2(:,:,2)*zocav2*1.e6 ! Coagulation 2-3 OC
  659. pprocess(:,:,21) = zanli(:,:,2)*pbfract2(:,:,3) ! Coagulation 2-4 N
  660. pprocess(:,:,22) = zanli(:,:,2)*pbfract2(:,:,3)*za4av2 ! Coagulation 2-4 SU
  661. pprocess(:,:,23) = zanli(:,:,2)*pbfract2(:,:,3)*zbcav2*1.e6 ! Coagulation 2-4 BC
  662. pprocess(:,:,24) = zanli(:,:,2)*pbfract2(:,:,3)*zocav2*1.e6 ! Coagulation 2-4 OC
  663. pprocess(:,:,25) = zanli(:,:,5)*pbfract5(:,:,2) ! Here, the 2 is good. Coagulation 2-5 N
  664. pprocess(:,:,26) = zanli(:,:,5)*pbfract5(:,:,2)*zbcav5*1.e6 ! Coagulation 2-5 BC
  665. pprocess(:,:,27) = zanli(:,:,5)*pbfract5(:,:,2)*zocav5*1.e6 ! Coagulation 2-5 OC
  666. pprocess(:,:,28) = zanli(:,:,2)*pbfract2(:,:,5) ! Coagulation 2-6 N
  667. pprocess(:,:,29) = zanli(:,:,2)*pbfract2(:,:,5)*za4av2 ! Coagulation 2-6 SU
  668. pprocess(:,:,30) = zanli(:,:,2)*pbfract2(:,:,5)*zbcav2*1.e6 ! Coagulation 2-6 BC
  669. pprocess(:,:,31) = zanli(:,:,2)*pbfract2(:,:,5)*zocav2*1.e6 ! Coagulation 2-6 OC
  670. pprocess(:,:,32) = zanli(:,:,2)*pbfract2(:,:,6) ! Coagulation 2-7 N
  671. pprocess(:,:,33) = zanli(:,:,2)*pbfract2(:,:,6)*za4av2 ! Coagulation 2-7 SU
  672. pprocess(:,:,34) = zanli(:,:,2)*pbfract2(:,:,6)*zbcav2*1.e6 ! Coagulation 2-7 BC
  673. pprocess(:,:,35) = zanli(:,:,2)*pbfract2(:,:,6)*zocav2*1.e6 ! Coagulation 2-7 OC
  674. pprocess(:,:,36) = zansq(:,:,3) ! Coagulation 3-3 N
  675. pprocess(:,:,37) = zanli(:,:,5)*pbfract5(:,:,3) ! Coagulation 3-5 N
  676. pprocess(:,:,38) = zanli(:,:,5)*pbfract5(:,:,3)*zbcav5*1.e6 ! Coagulation 3-5 BC
  677. pprocess(:,:,39) = zanli(:,:,5)*pbfract5(:,:,3)*zocav5*1.e6 ! Coagulation 3-5 OC
  678. pprocess(:,:,40) = zansq(:,:,5) ! Coagulation 5-5 N
  679. #endif
  680. !AJS: this is only for debugging ?
  681. !WRITE(77,*) zaernl_diff
  682. END SUBROUTINE m7_delcoa