m7_dnum.F90 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369
  1. #include "tm5.inc"
  2. #ifdef with_budgets
  3. SUBROUTINE m7_dnum(kproma, kbdim, klev, &
  4. pso4g, paerml, paernl, ptp1, &
  5. papp1, prelhum, pm6rp, prhop, &
  6. pso4_5, pso4_6, pso4_7, ptime, &
  7. pprocess)
  8. #else
  9. SUBROUTINE m7_dnum(kproma, kbdim, klev, &
  10. pso4g, paerml, paernl, ptp1, &
  11. papp1, prelhum, pm6rp, prhop, &
  12. pso4_5, pso4_6, pso4_7, ptime )
  13. #endif
  14. !
  15. ! *m7_dnum* changes gas phase sulfate, aerosol numbers and masses
  16. ! due to nucleation and coagulation
  17. !
  18. ! Authors:
  19. ! ---------
  20. ! J. Wilson and E. Vignati, JRC/EI (original source) 09/2000
  21. ! P. Stier, MPI (f90-version, changes, comments) 2001
  22. !
  23. ! Version:
  24. ! ---------
  25. ! This version is equivalent to the version dnum2 of the m7 boxmodel.
  26. !
  27. ! Purpose
  28. ! ---------
  29. ! This routine calculates new gas phase sulfate and aerosol
  30. ! numbers and masses after timestep ztmst.
  31. !
  32. ! Interface
  33. ! -----------
  34. ! *m7_dnum* is called from *m7*
  35. !
  36. ! Externals
  37. ! -----------
  38. ! *m7_coaset* calculates the coagulation kernels
  39. ! *m7_nuck* calculates the integral mass nucleated sulfate and
  40. ! the number of nucleated particles over one timestep
  41. ! *m7_delcoa* integrates equations for the changes in aerosol numbers
  42. ! dn/dt=c -an2 -bn over one timestep and calculates the
  43. ! corresponding changes in aerosol masses
  44. ! *m7_concoag* calculates particle numbers and mass moved from the
  45. ! insoluble to the mixed modes due to coagulation with
  46. ! smaller mixed particles and condensation of H2SO4.
  47. !
  48. ! Warning:
  49. ! --------
  50. ! For optimization purposes currently only "physically reasonable" elements of the
  51. ! coagulation kernel zcom are calculated in m7_concoag. These elements are specified
  52. ! in the matrix locoagmask in mo_aero_m7. Check carefully and adapt locoagmask
  53. ! accordingly before changes in the code below.
  54. USE mo_aero_m7, ONLY: naermod, nmod, lsnucl, lscoag
  55. #ifdef with_budgets
  56. Use M7_Data, Only: nm7procs
  57. #endif
  58. IMPLICIT NONE
  59. !--- Parameters:
  60. !
  61. ! pso4g = mass of gas phase sulfate [molec. cm-3]
  62. ! paerml = total aerosol mass for each compound
  63. ! [molec. cm-3 for sulphate and ug m-3 for bc, oc, ss, and dust]
  64. ! paernl = aerosol number for each mode [cm-3]
  65. ! ptp1 = atmospheric temperature at time t+1 [K]
  66. ! papp1 = atmospheric pressure at time t+1 [Pa]
  67. ! prelhum = atmospheric relative humidity [%]
  68. ! pm6rp = mean mode actual radius (wet radius for soluble modes
  69. ! and dry radius for insoluble modes) [cm]
  70. ! prhop = mean mode particle density [g cm-3]
  71. ! pso4_x = mass of sulphate condensed on insoluble mode x []
  72. !
  73. !--- Local variables:
  74. !
  75. ! zcom = general coagulation coefficient []
  76. ! (calculated in m7_coaset)
  77. ! za = effectively used coagulation coefficient for
  78. ! unimodal coagulation []
  79. ! zb = effectively used coagulation coefficient for
  80. ! inter-modal coagulation []
  81. ! zbfractx(:,:,y) = fraction of the total number of particles removed by
  82. ! coagulation from mode x (finally calculated in m7_delcoa)
  83. ! that is moved to mode y / y+1 (modes 5,6,7 and mode 1,2 resp.) [1]
  84. ! !@@@ Careful! Inconsistent usage!!!
  85. ! za4delt(:,:,:) = change in H2SO4 mass of the respective mode over one timstep
  86. ! due to:
  87. ! - nucleation of H2SO4 (calculated in m7_nuck)
  88. ! - coagulation (calculated in m7_concoag)
  89. ! zanew = number of nucleated particles
  90. ! zanew=za4delt/critn i.e. mass of formed sulfate
  91. ! divided by an assumed mass of a nucleus. []
  92. ! (calculated in m7_nuck)
  93. ! zxxavy = average mass of species xx in mode y []
  94. ! where xx is ss, du, bc, oc, or a4 for sulfate
  95. ! [molecules for sulfate and ug for others]
  96. !
  97. !@@@ to be continued!
  98. !--- Parameters:
  99. INTEGER :: kproma, kbdim, klev
  100. REAL :: ptime
  101. REAL :: pso4g(kbdim,klev), ptp1(kbdim,klev), &
  102. papp1(kbdim,klev), prelhum(kbdim,klev), &
  103. pso4_5(kbdim,klev), pso4_6(kbdim,klev), &
  104. pso4_7(kbdim,klev)
  105. REAL :: paerml(kbdim,klev,naermod), paernl(kbdim,klev,nmod), &
  106. pm6rp(kbdim,klev,nmod), prhop(kbdim,klev,nmod)
  107. #ifdef with_budgets
  108. Real :: pprocess(kbdim,klev,nm7procs)
  109. #endif
  110. ! Local Variables:
  111. INTEGER :: jl, jk
  112. REAL :: zanew(kbdim,klev)
  113. REAL :: za(kbdim,klev,nmod), zb(kbdim,klev,nmod), &
  114. za4delt(kbdim,klev,naermod)
  115. REAL :: zbfract1(kbdim,klev,nmod-1),zbfract2(kbdim,klev,nmod-1), &
  116. zbfract5(kbdim,klev,3), zbfract6(kbdim,klev,2), &
  117. zbfract7(kbdim,klev,2)
  118. REAL :: zcom(kbdim,klev,nmod,nmod)
  119. !--- 0) Initialisations: ----------------------------------------------
  120. za4delt(:,:,:) = 0. ! Mode 1 changed by m7_nuck if lsnucl=TRUE .
  121. ! Has to be initialized for the other modes.
  122. zanew(:,:) = 0. ! Changed by m7_nuck if lsnucl=TRUE .
  123. !--- 1) Calculate coagulation coefficients: --------------------------
  124. !
  125. IF (lscoag) CALL m7_coaset(kproma, kbdim, klev, paernl, ptp1, &
  126. papp1, pm6rp, prhop, zcom )
  127. !
  128. !--- 2) Calculate nucleation rate, number of nucleated particles ------
  129. ! and changes in gas phase sulfate mass.
  130. !
  131. IF (lsnucl) CALL m7_nuck(kproma, kbdim, klev, pso4g, &
  132. ptp1, prelhum, zanew, za4delt, &
  133. ptime )
  134. #ifdef with_budgets
  135. pprocess(:,:,1) = zanew ! Nucleations
  136. pprocess(:,:,2) = za4delt(:,:,1) ! Sulfate involved in nucleation
  137. #endif
  138. !
  139. !--- 3) Assign coagulation coefficients (unimodal coagulation)---------
  140. ! and the normalised fraction of particle numbers moved
  141. ! between the modes (inter-modal coagulation):
  142. !
  143. ! The general equation for dn/dt for each mode is:
  144. !
  145. ! dn/dt=-za*n^2 - zb*n + zc
  146. !
  147. ! where za=unimodal coagulation coefficient (zcom(mod))
  148. ! zb=inter-modal coagulation with higher modes
  149. ! (zcom(mod) * n(jmod+1))
  150. ! zc=particle formation rate
  151. ! (=zanew/ztmst if jmod=1, zero for higher modes)
  152. !
  153. ! zb is zero when n(jmod+1)=zero, or jmod=naermod
  154. !
  155. IF (lscoag) THEN
  156. DO jk=1,klev
  157. DO jl=1,kproma
  158. !--- 3.1) Unimodal coagulation coefficients:
  159. !@@@Coag:
  160. za(jl,jk,1)=zcom(jl,jk,1,1)/2. ! Unimodal coagulation
  161. za(jl,jk,2)=zcom(jl,jk,2,2)/2. ! only allowed for modes
  162. za(jl,jk,3)=zcom(jl,jk,3,3)/2. ! 1,2,3 and 5.
  163. za(jl,jk,4)=0.
  164. za(jl,jk,5)=zcom(jl,jk,5,5)/2.
  165. za(jl,jk,6)=0.
  166. za(jl,jk,7)=0.
  167. !
  168. !--- 3.2) Inter-modal coagulation - soluble modes
  169. !
  170. !--- Sum all higher mode coagulation terms for
  171. ! soluble modes 1,2,3,4:
  172. !
  173. !--- 3.2.1) Mode 1:
  174. !--- Number of particles (zbfract1(:,:,x)) that are moved
  175. ! from mode 1 to the mode x+1 :
  176. ! !@@@ Clumsy! Change to x - also in concoag!!!
  177. zbfract1(jl,jk,1)=zcom(jl,jk,2,1)*paernl(jl,jk,2)
  178. zbfract1(jl,jk,2)=zcom(jl,jk,3,1)*paernl(jl,jk,3)
  179. zbfract1(jl,jk,3)=zcom(jl,jk,4,1)*paernl(jl,jk,4)
  180. zbfract1(jl,jk,4)=zcom(jl,jk,5,1)*paernl(jl,jk,5)
  181. zbfract1(jl,jk,5)=zcom(jl,jk,6,1)*paernl(jl,jk,6)
  182. zbfract1(jl,jk,6)=zcom(jl,jk,7,1)*paernl(jl,jk,7)
  183. !
  184. !--- Sum of all particles that are moved from mode 1:
  185. !
  186. zb(jl,jk,1)=zbfract1(jl,jk,1)+zbfract1(jl,jk,2)+ &
  187. zbfract1(jl,jk,3)+zbfract1(jl,jk,4)+ &
  188. zbfract1(jl,jk,5)+zbfract1(jl,jk,6)
  189. !
  190. !--- Normalize number of particles by the total number of
  191. ! particles moved from mode 1:
  192. !
  193. IF (zb(jl,jk,1).GT. EPSILON(zb(jl,jk,1))) THEN
  194. zbfract1(jl,jk,1)=zbfract1(jl,jk,1)/zb(jl,jk,1)
  195. zbfract1(jl,jk,2)=zbfract1(jl,jk,2)/zb(jl,jk,1)
  196. zbfract1(jl,jk,3)=zbfract1(jl,jk,3)/zb(jl,jk,1)
  197. zbfract1(jl,jk,4)=zbfract1(jl,jk,4)/zb(jl,jk,1)
  198. zbfract1(jl,jk,5)=zbfract1(jl,jk,5)/zb(jl,jk,1)
  199. zbfract1(jl,jk,6)=zbfract1(jl,jk,6)/zb(jl,jk,1)
  200. END IF
  201. !
  202. !--- 3.2.2) Mode 2:
  203. !
  204. !--- Number of particles (zbfract1(:,:,x)) that are moved
  205. ! from mode 2 to the mode x+1 :
  206. !
  207. zbfract2(jl,jk,2)=zcom(jl,jk,3,2)*paernl(jl,jk,3)
  208. zbfract2(jl,jk,3)=zcom(jl,jk,4,2)*paernl(jl,jk,4)
  209. !zbfract2(jl,jk,4)=zcom(jl,jk,5,2)*paernl(jl,jk,5)
  210. zbfract2(jl,jk,4)=0.
  211. zbfract2(jl,jk,5)=zcom(jl,jk,6,2)*paernl(jl,jk,6)
  212. zbfract2(jl,jk,6)=zcom(jl,jk,7,2)*paernl(jl,jk,7)
  213. !--- Sum of all particles that are moved from mode 2:
  214. zb(jl,jk,2)=zbfract2(jl,jk,2)+zbfract2(jl,jk,3)+ &
  215. zbfract2(jl,jk,4)+zbfract2(jl,jk,5)+ &
  216. zbfract2(jl,jk,6)
  217. !--- Normalize particle numbers by the total number of
  218. ! particles moved from mode 2:
  219. IF (zb(jl,jk,2).GT. EPSILON(zb(jl,jk,2))) THEN
  220. zbfract2(jl,jk,2)=zbfract2(jl,jk,2)/zb(jl,jk,2)
  221. zbfract2(jl,jk,3)=zbfract2(jl,jk,3)/zb(jl,jk,2)
  222. zbfract2(jl,jk,4)=zbfract2(jl,jk,4)/zb(jl,jk,2)
  223. zbfract2(jl,jk,5)=zbfract2(jl,jk,5)/zb(jl,jk,2)
  224. zbfract2(jl,jk,6)=zbfract2(jl,jk,6)/zb(jl,jk,2)
  225. END IF
  226. !--- 3.2.3) Mode 3 and Mode 4 - considered ineffective:
  227. zb(jl,jk,3)=0.0
  228. zb(jl,jk,4)=0.0
  229. !
  230. !--- 3.3) Inter-modal coagulation - insoluble modes
  231. !
  232. ! For the insoluble modes coagulation with soluble modes
  233. ! is a sink as they are transfered to the corresponding
  234. ! mixed/solublemode. Therefore, terms with a lower mode
  235. ! number or the same mode number are included.
  236. ! (!@@@ There are still some switches for testing.)
  237. !
  238. !--- 3.3.1) Mode 5:
  239. !
  240. !--- Number of particles (zbfract5(:,:,x)) that are moved
  241. ! from mode 5 to the mode x:
  242. !@@@ zbfract5(jl,jk,1)= zcom(jl,jk,1,5)*paernl(jl,jk,1)
  243. zbfract5(jl,jk,1)=0.
  244. zbfract5(jl,jk,2)=zcom(jl,jk,2,5)*paernl(jl,jk,2)
  245. zbfract5(jl,jk,3)=zcom(jl,jk,3,5)*paernl(jl,jk,3)
  246. !--- Sum of all particles that are moved from mode 5:
  247. zb(jl,jk,5)=zbfract5(jl,jk,1)+zbfract5(jl,jk,2)+zbfract5(jl,jk,3)
  248. !--- Normalize number of particles by the total number of
  249. ! particles moved from mode 5:
  250. IF (zb(jl,jk,5).GT. EPSILON(zb(jl,jk,5))) THEN
  251. zbfract5(jl,jk,1)=zbfract5(jl,jk,1)/zb(jl,jk,5)
  252. zbfract5(jl,jk,2)=zbfract5(jl,jk,2)/zb(jl,jk,5)
  253. zbfract5(jl,jk,3)=zbfract5(jl,jk,3)/zb(jl,jk,5)
  254. END IF
  255. !--- 3.3.2) Mode 6:
  256. !--- Number of particles (zbfract6(:,:,x)) that are moved
  257. ! from mode 6 to the mode x:
  258. !@@@zbfract6(jl,jk,1)=zcom(jl,jk,1,6)*paernl(jl,jk,1)
  259. !@@@zbfract6(jl,jk,2)=zcom(jl,jk,2,6)*paernl(jl,jk,2)
  260. zbfract6(jl,jk,1)=0.
  261. zbfract6(jl,jk,2)=0.
  262. !--- Sum of all particles that are moved from mode 6:
  263. zb(jl,jk,6)=zbfract6(jl,jk,1)+zbfract6(jl,jk,2)
  264. !--- Normalize number of particles by the total number of
  265. ! particles moved from mode 6:
  266. IF (zb(jl,jk,6).GT. EPSILON(zb(jl,jk,6))) THEN
  267. zbfract6(jl,jk,1)=zbfract6(jl,jk,1)/zb(jl,jk,6)
  268. zbfract6(jl,jk,2)=zbfract6(jl,jk,2)/zb(jl,jk,6)
  269. END IF
  270. !--- 3.3.3) Mode 7:
  271. !--- Number of particles (zbfract7(:,:,x)) that are moved
  272. ! from mode 7 to the mode x:
  273. !@@@ zbfract7(jl,jk,1)=zcom(jl,jk,1,7)*paernl(jl,jk,1)
  274. !@@@ zbfract7(jl,jk,2)=zcom(jl,jk,2,7)*paernl(jl,jk,2)
  275. zbfract7(jl,jk,1)=0.
  276. zbfract7(jl,jk,2)=0.
  277. !--- Sum of all particles that are moved from mode 7:
  278. zb(jl,jk,7)=zbfract7(jl,jk,1)+zbfract7(jl,jk,2)
  279. !--- Normalize number of particles by the total number of
  280. ! particles moved from mode 7:
  281. IF (zb(jl,jk,7).GT. EPSILON(zb(jl,jk,7))) THEN
  282. zbfract7(jl,jk,1)=zbfract7(jl,jk,1)/zb(jl,jk,7)
  283. zbfract7(jl,jk,2)=zbfract7(jl,jk,2)/zb(jl,jk,7)
  284. END IF
  285. END DO
  286. END DO
  287. !
  288. ELSE
  289. za(:,:,:) = 0.
  290. zb(:,:,:) = 0.
  291. zbfract1(:,:,:) = 0.
  292. zbfract2(:,:,:) = 0.
  293. zbfract5(:,:,:) = 0.
  294. zbfract6(:,:,:) = 0.
  295. zbfract7(:,:,:) = 0.
  296. END IF !(lscoag)
  297. !
  298. !
  299. #ifdef with_budgets
  300. CALL m7_delcoa(kproma, kbdim, klev, paerml, &
  301. paernl, pm6rp, za4delt, zanew, &
  302. za, zb, zbfract1, zbfract2, &
  303. zbfract5, pso4_5, pso4_6, pso4_7, ptime,pprocess )
  304. #else
  305. CALL m7_delcoa(kproma, kbdim, klev, paerml, &
  306. paernl, pm6rp, za4delt, zanew, &
  307. za, zb, zbfract1, zbfract2, &
  308. zbfract5, pso4_5, pso4_6, pso4_7, ptime )
  309. #endif
  310. END SUBROUTINE m7_dnum