[1495] | 1 | !***************************************************************** |
---|
| 2 | ! |
---|
| 3 | ! Photochemical routine |
---|
| 4 | ! |
---|
| 5 | ! Author: Franck Lefevre |
---|
| 6 | ! ------ |
---|
| 7 | ! |
---|
[1708] | 8 | ! Version: 27/04/2017 |
---|
[1495] | 9 | ! |
---|
[1708] | 10 | ! ASIS scheme : for details on the method see |
---|
| 11 | ! Cariolle et al., Geosci. Model Dev., 10, 1467-1485, 2017. |
---|
| 12 | ! |
---|
[1495] | 13 | !***************************************************************** |
---|
| 14 | |
---|
[2027] | 15 | subroutine photochemistry(nlayer, nq, & |
---|
| 16 | ig, lswitch, zycol, sza, ptimestep, press, & |
---|
[2042] | 17 | alt, temp, dens, zmmean, dist_sol, zday, & |
---|
| 18 | surfdust1d, surfice1d, jo3, jh2o,tau, iter) |
---|
[1495] | 19 | |
---|
[2030] | 20 | use photolysis_mod, only : nb_phot_max, & |
---|
| 21 | nb_reaction_3_max, & |
---|
[2044] | 22 | nb_reaction_4_max, & |
---|
| 23 | jonline |
---|
[2042] | 24 | |
---|
| 25 | use param_v4_h, only: jdistot, jdistot_b |
---|
| 26 | |
---|
[1495] | 27 | implicit none |
---|
| 28 | |
---|
| 29 | #include "callkeys.h" |
---|
| 30 | |
---|
| 31 | !=================================================================== |
---|
| 32 | ! inputs: |
---|
| 33 | !=================================================================== |
---|
| 34 | |
---|
| 35 | integer, intent(in) :: nlayer ! number of atmospheric layers |
---|
| 36 | integer, intent(in) :: nq ! number of tracers |
---|
| 37 | integer :: ig ! grid point index |
---|
| 38 | |
---|
| 39 | real :: sza ! solar zenith angle (deg) |
---|
| 40 | real :: ptimestep ! physics timestep (s) |
---|
| 41 | real :: press(nlayer) ! pressure (hpa) |
---|
[2027] | 42 | real :: alt(nlayer) ! altitude (km) |
---|
[1495] | 43 | real :: temp(nlayer) ! temperature (k) |
---|
| 44 | real :: dens(nlayer) ! density (cm-3) |
---|
| 45 | real :: zmmean(nlayer) ! mean molar mass (g/mole) |
---|
| 46 | real :: dist_sol ! sun distance (au) |
---|
[2042] | 47 | real :: zday ! date (time since Ls=0, in martian days) |
---|
[1495] | 48 | real :: surfdust1d(nlayer) ! dust surface area (cm2/cm3) |
---|
| 49 | real :: surfice1d(nlayer) ! ice surface area (cm2/cm3) |
---|
[2031] | 50 | real :: tau ! dust optical depth |
---|
[1495] | 51 | |
---|
| 52 | !=================================================================== |
---|
| 53 | ! input/output: |
---|
| 54 | !=================================================================== |
---|
| 55 | |
---|
| 56 | real :: zycol(nlayer,nq) ! chemical species volume mixing ratio |
---|
| 57 | |
---|
| 58 | !=================================================================== |
---|
| 59 | ! output: |
---|
| 60 | !=================================================================== |
---|
| 61 | |
---|
| 62 | integer :: iter(nlayer) ! iteration counter |
---|
| 63 | real :: jo3(nlayer) ! photodissociation rate o3 -> o1d |
---|
[2030] | 64 | real :: jh2o(nlayer) ! photodissociation rate h2o -> h + oh |
---|
[1495] | 65 | |
---|
| 66 | !=================================================================== |
---|
| 67 | ! local: |
---|
| 68 | !=================================================================== |
---|
| 69 | |
---|
[2029] | 70 | integer, parameter :: nesp = 17 ! number of species in the chemical code |
---|
| 71 | |
---|
| 72 | integer :: phychemrat ! (physical timestep)/(nominal chemical timestep) |
---|
[2030] | 73 | integer :: j_o3_o1d, j_h2o, ilev, iesp |
---|
[1495] | 74 | integer :: lswitch |
---|
| 75 | logical, save :: firstcall = .true. |
---|
[2042] | 76 | logical :: jparam ! switch for J parameterization |
---|
[1495] | 77 | |
---|
| 78 | ! tracer indexes in the chemistry: |
---|
| 79 | |
---|
| 80 | integer,parameter :: i_co2 = 1 |
---|
| 81 | integer,parameter :: i_co = 2 |
---|
| 82 | integer,parameter :: i_o = 3 |
---|
| 83 | integer,parameter :: i_o1d = 4 |
---|
| 84 | integer,parameter :: i_o2 = 5 |
---|
| 85 | integer,parameter :: i_o3 = 6 |
---|
| 86 | integer,parameter :: i_h = 7 |
---|
| 87 | integer,parameter :: i_h2 = 8 |
---|
| 88 | integer,parameter :: i_oh = 9 |
---|
| 89 | integer,parameter :: i_ho2 = 10 |
---|
| 90 | integer,parameter :: i_h2o2 = 11 |
---|
| 91 | integer,parameter :: i_h2o = 12 |
---|
| 92 | integer,parameter :: i_n = 13 |
---|
| 93 | integer,parameter :: i_n2d = 14 |
---|
| 94 | integer,parameter :: i_no = 15 |
---|
| 95 | integer,parameter :: i_no2 = 16 |
---|
| 96 | integer,parameter :: i_n2 = 17 |
---|
| 97 | |
---|
[2042] | 98 | |
---|
| 99 | integer :: ilay |
---|
| 100 | |
---|
[1569] | 101 | real :: ctimestep ! standard timestep for the chemistry (s) |
---|
[1495] | 102 | real :: dt_guess ! first-guess timestep (s) |
---|
| 103 | real :: dt_corrected ! corrected timestep (s) |
---|
| 104 | real :: time ! internal time (between 0 and ptimestep, in s) |
---|
| 105 | |
---|
| 106 | real, dimension(nlayer,nesp) :: rm ! mixing ratios |
---|
| 107 | real (kind = 8), dimension(nesp) :: cold ! number densities at previous timestep (molecule.cm-3) |
---|
| 108 | real (kind = 8), dimension(nlayer,nesp) :: c ! number densities at current timestep (molecule.cm-3) |
---|
| 109 | real (kind = 8), dimension(nesp) :: cnew ! number densities at next timestep (molecule.cm-3) |
---|
| 110 | |
---|
| 111 | ! reaction rates |
---|
| 112 | |
---|
| 113 | real (kind = 8), dimension(nlayer, nb_phot_max) :: v_phot |
---|
| 114 | real (kind = 8), dimension(nlayer,nb_reaction_3_max) :: v_3 |
---|
| 115 | real (kind = 8), dimension(nlayer,nb_reaction_4_max) :: v_4 |
---|
| 116 | logical :: hetero_dust, hetero_ice |
---|
| 117 | |
---|
| 118 | ! matrix |
---|
| 119 | |
---|
[1496] | 120 | real (kind = 8), dimension(nesp,nesp) :: mat, mat1 |
---|
[1495] | 121 | integer, dimension(nesp) :: indx |
---|
| 122 | integer :: code |
---|
| 123 | |
---|
[1496] | 124 | ! production and loss terms (for first-guess solution only) |
---|
| 125 | |
---|
| 126 | real (kind = 8), dimension(nesp) :: prod, loss |
---|
| 127 | |
---|
[1495] | 128 | !=================================================================== |
---|
| 129 | ! initialisation of the reaction indexes |
---|
| 130 | !=================================================================== |
---|
| 131 | |
---|
| 132 | if (firstcall) then |
---|
| 133 | print*,'photochemistry: initialize indexes' |
---|
| 134 | call indice(i_co2, i_co, i_o, i_o1d, i_o2, i_o3, i_h, & |
---|
| 135 | i_h2, i_oh, i_ho2, i_h2o2, i_h2o, & |
---|
| 136 | i_n, i_n2d, i_no, i_no2, i_n2) |
---|
| 137 | firstcall = .false. |
---|
| 138 | end if |
---|
| 139 | |
---|
| 140 | !=================================================================== |
---|
| 141 | ! initialisation of mixing ratios and densities |
---|
| 142 | !=================================================================== |
---|
| 143 | |
---|
| 144 | call gcmtochim(nlayer, nq, zycol, lswitch, nesp, & |
---|
| 145 | i_co2, i_co, i_o, i_o1d, i_o2, i_o3, i_h, & |
---|
| 146 | i_h2, i_oh, i_ho2, i_h2o2, i_h2o, & |
---|
| 147 | i_n, i_n2d, i_no, i_no2, i_n2, dens, rm, c) |
---|
| 148 | |
---|
| 149 | !=================================================================== |
---|
[2029] | 150 | ! photolysis rates |
---|
[1495] | 151 | !=================================================================== |
---|
| 152 | |
---|
[2042] | 153 | jparam= .false. |
---|
[1495] | 154 | |
---|
[2027] | 155 | if (jonline) then |
---|
[2030] | 156 | if (sza <= 113.) then ! day at 300 km |
---|
[2029] | 157 | call photolysis_online(nlayer, alt, press, temp, zmmean, & |
---|
| 158 | i_co2, i_co, i_o, i_o1d, i_o2, i_o3, i_h, & |
---|
| 159 | i_h2, i_oh, i_ho2, i_h2o2, i_h2o, & |
---|
| 160 | i_n, i_n2d, i_no, i_no2, i_n2, nesp, rm, & |
---|
| 161 | tau, sza, dist_sol, v_phot) |
---|
| 162 | else ! night |
---|
| 163 | v_phot(:,:) = 0. |
---|
| 164 | end if |
---|
[2042] | 165 | else if(jparam) then |
---|
| 166 | call jthermcalc_e107(ig,nlayer,2,c,nesp,temp,alt,sza,zday) |
---|
| 167 | |
---|
| 168 | do ilay=1,lswitch-1 |
---|
| 169 | call phdisrate(ig,nlayer,2,sza,ilay) |
---|
| 170 | enddo |
---|
| 171 | v_phot(:,1)=jdistot(2,:) |
---|
| 172 | v_phot(:,2)=jdistot_b(2,:) |
---|
| 173 | v_phot(:,3)=jdistot(1,:) |
---|
| 174 | v_phot(:,4)=jdistot_b(1,:) |
---|
| 175 | v_phot(:,5)=jdistot(7,:) |
---|
| 176 | v_phot(:,6)=jdistot_b(7,:) |
---|
| 177 | v_phot(:,7)=jdistot(4,:) |
---|
| 178 | v_phot(:,8)=jdistot(6,:) |
---|
| 179 | v_phot(:,10)=jdistot(5,:) |
---|
| 180 | v_phot(:,11)=jdistot(10,:) |
---|
| 181 | v_phot(:,12)=jdistot(13,:) |
---|
| 182 | v_phot(:,13)=jdistot(8,:) |
---|
[2027] | 183 | else |
---|
[2031] | 184 | tau = tau*7./press(1) ! dust in the lookup table is at 7 hpa |
---|
[2027] | 185 | call photolysis(nlayer, lswitch, press, temp, sza, tau, zmmean, dist_sol, & |
---|
| 186 | rm(:,i_co2), rm(:,i_o3), v_phot) |
---|
| 187 | end if |
---|
| 188 | |
---|
[2030] | 189 | ! save o3 and h2o photolysis for output |
---|
[1495] | 190 | |
---|
| 191 | j_o3_o1d = 5 |
---|
| 192 | jo3(:) = v_phot(:,j_o3_o1d) |
---|
[2030] | 193 | j_h2o = 7 |
---|
| 194 | jh2o(:) = v_phot(:,j_h2o) |
---|
[1495] | 195 | |
---|
| 196 | !=================================================================== |
---|
| 197 | ! reaction rates |
---|
| 198 | !=================================================================== |
---|
| 199 | ! switches for heterogeneous chemistry |
---|
| 200 | ! hetero_ice : reactions on ice clouds |
---|
| 201 | ! hetero_dust : reactions on dust |
---|
| 202 | !=================================================================== |
---|
| 203 | |
---|
| 204 | hetero_dust = .false. |
---|
| 205 | hetero_ice = .true. |
---|
| 206 | |
---|
[2024] | 207 | call reactionrates(nlayer, lswitch, dens, c(:,i_co2), c(:,i_o2), & |
---|
| 208 | c(:,i_o), c(:,i_n2), press, temp, hetero_dust, hetero_ice, & |
---|
[1495] | 209 | surfdust1d, surfice1d, v_phot, v_3, v_4) |
---|
| 210 | |
---|
| 211 | !=================================================================== |
---|
[1569] | 212 | ! ctimestep : standard chemical timestep (s), defined as |
---|
| 213 | ! the fraction phychemrat of the physical timestep |
---|
[1495] | 214 | !=================================================================== |
---|
| 215 | |
---|
[1503] | 216 | phychemrat = 1 |
---|
[1495] | 217 | |
---|
| 218 | ctimestep = ptimestep/real(phychemrat) |
---|
| 219 | |
---|
| 220 | !print*, "ptimestep = ", ptimestep |
---|
| 221 | !print*, "phychemrat = ", phychemrat |
---|
| 222 | !print*, "ctimestep = ", ctimestep |
---|
| 223 | !stop |
---|
| 224 | |
---|
| 225 | !=================================================================== |
---|
| 226 | ! loop over levels |
---|
| 227 | !=================================================================== |
---|
| 228 | |
---|
| 229 | do ilev = 1,lswitch - 1 |
---|
| 230 | |
---|
| 231 | ! initializations |
---|
| 232 | |
---|
| 233 | time = 0. |
---|
| 234 | iter(ilev) = 0 |
---|
| 235 | dt_guess = ctimestep |
---|
| 236 | cold(:) = c(ilev,:) |
---|
| 237 | |
---|
| 238 | ! internal loop for the chemistry |
---|
| 239 | |
---|
| 240 | do while (time < ptimestep) |
---|
| 241 | |
---|
[1496] | 242 | iter(ilev) = iter(ilev) + 1 ! iteration counter |
---|
[1495] | 243 | |
---|
| 244 | ! first-guess: fill matrix |
---|
| 245 | |
---|
[1496] | 246 | call fill_matrix(ilev, mat1, prod, loss, c, nesp, nlayer, v_phot, v_3, v_4) |
---|
[1495] | 247 | |
---|
[1569] | 248 | ! adaptative evaluation of the sub time step |
---|
[1496] | 249 | |
---|
[1569] | 250 | call define_dt(nesp, dt_corrected, dt_guess, ctimestep, cold(:), c(ilev,:), & |
---|
[1571] | 251 | mat1, prod, loss, dens(ilev)) |
---|
[1569] | 252 | |
---|
| 253 | if (time + dt_corrected > ptimestep) then |
---|
| 254 | dt_corrected = ptimestep - time |
---|
| 255 | end if |
---|
| 256 | |
---|
| 257 | ! if (dt_corrected /= dt_guess) then ! the timestep has been modified |
---|
| 258 | |
---|
| 259 | ! form the matrix identity + mat*dt_corrected |
---|
| 260 | |
---|
| 261 | mat(:,:) = mat1(:,:)*dt_corrected |
---|
[1496] | 262 | do iesp = 1,nesp |
---|
| 263 | mat(iesp,iesp) = 1. + mat(iesp,iesp) |
---|
| 264 | end do |
---|
| 265 | |
---|
[1569] | 266 | ! solve the linear system M*Cn+1 = Cn (RHS in cnew, then replaced by solution) |
---|
[1495] | 267 | |
---|
| 268 | cnew(:) = c(ilev,:) |
---|
| 269 | |
---|
[1499] | 270 | #ifdef LAPACK |
---|
[1495] | 271 | call dgesv(nesp,1,mat,nesp,indx,cnew,nesp,code) |
---|
[1499] | 272 | #else |
---|
[2007] | 273 | write(*,*) "photochemistry error, missing LAPACK routine dgesv" |
---|
[1499] | 274 | stop |
---|
| 275 | #endif |
---|
[1569] | 276 | |
---|
| 277 | ! end if |
---|
| 278 | |
---|
[1495] | 279 | ! eliminate small values |
---|
| 280 | |
---|
| 281 | where (cnew(:)/dens(ilev) < 1.e-30) |
---|
| 282 | cnew(:) = 0. |
---|
| 283 | end where |
---|
| 284 | |
---|
[1569] | 285 | ! update concentrations |
---|
[1495] | 286 | |
---|
[1569] | 287 | cold(:) = c(ilev,:) |
---|
| 288 | c(ilev,:) = cnew(:) |
---|
| 289 | cnew(:) = 0. |
---|
[1495] | 290 | |
---|
[1569] | 291 | ! increment internal time |
---|
[1495] | 292 | |
---|
[1569] | 293 | time = time + dt_corrected |
---|
| 294 | dt_guess = dt_corrected ! first-guess timestep for next iteration |
---|
[1495] | 295 | |
---|
[1569] | 296 | end do ! while (time < ptimestep) |
---|
[1495] | 297 | |
---|
[1569] | 298 | end do ! ilev |
---|
[1495] | 299 | |
---|
[1569] | 300 | !=================================================================== |
---|
| 301 | ! save chemical species for the gcm |
---|
| 302 | !=================================================================== |
---|
[1495] | 303 | |
---|
[1569] | 304 | call chimtogcm(nlayer, nq, zycol, lswitch, nesp, & |
---|
| 305 | i_co2, i_co, i_o, i_o1d, i_o2, i_o3, i_h, & |
---|
| 306 | i_h2, i_oh, i_ho2, i_h2o2, i_h2o, & |
---|
| 307 | i_n, i_n2d, i_no, i_no2, i_n2, dens, c) |
---|
[1495] | 308 | |
---|
[1569] | 309 | contains |
---|
[1495] | 310 | |
---|
[1569] | 311 | !================================================================ |
---|
[1495] | 312 | |
---|
[1571] | 313 | subroutine define_dt(nesp, dtnew, dtold, ctimestep, cold, ccur, mat1, & |
---|
| 314 | prod, loss, dens) |
---|
[1495] | 315 | |
---|
[1569] | 316 | !================================================================ |
---|
| 317 | ! iterative evaluation of the appropriate time step dtnew |
---|
| 318 | ! according to curvature criterion based on |
---|
| 319 | ! e = 2 Rtol [r Cn+1 -(1-r) Cn + Cn-1 ]/[(1+r) Cn] |
---|
| 320 | ! with r = (tn - tn-1)/(tn+1 - tn) |
---|
| 321 | !================================================================ |
---|
[1495] | 322 | |
---|
[1569] | 323 | implicit none |
---|
[1495] | 324 | |
---|
[1569] | 325 | ! input |
---|
[1495] | 326 | |
---|
[1569] | 327 | integer :: nesp ! number of species in the chemistry |
---|
[1495] | 328 | |
---|
[1569] | 329 | real :: dtold, ctimestep |
---|
| 330 | real (kind = 8), dimension(nesp) :: cold, ccur |
---|
| 331 | real (kind = 8), dimension(nesp,nesp) :: mat1 |
---|
| 332 | real (kind = 8), dimension(nesp) :: prod, loss |
---|
[1574] | 333 | real :: dens |
---|
[1569] | 334 | |
---|
| 335 | ! output |
---|
| 336 | |
---|
| 337 | real :: dtnew |
---|
| 338 | |
---|
| 339 | ! local |
---|
| 340 | |
---|
| 341 | real (kind = 8), dimension(nesp) :: cnew |
---|
| 342 | real (kind = 8), dimension(nesp,nesp) :: mat |
---|
[1571] | 343 | real (kind = 8) :: atol, ratio, e, es, coef |
---|
[1569] | 344 | |
---|
| 345 | integer :: code, iesp, iter |
---|
| 346 | integer, dimension(nesp) :: indx |
---|
| 347 | |
---|
| 348 | real :: dttest |
---|
| 349 | |
---|
| 350 | ! parameters |
---|
| 351 | |
---|
| 352 | real (kind = 8), parameter :: dtmin = 10. ! minimum time step (s) |
---|
[1571] | 353 | real (kind = 8), parameter :: vmrtol = 1.e-11 ! absolute tolerance on vmr |
---|
[2150] | 354 | real (kind = 8), parameter :: rtol = 0.05 ! rtol recommended value : 0.1-0.02 |
---|
[1569] | 355 | integer, parameter :: niter = 3 ! number of iterations |
---|
| 356 | real (kind = 8), parameter :: coefmax = 2. |
---|
| 357 | real (kind = 8), parameter :: coefmin = 0.1 |
---|
| 358 | logical :: fast_guess = .true. |
---|
| 359 | |
---|
| 360 | dttest = dtold ! dttest = dtold = dt_guess |
---|
| 361 | |
---|
[1571] | 362 | atol = vmrtol*dens ! absolute tolerance in molecule.cm-3 |
---|
| 363 | |
---|
[1569] | 364 | do iter = 1,niter |
---|
| 365 | |
---|
| 366 | if (fast_guess) then |
---|
| 367 | |
---|
[1571] | 368 | ! first guess : fast semi-implicit method |
---|
[1569] | 369 | |
---|
| 370 | do iesp = 1, nesp |
---|
| 371 | cnew(iesp) = (ccur(iesp) + prod(iesp)*dttest)/(1. + loss(iesp)*dttest) |
---|
| 372 | end do |
---|
| 373 | |
---|
| 374 | else |
---|
| 375 | |
---|
| 376 | ! first guess : form the matrix identity + mat*dt_guess |
---|
| 377 | |
---|
| 378 | mat(:,:) = mat1(:,:)*dttest |
---|
| 379 | do iesp = 1,nesp |
---|
| 380 | mat(iesp,iesp) = 1. + mat(iesp,iesp) |
---|
| 381 | end do |
---|
| 382 | |
---|
| 383 | ! form right-hand side (RHS) of the system |
---|
| 384 | |
---|
| 385 | cnew(:) = ccur(:) |
---|
| 386 | |
---|
| 387 | ! solve the linear system M*Cn+1 = Cn (RHS in cnew, then replaced by solution) |
---|
| 388 | |
---|
[1499] | 389 | #ifdef LAPACK |
---|
[1495] | 390 | call dgesv(nesp,1,mat,nesp,indx,cnew,nesp,code) |
---|
[1499] | 391 | #else |
---|
[2007] | 392 | write(*,*) "photochemistry error, missing LAPACK routine dgesv" |
---|
[1499] | 393 | stop |
---|
| 394 | #endif |
---|
[1495] | 395 | |
---|
[1569] | 396 | end if |
---|
[1495] | 397 | |
---|
[1569] | 398 | ! ratio old/new subtimestep |
---|
[1495] | 399 | |
---|
[1569] | 400 | ratio = dtold/dttest |
---|
[1495] | 401 | |
---|
[1569] | 402 | ! e : local error indicatocitr |
---|
[1495] | 403 | |
---|
[1569] | 404 | e = 0. |
---|
[1495] | 405 | |
---|
[1569] | 406 | do iesp = 1,nesp |
---|
| 407 | es = 2.*abs((ratio*cnew(iesp) - (1. + ratio)*ccur(iesp) + cold(iesp)) & |
---|
[2150] | 408 | /(1. + ratio)/max(ccur(iesp)*rtol,atol)) |
---|
[1495] | 409 | |
---|
[1569] | 410 | if (es > e) then |
---|
| 411 | e = es |
---|
| 412 | end if |
---|
| 413 | end do |
---|
[1495] | 414 | |
---|
[1569] | 415 | ! timestep correction |
---|
[1495] | 416 | |
---|
[1569] | 417 | coef = max(coefmin, min(coefmax,0.8/sqrt(e))) |
---|
[1495] | 418 | |
---|
[1569] | 419 | dttest = max(dtmin,dttest*coef) |
---|
| 420 | dttest = min(ctimestep,dttest) |
---|
[1495] | 421 | |
---|
[1569] | 422 | end do ! iter |
---|
| 423 | |
---|
| 424 | ! new timestep |
---|
| 425 | |
---|
| 426 | dtnew = dttest |
---|
| 427 | |
---|
| 428 | end subroutine define_dt |
---|
| 429 | |
---|
[1495] | 430 | !====================================================================== |
---|
| 431 | |
---|
[2024] | 432 | subroutine reactionrates(nlayer, & |
---|
| 433 | lswitch, dens, co2, o2, o, n2, press, t, & |
---|
| 434 | hetero_dust, hetero_ice, & |
---|
| 435 | surfdust1d, surfice1d, & |
---|
[1495] | 436 | v_phot, v_3, v_4) |
---|
| 437 | |
---|
| 438 | !================================================================ |
---|
| 439 | ! compute reaction rates ! |
---|
| 440 | !---------------------------------------------------------------- |
---|
| 441 | ! reaction type array ! |
---|
| 442 | !---------------------------------------------------------------- |
---|
| 443 | ! A + B --> C + D bimolecular v_4 ! |
---|
| 444 | ! A + A --> B + C quadratic v_3 ! |
---|
| 445 | ! A + C --> B + C quenching v_phot ! |
---|
| 446 | ! A + ice --> B + C heterogeneous v_phot ! |
---|
| 447 | !================================================================ |
---|
| 448 | |
---|
| 449 | use comcstfi_h |
---|
[2030] | 450 | use photolysis_mod, only : nphot, nb_phot_max, & |
---|
| 451 | nb_reaction_3_max, & |
---|
| 452 | nb_reaction_4_max |
---|
[1495] | 453 | |
---|
| 454 | implicit none |
---|
| 455 | |
---|
| 456 | !---------------------------------------------------------------------- |
---|
| 457 | ! input |
---|
| 458 | !---------------------------------------------------------------------- |
---|
| 459 | |
---|
| 460 | integer, intent(in) :: nlayer ! number of atmospheric layers |
---|
| 461 | integer :: lswitch ! interface level between lower |
---|
| 462 | ! atmosphere and thermosphere chemistries |
---|
| 463 | real, dimension(nlayer) :: dens ! total number density (molecule.cm-3) |
---|
| 464 | real, dimension(nlayer) :: press ! pressure (hPa) |
---|
| 465 | real, dimension(nlayer) :: t ! temperature (K) |
---|
| 466 | real, dimension(nlayer) :: surfdust1d ! dust surface area (cm2.cm-3) |
---|
| 467 | real, dimension(nlayer) :: surfice1d ! ice surface area (cm2.cm-3) |
---|
| 468 | real (kind = 8), dimension(nlayer) :: co2 ! co2 number density (molecule.cm-3) |
---|
| 469 | real (kind = 8), dimension(nlayer) :: o2 ! o2 number density (molecule.cm-3) |
---|
[2024] | 470 | real (kind = 8), dimension(nlayer) :: o ! o number density (molecule.cm-3) |
---|
| 471 | real (kind = 8), dimension(nlayer) :: n2 ! n2 number density (molecule.cm-3) |
---|
[1495] | 472 | logical :: hetero_dust, hetero_ice ! switches for heterogeneous chemistry |
---|
| 473 | |
---|
| 474 | !---------------------------------------------------------------------- |
---|
| 475 | ! output |
---|
| 476 | !---------------------------------------------------------------------- |
---|
| 477 | |
---|
| 478 | real (kind = 8), dimension(nlayer, nb_phot_max) :: v_phot |
---|
| 479 | real (kind = 8), dimension(nlayer,nb_reaction_3_max) :: v_3 |
---|
| 480 | real (kind = 8), dimension(nlayer,nb_reaction_4_max) :: v_4 |
---|
| 481 | |
---|
| 482 | !---------------------------------------------------------------------- |
---|
| 483 | ! local |
---|
| 484 | !---------------------------------------------------------------------- |
---|
| 485 | |
---|
| 486 | integer :: ilev |
---|
| 487 | integer :: nb_phot, nb_reaction_3, nb_reaction_4 |
---|
| 488 | real :: ak0, ak1, xpo, rate |
---|
| 489 | real :: k1a0, k1b0, k1ainf, k1a, k1b, fc, fx, x, y, gam |
---|
| 490 | real, dimension(nlayer) :: deq |
---|
| 491 | real, dimension(nlayer) :: a001, a002, a003, & |
---|
[2024] | 492 | b001, b002, b003, b004, b005, b006, b007, & |
---|
| 493 | b008, b009, & |
---|
| 494 | c001, c002, c003, c004, c005, c006, c007, & |
---|
| 495 | c008, c009, c010, c011, c012, c013, c014, & |
---|
| 496 | c015, c016, c017, c018, & |
---|
| 497 | d001, d002, d003, d004, d005, d006, d007, & |
---|
| 498 | d008, d009, d010, d011, d012, & |
---|
| 499 | e001, e002, & |
---|
| 500 | h001, h002, h003, h004, h005 |
---|
[1495] | 501 | |
---|
| 502 | !---------------------------------------------------------------------- |
---|
| 503 | ! initialisation |
---|
| 504 | !---------------------------------------------------------------------- |
---|
| 505 | |
---|
[2030] | 506 | nb_phot = nphot ! initialised to the number of photolysis rates |
---|
[1495] | 507 | nb_reaction_3 = 0 |
---|
| 508 | nb_reaction_4 = 0 |
---|
| 509 | |
---|
| 510 | !---------------------------------------------------------------------- |
---|
| 511 | ! oxygen reactions |
---|
| 512 | !---------------------------------------------------------------------- |
---|
| 513 | |
---|
| 514 | !--- a001: o + o2 + co2 -> o3 + co2 |
---|
| 515 | |
---|
| 516 | ! jpl 2003 |
---|
| 517 | ! |
---|
[1825] | 518 | ! co2/n2 efficiency as a third body = 2.075 |
---|
[1495] | 519 | ! from sehested et al., j. geophys. res., 100, 1995. |
---|
| 520 | |
---|
| 521 | a001(:) = 2.075*6.0e-34*(t(:)/300.)**(-2.4)*dens(:) |
---|
| 522 | |
---|
| 523 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 524 | v_4(:,nb_reaction_4) = a001(:) |
---|
| 525 | |
---|
| 526 | !--- a002: o + o + co2 -> o2 + co2 |
---|
| 527 | |
---|
| 528 | ! Tsang and Hampson, J. Chem. Phys. Ref. Data, 15, 1087, 1986 |
---|
| 529 | |
---|
| 530 | ! a002(:) = 2.5*5.2e-35*exp(900./t(:))*dens(:) |
---|
| 531 | |
---|
| 532 | ! Campbell and Gray, Chem. Phys. Lett., 18, 607, 1973 |
---|
| 533 | |
---|
| 534 | ! a002(:) = 1.2e-32*(300./t(:))**(2.0)*dens(:) ! yung expression |
---|
| 535 | a002(:) = 2.5*9.46e-34*exp(485./t(:))*dens(:) ! nist expression |
---|
| 536 | |
---|
| 537 | nb_reaction_3 = nb_reaction_3 + 1 |
---|
| 538 | v_3(:,nb_reaction_3) = a002(:) |
---|
| 539 | |
---|
| 540 | !--- a003: o + o3 -> o2 + o2 |
---|
| 541 | |
---|
| 542 | ! jpl 2003 |
---|
| 543 | |
---|
| 544 | a003(:) = 8.0e-12*exp(-2060./t(:)) |
---|
| 545 | |
---|
| 546 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 547 | v_4(:,nb_reaction_4) = a003(:) |
---|
| 548 | |
---|
| 549 | !---------------------------------------------------------------------- |
---|
| 550 | ! o(1d) reactions |
---|
| 551 | !---------------------------------------------------------------------- |
---|
| 552 | |
---|
| 553 | !--- b001: o(1d) + co2 -> o + co2 |
---|
| 554 | |
---|
| 555 | ! jpl 2006 |
---|
| 556 | |
---|
| 557 | b001(:) = 7.5e-11*exp(115./t(:)) |
---|
| 558 | |
---|
| 559 | nb_phot = nb_phot + 1 |
---|
| 560 | v_phot(:,nb_phot) = b001(:)*co2(:) |
---|
| 561 | |
---|
| 562 | !--- b002: o(1d) + h2o -> oh + oh |
---|
| 563 | |
---|
| 564 | ! jpl 2006 |
---|
| 565 | |
---|
| 566 | b002(:) = 1.63e-10*exp(60./t(:)) |
---|
| 567 | |
---|
| 568 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 569 | v_4(:,nb_reaction_4) = b002(:) |
---|
| 570 | |
---|
| 571 | !--- b003: o(1d) + h2 -> oh + h |
---|
| 572 | |
---|
| 573 | ! jpl 2011 |
---|
| 574 | |
---|
| 575 | b003(:) = 1.2e-10 |
---|
| 576 | |
---|
| 577 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 578 | v_4(:,nb_reaction_4) = b003(:) |
---|
| 579 | |
---|
| 580 | !--- b004: o(1d) + o2 -> o + o2 |
---|
| 581 | |
---|
| 582 | ! jpl 2006 |
---|
| 583 | |
---|
| 584 | b004(:) = 3.3e-11*exp(55./t(:)) |
---|
| 585 | |
---|
| 586 | nb_phot = nb_phot + 1 |
---|
| 587 | v_phot(:,nb_phot) = b004(:)*o2(:) |
---|
| 588 | |
---|
| 589 | !--- b005: o(1d) + o3 -> o2 + o2 |
---|
| 590 | |
---|
| 591 | ! jpl 2003 |
---|
| 592 | |
---|
| 593 | b005(:) = 1.2e-10 |
---|
| 594 | |
---|
| 595 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 596 | v_4(:,nb_reaction_4) = b005(:) |
---|
| 597 | |
---|
| 598 | !--- b006: o(1d) + o3 -> o2 + o + o |
---|
| 599 | |
---|
| 600 | ! jpl 2003 |
---|
| 601 | |
---|
| 602 | b006(:) = 1.2e-10 |
---|
| 603 | |
---|
| 604 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 605 | v_4(:,nb_reaction_4) = b006(:) |
---|
| 606 | |
---|
| 607 | !--- b007: o(1d) + ch4 -> ch3 + oh |
---|
| 608 | |
---|
| 609 | ! jpl 2003 |
---|
| 610 | |
---|
| 611 | b007(:) = 1.5e-10*0.75 |
---|
| 612 | |
---|
| 613 | !--- b008: o(1d) + ch4 -> ch3o + h |
---|
| 614 | |
---|
| 615 | ! jpl 2003 |
---|
| 616 | |
---|
| 617 | b008(:) = 1.5e-10*0.20 |
---|
| 618 | ! |
---|
| 619 | !--- b009: o(1d) + ch4 -> ch2o + h2 |
---|
| 620 | |
---|
| 621 | ! jpl 2003 |
---|
| 622 | |
---|
| 623 | b009(:) = 1.5e-10*0.05 |
---|
| 624 | |
---|
| 625 | !---------------------------------------------------------------------- |
---|
| 626 | ! hydrogen reactions |
---|
| 627 | !---------------------------------------------------------------------- |
---|
| 628 | |
---|
| 629 | !--- c001: o + ho2 -> oh + o2 |
---|
| 630 | |
---|
| 631 | ! jpl 2003 |
---|
| 632 | |
---|
| 633 | c001(:) = 3.0e-11*exp(200./t(:)) |
---|
| 634 | |
---|
| 635 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 636 | v_4(:,nb_reaction_4) = c001(:) |
---|
| 637 | |
---|
| 638 | !--- c002: o + oh -> o2 + h |
---|
| 639 | |
---|
| 640 | ! jpl 2011 |
---|
| 641 | |
---|
| 642 | c002(:) = 1.8e-11*exp(180./t(:)) |
---|
| 643 | |
---|
| 644 | ! robertson and smith, j. chem. phys. a 110, 6673, 2006 |
---|
| 645 | |
---|
| 646 | ! c002(:) = 11.2e-11*t(:)**(-0.32)*exp(177./t(:)) |
---|
| 647 | |
---|
| 648 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 649 | v_4(:,nb_reaction_4) = c002(:) |
---|
| 650 | |
---|
| 651 | !--- c003: h + o3 -> oh + o2 |
---|
| 652 | |
---|
| 653 | ! jpl 2003 |
---|
| 654 | |
---|
| 655 | c003(:) = 1.4e-10*exp(-470./t(:)) |
---|
| 656 | |
---|
| 657 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 658 | v_4(:,nb_reaction_4) = c003(:) |
---|
| 659 | |
---|
| 660 | !--- c004: h + ho2 -> oh + oh |
---|
| 661 | |
---|
| 662 | ! jpl 2006 |
---|
| 663 | |
---|
| 664 | c004(:) = 7.2e-11 |
---|
| 665 | |
---|
| 666 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 667 | v_4(:,nb_reaction_4) = c004(:) |
---|
| 668 | |
---|
| 669 | !--- c005: h + ho2 -> h2 + o2 |
---|
| 670 | |
---|
| 671 | ! jpl 2006 |
---|
| 672 | |
---|
| 673 | c005(:) = 6.9e-12 |
---|
| 674 | |
---|
| 675 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 676 | v_4(:,nb_reaction_4) = c005(:) |
---|
| 677 | |
---|
| 678 | !--- c006: h + ho2 -> h2o + o |
---|
| 679 | |
---|
| 680 | ! jpl 2006 |
---|
| 681 | |
---|
| 682 | c006(:) = 1.6e-12 |
---|
| 683 | |
---|
| 684 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 685 | v_4(:,nb_reaction_4) = c006(:) |
---|
| 686 | |
---|
| 687 | !--- c007: oh + ho2 -> h2o + o2 |
---|
| 688 | |
---|
| 689 | ! jpl 2003 |
---|
| 690 | |
---|
| 691 | ! canty et al., grl, 2006 suggest to increase this rate |
---|
| 692 | ! by 20%. not done here. |
---|
| 693 | |
---|
| 694 | c007(:) = 4.8e-11*exp(250./t(:)) |
---|
| 695 | |
---|
| 696 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 697 | v_4(:,nb_reaction_4) = c007(:) |
---|
| 698 | |
---|
| 699 | !--- c008: ho2 + ho2 -> h2o2 + o2 |
---|
| 700 | |
---|
[2150] | 701 | ! jpl 2015 |
---|
[1495] | 702 | |
---|
[2150] | 703 | ! c008(:) = 3.0e-13*exp(460./t(:)) |
---|
[1495] | 704 | |
---|
| 705 | ! christensen et al., grl, 13, 2002 |
---|
| 706 | |
---|
| 707 | c008(:) = 1.5e-12*exp(19./t(:)) |
---|
| 708 | |
---|
| 709 | nb_reaction_3 = nb_reaction_3 + 1 |
---|
| 710 | v_3(:,nb_reaction_3) = c008(:) |
---|
| 711 | |
---|
| 712 | !--- c009: oh + h2o2 -> h2o + ho2 |
---|
| 713 | |
---|
| 714 | ! jpl 2006 |
---|
| 715 | |
---|
| 716 | c009(:) = 1.8e-12 |
---|
| 717 | |
---|
| 718 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 719 | v_4(:,nb_reaction_4) = c009(:) |
---|
| 720 | |
---|
| 721 | !--- c010: oh + h2 -> h2o + h |
---|
| 722 | |
---|
| 723 | ! jpl 2006 |
---|
| 724 | |
---|
| 725 | c010(:) = 2.8e-12*exp(-1800./t(:)) |
---|
| 726 | |
---|
| 727 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 728 | v_4(:,nb_reaction_4) = c010(:) |
---|
| 729 | |
---|
| 730 | !--- c011: h + o2 + co2 -> ho2 + co2 |
---|
| 731 | |
---|
| 732 | ! jpl 2011 |
---|
[1825] | 733 | ! co2/n2 efficiency as a third body = 2.4 |
---|
| 734 | ! from ashman and haynes, 27th symposium on combustion, 1998. |
---|
[1495] | 735 | |
---|
| 736 | do ilev = 1,lswitch-1 |
---|
[1825] | 737 | ak0 = 2.4*4.4e-32*(t(ilev)/300.)**(-1.3) |
---|
[1495] | 738 | ak1 = 7.5e-11*(t(ilev)/300.)**(0.2) |
---|
| 739 | |
---|
| 740 | rate = (ak0*dens(ilev))/(1. + ak0*dens(ilev)/ak1) |
---|
| 741 | xpo = 1./(1. + alog10((ak0*dens(ilev))/ak1)**2) |
---|
| 742 | c011(ilev) = rate*0.6**xpo |
---|
| 743 | end do |
---|
| 744 | |
---|
| 745 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 746 | v_4(:,nb_reaction_4) = c011(:) |
---|
| 747 | |
---|
| 748 | !--- c012: o + h2o2 -> oh + ho2 |
---|
| 749 | |
---|
| 750 | ! jpl 2003 |
---|
| 751 | |
---|
| 752 | c012(:) = 1.4e-12*exp(-2000./t(:)) |
---|
| 753 | |
---|
| 754 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 755 | v_4(:,nb_reaction_4) = c012(:) |
---|
| 756 | |
---|
| 757 | !--- c013: oh + oh -> h2o + o |
---|
| 758 | |
---|
| 759 | ! jpl 2006 |
---|
| 760 | |
---|
| 761 | c013(:) = 1.8e-12 |
---|
| 762 | |
---|
| 763 | nb_reaction_3 = nb_reaction_3 + 1 |
---|
| 764 | v_3(:,nb_reaction_3) = c013(:) |
---|
| 765 | |
---|
| 766 | !--- c014: oh + o3 -> ho2 + o2 |
---|
| 767 | |
---|
| 768 | ! jpl 2003 |
---|
| 769 | |
---|
| 770 | c014(:) = 1.7e-12*exp(-940./t(:)) |
---|
| 771 | |
---|
| 772 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 773 | v_4(:,nb_reaction_4) = c014(:) |
---|
| 774 | |
---|
| 775 | !--- c015: ho2 + o3 -> oh + o2 + o2 |
---|
| 776 | |
---|
| 777 | ! jpl 2003 |
---|
| 778 | |
---|
| 779 | c015(:) = 1.0e-14*exp(-490./t(:)) |
---|
| 780 | |
---|
| 781 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 782 | v_4(:,nb_reaction_4) = c015(:) |
---|
| 783 | |
---|
| 784 | !--- c016: ho2 + ho2 + co2 -> h2o2 + o2 + co2 |
---|
| 785 | |
---|
| 786 | ! jpl 2011 |
---|
| 787 | |
---|
| 788 | c016(:) = 2.5*2.1e-33*exp(920./t(:))*dens(:) |
---|
| 789 | |
---|
| 790 | nb_reaction_3 = nb_reaction_3 + 1 |
---|
| 791 | v_3(:,nb_reaction_3) = c016(:) |
---|
| 792 | |
---|
| 793 | !--- c017: oh + oh + co2 -> h2o2 + co2 |
---|
| 794 | |
---|
| 795 | ! jpl 2003 |
---|
| 796 | |
---|
| 797 | do ilev = 1,lswitch-1 |
---|
| 798 | ak0 = 2.5*6.9e-31*(t(ilev)/300.)**(-1.0) |
---|
| 799 | ak1 = 2.6e-11*(t(ilev)/300.)**(0.0) |
---|
| 800 | |
---|
| 801 | rate = (ak0*dens(ilev))/(1. + ak0*dens(ilev)/ak1) |
---|
| 802 | xpo = 1./(1. + alog10((ak0*dens(ilev))/ak1)**2) |
---|
| 803 | c017(ilev) = rate*0.6**xpo |
---|
| 804 | end do |
---|
| 805 | |
---|
| 806 | nb_reaction_3 = nb_reaction_3 + 1 |
---|
| 807 | v_3(:,nb_reaction_3) = c017(:) |
---|
| 808 | |
---|
| 809 | !--- c018: h + h + co2 -> h2 + co2 |
---|
| 810 | |
---|
| 811 | ! baulch et al., 2005 |
---|
| 812 | |
---|
| 813 | c018(:) = 2.5*1.8e-30*(t(:)**(-1.0))*dens(:) |
---|
| 814 | |
---|
| 815 | nb_reaction_3 = nb_reaction_3 + 1 |
---|
| 816 | v_3(:,nb_reaction_3) = c018(:) |
---|
| 817 | |
---|
| 818 | !---------------------------------------------------------------------- |
---|
| 819 | ! nitrogen reactions |
---|
| 820 | !---------------------------------------------------------------------- |
---|
| 821 | |
---|
| 822 | !--- d001: no2 + o -> no + o2 |
---|
| 823 | |
---|
| 824 | ! jpl 2006 |
---|
| 825 | |
---|
| 826 | d001(:) = 5.1e-12*exp(210./t(:)) |
---|
| 827 | |
---|
| 828 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 829 | v_4(:,nb_reaction_4) = d001(:) |
---|
| 830 | |
---|
| 831 | !--- d002: no + o3 -> no2 + o2 |
---|
| 832 | |
---|
| 833 | ! jpl 2006 |
---|
| 834 | |
---|
| 835 | d002(:) = 3.0e-12*exp(-1500./t(:)) |
---|
| 836 | |
---|
| 837 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 838 | v_4(:,nb_reaction_4) = d002(:) |
---|
| 839 | |
---|
| 840 | !--- d003: no + ho2 -> no2 + oh |
---|
| 841 | |
---|
| 842 | ! jpl 2011 |
---|
| 843 | |
---|
| 844 | d003(:) = 3.3e-12*exp(270./t(:)) |
---|
| 845 | |
---|
| 846 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 847 | v_4(:,nb_reaction_4) = d003(:) |
---|
| 848 | |
---|
| 849 | !--- d004: n + no -> n2 + o |
---|
| 850 | |
---|
| 851 | ! jpl 2011 |
---|
| 852 | |
---|
| 853 | d004(:) = 2.1e-11*exp(100./t(:)) |
---|
| 854 | |
---|
| 855 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 856 | v_4(:,nb_reaction_4) = d004(:) |
---|
| 857 | |
---|
| 858 | !--- d005: n + o2 -> no + o |
---|
| 859 | |
---|
| 860 | ! jpl 2011 |
---|
| 861 | |
---|
| 862 | d005(:) = 1.5e-11*exp(-3600./t(:)) |
---|
| 863 | |
---|
| 864 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 865 | v_4(:,nb_reaction_4) = d005(:) |
---|
| 866 | |
---|
| 867 | !--- d006: no2 + h -> no + oh |
---|
| 868 | |
---|
| 869 | ! jpl 2011 |
---|
| 870 | |
---|
| 871 | d006(:) = 4.0e-10*exp(-340./t(:)) |
---|
| 872 | |
---|
| 873 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 874 | v_4(:,nb_reaction_4) = d006(:) |
---|
| 875 | |
---|
| 876 | !--- d007: n + o -> no |
---|
| 877 | |
---|
| 878 | d007(:) = 2.8e-17*(300./t(:))**0.5 |
---|
| 879 | |
---|
| 880 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 881 | v_4(:,nb_reaction_4) = d007(:) |
---|
| 882 | |
---|
| 883 | !--- d008: n + ho2 -> no + oh |
---|
| 884 | |
---|
| 885 | ! brune et al., j. chem. phys., 87, 1983 |
---|
| 886 | |
---|
| 887 | d008(:) = 2.19e-11 |
---|
| 888 | |
---|
| 889 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 890 | v_4(:,nb_reaction_4) = d008(:) |
---|
| 891 | |
---|
| 892 | !--- d009: n + oh -> no + h |
---|
| 893 | |
---|
| 894 | ! atkinson et al., j. phys. chem. ref. data, 18, 881, 1989 |
---|
| 895 | |
---|
| 896 | d009(:) = 3.8e-11*exp(85./t(:)) |
---|
| 897 | |
---|
| 898 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 899 | v_4(:,nb_reaction_4) = d009(:) |
---|
| 900 | |
---|
[2024] | 901 | !--- d010: n(2d) + o -> n + o |
---|
| 902 | |
---|
| 903 | ! herron, j. phys. chem. ref. data, 1999 |
---|
| 904 | |
---|
| 905 | d010(:) = 3.3e-12*exp(-260./t(:)) |
---|
| 906 | |
---|
| 907 | nb_phot = nb_phot + 1 |
---|
| 908 | v_phot(:,nb_phot) = d010(:)*o(:) |
---|
| 909 | |
---|
| 910 | !--- d011: n(2d) + n2 -> n + n2 |
---|
| 911 | |
---|
| 912 | ! herron, j. phys. chem. ref. data, 1999 |
---|
| 913 | |
---|
| 914 | d011(:) = 1.7e-14 |
---|
| 915 | |
---|
| 916 | nb_phot = nb_phot + 1 |
---|
| 917 | v_phot(:,nb_phot) = d011(:)*n2(:) |
---|
| 918 | |
---|
| 919 | !--- d012: n(2d) + co2 -> no + co |
---|
| 920 | |
---|
| 921 | ! herron, j. phys. chem. ref. data, 1999 |
---|
| 922 | |
---|
| 923 | d012(:) = 3.6e-13 |
---|
| 924 | |
---|
| 925 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 926 | v_4(:,nb_reaction_4) = d012(:) |
---|
| 927 | |
---|
[1495] | 928 | !---------------------------------------------------------------------- |
---|
| 929 | ! carbon reactions |
---|
| 930 | !---------------------------------------------------------------------- |
---|
| 931 | |
---|
| 932 | !--- e001: oh + co -> co2 + h |
---|
| 933 | |
---|
| 934 | ! jpl 2003 |
---|
| 935 | |
---|
| 936 | ! e001(:) = 1.5e-13*(1 + 0.6*press(:)/1013.) |
---|
| 937 | |
---|
| 938 | ! mccabe et al., grl, 28, 3135, 2001 |
---|
| 939 | |
---|
| 940 | ! e001(:) = 1.57e-13 + 3.54e-33*dens(:) |
---|
| 941 | |
---|
| 942 | ! jpl 2006 |
---|
| 943 | |
---|
| 944 | ! ak0 = 1.5e-13*(t(:)/300.)**(0.6) |
---|
| 945 | ! ak1 = 2.1e-9*(t(:)/300.)**(6.1) |
---|
| 946 | ! rate1 = ak0/(1. + ak0/(ak1/dens(:))) |
---|
| 947 | ! xpo1 = 1./(1. + alog10(ak0/(ak1/dens(:)))**2) |
---|
| 948 | |
---|
| 949 | ! ak0 = 5.9e-33*(t(:)/300.)**(-1.4) |
---|
| 950 | ! ak1 = 1.1e-12*(t(:)/300.)**(1.3) |
---|
| 951 | ! rate2 = (ak0*dens(:))/(1. + ak0*dens(:)/ak1) |
---|
| 952 | ! xpo2 = 1./(1. + alog10((ak0*dens(:))/ak1)**2) |
---|
| 953 | |
---|
| 954 | ! e001(:) = rate1*0.6**xpo1 + rate2*0.6**xpo2 |
---|
| 955 | |
---|
| 956 | ! joshi et al., 2006 |
---|
| 957 | |
---|
| 958 | do ilev = 1,lswitch-1 |
---|
| 959 | k1a0 = 1.34*2.5*dens(ilev) & |
---|
| 960 | *1/(1/(3.62e-26*t(ilev)**(-2.739)*exp(-20./t(ilev))) & |
---|
| 961 | + 1/(6.48e-33*t(ilev)**(0.14)*exp(-57./t(ilev)))) ! typo in paper corrected |
---|
| 962 | k1b0 = 1.17e-19*t(ilev)**(2.053)*exp(139./t(ilev)) & |
---|
| 963 | + 9.56e-12*t(ilev)**(-0.664)*exp(-167./t(ilev)) |
---|
| 964 | k1ainf = 1.52e-17*t(ilev)**(1.858)*exp(28.8/t(ilev)) & |
---|
| 965 | + 4.78e-8*t(ilev)**(-1.851)*exp(-318./t(ilev)) |
---|
| 966 | x = k1a0/(k1ainf - k1b0) |
---|
| 967 | y = k1b0/(k1ainf - k1b0) |
---|
| 968 | fc = 0.628*exp(-1223./t(ilev)) + (1. - 0.628)*exp(-39./t(ilev)) & |
---|
| 969 | + exp(-t(ilev)/255.) |
---|
| 970 | fx = fc**(1./(1. + (alog(x))**2)) ! typo in paper corrected |
---|
| 971 | k1a = k1a0*((1. + y)/(1. + x))*fx |
---|
| 972 | k1b = k1b0*(1./(1.+x))*fx |
---|
| 973 | |
---|
| 974 | e001(ilev) = k1a + k1b |
---|
| 975 | end do |
---|
| 976 | |
---|
| 977 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 978 | v_4(:,nb_reaction_4) = e001(:) |
---|
| 979 | |
---|
| 980 | !--- e002: o + co + m -> co2 + m |
---|
| 981 | |
---|
| 982 | ! tsang and hampson, 1986. |
---|
| 983 | |
---|
| 984 | e002(:) = 2.5*6.5e-33*exp(-2184./t(:))*dens(:) |
---|
| 985 | |
---|
| 986 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 987 | v_4(:,nb_reaction_4) = e002(:) |
---|
| 988 | |
---|
| 989 | !---------------------------------------------------------------------- |
---|
| 990 | ! heterogeneous chemistry |
---|
| 991 | !---------------------------------------------------------------------- |
---|
| 992 | |
---|
| 993 | if (hetero_ice) then |
---|
| 994 | |
---|
| 995 | ! k = (surface*v*gamma)/4 (s-1) |
---|
| 996 | ! v = 100*sqrt(8rt/(pi*m)) (cm s-1) |
---|
| 997 | |
---|
| 998 | !--- h001: ho2 + ice -> products |
---|
| 999 | |
---|
| 1000 | ! cooper and abbatt, 1996: gamma = 0.025 |
---|
| 1001 | |
---|
| 1002 | gam = 0.025 |
---|
| 1003 | h001(:) = surfice1d(:) & |
---|
| 1004 | *100.*sqrt(8.*8.31*t(:)/(33.e-3*pi))*gam/4. |
---|
| 1005 | |
---|
| 1006 | ! h002: oh + ice -> products |
---|
| 1007 | |
---|
| 1008 | ! cooper and abbatt, 1996: gamma = 0.03 |
---|
| 1009 | |
---|
| 1010 | gam = 0.03 |
---|
| 1011 | h002(:) = surfice1d(:) & |
---|
| 1012 | *100.*sqrt(8.*8.31*t(:)/(17.e-3*pi))*gam/4. |
---|
| 1013 | |
---|
| 1014 | !--- h003: h2o2 + ice -> products |
---|
| 1015 | |
---|
| 1016 | ! gamma = 0. test value |
---|
| 1017 | |
---|
| 1018 | gam = 0. |
---|
| 1019 | h003(:) = surfice1d(:) & |
---|
| 1020 | *100.*sqrt(8.*8.31*t(:)/(34.e-3*pi))*gam/4. |
---|
| 1021 | else |
---|
| 1022 | h001(:) = 0. |
---|
| 1023 | h002(:) = 0. |
---|
| 1024 | h003(:) = 0. |
---|
| 1025 | end if |
---|
| 1026 | |
---|
| 1027 | nb_phot = nb_phot + 1 |
---|
| 1028 | v_phot(:,nb_phot) = h001(:) |
---|
| 1029 | |
---|
| 1030 | nb_phot = nb_phot + 1 |
---|
| 1031 | v_phot(:,nb_phot) = h002(:) |
---|
| 1032 | |
---|
| 1033 | nb_phot = nb_phot + 1 |
---|
| 1034 | v_phot(:,nb_phot) = h003(:) |
---|
| 1035 | |
---|
| 1036 | if (hetero_dust) then |
---|
| 1037 | |
---|
| 1038 | !--- h004: ho2 + dust -> products |
---|
| 1039 | |
---|
| 1040 | ! jacob, 2000: gamma = 0.2 |
---|
| 1041 | ! see dereus et al., atm. chem. phys., 2005 |
---|
| 1042 | |
---|
| 1043 | gam = 0.2 |
---|
| 1044 | h004(:) = surfdust1d(:) & |
---|
| 1045 | *100.*sqrt(8.*8.31*t(:)/(33.e-3*pi))*gam/4. |
---|
| 1046 | |
---|
| 1047 | !--- h005: h2o2 + dust -> products |
---|
| 1048 | |
---|
| 1049 | ! gamma = 5.e-4 |
---|
| 1050 | ! see dereus et al., atm. chem. phys., 2005 |
---|
| 1051 | |
---|
| 1052 | gam = 5.e-4 |
---|
| 1053 | h005(:) = surfdust1d(:) & |
---|
| 1054 | *100.*sqrt(8.*8.31*t(:)/(34.e-3*pi))*gam/4. |
---|
| 1055 | else |
---|
| 1056 | h004(:) = 0. |
---|
| 1057 | h005(:) = 0. |
---|
| 1058 | end if |
---|
| 1059 | |
---|
| 1060 | nb_phot = nb_phot + 1 |
---|
| 1061 | v_phot(:,nb_phot) = h004(:) |
---|
| 1062 | |
---|
| 1063 | nb_phot = nb_phot + 1 |
---|
| 1064 | v_phot(:,nb_phot) = h005(:) |
---|
| 1065 | |
---|
[1499] | 1066 | end subroutine reactionrates |
---|
[1495] | 1067 | |
---|
| 1068 | !====================================================================== |
---|
| 1069 | |
---|
[1496] | 1070 | subroutine fill_matrix(ilev, mat, prod, loss, c, nesp, nlayer, v_phot, v_3, v_4) |
---|
[1495] | 1071 | |
---|
| 1072 | !====================================================================== |
---|
| 1073 | ! filling of the jacobian matrix |
---|
| 1074 | !====================================================================== |
---|
| 1075 | |
---|
| 1076 | use types_asis |
---|
[2030] | 1077 | use photolysis_mod, only : nb_phot_max, & |
---|
| 1078 | nb_reaction_3_max, & |
---|
| 1079 | nb_reaction_4_max |
---|
[1495] | 1080 | |
---|
| 1081 | implicit none |
---|
| 1082 | |
---|
| 1083 | ! input |
---|
| 1084 | |
---|
| 1085 | integer :: ilev ! level index |
---|
| 1086 | integer :: nesp ! number of species in the chemistry |
---|
| 1087 | integer, intent(in) :: nlayer ! number of atmospheric layers |
---|
| 1088 | |
---|
| 1089 | real (kind = 8), dimension(nlayer,nesp) :: c ! number densities |
---|
| 1090 | real (kind = 8), dimension(nlayer, nb_phot_max) :: v_phot |
---|
| 1091 | real (kind = 8), dimension(nlayer,nb_reaction_3_max) :: v_3 |
---|
| 1092 | real (kind = 8), dimension(nlayer,nb_reaction_4_max) :: v_4 |
---|
| 1093 | |
---|
| 1094 | ! output |
---|
| 1095 | |
---|
[1496] | 1096 | real (kind = 8), dimension(nesp,nesp), intent(out) :: mat ! matrix |
---|
| 1097 | real (kind = 8), dimension(nesp), intent(out) :: prod, loss |
---|
[1495] | 1098 | |
---|
| 1099 | ! local |
---|
| 1100 | |
---|
| 1101 | integer :: iesp |
---|
| 1102 | integer :: ind_phot_2,ind_phot_4,ind_phot_6 |
---|
| 1103 | integer :: ind_3_2,ind_3_4,ind_3_6 |
---|
| 1104 | integer :: ind_4_2,ind_4_4,ind_4_6,ind_4_8 |
---|
| 1105 | integer :: iphot,i3,i4 |
---|
| 1106 | |
---|
[1569] | 1107 | real(kind = 8) :: eps, eps_4 ! implicit/explicit coefficient |
---|
[1495] | 1108 | |
---|
[1496] | 1109 | ! initialisations |
---|
| 1110 | |
---|
[1495] | 1111 | mat(:,:) = 0. |
---|
[1496] | 1112 | prod(:) = 0. |
---|
| 1113 | loss(:) = 0. |
---|
[1495] | 1114 | |
---|
| 1115 | ! photodissociations |
---|
| 1116 | ! or reactions a + c -> b + c |
---|
| 1117 | ! or reactions a + ice -> b + c |
---|
| 1118 | |
---|
| 1119 | do iphot = 1,nb_phot_max |
---|
| 1120 | |
---|
| 1121 | ind_phot_2 = indice_phot(iphot)%z2 |
---|
| 1122 | ind_phot_4 = indice_phot(iphot)%z4 |
---|
| 1123 | ind_phot_6 = indice_phot(iphot)%z6 |
---|
| 1124 | |
---|
[1496] | 1125 | mat(ind_phot_2,ind_phot_2) = mat(ind_phot_2,ind_phot_2) + indice_phot(iphot)%z1*v_phot(ilev,iphot) |
---|
| 1126 | mat(ind_phot_4,ind_phot_2) = mat(ind_phot_4,ind_phot_2) - indice_phot(iphot)%z3*v_phot(ilev,iphot) |
---|
| 1127 | mat(ind_phot_6,ind_phot_2) = mat(ind_phot_6,ind_phot_2) - indice_phot(iphot)%z5*v_phot(ilev,iphot) |
---|
[1495] | 1128 | |
---|
[1496] | 1129 | loss(ind_phot_2) = loss(ind_phot_2) + indice_phot(iphot)%z1*v_phot(ilev,iphot) |
---|
| 1130 | prod(ind_phot_4) = prod(ind_phot_4) + indice_phot(iphot)%z3*v_phot(ilev,iphot)*c(ilev,ind_phot_2) |
---|
| 1131 | prod(ind_phot_6) = prod(ind_phot_6) + indice_phot(iphot)%z5*v_phot(ilev,iphot)*c(ilev,ind_phot_2) |
---|
| 1132 | |
---|
[1495] | 1133 | end do |
---|
| 1134 | |
---|
| 1135 | ! reactions a + a -> b + c |
---|
| 1136 | |
---|
| 1137 | do i3 = 1,nb_reaction_3_max |
---|
| 1138 | |
---|
| 1139 | ind_3_2 = indice_3(i3)%z2 |
---|
| 1140 | ind_3_4 = indice_3(i3)%z4 |
---|
| 1141 | ind_3_6 = indice_3(i3)%z6 |
---|
| 1142 | |
---|
[1496] | 1143 | mat(ind_3_2,ind_3_2) = mat(ind_3_2,ind_3_2) + indice_3(i3)%z1*v_3(ilev,i3)*c(ilev,ind_3_2) |
---|
| 1144 | mat(ind_3_4,ind_3_2) = mat(ind_3_4,ind_3_2) - indice_3(i3)%z3*v_3(ilev,i3)*c(ilev,ind_3_2) |
---|
| 1145 | mat(ind_3_6,ind_3_2) = mat(ind_3_6,ind_3_2) - indice_3(i3)%z5*v_3(ilev,i3)*c(ilev,ind_3_2) |
---|
[1495] | 1146 | |
---|
[1496] | 1147 | loss(ind_3_2) = loss(ind_3_2) + indice_3(i3)%z1*v_3(ilev,i3)*c(ilev,ind_3_2) |
---|
| 1148 | prod(ind_3_4) = prod(ind_3_4) + indice_3(i3)%z3*v_3(ilev,i3)*c(ilev,ind_3_2)*c(ilev,ind_3_2) |
---|
| 1149 | prod(ind_3_6) = prod(ind_3_6) + indice_3(i3)%z5*v_3(ilev,i3)*c(ilev,ind_3_2)*c(ilev,ind_3_2) |
---|
| 1150 | |
---|
[1495] | 1151 | end do |
---|
| 1152 | |
---|
| 1153 | ! reactions a + b -> c + d |
---|
| 1154 | |
---|
| 1155 | eps = 1.d-10 |
---|
| 1156 | |
---|
| 1157 | do i4 = 1,nb_reaction_4_max |
---|
| 1158 | |
---|
| 1159 | ind_4_2 = indice_4(i4)%z2 |
---|
| 1160 | ind_4_4 = indice_4(i4)%z4 |
---|
| 1161 | ind_4_6 = indice_4(i4)%z6 |
---|
| 1162 | ind_4_8 = indice_4(i4)%z8 |
---|
| 1163 | |
---|
| 1164 | eps_4 = abs(c(ilev,ind_4_2))/(abs(c(ilev,ind_4_2)) + abs(c(ilev,ind_4_4)) + eps) |
---|
[1569] | 1165 | eps_4 = min(eps_4,1.0) |
---|
[1495] | 1166 | |
---|
[1496] | 1167 | mat(ind_4_2,ind_4_2) = mat(ind_4_2,ind_4_2) + indice_4(i4)%z1*v_4(ilev,i4)*(1. - eps_4)*c(ilev,ind_4_4) |
---|
| 1168 | mat(ind_4_2,ind_4_4) = mat(ind_4_2,ind_4_4) + indice_4(i4)%z1*v_4(ilev,i4)*eps_4*c(ilev,ind_4_2) |
---|
| 1169 | mat(ind_4_4,ind_4_2) = mat(ind_4_4,ind_4_2) + indice_4(i4)%z3*v_4(ilev,i4)*(1. - eps_4)*c(ilev,ind_4_4) |
---|
| 1170 | mat(ind_4_4,ind_4_4) = mat(ind_4_4,ind_4_4) + indice_4(i4)%z3*v_4(ilev,i4)*eps_4*c(ilev,ind_4_2) |
---|
| 1171 | mat(ind_4_6,ind_4_2) = mat(ind_4_6,ind_4_2) - indice_4(i4)%z5*v_4(ilev,i4)*(1. - eps_4)*c(ilev,ind_4_4) |
---|
| 1172 | mat(ind_4_6,ind_4_4) = mat(ind_4_6,ind_4_4) - indice_4(i4)%z5*v_4(ilev,i4)*eps_4*c(ilev,ind_4_2) |
---|
| 1173 | mat(ind_4_8,ind_4_2) = mat(ind_4_8,ind_4_2) - indice_4(i4)%z7*v_4(ilev,i4)*(1. - eps_4)*c(ilev,ind_4_4) |
---|
| 1174 | mat(ind_4_8,ind_4_4) = mat(ind_4_8,ind_4_4) - indice_4(i4)%z7*v_4(ilev,i4)*eps_4*c(ilev,ind_4_2) |
---|
[1495] | 1175 | |
---|
[1496] | 1176 | loss(ind_4_2) = loss(ind_4_2) + indice_4(i4)%z1*v_4(ilev,i4)*c(ilev,ind_4_4) |
---|
| 1177 | loss(ind_4_4) = loss(ind_4_4) + indice_4(i4)%z3*v_4(ilev,i4)*c(ilev,ind_4_2) |
---|
| 1178 | prod(ind_4_6) = prod(ind_4_6) + indice_4(i4)%z5*v_4(ilev,i4)*c(ilev,ind_4_2)*c(ilev,ind_4_4) |
---|
| 1179 | prod(ind_4_8) = prod(ind_4_8) + indice_4(i4)%z7*v_4(ilev,i4)*c(ilev,ind_4_2)*c(ilev,ind_4_4) |
---|
| 1180 | |
---|
[1495] | 1181 | end do |
---|
| 1182 | |
---|
[1499] | 1183 | end subroutine fill_matrix |
---|
[1495] | 1184 | |
---|
| 1185 | !================================================================ |
---|
| 1186 | |
---|
| 1187 | subroutine indice(i_co2, i_co, i_o, i_o1d, i_o2, i_o3, i_h, & |
---|
| 1188 | i_h2, i_oh, i_ho2, i_h2o2, i_h2o, & |
---|
| 1189 | i_n, i_n2d, i_no, i_no2, i_n2) |
---|
| 1190 | |
---|
| 1191 | !================================================================ |
---|
| 1192 | ! set the "indice" arrays used to fill the jacobian matrix ! |
---|
| 1193 | !---------------------------------------------------------------- |
---|
| 1194 | ! reaction type ! |
---|
| 1195 | !---------------------------------------------------------------- |
---|
| 1196 | ! A + hv --> B + C photolysis indice_phot ! |
---|
| 1197 | ! A + B --> C + D bimolecular indice_4 ! |
---|
| 1198 | ! A + A --> B + C quadratic indice_3 ! |
---|
| 1199 | ! A + C --> B + C quenching indice_phot ! |
---|
| 1200 | ! A + ice --> B + C heterogeneous indice_phot ! |
---|
| 1201 | !================================================================ |
---|
| 1202 | |
---|
| 1203 | use types_asis |
---|
[2030] | 1204 | use photolysis_mod, only : nb_phot_max, & |
---|
| 1205 | nb_reaction_3_max, & |
---|
| 1206 | nb_reaction_4_max |
---|
[1495] | 1207 | |
---|
| 1208 | implicit none |
---|
| 1209 | |
---|
| 1210 | ! input |
---|
| 1211 | |
---|
| 1212 | integer :: i_co2, i_co, i_o, i_o1d, i_o2, i_o3, i_h, & |
---|
| 1213 | i_h2, i_oh, i_ho2, i_h2o2, i_h2o, & |
---|
| 1214 | i_n, i_n2d, i_no, i_no2, i_n2 |
---|
| 1215 | |
---|
| 1216 | ! local |
---|
| 1217 | |
---|
| 1218 | integer :: nb_phot, nb_reaction_3, nb_reaction_4 |
---|
| 1219 | integer :: i_dummy |
---|
| 1220 | |
---|
| 1221 | allocate (indice_phot(nb_phot_max)) |
---|
| 1222 | allocate (indice_3(nb_reaction_3_max)) |
---|
| 1223 | allocate (indice_4(nb_reaction_4_max)) |
---|
| 1224 | |
---|
| 1225 | i_dummy = 1 |
---|
| 1226 | |
---|
| 1227 | nb_phot = 0 |
---|
| 1228 | nb_reaction_3 = 0 |
---|
| 1229 | nb_reaction_4 = 0 |
---|
| 1230 | |
---|
| 1231 | !=========================================================== |
---|
| 1232 | ! O2 + hv -> O + O |
---|
| 1233 | !=========================================================== |
---|
| 1234 | |
---|
| 1235 | nb_phot = nb_phot + 1 |
---|
| 1236 | |
---|
| 1237 | indice_phot(nb_phot) = z3spec(1.0, i_o2, 2.0, i_o, 0.0, i_dummy) |
---|
| 1238 | |
---|
| 1239 | !=========================================================== |
---|
| 1240 | ! O2 + hv -> O + O(1D) |
---|
| 1241 | !=========================================================== |
---|
| 1242 | |
---|
| 1243 | nb_phot = nb_phot + 1 |
---|
| 1244 | |
---|
| 1245 | indice_phot(nb_phot) = z3spec(1.0, i_o2, 1.0, i_o, 1.0, i_o1d) |
---|
| 1246 | |
---|
| 1247 | !=========================================================== |
---|
| 1248 | ! CO2 + hv -> CO + O |
---|
| 1249 | !=========================================================== |
---|
| 1250 | |
---|
| 1251 | nb_phot = nb_phot + 1 |
---|
| 1252 | |
---|
| 1253 | indice_phot(nb_phot) = z3spec(1.0, i_co2, 1.0, i_co, 1.0, i_o) |
---|
| 1254 | |
---|
| 1255 | !=========================================================== |
---|
| 1256 | ! CO2 + hv -> CO + O(1D) |
---|
| 1257 | !=========================================================== |
---|
| 1258 | |
---|
| 1259 | nb_phot = nb_phot + 1 |
---|
| 1260 | |
---|
| 1261 | indice_phot(nb_phot) = z3spec(1.0, i_co2, 1.0, i_co, 1.0, i_o1d) |
---|
| 1262 | |
---|
| 1263 | !=========================================================== |
---|
| 1264 | ! O3 + hv -> O2 + O(1D) |
---|
| 1265 | !=========================================================== |
---|
| 1266 | |
---|
| 1267 | nb_phot = nb_phot + 1 |
---|
| 1268 | |
---|
| 1269 | indice_phot(nb_phot) = z3spec(1.0, i_o3, 1.0, i_o2, 1.0, i_o1d) |
---|
| 1270 | |
---|
| 1271 | !=========================================================== |
---|
| 1272 | ! O3 + hv -> O2 + O |
---|
| 1273 | !=========================================================== |
---|
| 1274 | |
---|
| 1275 | nb_phot = nb_phot + 1 |
---|
| 1276 | |
---|
| 1277 | indice_phot(nb_phot) = z3spec(1.0, i_o3, 1.0, i_o2, 1.0, i_o) |
---|
| 1278 | |
---|
| 1279 | !=========================================================== |
---|
| 1280 | ! H2O + hv -> H + OH |
---|
| 1281 | !=========================================================== |
---|
| 1282 | |
---|
| 1283 | nb_phot = nb_phot + 1 |
---|
| 1284 | |
---|
| 1285 | indice_phot(nb_phot) = z3spec(1.0, i_h2o, 1.0, i_h, 1.0, i_oh) |
---|
| 1286 | |
---|
| 1287 | !=========================================================== |
---|
| 1288 | ! H2O2 + hv -> OH + OH |
---|
| 1289 | !=========================================================== |
---|
| 1290 | |
---|
| 1291 | nb_phot = nb_phot + 1 |
---|
| 1292 | |
---|
| 1293 | indice_phot(nb_phot) = z3spec(1.0, i_h2o2, 2.0, i_oh, 0.0, i_dummy) |
---|
| 1294 | |
---|
| 1295 | !=========================================================== |
---|
| 1296 | ! HO2 + hv -> OH + O |
---|
| 1297 | !=========================================================== |
---|
| 1298 | |
---|
| 1299 | nb_phot = nb_phot + 1 |
---|
| 1300 | |
---|
| 1301 | indice_phot(nb_phot) = z3spec(1.0, i_ho2, 1.0, i_oh, 1.0, i_o) |
---|
| 1302 | |
---|
| 1303 | !=========================================================== |
---|
[2024] | 1304 | ! H2 + hv -> H + H |
---|
| 1305 | !=========================================================== |
---|
| 1306 | |
---|
| 1307 | nb_phot = nb_phot + 1 |
---|
| 1308 | |
---|
| 1309 | indice_phot(nb_phot) = z3spec(1.0, i_h2, 1.0, i_h, 1.0, i_h) |
---|
| 1310 | |
---|
| 1311 | !=========================================================== |
---|
[1495] | 1312 | ! NO + hv -> N + O |
---|
| 1313 | !=========================================================== |
---|
| 1314 | |
---|
| 1315 | nb_phot = nb_phot + 1 |
---|
| 1316 | |
---|
| 1317 | indice_phot(nb_phot) = z3spec(1.0, i_no, 1.0, i_n, 1.0, i_o) |
---|
| 1318 | |
---|
| 1319 | !=========================================================== |
---|
| 1320 | ! NO2 + hv -> NO + O |
---|
| 1321 | !=========================================================== |
---|
| 1322 | |
---|
| 1323 | nb_phot = nb_phot + 1 |
---|
| 1324 | |
---|
| 1325 | indice_phot(nb_phot) = z3spec(1.0, i_no2, 1.0, i_no, 1.0, i_o) |
---|
| 1326 | |
---|
| 1327 | !=========================================================== |
---|
[2024] | 1328 | ! N2 + hv -> N + N |
---|
| 1329 | !=========================================================== |
---|
| 1330 | |
---|
| 1331 | nb_phot = nb_phot + 1 |
---|
| 1332 | |
---|
| 1333 | indice_phot(nb_phot) = z3spec(1.0, i_n2, 1.0, i_n2d, 1.0, i_n) |
---|
| 1334 | |
---|
| 1335 | !=========================================================== |
---|
[1495] | 1336 | ! a001 : O + O2 + CO2 -> O3 + CO2 |
---|
| 1337 | !=========================================================== |
---|
| 1338 | |
---|
| 1339 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 1340 | |
---|
| 1341 | indice_4(nb_reaction_4) = z4spec(1.0, i_o, 1.0, i_o2, 1.0, i_o3, 0.0, i_dummy) |
---|
| 1342 | |
---|
| 1343 | !=========================================================== |
---|
| 1344 | ! a002 : O + O + CO2 -> O2 + CO2 |
---|
| 1345 | !=========================================================== |
---|
| 1346 | |
---|
| 1347 | nb_reaction_3 = nb_reaction_3 + 1 |
---|
| 1348 | |
---|
| 1349 | indice_3(nb_reaction_3) = z3spec(2.0, i_o, 1.0, i_o2, 0.0, i_dummy) |
---|
| 1350 | |
---|
| 1351 | !=========================================================== |
---|
| 1352 | ! a003 : O + O3 -> O2 + O2 |
---|
| 1353 | !=========================================================== |
---|
| 1354 | |
---|
| 1355 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 1356 | |
---|
| 1357 | indice_4(nb_reaction_4) = z4spec(1.0, i_o, 1.0, i_o3, 2.0, i_o2, 0.0, i_dummy) |
---|
| 1358 | |
---|
| 1359 | !=========================================================== |
---|
| 1360 | ! b001 : O(1D) + CO2 -> O + CO2 |
---|
| 1361 | !=========================================================== |
---|
| 1362 | |
---|
| 1363 | nb_phot = nb_phot + 1 |
---|
| 1364 | |
---|
| 1365 | indice_phot(nb_phot) = z3spec(1.0, i_o1d, 1.0, i_o, 0.0, i_dummy) |
---|
| 1366 | |
---|
| 1367 | !=========================================================== |
---|
| 1368 | ! b002 : O(1D) + H2O -> OH + OH |
---|
| 1369 | !=========================================================== |
---|
| 1370 | |
---|
| 1371 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 1372 | |
---|
| 1373 | indice_4(nb_reaction_4) = z4spec(1.0, i_o1d, 1.0, i_h2o, 2.0, i_oh, 0.0, i_dummy) |
---|
| 1374 | |
---|
| 1375 | !=========================================================== |
---|
| 1376 | ! b003 : O(1D) + H2 -> OH + H |
---|
| 1377 | !=========================================================== |
---|
| 1378 | |
---|
| 1379 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 1380 | |
---|
| 1381 | indice_4(nb_reaction_4) = z4spec(1.0, i_o1d, 1.0, i_h2, 1.0, i_oh, 1.0, i_h) |
---|
| 1382 | |
---|
| 1383 | !=========================================================== |
---|
| 1384 | ! b004 : O(1D) + O2 -> O + O2 |
---|
| 1385 | !=========================================================== |
---|
| 1386 | |
---|
| 1387 | nb_phot = nb_phot + 1 |
---|
| 1388 | |
---|
| 1389 | indice_phot(nb_phot) = z3spec(1.0, i_o1d, 1.0, i_o, 0.0, i_dummy) |
---|
| 1390 | |
---|
| 1391 | !=========================================================== |
---|
| 1392 | ! b005 : O(1D) + O3 -> O2 + O2 |
---|
| 1393 | !=========================================================== |
---|
| 1394 | |
---|
| 1395 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 1396 | |
---|
| 1397 | indice_4(nb_reaction_4) = z4spec(1.0, i_o1d, 1.0, i_o3, 2.0, i_o2, 0.0, i_dummy) |
---|
| 1398 | |
---|
| 1399 | !=========================================================== |
---|
| 1400 | ! b006 : O(1D) + O3 -> O2 + O + O |
---|
| 1401 | !=========================================================== |
---|
| 1402 | |
---|
| 1403 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 1404 | |
---|
| 1405 | indice_4(nb_reaction_4) = z4spec(1.0, i_o1d, 1.0, i_o3, 1.0, i_o2, 2.0, i_o) |
---|
| 1406 | |
---|
| 1407 | !=========================================================== |
---|
| 1408 | ! c001 : O + HO2 -> OH + O2 |
---|
| 1409 | !=========================================================== |
---|
| 1410 | |
---|
| 1411 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 1412 | |
---|
| 1413 | indice_4(nb_reaction_4) = z4spec(1.0, i_o, 1.0, i_ho2, 1.0, i_oh, 1.0, i_o2) |
---|
| 1414 | |
---|
| 1415 | !=========================================================== |
---|
| 1416 | ! c002 : O + OH -> O2 + H |
---|
| 1417 | !=========================================================== |
---|
| 1418 | |
---|
| 1419 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 1420 | |
---|
| 1421 | indice_4(nb_reaction_4) = z4spec(1.0, i_o, 1.0, i_oh, 1.0, i_o2, 1.0, i_h) |
---|
| 1422 | |
---|
| 1423 | !=========================================================== |
---|
| 1424 | ! c003 : H + O3 -> OH + O2 |
---|
| 1425 | !=========================================================== |
---|
| 1426 | |
---|
| 1427 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 1428 | |
---|
| 1429 | indice_4(nb_reaction_4) = z4spec(1.0, i_h, 1.0, i_o3, 1.0, i_oh, 1.0, i_o2) |
---|
| 1430 | |
---|
| 1431 | !=========================================================== |
---|
| 1432 | ! c004 : H + HO2 -> OH + OH |
---|
| 1433 | !=========================================================== |
---|
| 1434 | |
---|
| 1435 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 1436 | |
---|
| 1437 | indice_4(nb_reaction_4) = z4spec(1.0, i_h, 1.0, i_ho2, 2.0, i_oh, 0.0, i_dummy) |
---|
| 1438 | |
---|
| 1439 | !=========================================================== |
---|
| 1440 | ! c005 : H + HO2 -> H2 + O2 |
---|
| 1441 | !=========================================================== |
---|
| 1442 | |
---|
| 1443 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 1444 | |
---|
| 1445 | indice_4(nb_reaction_4) = z4spec(1.0, i_h, 1.0, i_ho2, 1.0, i_h2, 1.0, i_o2) |
---|
| 1446 | |
---|
| 1447 | !=========================================================== |
---|
| 1448 | ! c006 : H + HO2 -> H2O + O |
---|
| 1449 | !=========================================================== |
---|
| 1450 | |
---|
| 1451 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 1452 | |
---|
| 1453 | indice_4(nb_reaction_4) = z4spec(1.0, i_h, 1.0, i_ho2, 1.0, i_h2o, 1.0, i_o) |
---|
| 1454 | |
---|
| 1455 | !=========================================================== |
---|
| 1456 | ! c007 : OH + HO2 -> H2O + O2 |
---|
| 1457 | !=========================================================== |
---|
| 1458 | |
---|
| 1459 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 1460 | |
---|
| 1461 | indice_4(nb_reaction_4) = z4spec(1.0, i_oh, 1.0, i_ho2, 1.0, i_h2o, 1.0, i_o2) |
---|
| 1462 | |
---|
| 1463 | !=========================================================== |
---|
| 1464 | ! c008 : HO2 + HO2 -> H2O2 + O2 |
---|
| 1465 | !=========================================================== |
---|
| 1466 | |
---|
| 1467 | nb_reaction_3 = nb_reaction_3 + 1 |
---|
| 1468 | |
---|
| 1469 | indice_3(nb_reaction_3) = z3spec(2.0, i_ho2, 1.0, i_h2o2, 1.0, i_o2) |
---|
| 1470 | |
---|
| 1471 | !=========================================================== |
---|
| 1472 | ! c009 : OH + H2O2 -> H2O + HO2 |
---|
| 1473 | !=========================================================== |
---|
| 1474 | |
---|
| 1475 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 1476 | |
---|
| 1477 | indice_4(nb_reaction_4) = z4spec(1.0, i_oh, 1.0, i_h2o2, 1.0, i_h2o, 1.0, i_ho2) |
---|
| 1478 | |
---|
| 1479 | !=========================================================== |
---|
| 1480 | ! c010 : OH + H2 -> H2O + H |
---|
| 1481 | !=========================================================== |
---|
| 1482 | |
---|
| 1483 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 1484 | |
---|
| 1485 | indice_4(nb_reaction_4) = z4spec(1.0, i_oh, 1.0, i_h2, 1.0, i_h2o, 1.0, i_h) |
---|
| 1486 | |
---|
| 1487 | !=========================================================== |
---|
| 1488 | ! c011 : H + O2 + CO2 -> HO2 + CO2 |
---|
| 1489 | !=========================================================== |
---|
| 1490 | |
---|
| 1491 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 1492 | |
---|
| 1493 | indice_4(nb_reaction_4) = z4spec(1.0, i_h, 1.0, i_o2, 1.0, i_ho2, 0.0, i_dummy) |
---|
| 1494 | |
---|
| 1495 | !=========================================================== |
---|
| 1496 | ! c012 : O + H2O2 -> OH + HO2 |
---|
| 1497 | !=========================================================== |
---|
| 1498 | |
---|
| 1499 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 1500 | |
---|
| 1501 | indice_4(nb_reaction_4) = z4spec(1.0, i_o, 1.0, i_h2o2, 1.0, i_oh, 1.0, i_ho2) |
---|
| 1502 | |
---|
| 1503 | !=========================================================== |
---|
| 1504 | ! c013 : OH + OH -> H2O + O |
---|
| 1505 | !=========================================================== |
---|
| 1506 | |
---|
| 1507 | nb_reaction_3 = nb_reaction_3 + 1 |
---|
| 1508 | |
---|
| 1509 | indice_3(nb_reaction_3) = z3spec(2.0, i_oh, 1.0, i_h2o, 1.0, i_o) |
---|
| 1510 | |
---|
| 1511 | !=========================================================== |
---|
| 1512 | ! c014 : OH + O3 -> HO2 + O2 |
---|
| 1513 | !=========================================================== |
---|
| 1514 | |
---|
| 1515 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 1516 | |
---|
| 1517 | indice_4(nb_reaction_4) = z4spec(1.0, i_oh, 1.0, i_o3, 1.0, i_ho2, 1.0, i_o2) |
---|
| 1518 | |
---|
| 1519 | !=========================================================== |
---|
| 1520 | ! c015 : HO2 + O3 -> OH + O2 + O2 |
---|
| 1521 | !=========================================================== |
---|
| 1522 | |
---|
| 1523 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 1524 | |
---|
| 1525 | indice_4(nb_reaction_4) = z4spec(1.0, i_ho2, 1.0, i_o3, 1.0, i_oh, 2.0, i_o2) |
---|
| 1526 | |
---|
| 1527 | !=========================================================== |
---|
| 1528 | ! c016 : HO2 + HO2 + CO2 -> H2O2 + O2 + CO2 |
---|
| 1529 | !=========================================================== |
---|
| 1530 | |
---|
| 1531 | nb_reaction_3 = nb_reaction_3 + 1 |
---|
| 1532 | |
---|
| 1533 | indice_3(nb_reaction_3) = z3spec(2.0, i_ho2, 1.0, i_h2o2, 1.0, i_o2) |
---|
| 1534 | |
---|
| 1535 | !=========================================================== |
---|
| 1536 | ! c017 : OH + OH + CO2 -> H2O2 + CO2 |
---|
| 1537 | !=========================================================== |
---|
| 1538 | |
---|
| 1539 | nb_reaction_3 = nb_reaction_3 + 1 |
---|
| 1540 | |
---|
| 1541 | indice_3(nb_reaction_3) = z3spec(2.0, i_oh, 1.0, i_h2o2, 0.0, i_dummy) |
---|
| 1542 | |
---|
| 1543 | !=========================================================== |
---|
| 1544 | ! c018 : H + H + CO2 -> H2 + CO2 |
---|
| 1545 | !=========================================================== |
---|
| 1546 | |
---|
| 1547 | nb_reaction_3 = nb_reaction_3 + 1 |
---|
| 1548 | |
---|
| 1549 | indice_3(nb_reaction_3) = z3spec(2.0, i_h, 1.0, i_h2, 0.0, i_dummy) |
---|
| 1550 | |
---|
| 1551 | !=========================================================== |
---|
| 1552 | ! d001 : NO2 + O -> NO + O2 |
---|
| 1553 | !=========================================================== |
---|
| 1554 | |
---|
| 1555 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 1556 | |
---|
| 1557 | indice_4(nb_reaction_4) = z4spec(1.0, i_no2, 1.0, i_o, 1.0, i_no, 1.0, i_o2) |
---|
| 1558 | |
---|
| 1559 | !=========================================================== |
---|
| 1560 | ! d002 : NO + O3 -> NO2 + O2 |
---|
| 1561 | !=========================================================== |
---|
| 1562 | |
---|
| 1563 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 1564 | |
---|
| 1565 | indice_4(nb_reaction_4) = z4spec(1.0, i_no, 1.0, i_o3, 1.0, i_no2, 1.0, i_o2) |
---|
| 1566 | |
---|
| 1567 | !=========================================================== |
---|
| 1568 | ! d003 : NO + HO2 -> NO2 + OH |
---|
| 1569 | !=========================================================== |
---|
| 1570 | |
---|
| 1571 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 1572 | |
---|
| 1573 | indice_4(nb_reaction_4) = z4spec(1.0, i_no, 1.0, i_ho2, 1.0, i_no2, 1.0, i_oh) |
---|
| 1574 | |
---|
| 1575 | !=========================================================== |
---|
| 1576 | ! d004 : N + NO -> N2 + O |
---|
| 1577 | !=========================================================== |
---|
| 1578 | |
---|
| 1579 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 1580 | |
---|
| 1581 | indice_4(nb_reaction_4) = z4spec(1.0, i_n, 1.0, i_no, 1.0, i_n2, 1.0, i_o) |
---|
| 1582 | |
---|
| 1583 | !=========================================================== |
---|
| 1584 | ! d005 : N + O2 -> NO + O |
---|
| 1585 | !=========================================================== |
---|
| 1586 | |
---|
| 1587 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 1588 | |
---|
| 1589 | indice_4(nb_reaction_4) = z4spec(1.0, i_n, 1.0, i_o2, 1.0, i_no, 1.0, i_o) |
---|
| 1590 | |
---|
| 1591 | !=========================================================== |
---|
| 1592 | ! d006 : NO2 + H -> NO + OH |
---|
| 1593 | !=========================================================== |
---|
| 1594 | |
---|
| 1595 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 1596 | |
---|
| 1597 | indice_4(nb_reaction_4) = z4spec(1.0, i_no2, 1.0, i_h, 1.0, i_no, 1.0, i_oh) |
---|
| 1598 | |
---|
| 1599 | !=========================================================== |
---|
| 1600 | ! d007 : N + O -> NO |
---|
| 1601 | !=========================================================== |
---|
| 1602 | |
---|
| 1603 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 1604 | |
---|
| 1605 | indice_4(nb_reaction_4) = z4spec(1.0, i_n, 1.0, i_o, 1.0, i_no, 0.0, i_dummy) |
---|
| 1606 | |
---|
| 1607 | !=========================================================== |
---|
| 1608 | ! d008 : N + HO2 -> NO + OH |
---|
| 1609 | !=========================================================== |
---|
| 1610 | |
---|
| 1611 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 1612 | |
---|
| 1613 | indice_4(nb_reaction_4) = z4spec(1.0, i_n, 1.0, i_ho2, 1.0, i_no, 1.0, i_oh) |
---|
| 1614 | |
---|
| 1615 | !=========================================================== |
---|
| 1616 | ! d009 : N + OH -> NO + H |
---|
| 1617 | !=========================================================== |
---|
| 1618 | |
---|
| 1619 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 1620 | |
---|
| 1621 | indice_4(nb_reaction_4) = z4spec(1.0, i_n, 1.0, i_oh, 1.0, i_no, 1.0, i_h) |
---|
| 1622 | |
---|
| 1623 | !=========================================================== |
---|
[2024] | 1624 | ! d010 : N(2D) + O -> N + O |
---|
| 1625 | !=========================================================== |
---|
| 1626 | |
---|
| 1627 | nb_phot = nb_phot + 1 |
---|
| 1628 | |
---|
| 1629 | indice_phot(nb_phot) = z3spec(1.0, i_n2d, 1.0, i_n, 0.0, i_dummy) |
---|
| 1630 | |
---|
| 1631 | !=========================================================== |
---|
| 1632 | ! d011 : N(2D) + N2 -> N + N2 |
---|
| 1633 | !=========================================================== |
---|
| 1634 | |
---|
| 1635 | nb_phot = nb_phot + 1 |
---|
| 1636 | |
---|
| 1637 | indice_phot(nb_phot) = z3spec(1.0, i_n2d, 1.0, i_n, 0.0, i_dummy) |
---|
| 1638 | |
---|
| 1639 | !=========================================================== |
---|
| 1640 | ! d012 : N(2D) + CO2 -> NO + CO |
---|
| 1641 | !=========================================================== |
---|
| 1642 | |
---|
| 1643 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 1644 | |
---|
| 1645 | indice_4(nb_reaction_4) = z4spec(1.0, i_n2d, 1.0, i_co2, 1.0, i_no, 1.0, i_co) |
---|
| 1646 | |
---|
| 1647 | !=========================================================== |
---|
[1495] | 1648 | ! e001 : CO + OH -> CO2 + H |
---|
| 1649 | !=========================================================== |
---|
| 1650 | |
---|
| 1651 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 1652 | |
---|
| 1653 | indice_4(nb_reaction_4) = z4spec(1.0, i_co, 1.0, i_oh, 1.0, i_co2, 1.0, i_h) |
---|
| 1654 | |
---|
| 1655 | !=========================================================== |
---|
| 1656 | ! e002 : CO + O + M -> CO2 + M |
---|
| 1657 | !=========================================================== |
---|
| 1658 | |
---|
| 1659 | nb_reaction_4 = nb_reaction_4 + 1 |
---|
| 1660 | |
---|
| 1661 | indice_4(nb_reaction_4) = z4spec(1.0, i_co, 1.0, i_o, 1.0, i_co2, 0.0, i_dummy) |
---|
| 1662 | |
---|
| 1663 | !=========================================================== |
---|
| 1664 | ! h001: HO2 + ice -> products |
---|
| 1665 | ! treated as |
---|
| 1666 | ! HO2 -> 0.5 H2O + 0.75 O2 |
---|
| 1667 | !=========================================================== |
---|
| 1668 | |
---|
| 1669 | nb_phot = nb_phot + 1 |
---|
| 1670 | |
---|
| 1671 | indice_phot(nb_phot) = z3spec(1.0, i_ho2, 0.5, i_h2o, 0.75, i_o2) |
---|
| 1672 | |
---|
| 1673 | !=========================================================== |
---|
| 1674 | ! h002: OH + ice -> products |
---|
| 1675 | ! treated as |
---|
| 1676 | ! OH -> 0.5 H2O + 0.25 O2 |
---|
| 1677 | !=========================================================== |
---|
| 1678 | |
---|
| 1679 | nb_phot = nb_phot + 1 |
---|
| 1680 | |
---|
| 1681 | indice_phot(nb_phot) = z3spec(1.0, i_oh, 0.5, i_h2o, 0.25, i_o2) |
---|
| 1682 | |
---|
| 1683 | !=========================================================== |
---|
| 1684 | ! h003: H2O2 + ice -> products |
---|
| 1685 | ! treated as |
---|
| 1686 | ! H2O2 -> H2O + 0.5 O2 |
---|
| 1687 | !=========================================================== |
---|
| 1688 | |
---|
| 1689 | nb_phot = nb_phot + 1 |
---|
| 1690 | |
---|
| 1691 | indice_phot(nb_phot) = z3spec(1.0, i_h2o2, 1.0, i_h2o, 0.5, i_o2) |
---|
| 1692 | |
---|
| 1693 | !=========================================================== |
---|
| 1694 | ! h004: HO2 + dust -> products |
---|
| 1695 | ! treated as |
---|
| 1696 | ! HO2 -> 0.5 H2O + 0.75 O2 |
---|
| 1697 | !=========================================================== |
---|
| 1698 | |
---|
| 1699 | nb_phot = nb_phot + 1 |
---|
| 1700 | |
---|
| 1701 | indice_phot(nb_phot) = z3spec(1.0, i_ho2, 0.5, i_h2o, 0.75, i_o2) |
---|
| 1702 | |
---|
| 1703 | !=========================================================== |
---|
| 1704 | ! h005: H2O2 + dust -> products |
---|
| 1705 | ! treated as |
---|
| 1706 | ! H2O2 -> H2O + 0.5 O2 |
---|
| 1707 | !=========================================================== |
---|
| 1708 | |
---|
| 1709 | nb_phot = nb_phot + 1 |
---|
| 1710 | |
---|
| 1711 | indice_phot(nb_phot) = z3spec(1.0, i_h2o2, 1.0, i_h2o, 0.5, i_o2) |
---|
| 1712 | |
---|
| 1713 | !=========================================================== |
---|
| 1714 | ! check dimensions |
---|
| 1715 | !=========================================================== |
---|
| 1716 | |
---|
| 1717 | print*, 'nb_phot = ', nb_phot |
---|
| 1718 | print*, 'nb_reaction_4 = ', nb_reaction_4 |
---|
| 1719 | print*, 'nb_reaction_3 = ', nb_reaction_3 |
---|
| 1720 | |
---|
| 1721 | if ((nb_phot /= nb_phot_max) .or. & |
---|
| 1722 | (nb_reaction_3 /= nb_reaction_3_max) .or. & |
---|
| 1723 | (nb_reaction_4 /= nb_reaction_4_max)) then |
---|
| 1724 | print*, 'wrong dimensions in indice' |
---|
| 1725 | stop |
---|
| 1726 | end if |
---|
| 1727 | |
---|
[1499] | 1728 | end subroutine indice |
---|
[1495] | 1729 | |
---|
| 1730 | !***************************************************************** |
---|
| 1731 | |
---|
| 1732 | subroutine gcmtochim(nlayer, nq, zycol, lswitch, nesp, & |
---|
| 1733 | i_co2, i_co, i_o, i_o1d, i_o2, i_o3, i_h, & |
---|
| 1734 | i_h2, i_oh, i_ho2, i_h2o2, i_h2o, & |
---|
| 1735 | i_n, i_n2d, i_no, i_no2, i_n2, & |
---|
| 1736 | dens, rm, c) |
---|
| 1737 | |
---|
| 1738 | !***************************************************************** |
---|
| 1739 | |
---|
| 1740 | use tracer_mod, only: igcm_co2, igcm_co, igcm_o, igcm_o1d, & |
---|
| 1741 | & igcm_o2, igcm_o3, igcm_h, igcm_h2, igcm_oh, & |
---|
| 1742 | & igcm_ho2, igcm_h2o2, igcm_h2o_vap, & |
---|
| 1743 | & igcm_n, igcm_n2d, igcm_no, igcm_no2, igcm_n2 |
---|
| 1744 | |
---|
| 1745 | implicit none |
---|
| 1746 | |
---|
| 1747 | #include "callkeys.h" |
---|
| 1748 | |
---|
| 1749 | !ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
| 1750 | ! input: |
---|
| 1751 | !ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
| 1752 | |
---|
| 1753 | integer, intent(in) :: nlayer ! number of atmospheric layers |
---|
| 1754 | integer, intent(in) :: nq ! number of tracers in the gcm |
---|
| 1755 | integer :: nesp ! number of species in the chemistry |
---|
| 1756 | integer :: lswitch ! interface level between chemistries |
---|
| 1757 | |
---|
| 1758 | integer :: i_co2, i_co, i_o, i_o1d, i_o2, i_o3, i_h, & |
---|
| 1759 | i_h2, i_oh, i_ho2, i_h2o2, i_h2o, & |
---|
| 1760 | i_n, i_n2d, i_no, i_no2, i_n2 |
---|
| 1761 | |
---|
| 1762 | real :: zycol(nlayer,nq) ! volume mixing ratios in the gcm |
---|
| 1763 | real :: dens(nlayer) ! total number density (molecule.cm-3) |
---|
| 1764 | |
---|
| 1765 | !ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
| 1766 | ! output: |
---|
| 1767 | !ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
| 1768 | |
---|
| 1769 | real, dimension(nlayer,nesp) :: rm ! volume mixing ratios |
---|
| 1770 | real (kind = 8), dimension(nlayer,nesp) :: c ! number densities (molecule.cm-3) |
---|
| 1771 | |
---|
| 1772 | !ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
| 1773 | ! local: |
---|
| 1774 | !ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
| 1775 | |
---|
| 1776 | integer :: l, iesp |
---|
| 1777 | logical,save :: firstcall = .true. |
---|
| 1778 | |
---|
| 1779 | |
---|
| 1780 | ! first call initializations |
---|
| 1781 | |
---|
| 1782 | if (firstcall) then |
---|
| 1783 | |
---|
| 1784 | ! identify the indexes of the tracers we need |
---|
| 1785 | |
---|
| 1786 | if (igcm_co2 == 0) then |
---|
| 1787 | write(*,*) "gcmtochim: Error; no CO2 tracer !!!" |
---|
| 1788 | stop |
---|
| 1789 | endif |
---|
| 1790 | if (igcm_co == 0) then |
---|
| 1791 | write(*,*) "gcmtochim: Error; no CO tracer !!!" |
---|
| 1792 | stop |
---|
| 1793 | end if |
---|
| 1794 | if (igcm_o == 0) then |
---|
| 1795 | write(*,*) "gcmtochim: Error; no O tracer !!!" |
---|
| 1796 | stop |
---|
| 1797 | end if |
---|
| 1798 | if (igcm_o1d == 0) then |
---|
| 1799 | write(*,*) "gcmtochim: Error; no O1D tracer !!!" |
---|
| 1800 | stop |
---|
| 1801 | end if |
---|
| 1802 | if (igcm_o2 == 0) then |
---|
| 1803 | write(*,*) "gcmtochim: Error; no O2 tracer !!!" |
---|
| 1804 | stop |
---|
| 1805 | end if |
---|
| 1806 | if (igcm_o3 == 0) then |
---|
| 1807 | write(*,*) "gcmtochim: Error; no O3 tracer !!!" |
---|
| 1808 | stop |
---|
| 1809 | end if |
---|
| 1810 | if (igcm_h == 0) then |
---|
| 1811 | write(*,*) "gcmtochim: Error; no H tracer !!!" |
---|
| 1812 | stop |
---|
| 1813 | end if |
---|
| 1814 | if (igcm_h2 == 0) then |
---|
| 1815 | write(*,*) "gcmtochim: Error; no H2 tracer !!!" |
---|
| 1816 | stop |
---|
| 1817 | end if |
---|
| 1818 | if (igcm_oh == 0) then |
---|
| 1819 | write(*,*) "gcmtochim: Error; no OH tracer !!!" |
---|
| 1820 | stop |
---|
| 1821 | end if |
---|
| 1822 | if (igcm_ho2 == 0) then |
---|
| 1823 | write(*,*) "gcmtochim: Error; no HO2 tracer !!!" |
---|
| 1824 | stop |
---|
| 1825 | end if |
---|
| 1826 | if (igcm_h2o2 == 0) then |
---|
| 1827 | write(*,*) "gcmtochim: Error; no H2O2 tracer !!!" |
---|
| 1828 | stop |
---|
| 1829 | end if |
---|
| 1830 | if (igcm_n == 0) then |
---|
| 1831 | write(*,*) "gcmtochim: Error; no N tracer !!!" |
---|
| 1832 | stop |
---|
| 1833 | end if |
---|
| 1834 | if (igcm_n2d == 0) then |
---|
| 1835 | write(*,*) "gcmtochim: Error; no N2D tracer !!!" |
---|
| 1836 | stop |
---|
| 1837 | end if |
---|
| 1838 | if (igcm_no == 0) then |
---|
| 1839 | write(*,*) "gcmtochim: Error; no NO tracer !!!" |
---|
| 1840 | stop |
---|
| 1841 | end if |
---|
| 1842 | if (igcm_no2 == 0) then |
---|
| 1843 | write(*,*) "gcmtochim: Error; no NO2 tracer !!!" |
---|
| 1844 | stop |
---|
| 1845 | end if |
---|
| 1846 | if (igcm_n2 == 0) then |
---|
| 1847 | write(*,*) "gcmtochim: Error; no N2 tracer !!!" |
---|
| 1848 | stop |
---|
| 1849 | end if |
---|
| 1850 | if (igcm_h2o_vap == 0) then |
---|
| 1851 | write(*,*) "gcmtochim: Error; no water vapor tracer !!!" |
---|
| 1852 | stop |
---|
| 1853 | end if |
---|
| 1854 | firstcall = .false. |
---|
| 1855 | end if ! of if (firstcall) |
---|
| 1856 | |
---|
| 1857 | !ccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
| 1858 | ! initialise mixing ratios |
---|
| 1859 | !ccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
| 1860 | |
---|
[2028] | 1861 | do l = 1,nlayer |
---|
[1495] | 1862 | rm(l,i_co2) = zycol(l, igcm_co2) |
---|
| 1863 | rm(l,i_co) = zycol(l, igcm_co) |
---|
| 1864 | rm(l,i_o) = zycol(l, igcm_o) |
---|
| 1865 | rm(l,i_o1d) = zycol(l, igcm_o1d) |
---|
| 1866 | rm(l,i_o2) = zycol(l, igcm_o2) |
---|
| 1867 | rm(l,i_o3) = zycol(l, igcm_o3) |
---|
| 1868 | rm(l,i_h) = zycol(l, igcm_h) |
---|
| 1869 | rm(l,i_h2) = zycol(l, igcm_h2) |
---|
| 1870 | rm(l,i_oh) = zycol(l, igcm_oh) |
---|
| 1871 | rm(l,i_ho2) = zycol(l, igcm_ho2) |
---|
| 1872 | rm(l,i_h2o2) = zycol(l, igcm_h2o2) |
---|
| 1873 | rm(l,i_h2o) = zycol(l, igcm_h2o_vap) |
---|
| 1874 | rm(l,i_n) = zycol(l, igcm_n) |
---|
| 1875 | rm(l,i_n2d) = zycol(l, igcm_n2d) |
---|
| 1876 | rm(l,i_no) = zycol(l, igcm_no) |
---|
| 1877 | rm(l,i_no2) = zycol(l, igcm_no2) |
---|
| 1878 | rm(l,i_n2) = zycol(l, igcm_n2) |
---|
| 1879 | end do |
---|
| 1880 | |
---|
| 1881 | where (rm(:,:) < 1.e-30) |
---|
| 1882 | rm(:,:) = 0. |
---|
| 1883 | end where |
---|
| 1884 | |
---|
| 1885 | !ccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
| 1886 | ! initialise number densities |
---|
| 1887 | !ccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
| 1888 | |
---|
| 1889 | do iesp = 1,nesp |
---|
[2042] | 1890 | do l = 1,nlayer!-1!lswitch-1 |
---|
[1495] | 1891 | c(l,iesp) = rm(l,iesp)*dens(l) |
---|
| 1892 | end do |
---|
| 1893 | end do |
---|
| 1894 | |
---|
[1499] | 1895 | end subroutine gcmtochim |
---|
[1495] | 1896 | |
---|
| 1897 | !***************************************************************** |
---|
| 1898 | |
---|
| 1899 | subroutine chimtogcm(nlayer, nq, zycol, lswitch, nesp, & |
---|
| 1900 | i_co2, i_co, i_o, i_o1d, i_o2, i_o3, i_h, & |
---|
| 1901 | i_h2, i_oh, i_ho2, i_h2o2, i_h2o, & |
---|
| 1902 | i_n, i_n2d, i_no, i_no2, i_n2, dens, c) |
---|
| 1903 | |
---|
| 1904 | !***************************************************************** |
---|
| 1905 | |
---|
| 1906 | use tracer_mod, only: igcm_co2, igcm_co, igcm_o, igcm_o1d, & |
---|
| 1907 | igcm_o2, igcm_o3, igcm_h, igcm_h2, igcm_oh, & |
---|
| 1908 | igcm_ho2, igcm_h2o2, igcm_h2o_vap, & |
---|
| 1909 | igcm_n, igcm_n2d, igcm_no, igcm_no2, igcm_n2 |
---|
| 1910 | |
---|
| 1911 | implicit none |
---|
| 1912 | |
---|
| 1913 | #include "callkeys.h" |
---|
| 1914 | |
---|
| 1915 | !ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
| 1916 | ! inputs: |
---|
| 1917 | !ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
| 1918 | |
---|
| 1919 | integer, intent(in) :: nlayer ! number of atmospheric layers |
---|
| 1920 | integer, intent(in) :: nq ! number of tracers in the gcm |
---|
| 1921 | integer :: nesp ! number of species in the chemistry |
---|
| 1922 | integer :: lswitch ! interface level between chemistries |
---|
| 1923 | integer :: i_co2, i_co, i_o, i_o1d, i_o2, i_o3, i_h, & |
---|
| 1924 | i_h2, i_oh, i_ho2, i_h2o2, i_h2o, & |
---|
| 1925 | i_n, i_n2d, i_no, i_no2, i_n2 |
---|
| 1926 | |
---|
| 1927 | real :: dens(nlayer) ! total number density (molecule.cm-3) |
---|
| 1928 | real (kind = 8), dimension(nlayer,nesp) :: c ! number densities (molecule.cm-3) |
---|
| 1929 | |
---|
| 1930 | !ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
| 1931 | ! output: |
---|
| 1932 | !ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
| 1933 | |
---|
| 1934 | real zycol(nlayer,nq) ! volume mixing ratios in the gcm |
---|
| 1935 | |
---|
| 1936 | !ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
| 1937 | ! local: |
---|
| 1938 | !ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
| 1939 | |
---|
| 1940 | integer l |
---|
| 1941 | |
---|
| 1942 | !ccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
| 1943 | ! save mixing ratios for the gcm |
---|
| 1944 | !ccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
| 1945 | |
---|
| 1946 | do l = 1,lswitch-1 |
---|
| 1947 | zycol(l, igcm_co2) = c(l,i_co2)/dens(l) |
---|
| 1948 | zycol(l, igcm_co) = c(l,i_co)/dens(l) |
---|
| 1949 | zycol(l, igcm_o) = c(l,i_o)/dens(l) |
---|
| 1950 | zycol(l, igcm_o1d) = c(l,i_o1d)/dens(l) |
---|
| 1951 | zycol(l, igcm_o2) = c(l,i_o2)/dens(l) |
---|
| 1952 | zycol(l, igcm_o3) = c(l,i_o3)/dens(l) |
---|
| 1953 | zycol(l, igcm_h) = c(l,i_h)/dens(l) |
---|
| 1954 | zycol(l, igcm_h2) = c(l,i_h2)/dens(l) |
---|
| 1955 | zycol(l, igcm_oh) = c(l,i_oh)/dens(l) |
---|
| 1956 | zycol(l, igcm_ho2) = c(l,i_ho2)/dens(l) |
---|
| 1957 | zycol(l, igcm_h2o2) = c(l,i_h2o2)/dens(l) |
---|
| 1958 | zycol(l, igcm_h2o_vap) = c(l,i_h2o)/dens(l) |
---|
| 1959 | zycol(l, igcm_n) = c(l,i_n)/dens(l) |
---|
| 1960 | zycol(l, igcm_n2d) = c(l,i_n2d)/dens(l) |
---|
| 1961 | zycol(l, igcm_no) = c(l,i_no)/dens(l) |
---|
| 1962 | zycol(l, igcm_no2) = c(l,i_no2)/dens(l) |
---|
| 1963 | zycol(l, igcm_n2) = c(l,i_n2)/dens(l) |
---|
| 1964 | end do |
---|
| 1965 | |
---|
[1499] | 1966 | end subroutine chimtogcm |
---|
| 1967 | |
---|
[2007] | 1968 | end subroutine photochemistry |
---|
[1499] | 1969 | |
---|