m7.F90 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. #include "tm5.inc"
  2. #ifdef with_budgets
  3. SUBROUTINE m7(kproma, kbdim, klev, & ! TM5 indices
  4. papp1, prelhum, ptp1, & ! " thermodynamics
  5. pso4g, pelvoc, psvoc, paerml, paernl, & ! M7 tracers
  6. prhop, pww, pm6rp, pm6dry, & ! " aerosol properties
  7. ptime, & ! TM5 time step
  8. pprocess ) ! TM5 budget processes
  9. #else
  10. SUBROUTINE m7(kproma, kbdim, klev, & ! TM5 indices
  11. papp1, prelhum, ptp1, & ! " thermodynamics
  12. pso4g, pelvoc, psvoc, paerml, paernl, & ! M7 tracers
  13. prhop, pww, pm6rp, pm6dry, & ! " aerosol properties
  14. ptime ) ! TM5 time step
  15. #endif
  16. !
  17. ! ****m7* Aerosol model for the system so4,bc,oc,ss,dust in 7 modes.
  18. !
  19. ! Authors:
  20. ! ---------
  21. ! E. Vignati, JRC/EI (original source) 2000
  22. ! P. Stier, MPI (f90-version, changes, comments) 2001
  23. ! E. Vignati, JRC/IES (so2 is not required in this version) 2005
  24. !
  25. ! Purpose
  26. ! ---------
  27. ! Aerosol model for the system so4,bc,oc,ss,dust in 7 modes.
  28. !
  29. ! Externals
  30. ! ---------
  31. !
  32. ! *m7_averageproperties*
  33. ! calculates the average mass for all modes and the particle
  34. ! dry radius and density for the insoluble modes.
  35. !
  36. ! *m7_equiz*
  37. ! calculates the ambient radius of sulphate particles
  38. !
  39. ! *m7_equimix*
  40. ! calculates the ambient radius of so4,bc,oc (dust) particles
  41. !
  42. ! *m7_equil*
  43. ! calculates the ambient radius of so4,ss particles
  44. !
  45. ! *m7_dgas*
  46. ! calculates the sulfate condensation on existing particles
  47. !
  48. ! *m7_dnum*
  49. ! calculates new gas phase sulfate and aerosol numbers and masses
  50. ! after condensation, nucleation and coagulation over one timestep
  51. !
  52. ! *m7_dconc*
  53. ! repartitions aerosol number and mass between the
  54. ! the modes to account for condensational growth and the formation
  55. ! of an accumulation mode from the upper tail of the aitken mode and
  56. ! of a coarse mode from the upper tail of the accumulation mode
  57. !
  58. USE mo_aero_m7, ONLY: lsnucl, lscoag, lscond, &
  59. nmod, nss, nsol, naermod
  60. use tracer_data, only : tracer_print
  61. use GO, only : gol, goErr, goPr, goBug
  62. use mo_aero, only : nsoa !RM
  63. #ifdef with_budgets
  64. Use M7_Data, Only: nm7procs
  65. #endif
  66. IMPLICIT NONE
  67. !--- Parameter list:
  68. !
  69. ! papp1 = atmospheric pressure at time t+1 [Pa]
  70. ! prelhum = atmospheric relative humidity [% (0-1)]
  71. ! ptp1 = atmospheric temperature at time t+1 [K]
  72. ! pso4g = mass of gas phase sulfate [molec. cm-3]
  73. ! paerml = total aerosol mass for each compound
  74. ! [molec. cm-3 for sulphate and ug m-3 for bc, oc, ss, and dust]
  75. ! paernl = aerosol number for each mode [cm-3]
  76. ! prhop = mean mode particle density [g cm-3]
  77. ! pm6rp = mean mode actual radius (wet radius for soluble modes
  78. ! and dry radius for insoluble modes) [cm]
  79. ! pm6dry = dry radius for soluble modes [cm]
  80. ! pww = aerosol water content for each mode [kg(water) m-3(air)]
  81. !
  82. !--- Local variables:
  83. !
  84. ! zttn = average mass for single compound in each mode
  85. ! [in molec. for sulphate and in ug for bc, oc, ss, and dust]
  86. ! zhplus = number of h+ in mole [???] (kg water)-1
  87. ! zso4_x = mass of sulphate condensed on insoluble mode x [molec. cm-3]
  88. ! (calculated in dgas used in concoag)
  89. ! Parameters:
  90. INTEGER :: kproma, kbdim, klev
  91. REAL :: ptime
  92. REAL :: prelhum(kbdim,klev), papp1(kbdim,klev), &
  93. ptp1(kbdim,klev), &
  94. pso4g(kbdim,klev), pelvoc(kbdim,klev), psvoc(kbdim,klev) !RM
  95. REAL :: paerml(kbdim,klev,naermod), paernl(kbdim,klev,nmod), &
  96. pm6rp(kbdim,klev,nmod), pm6dry(kbdim,klev,nsol), &
  97. prhop(kbdim,klev,nmod), pww(kbdim,klev,nmod)
  98. #ifdef with_budgets
  99. Real :: pprocess(kbdim,klev,nm7procs)
  100. #endif
  101. ! Local variables:
  102. !--- m7_box:
  103. INTEGER :: i
  104. LOGICAL :: lofirst=.TRUE.
  105. !--- END m7_box
  106. REAL :: zso4_5(kbdim,klev), zso4_6(kbdim,klev), &
  107. zso4_7(kbdim,klev)
  108. REAL :: zhplus(kbdim,klev,nss)
  109. REAL :: zttn(kbdim,klev,naermod)
  110. !
  111. !--- 0) Initialisations: -------------------------------------------------
  112. !
  113. zhplus(:,:,:) = 0.
  114. pm6dry(:,:,:) = 0.
  115. pm6rp(:,:,:) = 0.
  116. zttn(:,:,:) = 0.
  117. prhop(:,:,:) = 0.
  118. pww(:,:,:) = 0.
  119. zso4_5(:,:) = 0.
  120. zso4_6(:,:) = 0.
  121. zso4_7(:,:) = 0.
  122. #ifdef with_budgets
  123. pprocess(:,:,:) = 0.0
  124. #endif
  125. ! write(*,*) 'in2', 'h2so4= ', pso4g(2100,1), 'num1= ', paernl(2100,1,1)
  126. ! write(*,*) 'in2', 'BCsol= ', paerml(2100,1,5),'BCins= ', paerml(2100,1,8)
  127. ! write(*,*) 'in2', 'POsol= ', paerml(2100,1,9),'POins= ', paerml(2100,1,12)
  128. ! write(*,*) 'in2', 'num2= ', paernl(2100,1,2), 'num5= ', paernl(2100,1,5)
  129. !
  130. ! write(*,*) 'in2', 'BCtot= ', paerml(2100,1,5)+ paerml(2100,1,8)+paerml(2100,1,6)+paerml(2100,1,7)
  131. !
  132. !--- 1) Calculation of particle properties under ambient conditions: -----
  133. !
  134. !--- 1.1) Calculate mean particle mass for all modes
  135. ! and dry radius and density for the insoluble modes.
  136. !
  137. CALL m7_averageproperties(kproma, kbdim, klev, paernl, paerml, zttn, pm6rp, prhop)
  138. !
  139. !--- 1.2) Calculate ambient count median radii and density
  140. ! for lognormal distribution of particles.
  141. !
  142. ! Sulfate particles:
  143. !
  144. CALL m7_equiz(kproma, kbdim, klev, &
  145. papp1, zttn, ptp1, &
  146. prelhum, pm6rp, pm6dry, &
  147. prhop, pww, paernl )
  148. !
  149. ! Mixed particles with sulfate, b/o carbon and dust:
  150. !
  151. CALL m7_equimix(kproma, kbdim, klev, &
  152. papp1, zttn, ptp1, &
  153. prelhum, pm6rp, pm6dry, &
  154. prhop, pww, paernl )
  155. !
  156. ! Accumulation and coarse mode particles in presence of
  157. ! sea salt particles:
  158. !
  159. CALL m7_equil(kproma, kbdim, klev, prelhum, paerml, paernl, &
  160. pm6rp, pm6dry, zhplus, pww, prhop, ptp1 )
  161. !
  162. !--- m7_box: Write initial particle distribution -------------------------
  163. IF (lofirst) THEN
  164. lofirst=.FALSE.
  165. !AJS: for debugging only ?
  166. !WRITE(16,FMT='(8(1x,e12.4))') 0.0, (pm6rp(1,1,i), i=1,7)
  167. !WRITE(20,FMT='(1x,f5.1,7x,7(1x,e12.4))') 0.0, (pm6dry(1,1,i), i=1,4), (pm6rp(1,1,i), i=5,7)
  168. END IF
  169. !--- END m7_box ----------------------------------------------------------
  170. !
  171. !--- 2) Calculate changes in aerosol mass and gas phase sulfate ----------
  172. ! due to sulfate condensation:
  173. ! No change in particle mass/number relationships.
  174. !
  175. #ifdef with_budgets
  176. IF (lscond) CALL m7_dgas(kproma, kbdim, klev, pso4g, paerml, paernl, &
  177. ptp1, papp1, pm6rp, zso4_5, zso4_6, zso4_7, &
  178. ptime,pprocess)
  179. #else
  180. IF (lscond) CALL m7_dgas(kproma, kbdim, klev, pso4g, paerml, paernl, &
  181. ptp1, papp1, pm6rp, zso4_5, zso4_6, zso4_7, &
  182. ptime)
  183. #endif
  184. !--- 2b) Calculate changes in aerosol mass ----------
  185. ! due to organic condensation:
  186. ! No change in particle mass/number relationships.
  187. !
  188. IF (nsoa .GT. 0 .AND. lscond) THEN
  189. #ifdef with_budgets
  190. CALL m7_dgas_org(kproma, kbdim, klev, pelvoc, psvoc, paerml, paernl, &
  191. ptp1, papp1, pm6rp, &
  192. ptime,pprocess)
  193. #else
  194. CALL m7_dgas_org(kproma, kbdim, klev, pelvoc, psvoc, paerml, paernl, &
  195. ptp1, papp1, pm6rp, &
  196. ptime)
  197. #endif
  198. END IF
  199. !
  200. !
  201. !--- 3) Calculate change in particle number concentrations ---------------
  202. ! due to nucleation and coagulation:
  203. ! Change particle mass/number relationships.
  204. !
  205. ! JadB: Removed "If (lsnucl .OR. lscoag)".
  206. ! If only lscond is set, the m7_dnum is required for storing sulfuric acid on insoluble aerosols (making the soluble).
  207. ! Without m7_dnum, the sulfuric acid condensed on insoluble particles is turned into void.
  208. ! IF (lsnucl.OR.lscoag) CALL m7_dnum(kproma, kbdim, klev, &
  209. ! pso4g, paerml, paernl, ptp1, &
  210. ! papp1, prelhum, pm6rp, prhop, &
  211. ! zso4_5, zso4_6, zso4_7, ptime )
  212. #ifdef with_budgets
  213. CALL m7_dnum(kproma, kbdim, klev, &
  214. pso4g, pelvoc, paerml, paernl, ptp1, &
  215. papp1, prelhum, pm6rp, prhop, &
  216. zso4_5, zso4_6, zso4_7, ptime,pprocess )
  217. #else
  218. CALL m7_dnum(kproma, kbdim, klev, &
  219. pso4g, pelvoc, paerml, paernl, ptp1, &
  220. papp1, prelhum, pm6rp, prhop, &
  221. zso4_5, zso4_6, zso4_7, ptime )
  222. #endif
  223. !
  224. !
  225. !--- 4) Recalculation of particle properties under ambient conditions: ---
  226. !
  227. !--- 4.1) Recalculate mean masses for all modes
  228. ! and dry radius and density for the insoluble modes.
  229. !
  230. CALL m7_averageproperties(kproma, kbdim, klev, paernl, paerml, zttn, pm6rp, prhop)
  231. !
  232. !--- 4.2) Calculate ambient count median radii and density
  233. ! for lognormal distribution of particles.
  234. !
  235. ! Sulfate particles:
  236. !
  237. CALL m7_equiz(kproma, kbdim, klev, &
  238. papp1, zttn, ptp1, &
  239. prelhum, pm6rp, pm6dry, &
  240. prhop, pww, paernl )
  241. !
  242. ! Mixed particles with sulfate, b/o carbon and dust:
  243. !
  244. CALL m7_equimix(kproma, kbdim, klev, &
  245. papp1, zttn, ptp1, &
  246. prelhum, pm6rp, pm6dry, &
  247. prhop, pww, paernl )
  248. !
  249. ! Accumulation and coarse mode particles in presence of
  250. ! sea salt particles:
  251. !
  252. CALL m7_equil(kproma, kbdim, klev, prelhum, paerml, paernl, &
  253. pm6rp, pm6dry, zhplus, pww, prhop, ptp1 )
  254. !
  255. !--- 5) Repartitition particles among the modes: -------------------------
  256. !
  257. IF (lscond.OR.lscoag) THEN
  258. #ifdef with_budgets
  259. CALL m7_dconc(kproma, kbdim, klev, paerml, paernl, pm6dry, pprocess)
  260. #else
  261. CALL m7_dconc(kproma, kbdim, klev, paerml, paernl, pm6dry)
  262. #endif
  263. END IF
  264. !
  265. !--- 6) Recalculation of particle properties under ambient conditions: ---
  266. !
  267. !--- 6.1) Calculate mean particle mass for all modes
  268. ! and dry radius and density for the insoluble modes:
  269. !
  270. CALL m7_averageproperties(kproma, kbdim, klev, paernl, paerml, zttn, pm6rp, prhop)
  271. !
  272. !--- 6.2) Calculate ambient count median radii and density
  273. ! for lognormal distribution of particles.
  274. !
  275. ! Sulfate particles:
  276. !
  277. CALL m7_equiz(kproma, kbdim, klev, &
  278. papp1, zttn, ptp1, &
  279. prelhum, pm6rp, pm6dry, &
  280. prhop, pww, paernl )
  281. !
  282. ! Mixed particles with sulfate, b/o carbon and dust:
  283. !
  284. CALL m7_equimix(kproma, kbdim, klev, &
  285. papp1, zttn, ptp1, &
  286. prelhum, pm6rp, pm6dry, &
  287. prhop, pww, paernl )
  288. !
  289. ! Accumulation and coarse mode particles in presence of
  290. ! sea salt particles:
  291. !
  292. CALL m7_equil(kproma, kbdim, klev, prelhum, paerml, paernl, &
  293. pm6rp, pm6dry, zhplus, pww, prhop, ptp1 )
  294. ! write(*,*) 'ou2', 'h2so4= ', pso4g(2100,1),'num1= ',paernl(2100,1,1)
  295. ! write(*,*) 'ou2', 'BCsol= ', paerml(2100,1,5),'BCins= ', paerml(2100,1,8)
  296. ! write(*,*) 'ou2', 'POsol= ', paerml(2100,1,9),'POins= ', paerml(2100,1,12)
  297. ! write(*,*) 'ou2', 'num2= ', paernl(2100,1,2), 'num5= ', paernl(2100,1,5)
  298. ! write(*,*) 'ou2', 'BCtot= ', paerml(2100,1,5)+ paerml(2100,1,8)+paerml(2100,1,6)+paerml(2100,1,7)
  299. ! write(*,*) 'ou2', 'cond5= ', zso4_5(2100,1), '6= ',zso4_6(2100,1), '7= ',zso4_7(2100,1)
  300. !
  301. END SUBROUTINE m7