chem_param__test.F90 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. !### macro's #####################################################
  2. !
  3. #define TRACEBACK write (gol,'("in ",a," (",a,", line",i5,")")') rname, __FILE__, __LINE__; call goErr
  4. #define IF_NOTOK_RETURN(action) if (status/=0) then; TRACEBACK; action; return; end if
  5. #define IF_ERROR_RETURN(action) if (status> 0) then; TRACEBACK; action; return; end if
  6. !
  7. #include "tm5.inc"
  8. !
  9. !#################################################################
  10. module chem_param
  11. use GO, only : gol, goPr, goErr
  12. use binas, only : xmair
  13. use reaction_data
  14. use deposition_data
  15. implicit none
  16. !
  17. ! definition of the chemistry: #reactions, order of species, etc.
  18. ! parameters needed for chemistry and rate constants
  19. !
  20. ! nmark: number of 'marked' tracers
  21. integer, parameter :: nmark = 1
  22. character(len=8),dimension(nmark) :: marknam = (/ 'test ' /)
  23. ! ntrace: number of tracers for chemistry
  24. integer, parameter :: ntrace = 10
  25. ! ntracet: number of transported tracers
  26. integer, parameter :: ntracet = 5 !
  27. ! ntrace_chem: non-transported tracers
  28. integer, parameter :: ntrace_chem = ntrace-ntracet
  29. ! maxtrace: total number of tracers
  30. integer, parameter :: maxtrace = ntrace + 0
  31. !
  32. ! components numbers
  33. !
  34. integer, parameter :: itracer=1
  35. !
  36. ! additional fields used in chemistry routine alone
  37. ! (more meteo-like files in units different from #/cm3)
  38. !
  39. integer,parameter :: n_extra = 0
  40. integer,parameter :: nstd = 1
  41. integer, dimension(nstd), parameter :: istd = (/ itracer /)
  42. !
  43. ! species name
  44. !
  45. integer, parameter :: tracer_name_len = 8
  46. character(len=tracer_name_len), parameter :: names(maxtrace) = (/ &
  47. 'TEST1 ', 'TEST2 ', 'TEST3 ', 'TEST4 ', 'TEST5 ', &
  48. 'TEST6 ', 'TEST7 ', 'TEST8 ', 'TEST9 ', 'TEST10 ' /)
  49. ! molar weights of components
  50. real, parameter :: xmh = 1.0079
  51. real, parameter :: xmn = 14.0067
  52. real, parameter :: xmc = 12.01115
  53. real, parameter :: xms = 32.064
  54. real, parameter :: xmo = 15.9994
  55. real, parameter :: xmcl = 35.453
  56. ! real, parameter :: xmo3=xmo*3
  57. ! real, parameter :: xmnox=xmn
  58. ! real, parameter :: xmh2o2=xmo*2.+xmh*2.
  59. ! real, parameter :: xmch4=xmc+xmh*4.
  60. ! real, parameter :: xmco=xmc+xmo
  61. ! real, parameter :: xmhno3=xmh+xmn+xmo*3.
  62. ! real, parameter :: xmmepe=xmc+xmh*4.+xmo*2.
  63. ! real, parameter :: xmch2o=xmc+xmh*2.+xmo
  64. ! real, parameter :: xmno=xmn+xmo
  65. ! real, parameter :: xmho2=xmh+xmo*2.
  66. ! real, parameter :: xmch3o2=xmc+2.*xmo+3.*xmh
  67. ! real, parameter :: xmoh=xmo+xmh
  68. ! real, parameter :: xmno2=xmn+2.*xmo
  69. ! real, parameter :: xmno3=xmn+3.*xmo
  70. ! real, parameter :: xmn2o5=2.*xmn+5.*xmo
  71. ! real, parameter :: xmhno4=xmn+4.*xmo+xmh
  72. ! !FD real, parameter :: xmair=28.94
  73. ! real, parameter :: xmh2o=xmh*2+xmo
  74. ! ! xmpar is the results of the CBM4 implementation...calculate as C
  75. ! real, parameter :: xmpar=xmc
  76. ! real, parameter :: xmeth=2.*xmc
  77. ! real, parameter :: xmole=2.*xmc
  78. ! real, parameter :: xmisop=5.*xmc+8.*xmh
  79. ! real, parameter :: xmgly=3.*xmc
  80. ! real, parameter :: xmald2=2.*xmc
  81. ! real, parameter :: xmc2o3=2.*xmc+3.*xmo+3.*xmh
  82. ! ! xmpan: ch3co-o2-no2
  83. ! real, parameter :: xmpan=2.*xmc+3.*xmh+3.*xmo+xmn+2.*xmo
  84. ! real, parameter :: xmror=2.*xmc+4.*xmh
  85. ! real, parameter :: xmrxpar=xmc
  86. ! real, parameter :: xmrooh=xmc+3.*xmh+2*xmo
  87. ! real, parameter :: xmorgntr=xmn
  88. ! real, parameter :: xmxo2=2.*xmo+xmc
  89. ! real, parameter :: xmxo2n=2.*xmo+xmc
  90. ! ! attention xmso2: conversion emissions done when added...
  91. ! real, parameter :: xmso2=xms+2.*xmo
  92. ! real, parameter :: xmdms=xms+2*xmc+6*xmh
  93. ! ! attention xmnh3: conversion emissions when added...
  94. ! real, parameter :: xmnh3=xmn+3.*xmh
  95. ! ! attention xmnh4: conversion emissions when added...
  96. ! real, parameter :: xmnh4=xmn+4.*xmh
  97. ! real, parameter :: xmmsa=xms+xmc+3*xmo+4*xmh
  98. ! real, parameter :: xmnh2=xmn+xmh*2.
  99. ! real, parameter :: xmso4=xms+4.*xmo
  100. ! real, parameter :: xmno3_a=xmn+xmo*3
  101. ! real, parameter :: xmrn222=222.
  102. ! real, parameter :: xmpb210=210.
  103. ! ! xmnmv: this is a dummy molecular mass
  104. ! real, parameter :: xmnmv=999.
  105. ! used in wet_depos ...
  106. real, parameter :: xmhno3 = xmh + xmn + xmo*3.0
  107. real,dimension(maxtrace),parameter :: ra = &
  108. (/ xmair, xmair, xmair, xmair, xmair, &
  109. xmair, xmair, xmair, xmair, xmair /)
  110. real,dimension(maxtrace),parameter :: fscale = xmair/ra(:)
  111. real,dimension(maxtrace),parameter :: uscale = xmair/ra(:)
  112. ! fscale(ntrace): scaling factor for conversion of mixing ratios
  113. ! in kg tracer per kg air to practical mixing ratio units (e.g. ppm)
  114. ! In this version: ratio of molecular weight of tracer to that of air
  115. ! ********************************************************************
  116. ! rates
  117. ! ********************************************************************
  118. ! heterogeneous removal rates
  119. real :: henry(ntracet,ntemp)
  120. ! ********************************************************************
  121. ! dummy tracers
  122. ! ********************************************************************
  123. ! dummy indices for tracers not included in this chemistry;
  124. ! comparision of tracer index with this numbers will fail ...
  125. integer, parameter :: ico = -999
  126. integer, parameter :: iso2 = -999
  127. integer, parameter :: iso4 = -998
  128. integer, parameter :: inh3 = -997
  129. integer, parameter :: ihno3 = -996
  130. integer, parameter :: ino = -995
  131. integer, parameter :: ino2 = -994
  132. integer, parameter :: inox = -993
  133. integer, parameter :: io3 = -992
  134. integer, parameter :: ihno4 = -991
  135. integer, parameter :: ih2o2 = -990
  136. integer, parameter :: ich4 = -989
  137. ! ********************************************************************
  138. ! aerosol
  139. ! ********************************************************************
  140. real, parameter :: density_ref = 1800.0 ! for 'reference' density calculations
  141. ! ********************************************************************
  142. ! dry deposition
  143. ! ********************************************************************
  144. ! number of tracers on which dry depositions should be applied:
  145. integer, parameter :: ndep = 0
  146. ! tracer indices on which dry depositions should be applied:
  147. integer, parameter :: idep(1) = (/ -999 /)
  148. ! deposition parameters:
  149. real, parameter :: ddep_diffrb(1) = (/ -999.9 /)
  150. real, parameter :: ddep_rsoil(1) = (/ -999.9 /)
  151. real, parameter :: ddep_rwat(1) = (/ -999.9 /)
  152. real, parameter :: ddep_rws(1) = (/ -999.9 /)
  153. real, parameter :: ddep_rsnow(1) = (/ -999.9 /)
  154. real, parameter :: ddep_rmes(1) = (/ -999.9 /)
  155. real, parameter :: ddep_rcut(1) = (/ -999.9 /)
  156. real, parameter :: ddep_diffcf(1) = (/ -999.9 /)
  157. ! some vd fields are copies:
  158. integer, parameter :: vd_ncopy = 0 ! dummy
  159. integer, parameter :: vd_copy_itarget(1) = (/ -999 /)
  160. integer, parameter :: vd_copy_isource(1) = (/ -999 /)
  161. ! number of aerosol bins used for deposition:
  162. integer, parameter :: nrdep = 0
  163. ! aerosol radii used for each bin:
  164. real, parameter :: lur(1) = (/ -999.9 /)
  165. ! ********************************************************************
  166. ! wet deposition
  167. ! ********************************************************************
  168. !
  169. ! nscav : selected species for scavenging
  170. ! nscav_index : index for scavenging:
  171. ! nscav_type : type of scavenging:
  172. ! 0 no scavenging
  173. ! 1 scavenging 100 % solubility assumed
  174. ! 2 scavenging henry solubility assumed
  175. ! 3 scavenging, aerosol removal assumed
  176. ! 4 scavenging, special case for SO2 with aq phase diss.
  177. !
  178. integer, parameter :: nscav = 0
  179. integer, parameter :: nscav_index(1) = (/ -999 /)
  180. ! note CMK CFD: wetS accounts for removal of SO2, so nscav_type = 0
  181. ! nh3 is taken out anyhow, since most will be scavenged
  182. ! by acidic falling frops below cloud
  183. integer, parameter :: nscav_type(1) = (/ -999 /)
  184. end module chem_param