1 | c***************************************************************** |
---|
2 | c |
---|
3 | c Photochemical routines for Scheme B |
---|
4 | c |
---|
5 | c Author: Franck Lefevre |
---|
6 | c ------ |
---|
7 | c |
---|
8 | c update 12/06/2003: compatibility with dust and iceparty |
---|
9 | c (S. Lebonnois) |
---|
10 | c update sept. 2008: identify tracer indexes using tracer names |
---|
11 | c (Ehouarn Millour) |
---|
12 | c |
---|
13 | c***************************************************************** |
---|
14 | c |
---|
15 | subroutine photochemist_B(lswitch,zycol, sza, ptimestep, press, |
---|
16 | c $ temp, dens, dist_sol) |
---|
17 | $ temp, dens, dist_sol, jo3) |
---|
18 | c |
---|
19 | c |
---|
20 | implicit none |
---|
21 | c |
---|
22 | #include "dimensions.h" |
---|
23 | #include "dimphys.h" |
---|
24 | #include "chimiedata.h" |
---|
25 | #include "callkeys.h" |
---|
26 | #include "tracer.h" |
---|
27 | c |
---|
28 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
29 | c input/output: |
---|
30 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
31 | c |
---|
32 | real zycol(nlayermx,nqmx) ! chemical species volume mixing ratio |
---|
33 | c if water, zycol(l,i_h2o_ice) is ice surface area (in microns^2/cm^3) |
---|
34 | c |
---|
35 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
36 | c inputs: |
---|
37 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
38 | c |
---|
39 | real sza ! solar zenith angle (deg) |
---|
40 | real ptimestep ! physics timestep (s) |
---|
41 | real press(nlayermx) ! pressure (hpa) |
---|
42 | real temp(nlayermx) ! temperature (k) |
---|
43 | real dens(nlayermx) ! density (cm-3) |
---|
44 | real dist_sol ! sun distance (au) |
---|
45 | c |
---|
46 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
47 | c output: |
---|
48 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
49 | c |
---|
50 | real jo3(nlayermx) ! photodissociation rate O3 -> O1D |
---|
51 | c |
---|
52 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
53 | c local: |
---|
54 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
55 | c |
---|
56 | integer phychemrat ! ratio physics timestep/chemistry timestep |
---|
57 | integer istep |
---|
58 | integer i_o3,lev,iq |
---|
59 | integer nesp |
---|
60 | integer lswitch |
---|
61 | c |
---|
62 | parameter (nesp = 15) ! number of species in the chemistry |
---|
63 | c |
---|
64 | real ctimestep ! chemistry timestep (s) |
---|
65 | real rm(nlayermx,nesp) ! species volume mixing ratio |
---|
66 | real j(nlayermx,nd) ! interpolated photolysis rates (s-1) |
---|
67 | real icesurf(nlayermx) ! ice surface area (cm^2/cm^3) |
---|
68 | real rmo3(nlayermx) ! ozone mixing ratio |
---|
69 | c |
---|
70 | c reaction rates |
---|
71 | c |
---|
72 | real a001(nlayermx), a002(nlayermx), a003(nlayermx) |
---|
73 | real b001(nlayermx), b002(nlayermx), b003(nlayermx), |
---|
74 | $ b004(nlayermx), b005(nlayermx), b006(nlayermx) |
---|
75 | real c001(nlayermx), c002(nlayermx), c003(nlayermx), |
---|
76 | $ c004(nlayermx), c005(nlayermx), c006(nlayermx), |
---|
77 | $ c007(nlayermx), c008(nlayermx), c009(nlayermx), |
---|
78 | $ c010(nlayermx), c011(nlayermx), c012(nlayermx), |
---|
79 | $ c013(nlayermx), c014(nlayermx), c015(nlayermx), |
---|
80 | $ c016(nlayermx), c017(nlayermx), c018(nlayermx) |
---|
81 | real d001(nlayermx), d002(nlayermx), d003(nlayermx) |
---|
82 | real e001(nlayermx), e002(nlayermx) |
---|
83 | real h001(nlayermx), h002(nlayermx) |
---|
84 | |
---|
85 | logical,save :: firstcall=.true. |
---|
86 | integer,save :: i_h2o_ice=0 ! water ice tracer index |
---|
87 | |
---|
88 | ! Initializations (at first call only) |
---|
89 | if (firstcall) then |
---|
90 | ! find index of water ice tracer |
---|
91 | do iq=1,nqmx |
---|
92 | if (noms(iq).eq."h2o_ice") then |
---|
93 | i_h2o_ice=iq |
---|
94 | endif |
---|
95 | enddo |
---|
96 | ! verify that it is the same index as the global one: |
---|
97 | if (i_h2o_ice.ne.igcm_h2o_ice) then |
---|
98 | write(*,*) "photochemist_B: Error ; found water ice tracer", |
---|
99 | & " index ",i_h2o_ice," does not match GCM index ", |
---|
100 | & " igcm_h2o_ice=",igcm_h2o_ice |
---|
101 | stop |
---|
102 | endif |
---|
103 | ! also check that there indeed is an "h2o_ice" tracer |
---|
104 | if (i_h2o_ice.eq.0) then |
---|
105 | write(*,*) "photochemist_B: Error ; did not find", |
---|
106 | & " water ice tracer" |
---|
107 | stop |
---|
108 | endif |
---|
109 | firstcall=.false. |
---|
110 | endif |
---|
111 | |
---|
112 | c |
---|
113 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
114 | c ctimestep : chemistry timestep (s) c |
---|
115 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
116 | c |
---|
117 | ctimestep = 10.*60. |
---|
118 | c |
---|
119 | phychemrat = int(ptimestep/ctimestep) |
---|
120 | c print*,"PHYCHEMRAT = ",phychemrat |
---|
121 | c |
---|
122 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
123 | c initialisation of chemical species and families c |
---|
124 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
125 | c |
---|
126 | call gcmtochim(zycol, lswitch, nesp, rm) |
---|
127 | c |
---|
128 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
129 | c ice surface area for heterogenous chemistry |
---|
130 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
131 | c |
---|
132 | if (water) then |
---|
133 | do lev=1,lswitch-1 |
---|
134 | ! icesurf(lev)= zycol(lev,nqmx-1)*1.e-8 ! microns^2 -> cm^2 |
---|
135 | icesurf(lev)= zycol(lev,i_h2o_ice)*1.e-8 ! microns^2 -> cm^2 |
---|
136 | enddo |
---|
137 | else |
---|
138 | do lev=1,lswitch-1 |
---|
139 | icesurf(lev)=0.0e0 |
---|
140 | enddo |
---|
141 | endif |
---|
142 | c |
---|
143 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
144 | c compute reaction rates c |
---|
145 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
146 | c |
---|
147 | call chemrates(lswitch, dens, press, temp, icesurf, |
---|
148 | $ a001, a002, a003, |
---|
149 | $ b001, b002, b003, b004, b005, b006, |
---|
150 | $ c001, c002, c003, c004, c005, c006, |
---|
151 | $ c007, c008, c009, c010, c011, c012, |
---|
152 | $ c013, c014, c015, c016, c017, c018, |
---|
153 | $ d001, d002, d003, |
---|
154 | $ e001, e002, |
---|
155 | $ h001, h002) |
---|
156 | c |
---|
157 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
158 | c interpolation of photolysis rates in the lookup table c |
---|
159 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
160 | c |
---|
161 | i_o3 = 5 |
---|
162 | c |
---|
163 | do lev=1,lswitch-1 |
---|
164 | rmo3(lev)=rm(lev,i_o3) |
---|
165 | enddo |
---|
166 | |
---|
167 | call phot(lswitch, press, temp, sza, dist_sol, rmo3, j) |
---|
168 | c |
---|
169 | do lev=1,lswitch-1 |
---|
170 | jo3(lev) = j(lev,5) |
---|
171 | enddo |
---|
172 | |
---|
173 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
174 | c loop over time within the physical timestep c |
---|
175 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
176 | c |
---|
177 | do istep = 1,phychemrat |
---|
178 | call chimie_B(lswitch,nesp, rm, j, dens, ctimestep, |
---|
179 | $ press, temp, sza, dist_sol, |
---|
180 | $ a001, a002, a003, |
---|
181 | $ b001, b002, b003, b004, b005, b006, |
---|
182 | $ c001, c002, c003, c004, c005, c006, |
---|
183 | $ c007, c008, c009, c010, c011, c012, |
---|
184 | $ c013, c014, c015, c016, c017, c018, |
---|
185 | $ d001, d002, d003, |
---|
186 | $ e001, e002, |
---|
187 | $ h001, h002) |
---|
188 | c |
---|
189 | c print*,'appel chimie ok iteration ', istep |
---|
190 | c |
---|
191 | end do |
---|
192 | c |
---|
193 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
194 | c save chemical species for the gcm c |
---|
195 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
196 | c |
---|
197 | call chimtogcm(zycol, lswitch, nesp, rm) |
---|
198 | c |
---|
199 | return |
---|
200 | end |
---|
201 | c |
---|
202 | c***************************************************************** |
---|
203 | c |
---|
204 | subroutine chimie_B(lswitch, nesp, rm, j, dens, dt, |
---|
205 | $ press, t, sza, dist_sol, |
---|
206 | $ a001, a002, a003, |
---|
207 | $ b001, b002, b003, b004, b005, b006, |
---|
208 | $ c001, c002, c003, c004, c005, c006, |
---|
209 | $ c007, c008, c009, c010, c011, c012, |
---|
210 | $ c013, c014, c015, c016, c017, c018, |
---|
211 | $ d001, d002, d003, |
---|
212 | $ e001, e002, |
---|
213 | $ h001, h002) |
---|
214 | c |
---|
215 | c***************************************************************** |
---|
216 | c |
---|
217 | implicit none |
---|
218 | c |
---|
219 | #include "dimensions.h" |
---|
220 | #include "dimphys.h" |
---|
221 | #include "chimiedata.h" |
---|
222 | #include "callkeys.h" |
---|
223 | c |
---|
224 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
225 | c input/output: |
---|
226 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
227 | c |
---|
228 | integer lswitch ! interface level between chemistries |
---|
229 | integer nesp ! number of species |
---|
230 | c |
---|
231 | real rm(nlayermx,nesp) ! volume mixing ratios |
---|
232 | c |
---|
233 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
234 | c inputs: |
---|
235 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
236 | c |
---|
237 | real dens(nlayermx) ! density (cm-3) |
---|
238 | real dt ! chemistry timestep (s) |
---|
239 | real j(nlayermx,nd) ! interpolated photolysis rates (s-1) |
---|
240 | real press(nlayermx) ! pressure (hpa) |
---|
241 | real t(nlayermx) ! temperature (k) |
---|
242 | real sza ! solar zenith angle (deg) |
---|
243 | real dist_sol ! sun distance (au) |
---|
244 | c |
---|
245 | c reaction rates |
---|
246 | c |
---|
247 | real a001(nlayermx), a002(nlayermx), a003(nlayermx) |
---|
248 | real b001(nlayermx), b002(nlayermx), b003(nlayermx), |
---|
249 | $ b004(nlayermx), b005(nlayermx), b006(nlayermx) |
---|
250 | real c001(nlayermx), c002(nlayermx), c003(nlayermx), |
---|
251 | $ c004(nlayermx), c005(nlayermx), c006(nlayermx), |
---|
252 | $ c007(nlayermx), c008(nlayermx), c009(nlayermx), |
---|
253 | $ c010(nlayermx), c011(nlayermx), c012(nlayermx), |
---|
254 | $ c013(nlayermx), c014(nlayermx), c015(nlayermx), |
---|
255 | $ c016(nlayermx), c017(nlayermx), c018(nlayermx) |
---|
256 | real d001(nlayermx), d002(nlayermx), d003(nlayermx) |
---|
257 | real e001(nlayermx), e002(nlayermx) |
---|
258 | real h001(nlayermx), h002(nlayermx) |
---|
259 | c |
---|
260 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
261 | c local: |
---|
262 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
263 | c |
---|
264 | integer HETERO |
---|
265 | parameter (HETERO=0) |
---|
266 | |
---|
267 | integer iesp, iter, l, niter |
---|
268 | integer i_co2, i_co, i_o2, i_h2, i_h2o, i_h2o2, i_hox, i_ox, |
---|
269 | $ i_o1d, i_o, i_o3, i_h, i_oh, i_ho2, i_n2 |
---|
270 | integer j_o2_o, j_o2_o1d, j_co2_o, j_co2_o1d, |
---|
271 | $ j_o3_o1d, j_o3_o, j_h2o, j_hdo, j_h2o2, |
---|
272 | $ j_ho2, j_no2 |
---|
273 | c |
---|
274 | parameter (niter = 5) ! iterations in the chemical scheme |
---|
275 | c |
---|
276 | real*8 cc0(nlayermx,nesp) ! initial number density (cm-3) |
---|
277 | real*8 cc(nlayermx,nesp) ! final number density (cm-3) |
---|
278 | real*8 co2(nlayermx) ! co2 number density (cm-3) |
---|
279 | real*8 nox(nlayermx) ! nox number density (cm-3) |
---|
280 | real*8 no(nlayermx) ! no number density (cm-3) |
---|
281 | real*8 no2(nlayermx) ! no2 number density (cm-3) |
---|
282 | real*8 production(nlayermx,nesp) ! production rate |
---|
283 | real*8 loss(nlayermx,nesp) ! loss rate |
---|
284 | c |
---|
285 | real c007h(nlayermx) ! c007 rate modified |
---|
286 | c ! by heterogenous reactions h001 and h002 |
---|
287 | c |
---|
288 | real ro_o3, rh_ho2, roh_ho2, rno2_no |
---|
289 | c |
---|
290 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
291 | c tracer numbering in the chemistry |
---|
292 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
293 | c |
---|
294 | i_co2 = 1 |
---|
295 | i_co = 2 |
---|
296 | i_o = 3 |
---|
297 | i_o1d = 4 |
---|
298 | i_o2 = 5 |
---|
299 | i_o3 = 6 |
---|
300 | i_h = 7 |
---|
301 | i_h2 = 8 |
---|
302 | i_oh = 9 |
---|
303 | i_ho2 = 10 |
---|
304 | i_h2o2 = 11 |
---|
305 | i_h2o = 12 |
---|
306 | i_n2 = 13 |
---|
307 | i_hox = 14 |
---|
308 | i_ox = 15 |
---|
309 | c |
---|
310 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
311 | c numbering of photolysis rates |
---|
312 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
313 | c |
---|
314 | j_o2_o = 1 ! o2 + hv -> o + o |
---|
315 | j_o2_o1d = 2 ! o2 + hv -> o + o(1d) |
---|
316 | j_co2_o = 3 ! co2 + hv -> co + o |
---|
317 | j_co2_o1d = 4 ! co2 + hv -> co + o(1d) |
---|
318 | j_o3_o1d = 5 ! o3 + hv -> o2 + o(1d) |
---|
319 | j_o3_o = 6 ! o3 + hv -> o2 + o |
---|
320 | j_h2o = 7 ! h2o + hv -> h + oh |
---|
321 | j_hdo = 8 ! hdo + hv -> d + oh |
---|
322 | j_h2o2 = 9 ! h2o2 + hv -> oh + oh |
---|
323 | j_ho2 = 10 ! ho2 + hv -> oh + o |
---|
324 | j_no2 = 11 ! no2 + hv -> no + o |
---|
325 | c |
---|
326 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
327 | c volume mixing ratio -> density conversion |
---|
328 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
329 | c |
---|
330 | do iesp = 1,nesp |
---|
331 | do l = 1,lswitch-1 |
---|
332 | cc0(l,iesp) = rm(l,iesp)*dens(l) |
---|
333 | cc(l,iesp) = cc0(l,iesp) |
---|
334 | end do |
---|
335 | end do |
---|
336 | c |
---|
337 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
338 | c co2 and nox number densities (cm-3) |
---|
339 | c |
---|
340 | c co2 mixing ratio: 0.953 |
---|
341 | c nox mixing ratio: 6.e-10 (yung and demore, 1999) |
---|
342 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
343 | c |
---|
344 | do l = 1,lswitch-1 |
---|
345 | co2(l) = cc(l,i_co2) |
---|
346 | nox(l) = 6.e-10*dens(l) |
---|
347 | end do |
---|
348 | c |
---|
349 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
350 | c loop over iterations in the chemical scheme |
---|
351 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
352 | c |
---|
353 | do iter = 1,niter |
---|
354 | c |
---|
355 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
356 | c modification of c007 |
---|
357 | c by heterogenous reactions h001 and h002 |
---|
358 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
359 | c |
---|
360 | if (HETERO.eq.1) then |
---|
361 | do l = 1,lswitch-1 |
---|
362 | c007h(l) = c007(l) |
---|
363 | $ + h001(l)/max(cc(l,i_oh), 1.d-30*dens(l)) |
---|
364 | $ + h002(l)/max(cc(l,i_ho2),1.d-30*dens(l)) |
---|
365 | c write(*,*) "C007 = ",c007(l)," / C007H = ",c007h(l) |
---|
366 | end do |
---|
367 | else |
---|
368 | do l = 1,lswitch-1 |
---|
369 | c007h(l) = c007(l) |
---|
370 | end do |
---|
371 | endif |
---|
372 | c |
---|
373 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
374 | c nox species |
---|
375 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
376 | c no2/no |
---|
377 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
378 | c |
---|
379 | do l = 1,lswitch-1 |
---|
380 | c |
---|
381 | rno2_no = (d002(l)*cc(l,i_o3) + d003(l)*cc(l,i_ho2)) |
---|
382 | $ /(j(l,j_no2) + |
---|
383 | $ d001(l)*max(cc(l,i_o),1.d-30*dens(l))) |
---|
384 | c |
---|
385 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
386 | c no |
---|
387 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
388 | c |
---|
389 | no(l) = nox(l)/(1. + rno2_no) |
---|
390 | c |
---|
391 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
392 | c no2 |
---|
393 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
394 | c |
---|
395 | no2(l) = no(l)*rno2_no |
---|
396 | c |
---|
397 | end do |
---|
398 | c |
---|
399 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
400 | c hox species |
---|
401 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
402 | c photochemical equilibrium for oh and ho2 |
---|
403 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
404 | c h/ho2 |
---|
405 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
406 | c |
---|
407 | do l = 1,lswitch-1 |
---|
408 | c |
---|
409 | rh_ho2 = (c001(l)*cc(l,i_o) |
---|
410 | $ + c004(l)*cc(l,i_h) |
---|
411 | $ + c005(l)*cc(l,i_h) |
---|
412 | $ + c006(l)*cc(l,i_h) |
---|
413 | $ + c007h(l)*cc(l,i_oh) |
---|
414 | $ + 2.*c008(l)*cc(l,i_ho2) |
---|
415 | $ + c015(l)*cc(l,i_o3) |
---|
416 | $ + 2.*c016(l)*cc(l,i_ho2) |
---|
417 | $ + j(l,j_ho2)) |
---|
418 | $ /(c011(l)*cc(l,i_o2)) |
---|
419 | c |
---|
420 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
421 | c oh/ho2 |
---|
422 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
423 | c |
---|
424 | roh_ho2 = (c001(l)*cc(l,i_o) |
---|
425 | $ + c003(l)*cc(l,i_o3)*rh_ho2 |
---|
426 | $ + 2.*c004(l)*cc(l,i_h) |
---|
427 | $ + 2.*c008(l)*cc(l,i_ho2) |
---|
428 | $ + c015(l)*cc(l,i_o3) |
---|
429 | $ + d003(l)*no(l) |
---|
430 | $ + j(l,j_ho2) |
---|
431 | $ + j(l,j_h2o)*cc(l,i_h2o) |
---|
432 | $ /max(cc(l,i_ho2),dens(l)*1.d-30)) |
---|
433 | $ /(c002(l)*cc(l,i_o) |
---|
434 | $ + c007h(l)*cc(l,i_ho2) |
---|
435 | $ + e001(l)*cc(l,i_co)) |
---|
436 | c |
---|
437 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
438 | c h |
---|
439 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
440 | c |
---|
441 | cc(l,i_h) = cc(l,i_hox) |
---|
442 | $ /(1. + (1. + roh_ho2)/rh_ho2) |
---|
443 | c |
---|
444 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
445 | c ho2 |
---|
446 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
447 | c |
---|
448 | cc(l,i_ho2) = cc(l,i_h)/rh_ho2 |
---|
449 | c |
---|
450 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
451 | c oh |
---|
452 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
453 | c |
---|
454 | cc(l,i_oh) = cc(l,i_ho2)*roh_ho2 |
---|
455 | c |
---|
456 | end do |
---|
457 | c |
---|
458 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
459 | c modification of c007 |
---|
460 | c by heterogenous reactions h001 and h002 |
---|
461 | c after update of cc(l,i_oh) and cc(l,i_ho2) |
---|
462 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
463 | c |
---|
464 | if (HETERO.eq.1) then |
---|
465 | do l = 1,lswitch-1 |
---|
466 | c007h(l) = c007(l) |
---|
467 | $ + h001(l)/max(cc(l,i_oh), 1.d-30*dens(l)) |
---|
468 | $ + h002(l)/max(cc(l,i_ho2),1.d-30*dens(l)) |
---|
469 | c write(*,*) "C007 = ",c007(l)," / C007H = ",c007h(l) |
---|
470 | end do |
---|
471 | endif |
---|
472 | c |
---|
473 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
474 | c ox species |
---|
475 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
476 | c day: |
---|
477 | c - o1d at photochemical equilibrium |
---|
478 | c - o3 at photochemical equilibrium |
---|
479 | c - continuity equation for ox |
---|
480 | c night: |
---|
481 | c - o1d = 0 |
---|
482 | c - continuity equation for o3 |
---|
483 | c - continuity equation for o |
---|
484 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
485 | c |
---|
486 | if (sza .le. 95.) then |
---|
487 | c |
---|
488 | do l = 1,lswitch-1 |
---|
489 | c |
---|
490 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
491 | c o(1d) |
---|
492 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
493 | c |
---|
494 | cc(l,i_o1d) = (j(l,j_co2_o1d)*co2(l) |
---|
495 | $ + j(l,j_o2_o1d)*cc(l,i_o2) |
---|
496 | $ + j(l,j_o3_o1d)*cc(l,i_o3)) |
---|
497 | $ /( b001(l)*co2(l) |
---|
498 | $ + b002(l)*cc(l,i_h2o) |
---|
499 | $ + b003(l)*cc(l,i_h2) |
---|
500 | $ + b004(l)*cc(l,i_o2) |
---|
501 | $ + b005(l)*cc(l,i_o3) |
---|
502 | $ + b006(l)*cc(l,i_o3)) |
---|
503 | c |
---|
504 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
505 | c o/o3 |
---|
506 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
507 | c |
---|
508 | ro_o3 = (j(l,j_o3_o1d) + j(l,j_o3_o) |
---|
509 | $ + a003(l)*cc(l,i_o) |
---|
510 | $ + c003(l)*cc(l,i_h) |
---|
511 | $ + c014(l)*cc(l,i_oh) |
---|
512 | $ + c015(l)*cc(l,i_ho2)) |
---|
513 | $ /(a001(l)*cc(l,i_o2)) |
---|
514 | c |
---|
515 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
516 | c o3 |
---|
517 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
518 | c |
---|
519 | cc(l,i_o3) = cc(l,i_ox)/(1. + ro_o3) |
---|
520 | c |
---|
521 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
522 | c o |
---|
523 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
524 | c |
---|
525 | cc(l,i_o) = cc(l,i_o3)*ro_o3 |
---|
526 | c |
---|
527 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
528 | c ox = o + o3 |
---|
529 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
530 | c |
---|
531 | production(l,i_ox) = |
---|
532 | $ + j(l,j_co2_o)*co2(l) |
---|
533 | $ + j(l,j_co2_o1d)*co2(l) |
---|
534 | $ + j(l,j_ho2)*cc(l,i_ho2) |
---|
535 | $ + 2.*j(l,j_o2_o)*cc(l,i_o2) |
---|
536 | $ + 2.*j(l,j_o2_o1d)*cc(l,i_o2) |
---|
537 | $ + c006(l)*cc(l,i_h)*cc(l,i_ho2) |
---|
538 | $ + c013(l)*cc(l,i_oh)*cc(l,i_oh) |
---|
539 | $ + d003(l)*cc(l,i_ho2)*no(l) |
---|
540 | c |
---|
541 | loss(l,i_ox) = 2.*a002(l)*cc(l,i_o)*cc(l,i_o) |
---|
542 | $ + 2.*a003(l)*cc(l,i_o)*cc(l,i_o3) |
---|
543 | $ + c001(l)*cc(l,i_ho2)*cc(l,i_o) |
---|
544 | $ + c002(l)*cc(l,i_oh)*cc(l,i_o) |
---|
545 | $ + c003(l)*cc(l,i_h)*cc(l,i_o3) |
---|
546 | $ + c012(l)*cc(l,i_o)*cc(l,i_h2o2) |
---|
547 | $ + c014(l)*cc(l,i_o3)*cc(l,i_oh) |
---|
548 | $ + c015(l)*cc(l,i_o3)*cc(l,i_ho2) |
---|
549 | $ + d001(l)*cc(l,i_o)*no2(l) |
---|
550 | $ + e002(l)*cc(l,i_o)*cc(l,i_co) |
---|
551 | c |
---|
552 | loss(l,i_ox) = loss(l,i_ox)/cc(l,i_ox) |
---|
553 | c |
---|
554 | end do |
---|
555 | c |
---|
556 | else |
---|
557 | c |
---|
558 | do l = 1,lswitch-1 |
---|
559 | c |
---|
560 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
561 | c o(1d) |
---|
562 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
563 | c |
---|
564 | cc(l,i_o1d) = 0. |
---|
565 | c |
---|
566 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
567 | c o3 |
---|
568 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
569 | c |
---|
570 | production(l,i_o3) = a001(l)*cc(l,i_o2)*cc(l,i_o) |
---|
571 | c |
---|
572 | loss(l,i_o3) = a003(l)*cc(l,i_o) |
---|
573 | $ + c003(l)*cc(l,i_h) |
---|
574 | $ + c014(l)*cc(l,i_oh) |
---|
575 | $ + c015(l)*cc(l,i_ho2) |
---|
576 | c |
---|
577 | |
---|
578 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
579 | c o |
---|
580 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
581 | c |
---|
582 | production(l,i_o) = c006(l)*cc(l,i_h)*cc(l,i_ho2) |
---|
583 | $ + c013(l)*cc(l,i_oh)*cc(l,i_oh) |
---|
584 | c |
---|
585 | loss(l,i_o) = a001(l)*cc(l,i_o2) |
---|
586 | $ + 2.*a002(l)*cc(l,i_o) |
---|
587 | $ + a003(l)*cc(l,i_o3) |
---|
588 | $ + c001(l)*cc(l,i_ho2) |
---|
589 | $ + c002(l)*cc(l,i_oh) |
---|
590 | $ + c012(l)*cc(l,i_h2o2) |
---|
591 | $ + e002(l)*cc(l,i_co) |
---|
592 | c |
---|
593 | end do |
---|
594 | end if |
---|
595 | c |
---|
596 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
597 | c other species |
---|
598 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
599 | c |
---|
600 | do l = 1,lswitch-1 |
---|
601 | c |
---|
602 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
603 | c co |
---|
604 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
605 | c |
---|
606 | production(l,i_co) = j(l,j_co2_o)*co2(l) |
---|
607 | $ + j(l,j_co2_o1d)*co2(l) |
---|
608 | c |
---|
609 | loss(l,i_co) = e001(l)*cc(l,i_oh) |
---|
610 | $ + e002(l)*cc(l,i_o) |
---|
611 | c |
---|
612 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
613 | c o2 |
---|
614 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
615 | c |
---|
616 | production(l,i_o2) = |
---|
617 | $ j(l,j_o3_o)*cc(l,i_o3) |
---|
618 | $ + j(l,j_o3_o1d)*cc(l,i_o3) |
---|
619 | $ + a002(l)*cc(l,i_o)*cc(l,i_o) |
---|
620 | $ + 2.*a003(l)*cc(l,i_o)*cc(l,i_o3) |
---|
621 | $ + 2.*b005(l)*cc(l,i_o1d)*cc(l,i_o3) |
---|
622 | $ + b006(l)*cc(l,i_o1d)*cc(l,i_o3) |
---|
623 | $ + c001(l)*cc(l,i_o)*cc(l,i_ho2) |
---|
624 | $ + c002(l)*cc(l,i_o)*cc(l,i_oh) |
---|
625 | $ + c003(l)*cc(l,i_h)*cc(l,i_o3) |
---|
626 | $ + c005(l)*cc(l,i_h)*cc(l,i_ho2) |
---|
627 | $ + c007h(l)*cc(l,i_oh)*cc(l,i_ho2) |
---|
628 | $ + c008(l)*cc(l,i_ho2)*cc(l,i_ho2) |
---|
629 | $ + c014(l)*cc(l,i_o3)*cc(l,i_oh) |
---|
630 | $ + 2.*c015(l)*cc(l,i_o3)*cc(l,i_ho2) |
---|
631 | $ + c016(l)*cc(l,i_ho2)*cc(l,i_ho2) |
---|
632 | $ + d001(l)*cc(l,i_o)*no2(l) |
---|
633 | c |
---|
634 | loss(l,i_o2) = j(l,j_o2_o) |
---|
635 | $ + j(l,j_o2_o1d) |
---|
636 | $ + a001(l)*cc(l,i_o) |
---|
637 | $ + c011(l)*cc(l,i_h) |
---|
638 | c |
---|
639 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
640 | c h2 |
---|
641 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
642 | c |
---|
643 | production(l,i_h2) = c005(l)*cc(l,i_h)*cc(l,i_ho2) |
---|
644 | $ + c018(l)*cc(l,i_h)*cc(l,i_h) |
---|
645 | c |
---|
646 | loss(l,i_h2) = b003(l)*cc(l,i_o1d) |
---|
647 | $ + c010(l)*cc(l,i_oh) |
---|
648 | c |
---|
649 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
650 | c h2o |
---|
651 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
652 | c |
---|
653 | production(l,i_h2o) = |
---|
654 | $ c006(l)*cc(l,i_h)*cc(l,i_ho2) |
---|
655 | $ + c007h(l)*cc(l,i_oh)*cc(l,i_ho2) |
---|
656 | $ + c009(l)*cc(l,i_oh)*cc(l,i_h2o2) |
---|
657 | $ + c010(l)*cc(l,i_oh)*cc(l,i_h2) |
---|
658 | $ + c013(l)*cc(l,i_oh)*cc(l,i_oh) |
---|
659 | c |
---|
660 | loss(l,i_h2o) = j(l,j_h2o) |
---|
661 | $ + b002(l)*cc(l,i_o1d) |
---|
662 | c |
---|
663 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
664 | c h2o2 |
---|
665 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
666 | c |
---|
667 | production(l,i_h2o2) = |
---|
668 | $ c008(l)*cc(l,i_ho2)*cc(l,i_ho2) |
---|
669 | $ + c016(l)*cc(l,i_ho2)*cc(l,i_ho2) |
---|
670 | $ + c017(l)*cc(l,i_oh)*cc(l,i_oh) |
---|
671 | c |
---|
672 | loss(l,i_h2o2) = j(l,j_h2o2) |
---|
673 | $ + c009(l)*cc(l,i_oh) |
---|
674 | $ + c012(l)*cc(l,i_o) |
---|
675 | c |
---|
676 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
677 | c hox = h + oh + ho2 |
---|
678 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
679 | c |
---|
680 | production(l,i_hox) = |
---|
681 | $ 2.*j(l,j_h2o)*cc(l,i_h2o) |
---|
682 | $ + 2.*j(l,j_h2o2)*cc(l,i_h2o2) |
---|
683 | $ + 2.*b002(l)*cc(l,i_o1d)*cc(l,i_h2o) |
---|
684 | $ + 2.*b003(l)*cc(l,i_o1d)*cc(l,i_h2) |
---|
685 | $ + 2.*c012(l)*cc(l,i_o)*cc(l,i_h2o2) |
---|
686 | c |
---|
687 | loss(l,i_hox) = 2.*c005(l)*cc(l,i_h)*cc(l,i_ho2) |
---|
688 | $ + 2.*c006(l)*cc(l,i_h)*cc(l,i_ho2) |
---|
689 | $ + 2.*c007h(l)*cc(l,i_oh)*cc(l,i_ho2) |
---|
690 | $ + 2.*c008(l)*cc(l,i_ho2)*cc(l,i_ho2) |
---|
691 | $ + 2.*c013(l)*cc(l,i_oh)*cc(l,i_oh) |
---|
692 | $ + 2.*c016(l)*cc(l,i_ho2)*cc(l,i_ho2) |
---|
693 | $ + 2.*c017(l)*cc(l,i_oh)*cc(l,i_oh) |
---|
694 | $ + 2.*c018(l)*cc(l,i_h)*cc(l,i_h) |
---|
695 | c |
---|
696 | loss(l,i_hox) = loss(l,i_hox)/cc(l,i_hox) |
---|
697 | c |
---|
698 | end do |
---|
699 | c |
---|
700 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
701 | c update number densities |
---|
702 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
703 | c |
---|
704 | c long-lived species |
---|
705 | c |
---|
706 | do l = 1,lswitch-1 |
---|
707 | cc(l,i_co) = (cc0(l,i_co) + production(l,i_co)*dt) |
---|
708 | $ /(1. + loss(l,i_co)*dt) |
---|
709 | cc(l,i_o2) = (cc0(l,i_o2) + production(l,i_o2)*dt) |
---|
710 | $ /(1. + loss(l,i_o2)*dt) |
---|
711 | cc(l,i_h2) = (cc0(l,i_h2) + production(l,i_h2)*dt) |
---|
712 | $ /(1. + loss(l,i_h2)*dt) |
---|
713 | cc(l,i_h2o2)= (cc0(l,i_h2o2) + production(l,i_h2o2)*dt) |
---|
714 | $ /(1. + loss(l,i_h2o2)*dt) |
---|
715 | cc(l,i_h2o) = (cc0(l,i_h2o) + production(l,i_h2o)*dt) |
---|
716 | $ /(1. + loss(l,i_h2o)*dt) |
---|
717 | cc(l,i_hox) = (cc0(l,i_hox) + production(l,i_hox)*dt) |
---|
718 | $ /(1. + loss(l,i_hox)*dt) |
---|
719 | end do |
---|
720 | c |
---|
721 | c ox species |
---|
722 | c |
---|
723 | if (sza .le. 95.) then |
---|
724 | do l = 1,lswitch-1 |
---|
725 | cc(l,i_ox) = (cc0(l,i_ox) + production(l,i_ox)*dt) |
---|
726 | $ /(1. + loss(l,i_ox)*dt) |
---|
727 | end do |
---|
728 | else |
---|
729 | do l = 1,lswitch-1 |
---|
730 | cc(l,i_o) = (cc0(l,i_o) + production(l,i_o)*dt) |
---|
731 | $ /(1. + loss(l,i_o)*dt) |
---|
732 | cc(l,i_o3) = (cc0(l,i_o3) + production(l,i_o3)*dt) |
---|
733 | $ /(1. + loss(l,i_o3)*dt) |
---|
734 | cc(l,i_ox) = cc(l,i_o) + cc(l,i_o3) |
---|
735 | end do |
---|
736 | end if |
---|
737 | c |
---|
738 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
739 | c end of loop over iterations |
---|
740 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
741 | c |
---|
742 | end do |
---|
743 | c |
---|
744 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
745 | c density -> volume mixing ratio conversion |
---|
746 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
747 | c |
---|
748 | do iesp = 1,nesp |
---|
749 | do l = 1,lswitch-1 |
---|
750 | rm(l,iesp) = max(cc(l,iesp)/dens(l), 1.d-30) |
---|
751 | end do |
---|
752 | end do |
---|
753 | c |
---|
754 | return |
---|
755 | end |
---|
756 | c |
---|
757 | c***************************************************************** |
---|
758 | c |
---|
759 | subroutine phot(lswitch, press, temp, sza, dist_sol, rmo3, j) |
---|
760 | c |
---|
761 | c***************************************************************** |
---|
762 | c |
---|
763 | implicit none |
---|
764 | c |
---|
765 | #include "dimensions.h" |
---|
766 | #include "dimphys.h" |
---|
767 | #include "chimiedata.h" |
---|
768 | c |
---|
769 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
770 | c inputs: |
---|
771 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
772 | c |
---|
773 | integer lswitch ! interface level between chemistries |
---|
774 | real press(nlayermx) ! pressure (hPa) |
---|
775 | real temp(nlayermx) ! temperature (K) |
---|
776 | real sza ! solar zenith angle (deg) |
---|
777 | real dist_sol ! sun distance (AU) |
---|
778 | real rmo3(nlayermx) ! ozone mixing ratio |
---|
779 | c |
---|
780 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
781 | c output: |
---|
782 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
783 | c |
---|
784 | real j(nlayermx,nd) ! interpolated photolysis rates (s-1) |
---|
785 | c |
---|
786 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
787 | c local: |
---|
788 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
789 | c |
---|
790 | integer icol, ij, indsza, indcol, indozo, indtemp, |
---|
791 | $ iozo, isza, it, iztop, l |
---|
792 | c |
---|
793 | real col(nlayermx) ! overhead air column (molecule cm-2) |
---|
794 | real colo3(nlayermx) ! overhead ozone column (molecule cm-2) |
---|
795 | real poids(2,2,2,2) ! 4D interpolation weights |
---|
796 | real tref ! temperature at 1.9 hPa in the gcm (K) |
---|
797 | real table_temp(ntemp) ! temperatures at 1.9 hPa in jmars (K) |
---|
798 | real cinf, csup, cicol, |
---|
799 | $ ciozo, cisza, citemp |
---|
800 | real colo3min, dp, scaleh |
---|
801 | real ratio_o3(nlayermx) |
---|
802 | c |
---|
803 | ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
804 | c day/night criterion |
---|
805 | ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
806 | c |
---|
807 | if (sza .le. 95.) then |
---|
808 | c |
---|
809 | ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
810 | c temperatures at 1.9 hPa in jmars |
---|
811 | ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
812 | c |
---|
813 | table_temp(1) = 226.2 |
---|
814 | table_temp(2) = 206.2 |
---|
815 | table_temp(3) = 186.2 |
---|
816 | table_temp(4) = 169.8 |
---|
817 | c |
---|
818 | ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
819 | c interpolation in solar zenith angle |
---|
820 | ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
821 | c |
---|
822 | indsza = nsza - 1 |
---|
823 | do isza = 1,nsza |
---|
824 | if (szatab(isza) .ge. sza) then |
---|
825 | indsza = min(indsza,isza - 1) |
---|
826 | indsza = max(indsza, 1) |
---|
827 | end if |
---|
828 | end do |
---|
829 | cisza = (sza - szatab(indsza)) |
---|
830 | $ /(szatab(indsza + 1) - szatab(indsza)) |
---|
831 | c |
---|
832 | ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
833 | c air and ozone columns |
---|
834 | ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
835 | c |
---|
836 | c air column at model top: assign standard value |
---|
837 | c |
---|
838 | scaleh = 10. |
---|
839 | iztop = nint(scaleh*log(press(1)/press(lswitch-1))) |
---|
840 | iztop = min(iztop,200) |
---|
841 | col(lswitch-1) = colairtab(iztop) |
---|
842 | c |
---|
843 | c ozone column at model top |
---|
844 | c |
---|
845 | colo3(lswitch-1) = 0. |
---|
846 | c |
---|
847 | c air and ozone columns for other levels |
---|
848 | c |
---|
849 | do l = lswitch-2,1,-1 |
---|
850 | dp = (press(l) - press(l+1))*100. |
---|
851 | col(l) = col(l+1) + factor*dp |
---|
852 | col(l) = min(col(l), colairtab(0)) |
---|
853 | colo3(l) = colo3(l+1) |
---|
854 | $ + factor*(rmo3(l+1) + rmo3(l))*0.5*dp |
---|
855 | end do |
---|
856 | c |
---|
857 | c ratio ozone column/minimal theoretical column (ro3 = 7.171e-10) |
---|
858 | c |
---|
859 | do l = 1,lswitch-1 |
---|
860 | colo3min = col(l)*7.171e-10 |
---|
861 | ratio_o3(l) = colo3(l)/colo3min |
---|
862 | ratio_o3(l) = min(ratio_o3(l), table_ozo(nozo)*10.) |
---|
863 | ratio_o3(l) = max(ratio_o3(l), table_ozo(1)*10.) |
---|
864 | end do |
---|
865 | c |
---|
866 | ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
867 | c temperature dependence |
---|
868 | ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
869 | c |
---|
870 | c 1) search for temperature at 1.9 hPa (tref): vertical interpolation |
---|
871 | c |
---|
872 | c print*,'****** recherche de T a 1.9 hPa ******' |
---|
873 | tref = temp(1) |
---|
874 | do l = (lswitch-1)-1,1,-1 |
---|
875 | if (press(l) .gt. 1.9) then |
---|
876 | cinf = (press(l) - 1.9) |
---|
877 | $ /(press(l) - press(l+1)) |
---|
878 | csup = 1. - cinf |
---|
879 | tref = cinf*temp(l+1) + csup*temp(l) |
---|
880 | c |
---|
881 | c print*, press(l+1), temp(l+1) |
---|
882 | c print*, press(l ), temp(l ) |
---|
883 | c print*, 'tref = ', tref |
---|
884 | go to 10 |
---|
885 | end if |
---|
886 | end do |
---|
887 | 10 continue |
---|
888 | c |
---|
889 | c 2) interpolation in temperature |
---|
890 | c |
---|
891 | tref = min(tref,table_temp(1)) |
---|
892 | tref = max(tref,table_temp(ntemp)) |
---|
893 | c |
---|
894 | do it = 2, ntemp |
---|
895 | if (table_temp(it) .le. tref) then |
---|
896 | citemp = (log(tref) - log(table_temp(it))) |
---|
897 | $ /(log(table_temp(it-1)) - log(table_temp(it))) |
---|
898 | indtemp = it - 1 |
---|
899 | c print*,'interpolation entre ', table_temp(it), ' et ', |
---|
900 | c $ table_temp(it-1) |
---|
901 | c print*,'indtemp = ', indtemp, ' citemp = ', citemp |
---|
902 | goto 20 |
---|
903 | end if |
---|
904 | end do |
---|
905 | 20 continue |
---|
906 | c print*,'****** fin interpolation en T ********' |
---|
907 | c |
---|
908 | ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
909 | c loop over vertical levels |
---|
910 | ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
911 | c |
---|
912 | do l = 1,lswitch-1 |
---|
913 | c |
---|
914 | c interpolation in air column |
---|
915 | c |
---|
916 | do icol = 0,200 |
---|
917 | if (colairtab(icol) .lt. col(l)) then |
---|
918 | cicol = (log(col(l)) - log(colairtab(icol))) |
---|
919 | $ /(log(colairtab(icol-1)) - log(colairtab(icol))) |
---|
920 | indcol = icol - 1 |
---|
921 | goto 30 |
---|
922 | end if |
---|
923 | end do |
---|
924 | 30 continue |
---|
925 | c |
---|
926 | cc interpolation in ozone column |
---|
927 | c |
---|
928 | indozo = nozo - 1 |
---|
929 | do iozo = 1,nozo |
---|
930 | if (table_ozo(iozo)*10. .ge. ratio_o3(l)) then |
---|
931 | indozo = min(indozo, iozo - 1) |
---|
932 | indozo = max(indozo, 1) |
---|
933 | end if |
---|
934 | end do |
---|
935 | ciozo = (ratio_o3(l) - table_ozo(indozo)*10.) |
---|
936 | $ /(table_ozo(indozo + 1)*10. - table_ozo(indozo)*10.) |
---|
937 | c |
---|
938 | c write(6,'(i2,4e13.4,5f10.4)') |
---|
939 | c $ l, press(l), col(l), |
---|
940 | c $ colairtab(indcol), colairtab(indcol+1), |
---|
941 | c $ colo3(l)/2.687e15, |
---|
942 | c $ ratio_o3(l), table_ozo(indozo), table_ozo(indozo+1), |
---|
943 | c $ ciozo |
---|
944 | c |
---|
945 | cc 4-dimensional interpolation weights |
---|
946 | c |
---|
947 | poids(1,1,1,1) = citemp*(1.-cisza)*cicol*(1.-ciozo) |
---|
948 | poids(1,1,1,2) = citemp*(1.-cisza)*cicol*ciozo |
---|
949 | poids(1,1,2,1) = citemp*(1.-cisza)*(1.-cicol)*(1.-ciozo) |
---|
950 | poids(1,1,2,2) = citemp*(1.-cisza)*(1.-cicol)*ciozo |
---|
951 | poids(1,2,1,1) = citemp*cisza*cicol*(1.-ciozo) |
---|
952 | poids(1,2,1,2) = citemp*cisza*cicol*ciozo |
---|
953 | poids(1,2,2,1) = citemp*cisza*(1.-cicol)*(1.-ciozo) |
---|
954 | poids(1,2,2,2) = citemp*cisza*(1.-cicol)*ciozo |
---|
955 | poids(2,1,1,1) = (1.-citemp)*(1.-cisza)*cicol*(1.-ciozo) |
---|
956 | poids(2,1,1,2) = (1.-citemp)*(1.-cisza)*cicol*ciozo |
---|
957 | poids(2,1,2,1) = (1.-citemp)*(1.-cisza)*(1.-cicol)*(1.-ciozo) |
---|
958 | poids(2,1,2,2) = (1.-citemp)*(1.-cisza)*(1.-cicol)*ciozo |
---|
959 | poids(2,2,1,1) = (1.-citemp)*cisza*cicol*(1.-ciozo) |
---|
960 | poids(2,2,1,2) = (1.-citemp)*cisza*cicol*ciozo |
---|
961 | poids(2,2,2,1) = (1.-citemp)*cisza*(1.-cicol)*(1.-ciozo) |
---|
962 | poids(2,2,2,2) = (1.-citemp)*cisza*(1.-cicol)*ciozo |
---|
963 | c |
---|
964 | cc 4-dimensional interpolation in the lookup table |
---|
965 | c |
---|
966 | do ij = 1,nd |
---|
967 | j(l,ij) = |
---|
968 | $ poids(1,1,1,1)*jphot(indtemp,indsza,indcol,indozo,ij) |
---|
969 | $ + poids(1,1,1,2)*jphot(indtemp,indsza,indcol,indozo+1,ij) |
---|
970 | $ + poids(1,1,2,1)*jphot(indtemp,indsza,indcol+1,indozo,ij) |
---|
971 | $ + poids(1,1,2,2)*jphot(indtemp,indsza,indcol+1,indozo+1,ij) |
---|
972 | $ + poids(1,2,1,1)*jphot(indtemp,indsza+1,indcol,indozo,ij) |
---|
973 | $ + poids(1,2,1,2)*jphot(indtemp,indsza+1,indcol,indozo+1,ij) |
---|
974 | $ + poids(1,2,2,1)*jphot(indtemp,indsza+1,indcol+1,indozo,ij) |
---|
975 | $ + poids(1,2,2,2)*jphot(indtemp,indsza+1,indcol+1,indozo+1,ij) |
---|
976 | $ + poids(2,1,1,1)*jphot(indtemp+1,indsza,indcol,indozo,ij) |
---|
977 | $ + poids(2,1,1,2)*jphot(indtemp+1,indsza,indcol,indozo+1,ij) |
---|
978 | $ + poids(2,1,2,1)*jphot(indtemp+1,indsza,indcol+1,indozo,ij) |
---|
979 | $ + poids(2,1,2,2)*jphot(indtemp+1,indsza,indcol+1,indozo+1,ij) |
---|
980 | $ + poids(2,2,1,1)*jphot(indtemp+1,indsza+1,indcol,indozo,ij) |
---|
981 | $ + poids(2,2,1,2)*jphot(indtemp+1,indsza+1,indcol,indozo+1,ij) |
---|
982 | $ + poids(2,2,2,1)*jphot(indtemp+1,indsza+1,indcol+1,indozo,ij) |
---|
983 | $ + poids(2,2,2,2)*jphot(indtemp+1,indsza+1,indcol+1,indozo+1,ij) |
---|
984 | end do |
---|
985 | c |
---|
986 | cc correction for sun distance |
---|
987 | c |
---|
988 | do ij = 1,nd |
---|
989 | j(l,ij) = j(l,ij)*(1.52/dist_sol)**2. |
---|
990 | end do |
---|
991 | c |
---|
992 | ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
993 | c end of loop over vertical levels |
---|
994 | ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
995 | c |
---|
996 | end do |
---|
997 | c |
---|
998 | else |
---|
999 | c |
---|
1000 | ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1001 | c night |
---|
1002 | ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1003 | c |
---|
1004 | do ij = 1,nd |
---|
1005 | do l = 1,lswitch-1 |
---|
1006 | j(l,ij) = 0. |
---|
1007 | end do |
---|
1008 | end do |
---|
1009 | c |
---|
1010 | end if |
---|
1011 | c |
---|
1012 | return |
---|
1013 | end |
---|
1014 | c |
---|
1015 | c***************************************************************** |
---|
1016 | c |
---|
1017 | subroutine gcmtochim(zycol, lswitch, nesp, rm) |
---|
1018 | c |
---|
1019 | c***************************************************************** |
---|
1020 | c |
---|
1021 | implicit none |
---|
1022 | c |
---|
1023 | #include "dimensions.h" |
---|
1024 | #include "dimphys.h" |
---|
1025 | #include "callkeys.h" |
---|
1026 | #include "tracer.h" |
---|
1027 | c |
---|
1028 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1029 | c inputs: |
---|
1030 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1031 | c |
---|
1032 | real zycol(nlayermx,nqmx)! species volume mixing ratio in the gcm |
---|
1033 | c |
---|
1034 | integer nesp ! number of species in the chemistry |
---|
1035 | integer lswitch ! interface level between chemistries |
---|
1036 | c |
---|
1037 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1038 | c outputs: |
---|
1039 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1040 | c |
---|
1041 | real rm(nlayermx,nesp) ! species volume mixing ratio |
---|
1042 | c |
---|
1043 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1044 | c local: |
---|
1045 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1046 | c |
---|
1047 | integer l,iq |
---|
1048 | logical,save :: firstcall=.true. |
---|
1049 | |
---|
1050 | ! Tracer indexes in the GCM: |
---|
1051 | integer,save :: g_co2=0 |
---|
1052 | integer,save :: g_co=0 |
---|
1053 | integer,save :: g_o=0 |
---|
1054 | integer,save :: g_o1d=0 |
---|
1055 | integer,save :: g_o2=0 |
---|
1056 | integer,save :: g_o3=0 |
---|
1057 | integer,save :: g_h=0 |
---|
1058 | integer,save :: g_h2=0 |
---|
1059 | integer,save :: g_oh=0 |
---|
1060 | integer,save :: g_ho2=0 |
---|
1061 | integer,save :: g_h2o2=0 |
---|
1062 | integer,save :: g_n2=0 |
---|
1063 | integer,save :: g_h2o_vap=0 |
---|
1064 | ! Tracer indexes in the chemistry: |
---|
1065 | integer,parameter :: i_co2=1 |
---|
1066 | integer,parameter :: i_co=2 |
---|
1067 | integer,parameter :: i_o=3 |
---|
1068 | integer,parameter :: i_o1d=4 |
---|
1069 | integer,parameter :: i_o2=5 |
---|
1070 | integer,parameter :: i_o3=6 |
---|
1071 | integer,parameter :: i_h=7 |
---|
1072 | integer,parameter :: i_h2=8 |
---|
1073 | integer,parameter :: i_oh=9 |
---|
1074 | integer,parameter :: i_ho2=10 |
---|
1075 | integer,parameter :: i_h2o2=11 |
---|
1076 | integer,parameter :: i_h2o=12 |
---|
1077 | integer,parameter :: i_n2=13 |
---|
1078 | integer,parameter :: i_hox=14 |
---|
1079 | integer,parameter :: i_ox=15 |
---|
1080 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1081 | c tracers numbering in the gcm |
---|
1082 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1083 | c co2 = nqchem_min |
---|
1084 | c co = nqchem_min + 1 |
---|
1085 | c o = nqchem_min + 2 |
---|
1086 | c o(1d) = nqchem_min + 3 |
---|
1087 | c o2 = nqchem_min + 4 |
---|
1088 | c o3 = nqchem_min + 5 |
---|
1089 | c h = nqchem_min + 6 |
---|
1090 | c h2 = nqchem_min + 7 |
---|
1091 | c oh = nqchem_min + 8 |
---|
1092 | c ho2 = nqchem_min + 9 |
---|
1093 | c h2o2 = nqchem_min + 10 |
---|
1094 | c n2 = nqchem_min + 11 |
---|
1095 | c ar = nqchem_min + 12 |
---|
1096 | c h2o = nqmx |
---|
1097 | c |
---|
1098 | |
---|
1099 | ! Fist call initializations |
---|
1100 | if (firstcall) then |
---|
1101 | ! get the indexes of the tracers we'll need |
---|
1102 | do iq=1,nqmx |
---|
1103 | if (noms(iq).eq."co2") then |
---|
1104 | g_co2=iq |
---|
1105 | endif |
---|
1106 | if (noms(iq).eq."co") then |
---|
1107 | g_co=iq |
---|
1108 | endif |
---|
1109 | if (noms(iq).eq."o") then |
---|
1110 | g_o=iq |
---|
1111 | endif |
---|
1112 | if (noms(iq).eq."o1d") then |
---|
1113 | g_o1d=iq |
---|
1114 | endif |
---|
1115 | if (noms(iq).eq."o2") then |
---|
1116 | g_o2=iq |
---|
1117 | endif |
---|
1118 | if (noms(iq).eq."o3") then |
---|
1119 | g_o3=iq |
---|
1120 | endif |
---|
1121 | if (noms(iq).eq."h") then |
---|
1122 | g_h=iq |
---|
1123 | endif |
---|
1124 | if (noms(iq).eq."h2") then |
---|
1125 | g_h2=iq |
---|
1126 | endif |
---|
1127 | if (noms(iq).eq."oh") then |
---|
1128 | g_oh=iq |
---|
1129 | endif |
---|
1130 | if (noms(iq).eq."ho2") then |
---|
1131 | g_ho2=iq |
---|
1132 | endif |
---|
1133 | if (noms(iq).eq."h2o2") then |
---|
1134 | g_h2o2=iq |
---|
1135 | endif |
---|
1136 | if (noms(iq).eq."n2") then |
---|
1137 | g_n2=iq |
---|
1138 | endif |
---|
1139 | if (noms(iq).eq."h2o_vap") then |
---|
1140 | g_h2o_vap=iq |
---|
1141 | endif |
---|
1142 | enddo |
---|
1143 | firstcall=.false. |
---|
1144 | endif ! of if (firstcall) |
---|
1145 | |
---|
1146 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1147 | c initialise chemical species |
---|
1148 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1149 | c |
---|
1150 | do l = 1,lswitch-1 |
---|
1151 | rm(l,i_co2) = max(zycol(l, g_co2), 1.e-30) |
---|
1152 | rm(l,i_co) = max(zycol(l, g_co), 1.e-30) |
---|
1153 | rm(l,i_o) = max(zycol(l, g_o), 1.e-30) |
---|
1154 | rm(l,i_o1d) = max(zycol(l, g_o1d), 1.e-30) |
---|
1155 | rm(l,i_o2) = max(zycol(l, g_o2), 1.e-30) |
---|
1156 | rm(l,i_o3) = max(zycol(l, g_o3), 1.e-30) |
---|
1157 | rm(l,i_h) = max(zycol(l, g_h), 1.e-30) |
---|
1158 | rm(l,i_h2) = max(zycol(l, g_h2), 1.e-30) |
---|
1159 | rm(l,i_oh) = max(zycol(l, g_oh), 1.e-30) |
---|
1160 | rm(l,i_ho2) = max(zycol(l, g_ho2), 1.e-30) |
---|
1161 | rm(l,i_h2o2) = max(zycol(l, g_h2o2), 1.e-30) |
---|
1162 | rm(l,i_n2) = max(zycol(l, g_n2), 1.e-30) |
---|
1163 | rm(l,i_h2o) = max(zycol(l, g_h2o_vap), 1.e-30) |
---|
1164 | c |
---|
1165 | end do |
---|
1166 | c |
---|
1167 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1168 | c initialise chemical families c |
---|
1169 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1170 | c |
---|
1171 | do l = 1,lswitch-1 |
---|
1172 | rm(l,i_hox) = rm(l,i_h) |
---|
1173 | $ + rm(l,i_oh) |
---|
1174 | $ + rm(l,i_ho2) |
---|
1175 | rm(l,i_ox) = rm(l,i_o) |
---|
1176 | $ + rm(l,i_o3) |
---|
1177 | end do |
---|
1178 | c |
---|
1179 | return |
---|
1180 | end |
---|
1181 | c |
---|
1182 | c***************************************************************** |
---|
1183 | c |
---|
1184 | subroutine chimtogcm(zycol, lswitch, nesp, rm) |
---|
1185 | c |
---|
1186 | c***************************************************************** |
---|
1187 | c |
---|
1188 | implicit none |
---|
1189 | c |
---|
1190 | #include "dimensions.h" |
---|
1191 | #include "dimphys.h" |
---|
1192 | #include "callkeys.h" |
---|
1193 | #include"tracer.h" |
---|
1194 | c |
---|
1195 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1196 | c inputs: |
---|
1197 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1198 | c |
---|
1199 | integer nesp ! number of species in the chemistry |
---|
1200 | integer lswitch ! interface level between chemistries |
---|
1201 | c |
---|
1202 | real rm(nlayermx,nesp) ! species volume mixing ratio |
---|
1203 | c |
---|
1204 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1205 | c output: |
---|
1206 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1207 | c |
---|
1208 | real zycol(nlayermx,nqmx) ! species volume mixing ratio in the gcm |
---|
1209 | c |
---|
1210 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1211 | c local: |
---|
1212 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1213 | c |
---|
1214 | integer l,iq |
---|
1215 | logical,save :: firstcall=.true. |
---|
1216 | |
---|
1217 | ! Tracer indexes in the GCM: |
---|
1218 | integer,save :: g_co2=0 |
---|
1219 | integer,save :: g_co=0 |
---|
1220 | integer,save :: g_o=0 |
---|
1221 | integer,save :: g_o1d=0 |
---|
1222 | integer,save :: g_o2=0 |
---|
1223 | integer,save :: g_o3=0 |
---|
1224 | integer,save :: g_h=0 |
---|
1225 | integer,save :: g_h2=0 |
---|
1226 | integer,save :: g_oh=0 |
---|
1227 | integer,save :: g_ho2=0 |
---|
1228 | integer,save :: g_h2o2=0 |
---|
1229 | integer,save :: g_n2=0 |
---|
1230 | integer,save :: g_h2o_vap=0 |
---|
1231 | ! Tracer indexes in the chemistry: |
---|
1232 | integer,parameter :: i_co2=1 |
---|
1233 | integer,parameter :: i_co=2 |
---|
1234 | integer,parameter :: i_o=3 |
---|
1235 | integer,parameter :: i_o1d=4 |
---|
1236 | integer,parameter :: i_o2=5 |
---|
1237 | integer,parameter :: i_o3=6 |
---|
1238 | integer,parameter :: i_h=7 |
---|
1239 | integer,parameter :: i_h2=8 |
---|
1240 | integer,parameter :: i_oh=9 |
---|
1241 | integer,parameter :: i_ho2=10 |
---|
1242 | integer,parameter :: i_h2o2=11 |
---|
1243 | integer,parameter :: i_h2o=12 |
---|
1244 | integer,parameter :: i_n2=13 |
---|
1245 | integer,parameter :: i_hox=14 |
---|
1246 | integer,parameter :: i_ox=15 |
---|
1247 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1248 | c tracers numbering in the gcm |
---|
1249 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1250 | c |
---|
1251 | c co2 = nqchem_min |
---|
1252 | c co = nqchem_min + 1 |
---|
1253 | c o = nqchem_min + 2 |
---|
1254 | c o(1d) = nqchem_min + 3 |
---|
1255 | c o2 = nqchem_min + 4 |
---|
1256 | c o3 = nqchem_min + 5 |
---|
1257 | c h = nqchem_min + 6 |
---|
1258 | c h2 = nqchem_min + 7 |
---|
1259 | c oh = nqchem_min + 8 |
---|
1260 | c ho2 = nqchem_min + 9 |
---|
1261 | c h2o2 = nqchem_min + 10 |
---|
1262 | c n2 = nqchem_min + 11 |
---|
1263 | c ar = nqchem_min + 12 |
---|
1264 | c h2o = nqmx |
---|
1265 | c |
---|
1266 | ! Fist call initializations |
---|
1267 | if (firstcall) then |
---|
1268 | ! get the indexes of the tracers we'll need |
---|
1269 | do iq=1,nqmx |
---|
1270 | if (noms(iq).eq."co2") then |
---|
1271 | g_co2=iq |
---|
1272 | endif |
---|
1273 | if (noms(iq).eq."co") then |
---|
1274 | g_co=iq |
---|
1275 | endif |
---|
1276 | if (noms(iq).eq."o") then |
---|
1277 | g_o=iq |
---|
1278 | endif |
---|
1279 | if (noms(iq).eq."o1d") then |
---|
1280 | g_o1d=iq |
---|
1281 | endif |
---|
1282 | if (noms(iq).eq."o2") then |
---|
1283 | g_o2=iq |
---|
1284 | endif |
---|
1285 | if (noms(iq).eq."o3") then |
---|
1286 | g_o3=iq |
---|
1287 | endif |
---|
1288 | if (noms(iq).eq."h") then |
---|
1289 | g_h=iq |
---|
1290 | endif |
---|
1291 | if (noms(iq).eq."h2") then |
---|
1292 | g_h2=iq |
---|
1293 | endif |
---|
1294 | if (noms(iq).eq."oh") then |
---|
1295 | g_oh=iq |
---|
1296 | endif |
---|
1297 | if (noms(iq).eq."ho2") then |
---|
1298 | g_ho2=iq |
---|
1299 | endif |
---|
1300 | if (noms(iq).eq."h2o2") then |
---|
1301 | g_h2o2=iq |
---|
1302 | endif |
---|
1303 | if (noms(iq).eq."n2") then |
---|
1304 | g_n2=iq |
---|
1305 | endif |
---|
1306 | if (noms(iq).eq."h2o_vap") then |
---|
1307 | g_h2o_vap=iq |
---|
1308 | endif |
---|
1309 | enddo |
---|
1310 | firstcall=.false. |
---|
1311 | endif ! of if (firstcall) |
---|
1312 | |
---|
1313 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1314 | c save mixing ratios for the gcm |
---|
1315 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1316 | c |
---|
1317 | do l = 1,lswitch-1 |
---|
1318 | zycol(l, g_co2) = rm(l,i_co2) |
---|
1319 | zycol(l, g_co) = rm(l,i_co) |
---|
1320 | zycol(l, g_o) = rm(l,i_o) |
---|
1321 | zycol(l, g_o1d) = rm(l,i_o1d) |
---|
1322 | zycol(l, g_o2) = rm(l,i_o2) |
---|
1323 | zycol(l, g_o3) = rm(l,i_o3) |
---|
1324 | zycol(l, g_h) = rm(l,i_h) |
---|
1325 | zycol(l, g_h2) = rm(l,i_h2) |
---|
1326 | zycol(l, g_oh) = rm(l,i_oh) |
---|
1327 | zycol(l, g_ho2) = rm(l,i_ho2) |
---|
1328 | zycol(l, g_h2o2) = rm(l,i_h2o2) |
---|
1329 | zycol(l, g_n2) = rm(l,i_n2) |
---|
1330 | zycol(l, g_h2o_vap) = rm(l,i_h2o) |
---|
1331 | end do |
---|
1332 | c |
---|
1333 | c water ice: zycol(nqmx-1) has not been changed if iceparty on |
---|
1334 | ! not an issue anymore since we now use tracer names ... |
---|
1335 | ! and not relevant anymore as we removed iceparty: water=>iceparty |
---|
1336 | c |
---|
1337 | return |
---|
1338 | end |
---|
1339 | c |
---|
1340 | c***************************************************************** |
---|
1341 | c |
---|
1342 | subroutine chemrates(lswitch, dens, press, t, icesurf, |
---|
1343 | $ a001, a002, a003, |
---|
1344 | $ b001, b002, b003, b004, b005, b006, |
---|
1345 | $ c001, c002, c003, c004, c005, c006, |
---|
1346 | $ c007, c008, c009, c010, c011, c012, |
---|
1347 | $ c013, c014, c015, c016, c017, c018, |
---|
1348 | $ d001, d002, d003, |
---|
1349 | $ e001, e002, |
---|
1350 | $ h001, h002) |
---|
1351 | c |
---|
1352 | c***************************************************************** |
---|
1353 | c |
---|
1354 | implicit none |
---|
1355 | c |
---|
1356 | #include "dimensions.h" |
---|
1357 | #include "dimphys.h" |
---|
1358 | c |
---|
1359 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1360 | c inputs: c |
---|
1361 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1362 | c |
---|
1363 | integer lswitch ! interface level between chemistries |
---|
1364 | |
---|
1365 | real dens(nlayermx) ! density (cm-3) |
---|
1366 | real press(nlayermx) ! pressure (hpa) |
---|
1367 | real t(nlayermx) ! temperature (k) |
---|
1368 | real icesurf(nlayermx) ! ice surface area (cm^2/cm^3) |
---|
1369 | c |
---|
1370 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1371 | c outputs: c |
---|
1372 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1373 | c |
---|
1374 | real a001(nlayermx), a002(nlayermx), a003(nlayermx) |
---|
1375 | real b001(nlayermx), b002(nlayermx), b003(nlayermx), |
---|
1376 | $ b004(nlayermx), b005(nlayermx), b006(nlayermx) |
---|
1377 | real c001(nlayermx), c002(nlayermx), c003(nlayermx), |
---|
1378 | $ c004(nlayermx), c005(nlayermx), c006(nlayermx), |
---|
1379 | $ c007(nlayermx), c008(nlayermx), c009(nlayermx), |
---|
1380 | $ c010(nlayermx), c011(nlayermx), c012(nlayermx), |
---|
1381 | $ c013(nlayermx), c014(nlayermx), c015(nlayermx), |
---|
1382 | $ c016(nlayermx), c017(nlayermx), c018(nlayermx) |
---|
1383 | real d001(nlayermx), d002(nlayermx), d003(nlayermx) |
---|
1384 | real e001(nlayermx), e002(nlayermx) |
---|
1385 | real h001(nlayermx), h002(nlayermx) |
---|
1386 | c |
---|
1387 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1388 | c local: c |
---|
1389 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1390 | c |
---|
1391 | real ak0, ak1, rate, xpo |
---|
1392 | c |
---|
1393 | integer l |
---|
1394 | c |
---|
1395 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1396 | c compute reaction rates from JPL 1997, otherwise mentioned |
---|
1397 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1398 | c |
---|
1399 | do l = 1,lswitch-1 |
---|
1400 | c |
---|
1401 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1402 | c oxygen compounds |
---|
1403 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1404 | c |
---|
1405 | ccc a001: o + o2 + co2 -> o3 + co2 |
---|
1406 | c |
---|
1407 | c jpl 2003 |
---|
1408 | c |
---|
1409 | a001(l) = 2.5 |
---|
1410 | $ *6.0e-34*(t(l)/300.)**(-2.4)*dens(l) |
---|
1411 | c |
---|
1412 | c nair et al., 1994 |
---|
1413 | c |
---|
1414 | c a001(l) = 1.3e-34*exp(724./t(l))*dens(l) |
---|
1415 | c |
---|
1416 | ccc a002: o + o + co2 -> o2 + co2 |
---|
1417 | c |
---|
1418 | c Tsang and Hampson, J. Chem. Phys. Ref. Data, 15, 1087, 1986 |
---|
1419 | c |
---|
1420 | a002(l) = 2.5*5.2e-35*exp(900./t(l))*dens(l) |
---|
1421 | c |
---|
1422 | c Campbell and Gray, Chem. Phys. Lett., 18, 607, 1973 |
---|
1423 | c |
---|
1424 | c a002(l) = 1.2e-32*(300./t(l))**(2.0)*dens(l) |
---|
1425 | c |
---|
1426 | ccc a003: o + o3 -> o2 + o2 |
---|
1427 | c |
---|
1428 | c jpl 2003 |
---|
1429 | c |
---|
1430 | a003(l) = 8.0e-12*exp(-2060./t(l)) |
---|
1431 | c |
---|
1432 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1433 | c reactions with o(1d) |
---|
1434 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1435 | c |
---|
1436 | ccc b001: o(1d) + co2 -> o + co2 |
---|
1437 | c |
---|
1438 | c jpl 2003 |
---|
1439 | c |
---|
1440 | b001(l) = 7.4e-11*exp(120./t(l)) |
---|
1441 | c |
---|
1442 | ccc b002: o(1d) + h2o -> oh + oh |
---|
1443 | c |
---|
1444 | c jpl 2003 |
---|
1445 | c |
---|
1446 | b002(l) = 2.2e-10 |
---|
1447 | c |
---|
1448 | ccc b003: o(1d) + h2 -> oh + h |
---|
1449 | c |
---|
1450 | c jpl 2003 |
---|
1451 | c |
---|
1452 | b003(l) = 1.1e-10 |
---|
1453 | c |
---|
1454 | c nair et al., 1994 |
---|
1455 | c |
---|
1456 | c b003(l) = 1.0e-10 |
---|
1457 | c |
---|
1458 | ccc b004: o(1d) + o2 -> o + o2 |
---|
1459 | c |
---|
1460 | c jpl 2003 |
---|
1461 | c |
---|
1462 | b004(l) = 3.2e-11*exp(70./t(l)) |
---|
1463 | c |
---|
1464 | ccc b005: o(1d) + o3 -> o2 + o2 |
---|
1465 | c |
---|
1466 | c jpl 2003 |
---|
1467 | c |
---|
1468 | b005(l) = 1.2e-10 |
---|
1469 | c |
---|
1470 | ccc b006: o(1d) + o3 -> o2 + o + o |
---|
1471 | c |
---|
1472 | c jpl 2003 |
---|
1473 | c |
---|
1474 | b006(l) = 1.2e-10 |
---|
1475 | c |
---|
1476 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1477 | c hydrogen compounds |
---|
1478 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1479 | c |
---|
1480 | ccc c001: o + ho2 -> oh + o2 |
---|
1481 | c |
---|
1482 | c jpl 2003 |
---|
1483 | c |
---|
1484 | c001(l) = 3.0e-11*exp(200./t(l)) |
---|
1485 | c c001(l) = 0.75*3.0e-11*exp(200./t(l)) |
---|
1486 | c |
---|
1487 | ccc c002: o + oh -> o2 + h |
---|
1488 | c |
---|
1489 | c jpl 2003 |
---|
1490 | c |
---|
1491 | c002(l) = 2.2e-11*exp(120./t(l)) |
---|
1492 | c |
---|
1493 | ccc c003: h + o3 -> oh + o2 |
---|
1494 | c |
---|
1495 | c jpl 2003 |
---|
1496 | c |
---|
1497 | c003(l) = 1.4e-10*exp(-470./t(l)) |
---|
1498 | c |
---|
1499 | ccc c004: h + ho2 -> oh + oh |
---|
1500 | c |
---|
1501 | c jpl 2003 |
---|
1502 | c |
---|
1503 | c004(l) = 8.1e-11*0.90 |
---|
1504 | c |
---|
1505 | ccc c005: h + ho2 -> h2 + o2 |
---|
1506 | c |
---|
1507 | c jpl 2003 |
---|
1508 | c |
---|
1509 | c005(l) = 8.1e-11*0.08 |
---|
1510 | c |
---|
1511 | ccc c006: h + ho2 -> h2o + o |
---|
1512 | c |
---|
1513 | c jpl 2003 |
---|
1514 | c |
---|
1515 | c006(l) = 8.1e-11*0.02 |
---|
1516 | c |
---|
1517 | ccc c007: oh + ho2 -> h2o + o2 |
---|
1518 | c |
---|
1519 | c jpl 2003 |
---|
1520 | c |
---|
1521 | c007(l) = 4.8e-11*exp(250./t(l)) |
---|
1522 | c c007(l) = 0.75*4.8e-11*exp(250./t(l)) |
---|
1523 | c |
---|
1524 | ccc c008: ho2 + ho2 -> h2o2 + o2 |
---|
1525 | c |
---|
1526 | c jpl 2003 |
---|
1527 | c |
---|
1528 | c c008(l) = 2.3e-13*exp(600./t(l)) |
---|
1529 | c |
---|
1530 | c christensen et al., grl, 13, 2002 |
---|
1531 | c |
---|
1532 | c008(l) = 1.5e-12*exp(19./t(l)) |
---|
1533 | c |
---|
1534 | ccc c009: oh + h2o2 -> h2o + ho2 |
---|
1535 | c |
---|
1536 | c jpl 2003 |
---|
1537 | c |
---|
1538 | c009(l) = 2.9e-12*exp(-160./t(l)) |
---|
1539 | c |
---|
1540 | ccc c010: oh + h2 -> h2o + h |
---|
1541 | c |
---|
1542 | c jpl 2003 |
---|
1543 | c |
---|
1544 | c010(l) = 5.5e-12*exp(-2000./t(l)) |
---|
1545 | c |
---|
1546 | ccc c011: h + o2 + co2 -> ho2 + co2 |
---|
1547 | c |
---|
1548 | c jpl 2003 |
---|
1549 | c |
---|
1550 | ak0 = 2.5*5.7e-32*(t(l)/300.)**(-1.6) |
---|
1551 | ak1 = 7.5e-11*(t(l)/300.)**(0.0) |
---|
1552 | c |
---|
1553 | rate = (ak0*dens(l))/(1. + ak0*dens(l)/ak1) |
---|
1554 | xpo = 1./(1. + alog10((ak0*dens(l))/ak1)**2) |
---|
1555 | c011(l) = rate*0.6**xpo |
---|
1556 | c |
---|
1557 | ccc c012: o + h2o2 -> oh + ho2 |
---|
1558 | c |
---|
1559 | c jpl 2003 |
---|
1560 | c |
---|
1561 | c012(l) = 1.4e-12*exp(-2000./t(l)) |
---|
1562 | c |
---|
1563 | ccc c013: oh + oh -> h2o + o |
---|
1564 | c |
---|
1565 | c jpl 2003 |
---|
1566 | c |
---|
1567 | c013(l) = 4.2e-12*exp(-240./t(l)) |
---|
1568 | c |
---|
1569 | ccc c014: oh + o3 -> ho2 + o2 |
---|
1570 | c |
---|
1571 | c jpl 2003 |
---|
1572 | c |
---|
1573 | c014(l) = 1.7e-12*exp(-940./t(l)) |
---|
1574 | c |
---|
1575 | c jpl 2000 |
---|
1576 | c |
---|
1577 | c c014(l) = 1.5e-12*exp(-880./t(l)) |
---|
1578 | c |
---|
1579 | c nair et al., 1994 (jpl 1997) |
---|
1580 | c |
---|
1581 | c c014(l) = 1.6e-12*exp(-940./t(l)) |
---|
1582 | c |
---|
1583 | ccc c015: ho2 + o3 -> oh + o2 + o2 |
---|
1584 | c |
---|
1585 | c jpl 2003 |
---|
1586 | c |
---|
1587 | c015(l) = 1.0e-14*exp(-490./t(l)) |
---|
1588 | c |
---|
1589 | c jpl 2000 |
---|
1590 | c |
---|
1591 | c c015(l) = 2.0e-14*exp(-680./t(l)) |
---|
1592 | c |
---|
1593 | c nair et al., 1994 (jpl 1997) |
---|
1594 | c |
---|
1595 | c c015(l) = 1.1e-14*exp(-500./t(l)) |
---|
1596 | c |
---|
1597 | ccc c016: ho2 + ho2 + co2 -> h2o2 + o2 + co2 |
---|
1598 | c |
---|
1599 | c jpl 2003 |
---|
1600 | c |
---|
1601 | c016(l) = 2.5*1.7e-33 |
---|
1602 | $ *exp(1000./t(l))*dens(l) |
---|
1603 | c |
---|
1604 | ccc c017: oh + oh + co2 -> h2o2 + co2 |
---|
1605 | c |
---|
1606 | c jpl 2003 |
---|
1607 | c |
---|
1608 | ak0 = 2.5*6.9e-31*(t(l)/300.)**(-1.0) |
---|
1609 | ak1 = 2.6e-11*(t(l)/300.)**(0.0) |
---|
1610 | c |
---|
1611 | c jpl 1997 |
---|
1612 | c |
---|
1613 | c ak0 = 2.5*6.2e-31*(t(l)/300.)**(-1.0) |
---|
1614 | c ak1 = 2.6e-11*(t(l)/300.)**(0.0) |
---|
1615 | c |
---|
1616 | c nair et al., 1994 |
---|
1617 | c |
---|
1618 | c ak0 = 2.5*7.1e-31*(t(l)/300.)**(-0.8) |
---|
1619 | c ak1 = 1.5e-11*(t(l)/300.)**(0.0) |
---|
1620 | c |
---|
1621 | rate = (ak0*dens(l))/(1. + ak0*dens(l)/ak1) |
---|
1622 | xpo = 1./(1. + alog10((ak0*dens(l))/ak1)**2) |
---|
1623 | c017(l) = rate*0.6**xpo |
---|
1624 | c |
---|
1625 | ccc c018: h + h + co2 -> h2 + co2 |
---|
1626 | c |
---|
1627 | c baulch et al., 1992 |
---|
1628 | c |
---|
1629 | c018(l) = 2.5*8.85e-33*(t(l)/298.)**(-0.6)*dens(l) |
---|
1630 | c |
---|
1631 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1632 | c nitrogen compounds |
---|
1633 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1634 | c |
---|
1635 | ccc d001: no2 + o -> no + o2 |
---|
1636 | c |
---|
1637 | c jpl 2003 |
---|
1638 | c |
---|
1639 | d001(l) = 5.6e-12*exp(180./t(l)) |
---|
1640 | c |
---|
1641 | ccc d002: no + o3 -> no2 + o2 |
---|
1642 | c |
---|
1643 | c jpl 2003 |
---|
1644 | c |
---|
1645 | d002(l) = 3.0e-12*exp(-1500./t(l)) |
---|
1646 | c |
---|
1647 | ccc d003: no + ho2 -> no2 + oh |
---|
1648 | c |
---|
1649 | c jpl 2003 |
---|
1650 | c |
---|
1651 | d003(l) = 3.5e-12*exp(250./t(l)) |
---|
1652 | c |
---|
1653 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1654 | c carbon compounds |
---|
1655 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1656 | c |
---|
1657 | ccc e001: oh + co -> co2 + h |
---|
1658 | c |
---|
1659 | c jpl 2003 |
---|
1660 | c |
---|
1661 | c e001(l) = 1.5e-13*(1 + 0.6*press(l)/1013.) |
---|
1662 | c |
---|
1663 | c mccabe et al., grl, 28, 3135, 2001 |
---|
1664 | c |
---|
1665 | e001(l) = 1.57e-13 + 3.54e-33*dens(l) |
---|
1666 | c |
---|
1667 | ccc e002: o + co + m -> co2 + m |
---|
1668 | c |
---|
1669 | c tsang and hampson, 1986. |
---|
1670 | c |
---|
1671 | e002(l) = 2.5*6.5e-33*exp(-2184./t(l))*dens(l) |
---|
1672 | c |
---|
1673 | c baulch et al., butterworths, 1976. |
---|
1674 | c |
---|
1675 | c e002(l) = 1.6e-32*exp(-2184./t(l))*dens(l) |
---|
1676 | c |
---|
1677 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1678 | c heterogenous chemistry |
---|
1679 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
1680 | c |
---|
1681 | ccc h001: ho2 + ice surface -> (ho2)ads |
---|
1682 | ccc (ho2)ads + oh -> h2o + o2 |
---|
1683 | ccc total : oh + ho2 -> h2o + o2, first order |
---|
1684 | ccc K = h001*[ho2], |
---|
1685 | ccc h001 = (S*v*gamma1)/4. (s-1), v=100*sqrt(3kT/m_ho2) (cm s-1) |
---|
1686 | c |
---|
1687 | c cooper and abbatt, 1996 |
---|
1688 | c |
---|
1689 | h001(l) = icesurf(l) * 25.*sqrt(3*8.31*t(l)/33.) * 0.025 |
---|
1690 | c h001(l) = 0.0e0 |
---|
1691 | c |
---|
1692 | ccc h002: oh + ice surface -> (oh)ads |
---|
1693 | ccc (oh)ads + ho2 -> h2o + o2 |
---|
1694 | ccc total : oh + ho2 -> h2o + o2, first order |
---|
1695 | ccc K = h002*[oh], |
---|
1696 | ccc h002 = (S*v*gamma2)/4. (s-1), v=100*sqrt(3kT/m_oh) (cm s-1) |
---|
1697 | c |
---|
1698 | c cooper and abbatt, 1996 |
---|
1699 | c |
---|
1700 | h002(l) = icesurf(l) * 25.*sqrt(3*8.31*t(l)/17.) * 0.03 |
---|
1701 | c h002(l) = 0.0e0 |
---|
1702 | c |
---|
1703 | c write(*,*) "level ",l," / icesurf=",icesurf(l), |
---|
1704 | c $ " / 0.25vg1=",(25.*sqrt(3*8.31*t(l)/33.) * 0.025), |
---|
1705 | c $ " / 0.25vg2=",(25.*sqrt(3*8.31*t(l)/17.) * 0.03) |
---|
1706 | c |
---|
1707 | end do |
---|
1708 | c |
---|
1709 | return |
---|
1710 | end |
---|