1 | c********************************************************************** |
---|
2 | |
---|
3 | subroutine jthermcalc(ig,chemthermod,rm,nesptherm,tx,iz,zenit) |
---|
4 | |
---|
5 | |
---|
6 | c feb 2002 fgg first version |
---|
7 | c nov 2002 fgg second version |
---|
8 | c |
---|
9 | c mar 2014 gg update for Venus GCM |
---|
10 | c |
---|
11 | c modified from paramhr.F |
---|
12 | c MAC July 2003 |
---|
13 | c********************************************************************** |
---|
14 | use dimphy |
---|
15 | use conc |
---|
16 | implicit none |
---|
17 | |
---|
18 | c common variables and constants |
---|
19 | #include "dimensions.h" |
---|
20 | #include "param.h" |
---|
21 | #include "param_v4.h" |
---|
22 | |
---|
23 | c input and output variables |
---|
24 | |
---|
25 | integer ig |
---|
26 | integer chemthermod |
---|
27 | integer nesptherm !Number of species considered |
---|
28 | real rm(klev,nesptherm) !Densities (cm-3) |
---|
29 | real tx(klev) !temperature |
---|
30 | real zenit !SZA |
---|
31 | real iz(klev) !Local altitude |
---|
32 | |
---|
33 | |
---|
34 | c local parameters and variables |
---|
35 | |
---|
36 | real co2colx(klev) !column density of CO2 (cm^-2) |
---|
37 | real o3pcolx(klev) !column density of O(3P)(cm^-2) |
---|
38 | real n2colx(klev) !N2 column density (cm-2) |
---|
39 | real ncolx(klev) !N column density (cm-2) |
---|
40 | real cocolx(klev) !CO column density (cm-2) |
---|
41 | c real o2colx(klev) !column density of O2(cm^-2) |
---|
42 | c real h2colx(klev) !H2 column density (cm-2) |
---|
43 | c real h2ocolx(klev) !H2O column density (cm-2) |
---|
44 | c real h2o2colx(klev) !column density of H2O2(cm^-2) |
---|
45 | c real o3colx(klev) !O3 column density (cm-2) |
---|
46 | c real hcolx(klev) !H column density (cm-2) |
---|
47 | c real no2colx(klev) !NO2 column density (cm-2) |
---|
48 | c real nocolx(klev) !NO column density (cm-2) |
---|
49 | real t2(klev) |
---|
50 | real coltemp(klev) |
---|
51 | real sigma(ninter,klev) |
---|
52 | real alfa(ninter,klev) |
---|
53 | |
---|
54 | integer i,j,k,indexint !indexes |
---|
55 | character dn |
---|
56 | |
---|
57 | |
---|
58 | |
---|
59 | c variables used in interpolation |
---|
60 | |
---|
61 | real*8 auxcoltab(nz2) |
---|
62 | real*8 auxjco2(nz2) |
---|
63 | c real*8 auxjo2(nz2) |
---|
64 | real*8 auxjo3p(nz2) |
---|
65 | c real*8 auxjh2o(nz2) |
---|
66 | c real*8 auxjh2(nz2) |
---|
67 | c real*8 auxjh2o2(nz2) |
---|
68 | c real*8 auxjo3(nz2) |
---|
69 | real*8 auxjn2(nz2) |
---|
70 | real*8 auxjn(nz2) |
---|
71 | c real*8 auxjno(nz2) |
---|
72 | real*8 auxjco(nz2) |
---|
73 | c real*8 auxjh(nz2) |
---|
74 | c real*8 auxjno2(nz2) |
---|
75 | real*8 wp(klev),wm(klev) |
---|
76 | real*8 auxcolinp(klev) |
---|
77 | integer auxind(klev) |
---|
78 | integer auxi |
---|
79 | integer ind |
---|
80 | real*8 cortemp(klev) |
---|
81 | |
---|
82 | real*8 limdown !limits for interpolation |
---|
83 | real*8 limup ! "" |
---|
84 | |
---|
85 | |
---|
86 | ! Tracer indexes in the thermospheric chemistry: |
---|
87 | !!! ATTENTION. These values have to be identical to those in euvheat.F90 |
---|
88 | !!! If the values are changed there, the same has to be done here !!! |
---|
89 | |
---|
90 | integer,parameter :: i_co2=1 |
---|
91 | integer,parameter :: i_n2=13 |
---|
92 | integer,parameter :: i_n=14 |
---|
93 | integer,parameter :: i_o=3 |
---|
94 | integer,parameter :: i_co=4 |
---|
95 | |
---|
96 | |
---|
97 | c*************************PROGRAM STARTS******************************* |
---|
98 | |
---|
99 | if(zenit.gt.140.) then |
---|
100 | dn='n' |
---|
101 | else |
---|
102 | dn='d' |
---|
103 | end if |
---|
104 | if(dn.eq.'n') then |
---|
105 | return |
---|
106 | endif |
---|
107 | |
---|
108 | !Initializing the photoabsorption coefficients |
---|
109 | jfotsout(:,:,:)=0. |
---|
110 | |
---|
111 | !Auxiliar temperature to take into account the temperature dependence |
---|
112 | !of CO2 cross section |
---|
113 | do i=1,klev |
---|
114 | t2(i)=tx(i) |
---|
115 | if(t2(i).lt.195.0) t2(i)=195.0 |
---|
116 | if(t2(i).gt.295.0) t2(i)=295.0 |
---|
117 | end do |
---|
118 | |
---|
119 | !Calculation of column amounts |
---|
120 | c call column(ig,chemthermod,rm,nesptherm,tx,iz,zenit, |
---|
121 | c $ co2colx,o2colx,o3pcolx,h2colx,h2ocolx, |
---|
122 | c $ h2o2colx,o3colx,n2colx,ncolx,nocolx,cocolx,hcolx,no2colx) |
---|
123 | call column(ig,chemthermod,rm,nesptherm,tx,iz,zenit, |
---|
124 | $ co2colx,o3pcolx, n2colx,ncolx,cocolx) |
---|
125 | |
---|
126 | !Auxiliar column to include the temperature dependence |
---|
127 | !of CO2 cross section |
---|
128 | coltemp(klev)=co2colx(klev)*abs(t2(klev)-t0(klev)) |
---|
129 | do i=klev-1,1,-1 |
---|
130 | coltemp(i)=!coltemp(i+1)+ PQ SE ELIMINA? REVISAR |
---|
131 | $ ( rm(i,i_co2) + rm(i+1,i_co2) ) * 0.5 |
---|
132 | $ * 1e5 * (iz(i+1)-iz(i)) * abs(t2(i)-t0(i)) |
---|
133 | end do |
---|
134 | |
---|
135 | !Calculation of CO2 cross section at temperature t0(i) |
---|
136 | do i=1,klev |
---|
137 | do indexint=24,32 |
---|
138 | sigma(indexint,i)=co2crsc195(indexint-23) |
---|
139 | alfa(indexint,i)=((co2crsc295(indexint-23) |
---|
140 | $ /sigma(indexint,i))-1.)/(295.-t0(i)) |
---|
141 | end do |
---|
142 | end do |
---|
143 | |
---|
144 | ! Interpolation to the tabulated photoabsorption coefficients for each species |
---|
145 | ! in each spectral interval |
---|
146 | |
---|
147 | |
---|
148 | c auxcolinp-> Actual atmospheric column |
---|
149 | c auxj*-> Tabulated photoabsorption coefficients |
---|
150 | c auxcoltab-> Tabulated atmospheric columns |
---|
151 | |
---|
152 | ccccccccccccccccccccccccccccccc |
---|
153 | c 0.1,5.0 (int 1) |
---|
154 | c |
---|
155 | c Absorption by: |
---|
156 | c CO2, O2, O, H2, N |
---|
157 | ccccccccccccccccccccccccccccccc |
---|
158 | |
---|
159 | c Input atmospheric column |
---|
160 | indexint=1 |
---|
161 | do i=1,klev |
---|
162 | auxcolinp(klev-i+1) = co2colx(i)*crscabsi2(1,indexint) + |
---|
163 | c $ o2colx(i)*crscabsi2(2,indexint) + |
---|
164 | $ o3pcolx(i)*crscabsi2(3,indexint) + |
---|
165 | c $ h2colx(i)*crscabsi2(5,indexint) + |
---|
166 | $ ncolx(i)*crscabsi2(9,indexint) |
---|
167 | end do |
---|
168 | limdown=1.e-20 |
---|
169 | limup=1.e26 |
---|
170 | |
---|
171 | |
---|
172 | c Interpolations |
---|
173 | |
---|
174 | do i=1,nz2 |
---|
175 | auxi = nz2-i+1 |
---|
176 | !CO2 tabulated coefficient |
---|
177 | auxjco2(i) = jabsifotsintpar(auxi,1,indexint) |
---|
178 | !O2 tabulated coefficient |
---|
179 | c auxjo2(i) = jabsifotsintpar(auxi,2,indexint) |
---|
180 | !O3p tabulated coefficient |
---|
181 | auxjo3p(i) = jabsifotsintpar(auxi,3,indexint) |
---|
182 | !H2 tabulated coefficient |
---|
183 | c auxjh2(i) = jabsifotsintpar(auxi,5,indexint) |
---|
184 | !N tabulated coefficient |
---|
185 | auxjn(i) = jabsifotsintpar(auxi,9,indexint) |
---|
186 | !Tabulated column |
---|
187 | auxcoltab(i) = c1_16(auxi,indexint) |
---|
188 | enddo |
---|
189 | |
---|
190 | !Only if chemthermod.ge.2 |
---|
191 | !N tabulated coefficient |
---|
192 | c if(chemthermod.ge.2) then |
---|
193 | c do i=1,nz2 |
---|
194 | c auxjn(i) = jabsifotsintpar(nz2-i+1,9,indexint) |
---|
195 | c enddo |
---|
196 | c endif |
---|
197 | |
---|
198 | call interfast |
---|
199 | $ (wm,wp,auxind,auxcolinp,klev,auxcoltab,nz2,limdown,limup) |
---|
200 | do i=1,klev |
---|
201 | ind=auxind(i) |
---|
202 | auxi=klev-i+1 |
---|
203 | !CO2 interpolated coefficient |
---|
204 | jfotsout(indexint,1,auxi) = wm(i)*auxjco2(ind+1) + |
---|
205 | $ wp(i)*auxjco2(ind) |
---|
206 | !O2 interpolated coefficient |
---|
207 | c jfotsout(indexint,2,auxi) = wm(i)*auxjo2(ind+1) + |
---|
208 | c $ wp(i)*auxjo2(ind) |
---|
209 | !O3p interpolated coefficient |
---|
210 | jfotsout(indexint,3,auxi) = wm(i)*auxjo3p(ind+1) + |
---|
211 | $ wp(i)*auxjo3p(ind) |
---|
212 | !H2 interpolated coefficient |
---|
213 | c jfotsout(indexint,5,auxi) = wm(i)*auxjh2(ind+1) + |
---|
214 | c $ wp(i)*auxjh2(ind) |
---|
215 | c !N interpolated coefficient |
---|
216 | jfotsout(indexint,9,auxi) = wm(i)*auxjn(ind+1) + |
---|
217 | $ wp(i)*auxjn(ind) |
---|
218 | |
---|
219 | c print*, '--- 1 jthermcal.F ---' |
---|
220 | c print*, jfotsout(indexint,1,auxi) |
---|
221 | c STOP |
---|
222 | |
---|
223 | |
---|
224 | enddo |
---|
225 | |
---|
226 | !Only if chemthermod.ge.2 |
---|
227 | !N interpolated coefficient |
---|
228 | c if(chemthermod.ge.2) then |
---|
229 | c do i=1,klev |
---|
230 | c ind=auxind(i) |
---|
231 | c jfotsout(indexint,9,klev-i+1) = wm(i)*auxjn(ind+1) + |
---|
232 | c $ wp(i)*auxjn(ind) |
---|
233 | c enddo |
---|
234 | c endif |
---|
235 | |
---|
236 | |
---|
237 | c End interval 1 |
---|
238 | |
---|
239 | |
---|
240 | ccccccccccccccccccccccccccccccc |
---|
241 | c 5-80.5nm (int 2-15) |
---|
242 | c |
---|
243 | c Absorption by: |
---|
244 | c CO2, O2, O, H2, N2, N, |
---|
245 | c NO, CO, H, NO2 |
---|
246 | ccccccccccccccccccccccccccccccc |
---|
247 | |
---|
248 | c Input atmospheric column |
---|
249 | do indexint=2,15 |
---|
250 | do i=1,klev |
---|
251 | auxcolinp(klev-i+1) = co2colx(i)*crscabsi2(1,indexint)+ |
---|
252 | $ o3pcolx(i)*crscabsi2(3,indexint)+ |
---|
253 | $ n2colx(i)*crscabsi2(8,indexint)+ |
---|
254 | $ ncolx(i)*crscabsi2(9,indexint)+ |
---|
255 | $ cocolx(i)*crscabsi2(11,indexint) |
---|
256 | |
---|
257 | c $ o2colx(i)*crscabsi2(2,indexint)+ |
---|
258 | c $ h2colx(i)*crscabsi2(5,indexint)+ |
---|
259 | c $ nocolx(i)*crscabsi2(10,indexint)+ |
---|
260 | c $ hcolx(i)*crscabsi2(12,indexint)+ |
---|
261 | c $ no2colx(i)*crscabsi2(13,indexint) |
---|
262 | end do |
---|
263 | |
---|
264 | c Interpolations |
---|
265 | |
---|
266 | do i=1,nz2 |
---|
267 | auxi = nz2-i+1 |
---|
268 | !O2 tabulated coefficient |
---|
269 | c auxjo2(i) = jabsifotsintpar(auxi,2,indexint) |
---|
270 | !O3p tabulated coefficient |
---|
271 | auxjo3p(i) = jabsifotsintpar(auxi,3,indexint) |
---|
272 | !CO2 tabulated coefficient |
---|
273 | auxjco2(i) = jabsifotsintpar(auxi,1,indexint) |
---|
274 | !H2 tabulated coefficient |
---|
275 | c auxjh2(i) = jabsifotsintpar(auxi,5,indexint) |
---|
276 | !N2 tabulated coefficient |
---|
277 | auxjn2(i) = jabsifotsintpar(auxi,8,indexint) |
---|
278 | !N tabulated coefficient |
---|
279 | auxjn(i) = jabsifotsintpar(auxi,9,indexint) |
---|
280 | !CO tabulated coefficient |
---|
281 | auxjco(i) = jabsifotsintpar(auxi,11,indexint) |
---|
282 | !H tabulated coefficient |
---|
283 | c auxjh(i) = jabsifotsintpar(auxi,12,indexint) |
---|
284 | !tabulated column |
---|
285 | auxcoltab(i) = c1_16(auxi,indexint) |
---|
286 | enddo |
---|
287 | c !Only if chemthermod.ge.2 |
---|
288 | c if(chemthermod.ge.2) then |
---|
289 | c do i=1,nz2 |
---|
290 | c auxi = nz2-i+1 |
---|
291 | c !N tabulated coefficient |
---|
292 | c auxjn(i) = jabsifotsintpar(auxi,9,indexint) |
---|
293 | c !NO tabulated coefficient |
---|
294 | c auxjno(i) = jabsifotsintpar(auxi,10,indexint) |
---|
295 | c !NO2 tabulated coefficient |
---|
296 | c auxjno2(i) = jabsifotsintpar(auxi,13,indexint) |
---|
297 | c enddo |
---|
298 | c endif |
---|
299 | |
---|
300 | call interfast(wm,wp,auxind,auxcolinp,klev, |
---|
301 | $ auxcoltab,nz2,limdown,limup) |
---|
302 | do i=1,klev |
---|
303 | ind=auxind(i) |
---|
304 | auxi = klev-i+1 |
---|
305 | !O2 interpolated coefficient |
---|
306 | c jfotsout(indexint,2,auxi) = wm(i)*auxjo2(ind+1) + |
---|
307 | c $ wp(i)*auxjo2(ind) |
---|
308 | !O3p interpolated coefficient |
---|
309 | jfotsout(indexint,3,auxi) = wm(i)*auxjo3p(ind+1) + |
---|
310 | $ wp(i)*auxjo3p(ind) |
---|
311 | !CO2 interpolated coefficient |
---|
312 | jfotsout(indexint,1,auxi) = wm(i)*auxjco2(ind+1) + |
---|
313 | $ wp(i)*auxjco2(ind) |
---|
314 | !H2 interpolated coefficient |
---|
315 | c jfotsout(indexint,5,auxi) = wm(i)*auxjh2(ind+1) + |
---|
316 | c $ wp(i)*auxjh2(ind) |
---|
317 | !N2 interpolated coefficient |
---|
318 | jfotsout(indexint,8,auxi) = wm(i)*auxjn2(ind+1) + |
---|
319 | $ wp(i)*auxjn2(ind) |
---|
320 | !N interpolated coefficient |
---|
321 | jfotsout(indexint,9,auxi) = wm(i)*auxjn(ind+1) + |
---|
322 | $ wp(i)*auxjn(ind) |
---|
323 | !CO interpolated coefficient |
---|
324 | jfotsout(indexint,11,auxi) = wm(i)*auxjco(ind+1) + |
---|
325 | $ wp(i)*auxjco(ind) |
---|
326 | !H interpolated coefficient |
---|
327 | c jfotsout(indexint,12,auxi) = wm(i)*auxjh(ind+1) + |
---|
328 | c $ wp(i)*auxjh(ind) |
---|
329 | enddo |
---|
330 | !Only if chemthermod.ge.2 |
---|
331 | c if(chemthermod.ge.2) then |
---|
332 | c do i=1,klev |
---|
333 | c ind=auxind(i) |
---|
334 | c auxi = klev-i+1 |
---|
335 | c !N interpolated coefficient |
---|
336 | c jfotsout(indexint,9,auxi) = wm(i)*auxjn(ind+1) + |
---|
337 | c $ wp(i)*auxjn(ind) |
---|
338 | c !NO interpolated coefficient |
---|
339 | c jfotsout(indexint,10,auxi)=wm(i)*auxjno(ind+1) + |
---|
340 | c $ wp(i)*auxjno(ind) |
---|
341 | c !NO2 interpolated coefficient |
---|
342 | c jfotsout(indexint,13,auxi)=wm(i)*auxjno2(ind+1)+ |
---|
343 | c $ wp(i)*auxjno2(ind) |
---|
344 | c enddo |
---|
345 | c endif |
---|
346 | end do |
---|
347 | |
---|
348 | c End intervals 2-15 |
---|
349 | |
---|
350 | |
---|
351 | ccccccccccccccccccccccccccccccc |
---|
352 | c 80.6-90.8nm (int16) |
---|
353 | c |
---|
354 | c Absorption by: |
---|
355 | c CO2, O2, O, N2, N, NO, |
---|
356 | c CO, H, NO2 |
---|
357 | ccccccccccccccccccccccccccccccc |
---|
358 | |
---|
359 | c Input atmospheric column |
---|
360 | indexint=16 |
---|
361 | do i=1,klev |
---|
362 | auxcolinp(klev-i+1) = co2colx(i)*crscabsi2(1,indexint)+ |
---|
363 | c $ o2colx(i)*crscabsi2(2,indexint)+ |
---|
364 | $ o3pcolx(i)*crscabsi2(3,indexint)+ |
---|
365 | $ n2colx(i)*crscabsi2(8,indexint)+ |
---|
366 | $ ncolx(i)*crscabsi2(9,indexint)+ |
---|
367 | c $ nocolx(i)*crscabsi2(10,indexint)+ |
---|
368 | $ cocolx(i)*crscabsi2(11,indexint) |
---|
369 | c $ hcolx(i)*crscabsi2(12,indexint)+ |
---|
370 | c $ no2colx(i)*crscabsi2(13,indexint) |
---|
371 | end do |
---|
372 | |
---|
373 | c Interpolations |
---|
374 | |
---|
375 | do i=1,nz2 |
---|
376 | auxi = nz2-i+1 |
---|
377 | !O2 tabulated coefficient |
---|
378 | c auxjo2(i) = jabsifotsintpar(auxi,2,indexint) |
---|
379 | !CO2 tabulated coefficient |
---|
380 | auxjco2(i) = jabsifotsintpar(auxi,1,indexint) |
---|
381 | !O3p tabulated coefficient |
---|
382 | auxjo3p(i) = jabsifotsintpar(auxi,3,indexint) |
---|
383 | !N2 tabulated coefficient |
---|
384 | auxjn2(i) = jabsifotsintpar(auxi,8,indexint) |
---|
385 | !CO tabulated coefficient |
---|
386 | auxjco(i) = jabsifotsintpar(auxi,11,indexint) |
---|
387 | c !N tabulated coefficient |
---|
388 | auxjn(i) = jabsifotsintpar(auxi,9,indexint) |
---|
389 | |
---|
390 | !NO tabulated coefficient |
---|
391 | c auxjno(i) = jabsifotsintpar(auxi,10,indexint) |
---|
392 | !H tabulated coefficient |
---|
393 | c auxjh(i) = jabsifotsintpar(auxi,12,indexint) |
---|
394 | !NO2 tabulated coefficient |
---|
395 | c auxjno2(i) = jabsifotsintpar(auxi,13,indexint) |
---|
396 | |
---|
397 | !Tabulated column |
---|
398 | auxcoltab(i) = c1_16(auxi,indexint) |
---|
399 | enddo |
---|
400 | !Only if chemthermod.ge.2 |
---|
401 | c if(chemthermod.ge.2) then |
---|
402 | c do i=1,nz2 |
---|
403 | c auxi = nz2-i+1 |
---|
404 | c !N tabulated coefficient |
---|
405 | c auxjn(i) = jabsifotsintpar(auxi,9,indexint) |
---|
406 | c !NO tabulated coefficient |
---|
407 | c auxjno(i) = jabsifotsintpar(auxi,10,indexint) |
---|
408 | c !NO2 tabulated coefficient |
---|
409 | c auxjno2(i) = jabsifotsintpar(auxi,13,indexint) |
---|
410 | c enddo |
---|
411 | c endif |
---|
412 | |
---|
413 | call interfast |
---|
414 | $ (wm,wp,auxind,auxcolinp,klev,auxcoltab,nz2,limdown,limup) |
---|
415 | do i=1,klev |
---|
416 | ind=auxind(i) |
---|
417 | auxi = klev-i+1 |
---|
418 | !O2 interpolated coefficient |
---|
419 | c jfotsout(indexint,2,auxi) = wm(i)*auxjo2(ind+1) + |
---|
420 | c $ wp(i)*auxjo2(ind) |
---|
421 | !CO2 interpolated coefficient |
---|
422 | jfotsout(indexint,1,auxi) = wm(i)*auxjco2(ind+1) + |
---|
423 | $ wp(i)*auxjco2(ind) |
---|
424 | !O3p interpolated coefficient |
---|
425 | jfotsout(indexint,3,auxi) = wm(i)*auxjo3p(ind+1) + |
---|
426 | $ wp(i)*auxjo3p(ind) |
---|
427 | !N2 interpolated coefficient |
---|
428 | jfotsout(indexint,8,auxi) = wm(i)*auxjn2(ind+1) + |
---|
429 | $ wp(i)*auxjn2(ind) |
---|
430 | !CO interpolated coefficient |
---|
431 | jfotsout(indexint,11,auxi) = wm(i)*auxjco(ind+1) + |
---|
432 | $ wp(i)*auxjco(ind) |
---|
433 | !N interpolated coefficient |
---|
434 | jfotsout(indexint,9,auxi) = wm(i)*auxjn(ind+1) + |
---|
435 | $ wp(i)*auxjn(ind) |
---|
436 | |
---|
437 | c !H interpolated coefficient |
---|
438 | c jfotsout(indexint,12,auxi) = wm(i)*auxjh(ind+1) + |
---|
439 | c $ wp(i)*auxjh(ind) |
---|
440 | enddo |
---|
441 | !Only if chemthermod.ge.2 |
---|
442 | c if(chemthermod.ge.2) then |
---|
443 | c do i=1,klev |
---|
444 | c ind=auxind(i) |
---|
445 | c auxi = klev-i+1 |
---|
446 | c !N interpolated coefficient |
---|
447 | c jfotsout(indexint,9,auxi) = wm(i)*auxjn(ind+1) + |
---|
448 | c $ wp(i)*auxjn(ind) |
---|
449 | c !NO interpolated coefficient |
---|
450 | c jfotsout(indexint,10,auxi) = wm(i)*auxjno(ind+1) + |
---|
451 | c $ wp(i)*auxjno(ind) |
---|
452 | c !NO2 interpolated coefficient |
---|
453 | c jfotsout(indexint,13,auxi) = wm(i)*auxjno2(ind+1) + |
---|
454 | c $ wp(i)*auxjno2(ind) |
---|
455 | c enddo |
---|
456 | c endif |
---|
457 | c End interval 16 |
---|
458 | |
---|
459 | |
---|
460 | ccccccccccccccccccccccccccccccc |
---|
461 | c 90.9-119.5nm (int 17-24) |
---|
462 | c |
---|
463 | c Absorption by: |
---|
464 | c CO2, O2, N2, NO, CO, NO2 |
---|
465 | ccccccccccccccccccccccccccccccc |
---|
466 | |
---|
467 | c Input column |
---|
468 | |
---|
469 | do i=1,klev |
---|
470 | auxcolinp(klev-i+1) = co2colx(i) + n2colx(i) + |
---|
471 | $ + cocolx(i) |
---|
472 | end do |
---|
473 | |
---|
474 | do indexint=17,24 |
---|
475 | |
---|
476 | c Interpolations |
---|
477 | |
---|
478 | do i=1,nz2 |
---|
479 | auxi = nz2-i+1 |
---|
480 | !CO2 tabulated coefficient |
---|
481 | auxjco2(i) = jabsifotsintpar(auxi,1,indexint) |
---|
482 | !O2 tabulated coefficient |
---|
483 | c auxjo2(i) = jabsifotsintpar(auxi,2,indexint) |
---|
484 | !N2 tabulated coefficient |
---|
485 | auxjn2(i) = jabsifotsintpar(auxi,8,indexint) |
---|
486 | !CO tabulated coefficient |
---|
487 | auxjco(i) = jabsifotsintpar(auxi,11,indexint) |
---|
488 | !Tabulated column |
---|
489 | auxcoltab(i) = c17_24(auxi) |
---|
490 | enddo |
---|
491 | !Only if chemthermod.ge.2 |
---|
492 | c if(chemthermod.ge.2) then |
---|
493 | c do i=1,nz2 |
---|
494 | c auxi = nz2-i+1 |
---|
495 | c !NO tabulated coefficient |
---|
496 | c auxjno(i) = jabsifotsintpar(auxi,10,indexint) |
---|
497 | c !NO2 tabulated coefficient |
---|
498 | c auxjno2(i) = jabsifotsintpar(auxi,13,indexint) |
---|
499 | c enddo |
---|
500 | c endif |
---|
501 | |
---|
502 | call interfast |
---|
503 | $ (wm,wp,auxind,auxcolinp,klev,auxcoltab,nz2,limdown,limup) |
---|
504 | !Correction to include T variation of CO2 cross section |
---|
505 | if(indexint.eq.24) then |
---|
506 | do i=1,klev |
---|
507 | auxi = klev-i+1 |
---|
508 | if(sigma(indexint,auxi)* |
---|
509 | $ alfa(indexint,auxi)*coltemp(auxi) |
---|
510 | $ .lt.60.) then |
---|
511 | cortemp(i)=exp(-sigma(indexint,auxi)* |
---|
512 | $ alfa(indexint,auxi)*coltemp(auxi)) |
---|
513 | else |
---|
514 | cortemp(i)=0. |
---|
515 | end if |
---|
516 | enddo |
---|
517 | else |
---|
518 | do i=1,klev |
---|
519 | cortemp(i)=1. |
---|
520 | enddo |
---|
521 | end if |
---|
522 | do i=1,klev |
---|
523 | ind=auxind(i) |
---|
524 | auxi = klev-i+1 |
---|
525 | !O2 interpolated coefficient |
---|
526 | c jfotsout(indexint,2,auxi) = (wm(i)*auxjo2(ind+1) + |
---|
527 | c $ wp(i)*auxjo2(ind)) * cortemp(i) |
---|
528 | !CO2 interpolated coefficient |
---|
529 | jfotsout(indexint,1,auxi) = (wm(i)*auxjco2(ind+1) + |
---|
530 | $ wp(i)*auxjco2(ind)) * cortemp(i) |
---|
531 | if(indexint.eq.24) jfotsout(indexint,1,auxi)= |
---|
532 | $ jfotsout(indexint,1,auxi)* |
---|
533 | $ (1+alfa(indexint,auxi)* |
---|
534 | $ (t2(auxi)-t0(auxi))) |
---|
535 | !N2 interpolated coefficient |
---|
536 | jfotsout(indexint,8,auxi) = (wm(i)*auxjn2(ind+1) + |
---|
537 | $ wp(i)*auxjn2(ind)) * cortemp(i) |
---|
538 | !CO interpolated coefficient |
---|
539 | jfotsout(indexint,11,auxi) = (wm(i)*auxjco(ind+1) + |
---|
540 | $ wp(i)*auxjco(ind)) * cortemp(i) |
---|
541 | enddo |
---|
542 | !Only if chemthermod.ge.2 |
---|
543 | c if(chemthermod.ge.2) then |
---|
544 | c do i=1,klev |
---|
545 | c ind=auxind(i) |
---|
546 | c auxi = klev-i+1 |
---|
547 | c !NO interpolated coefficient |
---|
548 | c jfotsout(indexint,10,auxi)=(wm(i)*auxjno(ind+1) + |
---|
549 | c $ wp(i)*auxjno(ind)) * cortemp(i) |
---|
550 | c !NO2 interpolated coefficient |
---|
551 | c jfotsout(indexint,13,auxi)=(wm(i)*auxjno2(ind+1)+ |
---|
552 | c $ wp(i)*auxjno2(ind)) * cortemp(i) |
---|
553 | c enddo |
---|
554 | c endif |
---|
555 | end do |
---|
556 | c End intervals 17-24 |
---|
557 | |
---|
558 | |
---|
559 | ccccccccccccccccccccccccccccccc |
---|
560 | c 119.6-167.0nm (int 25-29) |
---|
561 | c |
---|
562 | c Absorption by: |
---|
563 | c CO2, O2, H2O, H2O2, NO, |
---|
564 | c CO, NO2 |
---|
565 | ccccccccccccccccccccccccccccccc |
---|
566 | |
---|
567 | c Input atmospheric column |
---|
568 | |
---|
569 | do i=1,klev |
---|
570 | c auxcolinp(klev-i+1) = co2colx(i) + o2colx(i) + h2ocolx(i) + |
---|
571 | c $ h2o2colx(i) + nocolx(i) + cocolx(i) + no2colx(i) |
---|
572 | auxcolinp(klev-i+1) = co2colx(i) + cocolx(i) |
---|
573 | |
---|
574 | end do |
---|
575 | |
---|
576 | do indexint=25,29 |
---|
577 | |
---|
578 | c Interpolations |
---|
579 | |
---|
580 | do i=1,nz2 |
---|
581 | auxi = nz2-i+1 |
---|
582 | !CO2 tabulated coefficient |
---|
583 | auxjco2(i) = jabsifotsintpar(auxi,1,indexint) |
---|
584 | !O2 tabulated coefficient |
---|
585 | c auxjo2(i) = jabsifotsintpar(auxi,2,indexint) |
---|
586 | !H2O tabulated coefficient |
---|
587 | c auxjh2o(i) = jabsifotsintpar(auxi,4,indexint) |
---|
588 | !H2O2 tabulated coefficient |
---|
589 | c auxjh2o2(i) = jabsifotsintpar(auxi,6,indexint) |
---|
590 | !CO tabulated coefficient |
---|
591 | auxjco(i) = jabsifotsintpar(auxi,11,indexint) |
---|
592 | !Tabulated column |
---|
593 | auxcoltab(i) = c25_29(auxi) |
---|
594 | enddo |
---|
595 | !Only if chemthermod.ge.2 |
---|
596 | c if(chemthermod.ge.2) then |
---|
597 | c do i=1,nz2 |
---|
598 | c auxi = nz2-i+1 |
---|
599 | c !NO tabulated coefficient |
---|
600 | c auxjno(i) = jabsifotsintpar(auxi,10,indexint) |
---|
601 | c !NO2 tabulated coefficient |
---|
602 | c auxjno2(i) = jabsifotsintpar(auxi,13,indexint) |
---|
603 | c enddo |
---|
604 | c endif |
---|
605 | call interfast |
---|
606 | $ (wm,wp,auxind,auxcolinp,klev,auxcoltab,nz2,limdown,limup) |
---|
607 | do i=1,klev |
---|
608 | ind=auxind(i) |
---|
609 | auxi = klev-i+1 |
---|
610 | !Correction to include T variation of CO2 cross section |
---|
611 | if(sigma(indexint,auxi)*alfa(indexint,auxi)* |
---|
612 | $ coltemp(auxi).lt.60.) then |
---|
613 | cortemp(i)=exp(-sigma(indexint,auxi)* |
---|
614 | $ alfa(indexint,auxi)*coltemp(auxi)) |
---|
615 | else |
---|
616 | cortemp(i)=0. |
---|
617 | end if |
---|
618 | !CO2 interpolated coefficient |
---|
619 | jfotsout(indexint,1,auxi) = (wm(i)*auxjco2(ind+1) + |
---|
620 | $ wp(i)*auxjco2(ind)) * cortemp(i) * |
---|
621 | $ (1+alfa(indexint,auxi)* |
---|
622 | $ (t2(auxi)-t0(auxi))) |
---|
623 | !O2 interpolated coefficient |
---|
624 | c jfotsout(indexint,2,auxi) = (wm(i)*auxjo2(ind+1) + |
---|
625 | c $ wp(i)*auxjo2(ind)) * cortemp(i) |
---|
626 | !H2O interpolated coefficient |
---|
627 | c jfotsout(indexint,4,auxi) = (wm(i)*auxjh2o(ind+1) + |
---|
628 | c $ wp(i)*auxjh2o(ind)) * cortemp(i) |
---|
629 | !H2O2 interpolated coefficient |
---|
630 | c jfotsout(indexint,6,auxi) = (wm(i)*auxjh2o2(ind+1) + |
---|
631 | c $ wp(i)*auxjh2o2(ind)) * cortemp(i) |
---|
632 | !CO interpolated coefficient |
---|
633 | jfotsout(indexint,11,auxi) = (wm(i)*auxjco(ind+1) + |
---|
634 | $ wp(i)*auxjco(ind)) * cortemp(i) |
---|
635 | enddo |
---|
636 | !Only if chemthermod.ge.2 |
---|
637 | c if(chemthermod.ge.2) then |
---|
638 | c do i=1,klev |
---|
639 | c ind=auxind(i) |
---|
640 | c auxi = klev-i+1 |
---|
641 | c !NO interpolated coefficient |
---|
642 | c jfotsout(indexint,10,auxi)=(wm(i)*auxjno(ind+1) + |
---|
643 | c $ wp(i)*auxjno(ind)) * cortemp(i) |
---|
644 | c !NO2 interpolated coefficient |
---|
645 | c jfotsout(indexint,13,auxi)=(wm(i)*auxjno2(ind+1)+ |
---|
646 | c $ wp(i)*auxjno2(ind)) * cortemp(i) |
---|
647 | c enddo |
---|
648 | c endif |
---|
649 | |
---|
650 | end do |
---|
651 | |
---|
652 | c End intervals 25-29 |
---|
653 | |
---|
654 | |
---|
655 | cccccccccccccccccccccccccccccccc |
---|
656 | c 167.1-202.5nm (int 30-31) |
---|
657 | c |
---|
658 | c Absorption by: |
---|
659 | c CO2, O2, H2O, H2O2, NO, |
---|
660 | c NO2 |
---|
661 | cccccccccccccccccccccccccccccccc |
---|
662 | |
---|
663 | c Input atmospheric column |
---|
664 | |
---|
665 | do i=1,klev |
---|
666 | auxcolinp(klev-i+1) = co2colx(i) |
---|
667 | end do |
---|
668 | |
---|
669 | c Interpolation |
---|
670 | |
---|
671 | do indexint=30,31 |
---|
672 | |
---|
673 | do i=1,nz2 |
---|
674 | auxi = nz2-i+1 |
---|
675 | !CO2 tabulated coefficient |
---|
676 | auxjco2(i) = jabsifotsintpar(auxi,1,indexint) |
---|
677 | !O2 tabulated coefficient |
---|
678 | c auxjo2(i) = jabsifotsintpar(auxi,2,indexint) |
---|
679 | !H2O tabulated coefficient |
---|
680 | c auxjh2o(i) = jabsifotsintpar(auxi,4,indexint) |
---|
681 | !H2O2 tabulated coefficient |
---|
682 | c auxjh2o2(i) = jabsifotsintpar(auxi,6,indexint) |
---|
683 | !Tabulated column |
---|
684 | c auxcoltab(i) = c30_31(auxi) |
---|
685 | enddo |
---|
686 | !Only if chemthermod.ge.2 |
---|
687 | c if(chemthermod.ge.2) then |
---|
688 | c do i=1,nz2 |
---|
689 | c auxi = nz2-i+1 |
---|
690 | c !NO tabulated coefficient |
---|
691 | c auxjno(i) = jabsifotsintpar(auxi,10,indexint) |
---|
692 | c !NO2 tabulated coefficient |
---|
693 | c auxjno2(i) = jabsifotsintpar(auxi,13,indexint) |
---|
694 | c enddo |
---|
695 | c endif |
---|
696 | |
---|
697 | call interfast |
---|
698 | $ (wm,wp,auxind,auxcolinp,klev,auxcoltab,nz2,limdown,limup) |
---|
699 | do i=1,klev |
---|
700 | ind=auxind(i) |
---|
701 | auxi = klev-i+1 |
---|
702 | !Correction to include T variation of CO2 cross section |
---|
703 | if(sigma(indexint,auxi)*alfa(indexint,auxi)* |
---|
704 | $ coltemp(auxi).lt.60.) then |
---|
705 | cortemp(i)=exp(-sigma(indexint,auxi)* |
---|
706 | $ alfa(indexint,auxi)*coltemp(auxi)) |
---|
707 | else |
---|
708 | cortemp(i)=0. |
---|
709 | end if |
---|
710 | !CO2 interpolated coefficient |
---|
711 | jfotsout(indexint,1,auxi) = (wm(i)*auxjco2(ind+1) + |
---|
712 | $ wp(i)*auxjco2(ind)) * cortemp(i) * |
---|
713 | $ (1+alfa(indexint,auxi)* |
---|
714 | $ (t2(auxi)-t0(auxi))) |
---|
715 | !O2 interpolated coefficient |
---|
716 | c jfotsout(indexint,2,auxi) = (wm(i)*auxjo2(ind+1) + |
---|
717 | c $ wp(i)*auxjo2(ind)) * cortemp(i) |
---|
718 | !H2O interpolated coefficient |
---|
719 | c jfotsout(indexint,4,auxi) = (wm(i)*auxjh2o(ind+1) + |
---|
720 | c $ wp(i)*auxjh2o(ind)) * cortemp(i) |
---|
721 | !H2O2 interpolated coefficient |
---|
722 | c jfotsout(indexint,6,auxi) = (wm(i)*auxjh2o2(ind+1) + |
---|
723 | c $ wp(i)*auxjh2o2(ind)) * cortemp(i) |
---|
724 | enddo |
---|
725 | c !Only if chemthermod.ge.2 |
---|
726 | c if(chemthermod.ge.2) then |
---|
727 | c do i=1,klev |
---|
728 | c ind=auxind(i) |
---|
729 | c auxi = klev-i+1 |
---|
730 | c !NO interpolated coefficient |
---|
731 | c jfotsout(indexint,10,auxi)=(wm(i)*auxjno(ind+1) + |
---|
732 | c $ wp(i)*auxjno(ind)) * cortemp(i) |
---|
733 | c !NO2 interpolated coefficient |
---|
734 | c jfotsout(indexint,13,auxi)=(wm(i)*auxjno2(ind+1)+ |
---|
735 | c $ wp(i)*auxjno2(ind)) * cortemp(i) |
---|
736 | c enddo |
---|
737 | c endif |
---|
738 | |
---|
739 | end do |
---|
740 | |
---|
741 | c End intervals 30-31 |
---|
742 | |
---|
743 | |
---|
744 | ccccccccccccccccccccccccccccccc |
---|
745 | c 202.6-210.0nm (int 32) |
---|
746 | c |
---|
747 | c Absorption by: |
---|
748 | c CO2, O2, H2O2, NO, NO2 |
---|
749 | ccccccccccccccccccccccccccccccc |
---|
750 | |
---|
751 | c Input atmospheric column |
---|
752 | |
---|
753 | indexint=32 |
---|
754 | do i=1,klev |
---|
755 | auxcolinp(klev-i+1) =co2colx(i) |
---|
756 | end do |
---|
757 | |
---|
758 | c Interpolation |
---|
759 | |
---|
760 | do i=1,nz2 |
---|
761 | auxi = nz2-i+1 |
---|
762 | !CO2 tabulated coefficient |
---|
763 | auxjco2(i) = jabsifotsintpar(auxi,1,indexint) |
---|
764 | !O2 tabulated coefficient |
---|
765 | c auxjo2(i) = jabsifotsintpar(auxi,2,indexint) |
---|
766 | !H2O2 tabulated coefficient |
---|
767 | c auxjh2o2(i) = jabsifotsintpar(auxi,6,indexint) |
---|
768 | !Tabulated column |
---|
769 | auxcoltab(i) = c32(auxi) |
---|
770 | enddo |
---|
771 | !Only if chemthermod.ge.2 |
---|
772 | c if(chemthermod.ge.2) then |
---|
773 | c do i=1,nz2 |
---|
774 | c auxi = nz2-i+1 |
---|
775 | c !NO tabulated coefficient |
---|
776 | c auxjno(i) = jabsifotsintpar(auxi,10,indexint) |
---|
777 | c !NO2 tabulated coefficient |
---|
778 | c auxjno2(i) = jabsifotsintpar(auxi,13,indexint) |
---|
779 | c enddo |
---|
780 | c endif |
---|
781 | call interfast |
---|
782 | $ (wm,wp,auxind,auxcolinp,klev,auxcoltab,nz2,limdown,limup) |
---|
783 | do i=1,klev |
---|
784 | ind=auxind(i) |
---|
785 | auxi = klev-i+1 |
---|
786 | !Correction to include T variation of CO2 cross section |
---|
787 | if(sigma(indexint,klev-i+1)*alfa(indexint,auxi)* |
---|
788 | $ coltemp(auxi).lt.60.) then |
---|
789 | cortemp(i)=exp(-sigma(indexint,auxi)* |
---|
790 | $ alfa(indexint,auxi)*coltemp(auxi)) |
---|
791 | else |
---|
792 | cortemp(i)=0. |
---|
793 | end if |
---|
794 | !CO2 interpolated coefficient |
---|
795 | jfotsout(indexint,1,auxi) = (wm(i)*auxjco2(ind+1) + |
---|
796 | $ wp(i)*auxjco2(ind)) * cortemp(i) * |
---|
797 | $ (1+alfa(indexint,auxi)* |
---|
798 | $ (t2(auxi)-t0(auxi))) |
---|
799 | !O2 interpolated coefficient |
---|
800 | c jfotsout(indexint,2,auxi) = (wm(i)*auxjo2(ind+1) + |
---|
801 | c $ wp(i)*auxjo2(ind)) * cortemp(i) |
---|
802 | !H2O2 interpolated coefficient |
---|
803 | c jfotsout(indexint,6,auxi) = (wm(i)*auxjh2o2(ind+1) + |
---|
804 | c $ wp(i)*auxjh2o2(ind)) * cortemp(i) |
---|
805 | enddo |
---|
806 | !Only if chemthermod.ge.2 |
---|
807 | c if(chemthermod.ge.2) then |
---|
808 | c do i=1,klev |
---|
809 | c auxi = klev-i+1 |
---|
810 | c ind=auxind(i) |
---|
811 | c !NO interpolated coefficient |
---|
812 | c jfotsout(indexint,10,auxi) = (wm(i)*auxjno(ind+1) + |
---|
813 | c $ wp(i)*auxjno(ind)) * cortemp(i) |
---|
814 | !NO2 interpolated coefficient |
---|
815 | c jfotsout(indexint,13,auxi) = (wm(i)*auxjno2(ind+1) + |
---|
816 | c $ wp(i)*auxjno2(ind)) * cortemp(i) |
---|
817 | c enddo |
---|
818 | c endif |
---|
819 | |
---|
820 | c End of interval 32 |
---|
821 | |
---|
822 | |
---|
823 | ccccccccccccccccccccccccccccccc |
---|
824 | c 210.1-231.0nm (int 33) |
---|
825 | c |
---|
826 | c Absorption by: |
---|
827 | c O2, H2O2, NO2 |
---|
828 | ccccccccccccccccccccccccccccccc |
---|
829 | |
---|
830 | c Input atmospheric column |
---|
831 | |
---|
832 | c indexint=33 |
---|
833 | c do i=1,klev |
---|
834 | c auxcolinp(klev-i+1) = o2colx(i) + h2o2colx(i) + no2colx(i) |
---|
835 | c end do |
---|
836 | |
---|
837 | c Interpolation |
---|
838 | |
---|
839 | c do i=1,nz2 |
---|
840 | c auxi = nz2-i+1 |
---|
841 | !O2 tabulated coefficient |
---|
842 | c auxjo2(i) = jabsifotsintpar(auxi,2,indexint) |
---|
843 | !H2O2 tabulated coefficient |
---|
844 | c auxjh2o2(i) = jabsifotsintpar(auxi,6,indexint) |
---|
845 | !Tabulated column |
---|
846 | c auxcoltab(i) = c33(auxi) |
---|
847 | c enddo |
---|
848 | !Only if chemthermod.ge.2 |
---|
849 | c if(chemthermod.ge.2) then |
---|
850 | c do i=1,nz2 |
---|
851 | !NO2 tabulated coefficient |
---|
852 | c auxjno2(i) = jabsifotsintpar(nz2-i+1,13,indexint) |
---|
853 | c enddo |
---|
854 | c endif |
---|
855 | c call interfast |
---|
856 | c $ (wm,wp,auxind,auxcolinp,klev,auxcoltab,nz2,limdown,limup) |
---|
857 | c do i=1,klev |
---|
858 | c ind=auxind(i) |
---|
859 | c auxi = klev-i+1 |
---|
860 | !O2 interpolated coefficient |
---|
861 | c jfotsout(indexint,2,auxi) = wm(i)*auxjo2(ind+1) + |
---|
862 | c $ wp(i)*auxjo2(ind) |
---|
863 | c !H2O2 interpolated coefficient |
---|
864 | c jfotsout(indexint,6,auxi) = wm(i)*auxjh2o2(ind+1) + |
---|
865 | c $ wp(i)*auxjh2o2(ind) |
---|
866 | c enddo |
---|
867 | !Only if chemthermod.ge.2 |
---|
868 | c if(chemthermod.ge.2) then |
---|
869 | c do i=1,klev |
---|
870 | c ind=auxind(i) |
---|
871 | c !NO2 interpolated coefficient |
---|
872 | c jfotsout(indexint,13,klev-i+1) = wm(i)*auxjno2(ind+1) + |
---|
873 | c $ wp(i)*auxjno2(ind) |
---|
874 | c enddo |
---|
875 | c endif |
---|
876 | |
---|
877 | c End of interval 33 |
---|
878 | |
---|
879 | |
---|
880 | ccccccccccccccccccccccccccccccc |
---|
881 | c 231.1-240.0nm (int 34) |
---|
882 | c |
---|
883 | c Absorption by: |
---|
884 | c O2, H2O2, O3, NO2 |
---|
885 | ccccccccccccccccccccccccccccccc |
---|
886 | |
---|
887 | c Input atmospheric column |
---|
888 | |
---|
889 | c indexint=34 |
---|
890 | c do i=1,klev |
---|
891 | c auxcolinp(klev-i+1) = h2o2colx(i) + o2colx(i) + o3colx(i) + |
---|
892 | c $ no2colx(i) |
---|
893 | c end do |
---|
894 | |
---|
895 | c Interpolation |
---|
896 | |
---|
897 | c do i=1,nz2 |
---|
898 | c auxi = nz2-i+1 |
---|
899 | !O2 tabulated coefficient |
---|
900 | c auxjo2(i) = jabsifotsintpar(auxi,2,indexint) |
---|
901 | !H2O2 tabulated coefficient |
---|
902 | c auxjh2o2(i) = jabsifotsintpar(auxi,6,indexint) |
---|
903 | !O3 tabulated coefficient |
---|
904 | c auxjo3(i) = jabsifotsintpar(auxi,7,indexint) |
---|
905 | !Tabulated column |
---|
906 | c auxcoltab(i) = c34(nz2-i+1) |
---|
907 | c enddo |
---|
908 | !Only if chemthermod.ge.2 |
---|
909 | c if(chemthermod.ge.2) then |
---|
910 | c do i=1,nz2 |
---|
911 | !NO2 tabulated coefficient |
---|
912 | c auxjno2(i) = jabsifotsintpar(nz2-i+1,13,indexint) |
---|
913 | c enddo |
---|
914 | c endif |
---|
915 | c call interfast |
---|
916 | c $ (wm,wp,auxind,auxcolinp,klev,auxcoltab,nz2,limdown,limup) |
---|
917 | c do i=1,klev |
---|
918 | c ind=auxind(i) |
---|
919 | c auxi = klev-i+1 |
---|
920 | !O2 interpolated coefficient |
---|
921 | c jfotsout(indexint,2,auxi) = wm(i)*auxjo2(ind+1) + |
---|
922 | c $ wp(i)*auxjo2(ind) |
---|
923 | !H2O2 interpolated coefficient |
---|
924 | c jfotsout(indexint,6,auxi) = wm(i)*auxjh2o2(ind+1) + |
---|
925 | c $ wp(i)*auxjh2o2(ind) |
---|
926 | !O3 interpolated coefficient |
---|
927 | c jfotsout(indexint,7,auxi) = wm(i)*auxjo3(ind+1) + |
---|
928 | c $ wp(i)*auxjo3(ind) |
---|
929 | c enddo |
---|
930 | !Only if chemthermod.ge.2 |
---|
931 | c if(chemthermod.ge.2) then |
---|
932 | c do i=1,klev |
---|
933 | c ind=auxind(i) |
---|
934 | !NO2 interpolated coefficient |
---|
935 | c jfotsout(indexint,13,klev-i+1) = wm(i)*auxjno2(ind+1) + |
---|
936 | c $ wp(i)*auxjno2(ind) |
---|
937 | c enddo |
---|
938 | c endif |
---|
939 | |
---|
940 | c End of interval 34 |
---|
941 | |
---|
942 | |
---|
943 | ccccccccccccccccccccccccccccccc |
---|
944 | c 240.1-337.7nm (int 35) |
---|
945 | c |
---|
946 | c Absorption by: |
---|
947 | c H2O2, O3, NO2 |
---|
948 | ccccccccccccccccccccccccccccccc |
---|
949 | |
---|
950 | c Input atmospheric column |
---|
951 | |
---|
952 | indexint=35 |
---|
953 | c do i=1,klev |
---|
954 | c auxcolinp(klev-i+1) = o3colx(i) |
---|
955 | c end do |
---|
956 | c |
---|
957 | c Interpolation |
---|
958 | |
---|
959 | c do i=1,nz2 |
---|
960 | c auxi = nz2-i+1 |
---|
961 | !H2O2 tabulated coefficient |
---|
962 | c auxjh2o2(i) = jabsifotsintpar(auxi,6,indexint) |
---|
963 | !O3 tabulated coefficient |
---|
964 | c auxjo3(i) = jabsifotsintpar(auxi,7,indexint) |
---|
965 | !Tabulated column |
---|
966 | c auxcoltab(i) = c35(auxi) |
---|
967 | c enddo |
---|
968 | !Only if chemthermod.ge.2 |
---|
969 | c if(chemthermod.ge.2) then |
---|
970 | c do i=1,nz2 |
---|
971 | c !NO2 tabulated coefficient |
---|
972 | c auxjno2(i) = jabsifotsintpar(nz2-i+1,13,indexint) |
---|
973 | c enddo |
---|
974 | c endif |
---|
975 | c call interfast |
---|
976 | c $ (wm,wp,auxind,auxcolinp,klev,auxcoltab,nz2,limdown,limup) |
---|
977 | c do i=1,klev |
---|
978 | c ind=auxind(i) |
---|
979 | c auxi = klev-i+1 |
---|
980 | c !H2O2 interpolated coefficient |
---|
981 | c jfotsout(indexint,6,auxi) = wm(i)*auxjh2o2(ind+1) + |
---|
982 | c $ wp(i)*auxjh2o2(ind) |
---|
983 | c !O3 interpolated coefficient |
---|
984 | c jfotsout(indexint,7,auxi) = wm(i)*auxjo3(ind+1) + |
---|
985 | c $ wp(i)*auxjo3(ind) |
---|
986 | c enddo |
---|
987 | c if(chemthermod.ge.2) then |
---|
988 | c do i=1,klev |
---|
989 | c ind=auxind(i) |
---|
990 | c !NO2 interpolated coefficient |
---|
991 | c jfotsout(indexint,13,klev-i+1) = wm(i)*auxjno2(ind+1) + |
---|
992 | c $ wp(i)*auxjno2(ind) |
---|
993 | c enddo |
---|
994 | c endif |
---|
995 | |
---|
996 | c End of interval 35 |
---|
997 | |
---|
998 | ccccccccccccccccccccccccccccccc |
---|
999 | c 337.8-800.0 nm (int 36) |
---|
1000 | c |
---|
1001 | c Absorption by: |
---|
1002 | c O3, NO2 |
---|
1003 | ccccccccccccccccccccccccccccccc |
---|
1004 | |
---|
1005 | c Input atmospheric column |
---|
1006 | |
---|
1007 | indexint=36 |
---|
1008 | c do i=1,klev |
---|
1009 | c auxcolinp(klev-i+1) = o3colx(i) |
---|
1010 | c end do |
---|
1011 | |
---|
1012 | c Interpolation |
---|
1013 | |
---|
1014 | c do i=1,nz2 |
---|
1015 | c auxi = nz2-i+1 |
---|
1016 | !O3 tabulated coefficient |
---|
1017 | c auxjo3(i) = jabsifotsintpar(auxi,7,indexint) |
---|
1018 | !Tabulated column |
---|
1019 | c auxcoltab(i) = c36(auxi) |
---|
1020 | c enddo |
---|
1021 | !Only if chemthermod.ge.2 |
---|
1022 | c if(chemthermod.ge.2) then |
---|
1023 | c do i=1,nz2 |
---|
1024 | c !NO2 tabulated coefficient |
---|
1025 | c auxjno2(i) = jabsifotsintpar(nz2-i+1,13,indexint) |
---|
1026 | c enddo |
---|
1027 | c endif |
---|
1028 | c call interfast |
---|
1029 | c $ (wm,wp,auxind,auxcolinp,klev,auxcoltab,nz2,limdown,limup) |
---|
1030 | c do i=1,klev |
---|
1031 | c ind=auxind(i) |
---|
1032 | c !O3 interpolated coefficient |
---|
1033 | c jfotsout(indexint,7,klev-i+1) = wm(i)*auxjo3(ind+1) + |
---|
1034 | c $ wp(i)*auxjo3(ind) |
---|
1035 | c enddo |
---|
1036 | c !Only if chemthermod.ge.2 |
---|
1037 | c if(chemthermod.ge.2) then |
---|
1038 | c do i=1,klev |
---|
1039 | c ind=auxind(i) |
---|
1040 | c !NO2 interpolated coefficient |
---|
1041 | c jfotsout(indexint,13,klev-i+1) = wm(i)*auxjno2(ind+1) + |
---|
1042 | c $ wp(i)*auxjno2(ind) |
---|
1043 | c enddo |
---|
1044 | c endif |
---|
1045 | |
---|
1046 | c End of interval 36 |
---|
1047 | |
---|
1048 | c End of interpolation to obtain photoabsorption rates |
---|
1049 | |
---|
1050 | |
---|
1051 | return |
---|
1052 | end |
---|
1053 | |
---|
1054 | |
---|
1055 | |
---|
1056 | c********************************************************************** |
---|
1057 | c********************************************************************** |
---|
1058 | |
---|
1059 | c subroutine column(ig,chemthermod,rm,nesptherm,tx,iz,zenit, |
---|
1060 | c $ co2colx,o2colx,o3pcolx,h2colx,h2ocolx,h2o2colx,o3colx, |
---|
1061 | c $ n2colx,ncolx,nocolx,cocolx,hcolx,no2colx) |
---|
1062 | subroutine column(ig,chemthermod,rm,nesptherm,tx,iz,zenit, |
---|
1063 | $ co2colx,o3pcolx, n2colx,ncolx,cocolx) |
---|
1064 | |
---|
1065 | c mar 2014 gg adapted to Venus GCM |
---|
1066 | c nov 2002 fgg first version |
---|
1067 | |
---|
1068 | c********************************************************************** |
---|
1069 | use dimphy |
---|
1070 | use conc |
---|
1071 | implicit none |
---|
1072 | |
---|
1073 | |
---|
1074 | c common variables and constants |
---|
1075 | #include "dimensions.h" |
---|
1076 | c#include "tracer.h" |
---|
1077 | #include "param.h" |
---|
1078 | #include "param_v4.h" |
---|
1079 | #include "clesphys.h" |
---|
1080 | #include "mmol.h" |
---|
1081 | |
---|
1082 | |
---|
1083 | c local parameters and variables |
---|
1084 | |
---|
1085 | c input and output variables |
---|
1086 | |
---|
1087 | integer ig |
---|
1088 | integer chemthermod |
---|
1089 | integer nesptherm !# of species undergoing chemistry, input |
---|
1090 | real rm(klev,nesptherm) !densities (cm-3), input |
---|
1091 | real tx(klev) !temperature profile, input |
---|
1092 | real iz(klev+1) !height profile, input |
---|
1093 | real zenit !SZA, input |
---|
1094 | real co2colx(klev) !column density of CO2 (cm^-2), output |
---|
1095 | real o3pcolx(klev) !column density of O(3P)(cm^-2), output |
---|
1096 | real n2colx(klev) !N2 column density (cm-2), output |
---|
1097 | real ncolx(klev) !N column density (cm-2), output |
---|
1098 | real cocolx(klev) !CO column density (cm-2), output |
---|
1099 | |
---|
1100 | c real o2colx(klev) !column density of O2(cm^-2), output |
---|
1101 | c real h2colx(klev) !H2 column density (cm-2), output |
---|
1102 | c real h2ocolx(klev) !H2O column density (cm-2), output |
---|
1103 | c real h2o2colx(klev) !column density of H2O2(cm^-2), output |
---|
1104 | c real o3colx(klev) !O3 column density (cm-2), output |
---|
1105 | c real nocolx(klev) !NO column density (cm-2), output |
---|
1106 | c real hcolx(klev) !H column density (cm-2), output |
---|
1107 | c real no2colx(klev) !NO2 column density (cm-2), output |
---|
1108 | |
---|
1109 | |
---|
1110 | c local variables |
---|
1111 | |
---|
1112 | real xx |
---|
1113 | real grav(klev) |
---|
1114 | real Hco2,Ho3p,Ho2,Hh2,Hh2o,Hh2o2 |
---|
1115 | real Ho3,Hn2,Hn,Hno,Hco,Hh,Hno2 |
---|
1116 | |
---|
1117 | real co2x(klev) |
---|
1118 | real o3px(klev) |
---|
1119 | real cox(klev) |
---|
1120 | real n2x(klev) |
---|
1121 | real nx(klev) |
---|
1122 | |
---|
1123 | c real o2x(klev) |
---|
1124 | c real o3x(klev) |
---|
1125 | c real hx(klev) |
---|
1126 | c real h2x(klev) |
---|
1127 | c real h2ox(klev) |
---|
1128 | c real h2o2x(klev) |
---|
1129 | c real nox(klev) |
---|
1130 | c real no2x(klev) |
---|
1131 | |
---|
1132 | integer i,j,k,icol,indexint !indexes |
---|
1133 | |
---|
1134 | c variables for optical path calculation |
---|
1135 | |
---|
1136 | integer nz3 |
---|
1137 | ! parameter (nz3=nz*2) |
---|
1138 | |
---|
1139 | integer jj |
---|
1140 | real*8 esp(klev*2) |
---|
1141 | real*8 ilayesp(klev*2) |
---|
1142 | real*8 szalayesp(klev*2) |
---|
1143 | integer nlayesp |
---|
1144 | real*8 zmini |
---|
1145 | real*8 depth |
---|
1146 | real*8 espco2, espo2, espo3p, esph2, esph2o, esph2o2,espo3 |
---|
1147 | real*8 espn2,espn,espno,espco,esph,espno2 |
---|
1148 | real*8 rcmnz, rcmmini |
---|
1149 | real*8 szadeg |
---|
1150 | |
---|
1151 | ! Tracer indexes in the thermospheric chemistry: |
---|
1152 | !!! ATTENTION. These values have to be identical to those in euvheat.F90 |
---|
1153 | !!! If the values are changed there, the same has to be done here !!! |
---|
1154 | |
---|
1155 | integer,parameter :: i_co2=1 |
---|
1156 | integer,parameter :: i_n2=13 |
---|
1157 | integer,parameter :: i_n=14 |
---|
1158 | integer,parameter :: i_o=3 |
---|
1159 | integer,parameter :: i_co=4 |
---|
1160 | |
---|
1161 | c*************************PROGRAM STARTS******************************* |
---|
1162 | |
---|
1163 | nz3 = klev*2 |
---|
1164 | do i=1,klev |
---|
1165 | xx = ( radio + iz(i) ) * 1.e5 ! conversion [km] ---> [cm] |
---|
1166 | grav(i) = gg * masa /(xx**2) ! [cm/s2] |
---|
1167 | end do |
---|
1168 | |
---|
1169 | !Scale heights H = kT /Mg --> [cm] |
---|
1170 | xx = kboltzman * tx(klev) * n_avog / grav(klev) ! g cm mol-1 |
---|
1171 | |
---|
1172 | Ho3p = xx / mmolo |
---|
1173 | Hco2 = xx / mmolco2 |
---|
1174 | Hco = xx / mmolco |
---|
1175 | Hn2 = xx / mmoln2 |
---|
1176 | Hn = xx / mmoln |
---|
1177 | |
---|
1178 | !Only if O3 chem. required |
---|
1179 | c if(chemthermod.ge.1) |
---|
1180 | ! $ Ho3 = xx / mmol(igcm_o3) |
---|
1181 | c $ Ho3 = xx / mmolo3 |
---|
1182 | c !Only if N or ion chem. |
---|
1183 | c if(chemthermod.ge.2) then |
---|
1184 | c Hn2 = xx / mmoln2 |
---|
1185 | c Hn = xx / mmoln |
---|
1186 | c Hno = xx / mmolno |
---|
1187 | c Hno2 = xx / mmolno2 |
---|
1188 | c endif |
---|
1189 | ! first loop in altitude : initialisation |
---|
1190 | do i=klev,1,-1 |
---|
1191 | !Column initialisation |
---|
1192 | co2colx(i) = 0. |
---|
1193 | o3pcolx(i) = 0. |
---|
1194 | n2colx(i) = 0. |
---|
1195 | ncolx(i) = 0. |
---|
1196 | cocolx(i) = 0. |
---|
1197 | |
---|
1198 | !--Densities [cm-3] |
---|
1199 | co2x(i) = rm(i,i_co2) |
---|
1200 | o3px(i) = rm(i,i_o) |
---|
1201 | cox(i) = rm(i,i_co) |
---|
1202 | n2x(i) = rm(i,i_n2) |
---|
1203 | nx(i) = rm(i,i_n) |
---|
1204 | |
---|
1205 | !Only if O3 chem. required |
---|
1206 | c if(chemthermod.ge.1) |
---|
1207 | c $ o3x(i) = rm(i,i_o3) |
---|
1208 | c !Only if Nitrogen of ion chemistry requested |
---|
1209 | c if(chemthermod.ge.2) then |
---|
1210 | c n2x(i) = rm(i,i_n2) |
---|
1211 | c nx(i) = rm(i,i_n) |
---|
1212 | c nox(i) = rm(i,i_no) |
---|
1213 | c no2x(i) = rm(i,i_no2) |
---|
1214 | c endif |
---|
1215 | enddo ! end first loop |
---|
1216 | ! second loop in altitude : column calculations |
---|
1217 | do i=klev,1,-1 |
---|
1218 | !Routine to calculate the geometrical length of each layer |
---|
1219 | call espesor_optico_A(ig,i,zenit,iz(i),nz3,iz,esp,ilayesp, |
---|
1220 | $ szalayesp,nlayesp, zmini) |
---|
1221 | if(ilayesp(nlayesp).eq.-1) then |
---|
1222 | co2colx(i)=1.e25 |
---|
1223 | o3pcolx(i)=1.e25 |
---|
1224 | n2colx(i)=1.e25 |
---|
1225 | ncolx(i)=1.e25 |
---|
1226 | cocolx(i)=1.e25 |
---|
1227 | |
---|
1228 | c o2colx(i)=1.e25 |
---|
1229 | c o3pcolx(i)=1.e25 |
---|
1230 | c h2colx(i)=1.e25 |
---|
1231 | c h2ocolx(i)=1.e25 |
---|
1232 | c h2o2colx(i)=1.e25 |
---|
1233 | c o3colx(i)=1.e25 |
---|
1234 | c n2colx(i)=1.e25 |
---|
1235 | c ncolx(i)=1.e25 |
---|
1236 | c nocolx(i)=1.e25 |
---|
1237 | c cocolx(i)=1.e25 |
---|
1238 | c hcolx(i)=1.e25 |
---|
1239 | c no2colx(i)=1.e25 |
---|
1240 | else |
---|
1241 | rcmnz = ( radio + iz(klev) ) * 1.e5 ! km --> cm |
---|
1242 | rcmmini = ( radio + zmini ) * 1.e5 |
---|
1243 | !Column calculation taking into account the geometrical depth |
---|
1244 | !calculated before |
---|
1245 | do j=1,nlayesp |
---|
1246 | jj=ilayesp(j) |
---|
1247 | !Top layer |
---|
1248 | if(jj.eq.klev) then |
---|
1249 | if(zenit.le.60.) then |
---|
1250 | o3pcolx(i)=o3pcolx(i)+o3px(klev)*Ho3p*esp(j) |
---|
1251 | $ *1.e-5 |
---|
1252 | co2colx(i)=co2colx(i)+co2x(klev)*Hco2*esp(j) |
---|
1253 | $ *1.e-5 |
---|
1254 | cocolx(i)=cocolx(i)+cox(klev)*Hco*esp(j) |
---|
1255 | $ *1.e-5 |
---|
1256 | n2colx(i)=n2colx(i)+n2x(klev)*Hn2*esp(j) |
---|
1257 | $ *1.e-5 |
---|
1258 | ncolx(i)=ncolx(i)+nx(klev)*Hn*esp(j) |
---|
1259 | $ *1.e-5 |
---|
1260 | |
---|
1261 | c h2o2colx(i)=h2o2colx(i)+ |
---|
1262 | c $ h2o2x(klev)*Hh2o2*esp(j)*1.e-5 |
---|
1263 | c o2colx(i)=o2colx(i)+o2x(klev)*Ho2*esp(j) |
---|
1264 | c $ *1.e-5 |
---|
1265 | c h2colx(i)=h2colx(i)+h2x(klev)*Hh2*esp(j) |
---|
1266 | c $ *1.e-5 |
---|
1267 | c h2ocolx(i)=h2ocolx(i)+h2ox(klev)*Hh2o*esp(j) |
---|
1268 | c $ *1.e-5 |
---|
1269 | c cocolx(i)=cocolx(i)+cox(klev)*Hco*esp(j) |
---|
1270 | c $ *1.e-5 |
---|
1271 | c hcolx(i)=hcolx(i)+hx(klev)*Hh*esp(j) |
---|
1272 | c $ *1.e-5 |
---|
1273 | !Only if O3 chemistry required |
---|
1274 | c if(chemthermod.ge.1) o3colx(i)= |
---|
1275 | c $ o3colx(i)+o3x(klev)*Ho3*esp(j) |
---|
1276 | c $ *1.e-5 |
---|
1277 | !Only if N or ion chemistry requested |
---|
1278 | c if(chemthermod.ge.2) then |
---|
1279 | c n2colx(i)=n2colx(i)+n2x(klev)*Hn2*esp(j) |
---|
1280 | c $ *1.e-5 |
---|
1281 | c ncolx(i)=ncolx(i)+nx(klev)*Hn*esp(j) |
---|
1282 | c $ *1.e-5 |
---|
1283 | c nocolx(i)=nocolx(i)+nox(klev)*Hno*esp(j) |
---|
1284 | c $ *1.e-5 |
---|
1285 | c no2colx(i)=no2colx(i)+no2x(klev)*Hno2*esp(j) |
---|
1286 | c $ *1.e-5 |
---|
1287 | c endif |
---|
1288 | else if(zenit.gt.60.) then |
---|
1289 | espco2 =sqrt((rcmnz+Hco2)**2 -rcmmini**2) - esp(j) |
---|
1290 | espo3p = sqrt((rcmnz+Ho3p)**2 -rcmmini**2)- esp(j) |
---|
1291 | espco = sqrt((rcmnz+Hco)**2 -rcmmini**2) - esp(j) |
---|
1292 | espn2 =sqrt((rcmnz+Hn2)**2-rcmmini**2)-esp(j) |
---|
1293 | espn =sqrt((rcmnz+Hn)**2-rcmmini**2) - esp(j) |
---|
1294 | |
---|
1295 | c espo2 = sqrt((rcmnz+Ho2)**2 -rcmmini**2) - esp(j) |
---|
1296 | c esph2 = sqrt((rcmnz+Hh2)**2 -rcmmini**2) - esp(j) |
---|
1297 | c esph2o = sqrt((rcmnz+Hh2o)**2 -rcmmini**2)- esp(j) |
---|
1298 | c esph2o2= sqrt((rcmnz+Hh2o2)**2-rcmmini**2)- esp(j) |
---|
1299 | c esph = sqrt((rcmnz+Hh)**2 -rcmmini**2) - esp(j) |
---|
1300 | !Only if O3 chemistry required |
---|
1301 | c if(chemthermod.ge.1) |
---|
1302 | c $ espo3=sqrt((rcmnz+Ho3)**2-rcmmini**2)-esp(j) |
---|
1303 | c !Only if N or ion chemistry requested |
---|
1304 | c if(chemthermod.ge.2) then |
---|
1305 | c espn2 =sqrt((rcmnz+Hn2)**2-rcmmini**2)-esp(j) |
---|
1306 | c espn =sqrt((rcmnz+Hn)**2-rcmmini**2) - esp(j) |
---|
1307 | c espno =sqrt((rcmnz+Hno)**2-rcmmini**2) - esp(j) |
---|
1308 | c espno2=sqrt((rcmnz+Hno2)**2-rcmmini**2)- esp(j) |
---|
1309 | c endif |
---|
1310 | |
---|
1311 | co2colx(i) = co2colx(i) + espco2*co2x(klev) |
---|
1312 | o3pcolx(i) = o3pcolx(i) + espo3p*o3px(klev) |
---|
1313 | cocolx(i) = cocolx(i) + espco*cox(klev) |
---|
1314 | n2colx(i) = n2colx(i) + espn2*n2x(klev) |
---|
1315 | ncolx(i) = ncolx(i) + espn*nx(klev) |
---|
1316 | |
---|
1317 | c o2colx(i) = o2colx(i) + espo2*o2x(klev) |
---|
1318 | c h2colx(i) = h2colx(i) + esph2*h2x(klev) |
---|
1319 | c h2ocolx(i) = h2ocolx(i) + esph2o*h2ox(klev) |
---|
1320 | c h2o2colx(i)= h2o2colx(i)+ esph2o2*h2o2x(klev) |
---|
1321 | c cocolx(i) = cocolx(i) + espco*cox(klev) |
---|
1322 | c hcolx(i) = hcolx(i) + esph*hx(klev) |
---|
1323 | !Only if O3 chemistry required |
---|
1324 | c if(chemthermod.ge.1) |
---|
1325 | c $ o3colx(i) = o3colx(i) + espo3*o3x(klev) |
---|
1326 | c !Only if N or ion chemistry requested |
---|
1327 | c if(chemthermod.ge.2) then |
---|
1328 | c n2colx(i) = n2colx(i) + espn2*n2x(klev) |
---|
1329 | c ncolx(i) = ncolx(i) + espn*nx(klev) |
---|
1330 | c nocolx(i) = nocolx(i) + espno*nox(klev) |
---|
1331 | c no2colx(i) = no2colx(i) + espno2*no2x(klev) |
---|
1332 | c endif |
---|
1333 | endif !Of if zenit.lt.60 |
---|
1334 | !Other layers |
---|
1335 | else |
---|
1336 | co2colx(i) = co2colx(i) + |
---|
1337 | $ esp(j) * (co2x(jj)+co2x(jj+1)) / 2. |
---|
1338 | o3pcolx(i) = o3pcolx(i) + |
---|
1339 | $ esp(j) * (o3px(jj)+o3px(jj+1)) / 2. |
---|
1340 | cocolx(i) = cocolx(i) + |
---|
1341 | $ esp(j) * (cox(jj)+cox(jj+1)) / 2. |
---|
1342 | n2colx(i) = n2colx(i) + |
---|
1343 | $ esp(j) * (n2x(jj)+n2x(jj+1)) / 2. |
---|
1344 | ncolx(i) = ncolx(i) + |
---|
1345 | $ esp(j) * (nx(jj)+nx(jj+1)) / 2. |
---|
1346 | c |
---|
1347 | c o2colx(i) = o2colx(i) + |
---|
1348 | c $ esp(j) * (o2x(jj)+o2x(jj+1)) / 2. |
---|
1349 | c h2colx(i) = h2colx(i) + |
---|
1350 | c $ esp(j) * (h2x(jj)+h2x(jj+1)) / 2. |
---|
1351 | c h2ocolx(i) = h2ocolx(i) + |
---|
1352 | c $ esp(j) * (h2ox(jj)+h2ox(jj+1)) / 2. |
---|
1353 | c h2o2colx(i) = h2o2colx(i) + |
---|
1354 | c $ esp(j) * (h2o2x(jj)+h2o2x(jj+1)) / 2. |
---|
1355 | c hcolx(i) = hcolx(i) + |
---|
1356 | c $ esp(j) * (hx(jj)+hx(jj+1)) / 2. |
---|
1357 | !Only if O3 chemistry required |
---|
1358 | c if(chemthermod.ge.1) |
---|
1359 | c $ o3colx(i) = o3colx(i) + |
---|
1360 | c $ esp(j) * (o3x(jj)+o3x(jj+1)) / 2. |
---|
1361 | c !Only if N or ion chemistry requested |
---|
1362 | c if(chemthermod.ge.2) then |
---|
1363 | c n2colx(i) = n2colx(i) + |
---|
1364 | c $ esp(j) * (n2x(jj)+n2x(jj+1)) / 2. |
---|
1365 | c ncolx(i) = ncolx(i) + |
---|
1366 | c $ esp(j) * (nx(jj)+nx(jj+1)) / 2. |
---|
1367 | c nocolx(i) = nocolx(i) + |
---|
1368 | c $ esp(j) * (nox(jj)+nox(jj+1)) / 2. |
---|
1369 | c no2colx(i) = no2colx(i) + |
---|
1370 | c $ esp(j) * (no2x(jj)+no2x(jj+1)) / 2. |
---|
1371 | c endif |
---|
1372 | |
---|
1373 | endif !Of if jj.eq.klev |
---|
1374 | end do !Of do j=1,nlayesp |
---|
1375 | endif !Of ilayesp(nlayesp).eq.-1 |
---|
1376 | enddo !Of do i=klev,1,-1 |
---|
1377 | return |
---|
1378 | |
---|
1379 | |
---|
1380 | end |
---|
1381 | |
---|
1382 | |
---|
1383 | c********************************************************************** |
---|
1384 | c********************************************************************** |
---|
1385 | |
---|
1386 | subroutine interfast(wm,wp,nm,p,nlayer,pin,nl,limdown,limup) |
---|
1387 | C |
---|
1388 | C subroutine to perform linear interpolation in pressure from 1D profile |
---|
1389 | C escin(nl) sampled on pressure grid pin(nl) to profile |
---|
1390 | C escout(nlayer) on pressure grid p(nlayer). |
---|
1391 | C |
---|
1392 | real*8 wm(nlayer),wp(nlayer),p(nlayer) |
---|
1393 | integer nm(nlayer) |
---|
1394 | real*8 pin(nl) |
---|
1395 | real*8 limup,limdown |
---|
1396 | integer nl,nlayer,n1,n,np,nini |
---|
1397 | nini=1 |
---|
1398 | do n1=1,nlayer |
---|
1399 | if(p(n1) .gt. limup .or. p(n1) .lt. limdown) then |
---|
1400 | wm(n1) = 0.d0 |
---|
1401 | wp(n1) = 0.d0 |
---|
1402 | else |
---|
1403 | do n = nini,nl-1 |
---|
1404 | if (p(n1).ge.pin(n).and.p(n1).le.pin(n+1)) then |
---|
1405 | nm(n1)=n |
---|
1406 | np=n+1 |
---|
1407 | wm(n1)=abs(pin(n)-p(n1))/(pin(np)-pin(n)) |
---|
1408 | wp(n1)=1.d0 - wm(n1) |
---|
1409 | nini = n |
---|
1410 | exit |
---|
1411 | endif |
---|
1412 | enddo |
---|
1413 | endif |
---|
1414 | enddo |
---|
1415 | return |
---|
1416 | end |
---|
1417 | |
---|
1418 | |
---|
1419 | c********************************************************************** |
---|
1420 | c********************************************************************** |
---|
1421 | |
---|
1422 | subroutine espesor_optico_A (ig,capa, szadeg,z, |
---|
1423 | @ nz3,iz,esp,ilayesp,szalayesp,nlayesp, zmini) |
---|
1424 | |
---|
1425 | c fgg nov 03 Adaptation to Martian model |
---|
1426 | c malv jul 03 Corrected z grid. Split in alt & frec codes |
---|
1427 | c fgg feb 03 first version |
---|
1428 | ************************************************************************* |
---|
1429 | use dimphy |
---|
1430 | implicit none |
---|
1431 | |
---|
1432 | |
---|
1433 | c common variables and constants |
---|
1434 | #include "dimensions.h" |
---|
1435 | #include "param.h" |
---|
1436 | #include "param_v4.h" |
---|
1437 | |
---|
1438 | c arguments |
---|
1439 | |
---|
1440 | real szadeg ! I. SZA [rad] |
---|
1441 | real z ! I. altitude of interest [km] |
---|
1442 | integer nz3,ig ! I. dimension of esp, ylayesp, etc... |
---|
1443 | ! (=2*klev= max# of layers in ray path) |
---|
1444 | real iz(klev+1) ! I. Altitude of each layer |
---|
1445 | real*8 esp(nz3) ! O. layer widths after geometrically |
---|
1446 | ! amplified; in [cm] except at TOA |
---|
1447 | ! where an auxiliary value is used |
---|
1448 | real*8 ilayesp(nz3) ! O. Indexes of layers along ray path |
---|
1449 | real*8 szalayesp(nz3) ! O. SZA [deg] " " " |
---|
1450 | integer nlayesp |
---|
1451 | ! real*8 nlayesp ! O. # layers along ray path at this z |
---|
1452 | real*8 zmini ! O. Minimum altitud of ray path [km] |
---|
1453 | |
---|
1454 | |
---|
1455 | c local variables and constants |
---|
1456 | |
---|
1457 | integer j,i,capa |
---|
1458 | integer jmin ! index of min.altitude along ray path |
---|
1459 | real*8 szarad ! SZA [deg] |
---|
1460 | real*8 zz |
---|
1461 | real*8 diz(klev+1) |
---|
1462 | real*8 rkmnz ! distance TOA to center of Planet [km] |
---|
1463 | real*8 rkmmini ! distance zmini to center of P [km] |
---|
1464 | real*8 rkmj ! intermediate distance to C of P [km] |
---|
1465 | |
---|
1466 | c external function |
---|
1467 | external grid_R8 ! Returns index of layer containing the altitude |
---|
1468 | ! of interest, z; for example, if |
---|
1469 | ! zkm(i)=z or zkm(i)<z<zkm(i+1) => grid(z)=i |
---|
1470 | integer grid_R8 |
---|
1471 | |
---|
1472 | ************************************************************************* |
---|
1473 | szarad = dble(szadeg)*3.141592d0/180.d0 |
---|
1474 | zz=dble(z) |
---|
1475 | do i=1,klev |
---|
1476 | diz(i)=dble(iz(i)) |
---|
1477 | enddo |
---|
1478 | do j=1,nz3 |
---|
1479 | esp(j) = 0.d0 |
---|
1480 | szalayesp(j) = 777.d0 |
---|
1481 | ilayesp(j) = 0 |
---|
1482 | enddo |
---|
1483 | nlayesp = 0 |
---|
1484 | |
---|
1485 | ! First case: szadeg<60 |
---|
1486 | ! The optical thickness will be given by 1/cos(sza) |
---|
1487 | ! We deal with 2 different regions: |
---|
1488 | ! 1: First, all layers between z and ztop ("upper part of ray") |
---|
1489 | ! 2: Second, the layer at ztop |
---|
1490 | if(szadeg.lt.60.d0) then |
---|
1491 | |
---|
1492 | zmini = zz |
---|
1493 | if(abs(zz-diz(klev)).lt.1.d-3) goto 1357 |
---|
1494 | ! 1st Zone: Upper part of ray |
---|
1495 | ! |
---|
1496 | do j=grid_R8(zz,diz,klev),klev-1 |
---|
1497 | nlayesp = nlayesp + 1 |
---|
1498 | ilayesp(nlayesp) = j |
---|
1499 | esp(nlayesp) = (diz(j+1)-diz(j)) / cos(szarad) ! [km] |
---|
1500 | esp(nlayesp) = esp(nlayesp) * 1.d5 ! [cm] |
---|
1501 | szalayesp(nlayesp) = szadeg |
---|
1502 | end do |
---|
1503 | |
---|
1504 | ! |
---|
1505 | ! 2nd Zone: Top layer |
---|
1506 | 1357 continue |
---|
1507 | nlayesp = nlayesp + 1 |
---|
1508 | ilayesp(nlayesp) = klev |
---|
1509 | esp(nlayesp) = 1.d0 / cos(szarad) ! aux. non-dimens. factor |
---|
1510 | szalayesp(nlayesp) = szadeg |
---|
1511 | |
---|
1512 | |
---|
1513 | ! Second case: 60 < szadeg < 90 |
---|
1514 | ! The optical thickness is evaluated. |
---|
1515 | ! (the magnitude of the effect of not using cos(sza) is 3.e-5 |
---|
1516 | ! for z=60km & sza=30, and 5e-4 for z=60km & sza=60, approximately) |
---|
1517 | ! We deal with 2 different regions: |
---|
1518 | ! 1: First, all layers between z and ztop ("upper part of ray") |
---|
1519 | ! 2: Second, the layer at ztop ("uppermost layer") |
---|
1520 | else if(szadeg.le.90.d0.and.szadeg.ge.60.d0) then |
---|
1521 | |
---|
1522 | zmini=(radio+zz)*sin(szarad)-radio |
---|
1523 | rkmmini = radio + zmini |
---|
1524 | |
---|
1525 | if(abs(zz-diz(klev)).lt.1.d-4) goto 1470 |
---|
1526 | |
---|
1527 | ! 1st Zone: Upper part of ray |
---|
1528 | ! |
---|
1529 | do j=grid_R8(zz,diz,klev),klev-1 |
---|
1530 | nlayesp = nlayesp + 1 |
---|
1531 | ilayesp(nlayesp) = j |
---|
1532 | esp(nlayesp) = |
---|
1533 | # sqrt( (radio+diz(j+1))**2 - rkmmini**2 ) - |
---|
1534 | # sqrt( (radio+diz(j))**2 - rkmmini**2 ) ! [km] |
---|
1535 | esp(nlayesp) = esp(nlayesp) * 1.d5 ! [cm] |
---|
1536 | rkmj = radio+diz(j) |
---|
1537 | szalayesp(nlayesp) = asin( rkmmini/rkmj ) ! [rad] |
---|
1538 | szalayesp(nlayesp) = szalayesp(nlayesp) * 180.d0/3.141592 ! [deg] |
---|
1539 | end do |
---|
1540 | 1470 continue |
---|
1541 | ! 2nd Zone: Uppermost layer of ray. |
---|
1542 | ! |
---|
1543 | nlayesp = nlayesp + 1 |
---|
1544 | ilayesp(nlayesp) = klev |
---|
1545 | rkmnz = radio+diz(klev) |
---|
1546 | esp(nlayesp) = sqrt( rkmnz**2 - rkmmini**2 ) ! aux.factor[km] |
---|
1547 | esp(nlayesp) = esp(nlayesp) * 1.d5 ! aux.f. [cm] |
---|
1548 | szalayesp(nlayesp) = asin( rkmmini/rkmnz ) ! [rad] |
---|
1549 | szalayesp(nlayesp) = szalayesp(nlayesp) * 180.d0/3.141592! [deg] |
---|
1550 | |
---|
1551 | |
---|
1552 | ! Third case: szadeg > 90 |
---|
1553 | ! The optical thickness is evaluated. |
---|
1554 | ! We deal with 5 different regions: |
---|
1555 | ! 1: all layers between z and ztop ("upper part of ray") |
---|
1556 | ! 2: the layer at ztop ("uppermost layer") |
---|
1557 | ! 3: the lowest layer, at zmini |
---|
1558 | ! 4: the layers increasing from zmini to z (here SZA<90) |
---|
1559 | ! 5: the layers decreasing from z to zmini (here SZA>90) |
---|
1560 | else if(szadeg.gt.90.d0) then |
---|
1561 | |
---|
1562 | zmini=(radio+zz)*sin(szarad)-radio |
---|
1563 | rkmmini = radio + zmini |
---|
1564 | |
---|
1565 | if(zmini.lt.diz(1)) then ! Can see the sun? No => esp(j)=inft |
---|
1566 | nlayesp = nlayesp + 1 |
---|
1567 | ilayesp(nlayesp) = - 1 ! Value to mark "no sun on view" |
---|
1568 | ! esp(nlayesp) = 1.e30 |
---|
1569 | |
---|
1570 | else |
---|
1571 | jmin=grid_R8(zmini,diz,klev)+1 |
---|
1572 | |
---|
1573 | |
---|
1574 | if(abs(zz-diz(klev)).lt.1.d-4) goto 9876 |
---|
1575 | |
---|
1576 | ! 1st Zone: Upper part of ray |
---|
1577 | ! |
---|
1578 | do j=grid_R8(zz,diz,klev),klev-1 |
---|
1579 | nlayesp = nlayesp + 1 |
---|
1580 | ilayesp(nlayesp) = j |
---|
1581 | esp(nlayesp) = |
---|
1582 | $ sqrt( (radio+diz(j+1))**2 - rkmmini**2 ) - |
---|
1583 | $ sqrt( (radio+diz(j))**2 - rkmmini**2 ) ! [km] |
---|
1584 | esp(nlayesp) = esp(nlayesp) * 1.d5 ! [cm] |
---|
1585 | rkmj = radio+diz(j) |
---|
1586 | szalayesp(nlayesp) = asin( rkmmini/rkmj ) ! [rad] |
---|
1587 | szalayesp(nlayesp) = szalayesp(nlayesp) *180.d0/3.141592 ! [deg] |
---|
1588 | end do |
---|
1589 | |
---|
1590 | 9876 continue |
---|
1591 | ! 2nd Zone: Uppermost layer of ray. |
---|
1592 | ! |
---|
1593 | nlayesp = nlayesp + 1 |
---|
1594 | ilayesp(nlayesp) = klev |
---|
1595 | rkmnz = radio+diz(klev) |
---|
1596 | esp(nlayesp) = sqrt( rkmnz**2 - rkmmini**2 ) !aux.factor[km] |
---|
1597 | esp(nlayesp) = esp(nlayesp) * 1.d5 !aux.f.[cm] |
---|
1598 | szalayesp(nlayesp) = asin( rkmmini/rkmnz ) ! [rad] |
---|
1599 | szalayesp(nlayesp) = szalayesp(nlayesp) *180.d0/3.141592 ! [deg] |
---|
1600 | |
---|
1601 | ! 3er Zone: Lowestmost layer of ray |
---|
1602 | ! |
---|
1603 | if ( jmin .ge. 2 ) then ! If above the planet's surface |
---|
1604 | j=jmin-1 |
---|
1605 | nlayesp = nlayesp + 1 |
---|
1606 | ilayesp(nlayesp) = j |
---|
1607 | esp(nlayesp) = 2. * |
---|
1608 | $ sqrt( (radio+diz(j+1))**2 -rkmmini**2 ) ! [km] |
---|
1609 | esp(nlayesp) = esp(nlayesp) * 1.d5 ! [cm] |
---|
1610 | rkmj = radio+diz(j+1) |
---|
1611 | szalayesp(nlayesp) = asin( rkmmini/rkmj ) ! [rad] |
---|
1612 | szalayesp(nlayesp) = szalayesp(nlayesp) *180.d0/3.141592 ! [deg] |
---|
1613 | endif |
---|
1614 | |
---|
1615 | ! 4th zone: Lower part of ray, increasing from zmin to z |
---|
1616 | ! ( layers with SZA < 90 deg ) |
---|
1617 | do j=jmin,grid_R8(zz,diz,klev)-1 |
---|
1618 | nlayesp = nlayesp + 1 |
---|
1619 | ilayesp(nlayesp) = j |
---|
1620 | esp(nlayesp) = |
---|
1621 | $ sqrt( (radio+diz(j+1))**2 - rkmmini**2 ) |
---|
1622 | $ - sqrt( (radio+diz(j))**2 - rkmmini**2 ) ! [km] |
---|
1623 | esp(nlayesp) = esp(nlayesp) * 1.d5 ! [cm] |
---|
1624 | rkmj = radio+diz(j) |
---|
1625 | szalayesp(nlayesp) = asin( rkmmini/rkmj ) ! [rad] |
---|
1626 | szalayesp(nlayesp) = szalayesp(nlayesp) *180.d0/3.141592 ! [deg] |
---|
1627 | end do |
---|
1628 | |
---|
1629 | ! 5th zone: Lower part of ray, decreasing from z to zmin |
---|
1630 | ! ( layers with SZA > 90 deg ) |
---|
1631 | do j=grid_R8(zz,diz,klev)-1, jmin, -1 |
---|
1632 | nlayesp = nlayesp + 1 |
---|
1633 | ilayesp(nlayesp) = j |
---|
1634 | esp(nlayesp) = |
---|
1635 | $ sqrt( (radio+diz(j+1))**2 - rkmmini**2 ) |
---|
1636 | $ - sqrt( (radio+diz(j))**2 - rkmmini**2 ) ! [km] |
---|
1637 | esp(nlayesp) = esp(nlayesp) * 1.d5 ! [cm] |
---|
1638 | rkmj = radio+diz(j) |
---|
1639 | szalayesp(nlayesp) = 3.141592 - asin( rkmmini/rkmj ) ! [rad] |
---|
1640 | szalayesp(nlayesp) = szalayesp(nlayesp)*180.d0/3.141592 ! [deg] |
---|
1641 | end do |
---|
1642 | |
---|
1643 | end if |
---|
1644 | |
---|
1645 | end if |
---|
1646 | |
---|
1647 | return |
---|
1648 | |
---|
1649 | end |
---|
1650 | |
---|
1651 | |
---|
1652 | c********************************************************************** |
---|
1653 | c*********************************************************************** |
---|
1654 | |
---|
1655 | function grid_R8 (z, zgrid, nz) |
---|
1656 | |
---|
1657 | c Returns the index where z is located within vector zgrid |
---|
1658 | c The vector zgrid must be monotonously increasing, otherwise program stops. |
---|
1659 | c If z is outside zgrid limits, or zgrid dimension is nz<2, the program stops. |
---|
1660 | c |
---|
1661 | c FGG Aug-2004 Correct z.lt.zgrid(i) to .le. |
---|
1662 | c MALV Jul-2003 |
---|
1663 | c*********************************************************************** |
---|
1664 | |
---|
1665 | implicit none |
---|
1666 | |
---|
1667 | c Arguments |
---|
1668 | integer nz |
---|
1669 | real*8 z |
---|
1670 | real*8 zgrid(nz) |
---|
1671 | integer grid_R8 |
---|
1672 | |
---|
1673 | c Local |
---|
1674 | integer i, nz1, nznew |
---|
1675 | |
---|
1676 | c*** CODE START |
---|
1677 | |
---|
1678 | if ( z .lt. zgrid(1) .or. z.gt.zgrid(nz) ) then |
---|
1679 | write (*,*) ' GRID/ z outside bounds of zgrid ' |
---|
1680 | write (*,*) ' z,zgrid(1),zgrid(nz) =', z,zgrid(1),zgrid(nz) |
---|
1681 | stop ' Serious error in GRID.F ' |
---|
1682 | endif |
---|
1683 | if ( nz .lt. 2 ) then |
---|
1684 | write (*,*) ' GRID/ zgrid needs 2 points at least ! ' |
---|
1685 | stop ' Serious error in GRID.F ' |
---|
1686 | endif |
---|
1687 | if ( zgrid(1) .ge. zgrid(nz) ) then |
---|
1688 | write (*,*) ' GRID/ zgrid must increase with index' |
---|
1689 | stop ' Serious error in GRID.F ' |
---|
1690 | endif |
---|
1691 | |
---|
1692 | nz1 = 1 |
---|
1693 | nznew = nz/2 |
---|
1694 | if ( z .gt. zgrid(nznew) ) then |
---|
1695 | nz1 = nznew |
---|
1696 | nznew = nz |
---|
1697 | endif |
---|
1698 | do i=nz1+1,nznew |
---|
1699 | if ( z. eq. zgrid(i) ) then |
---|
1700 | grid_R8=i |
---|
1701 | return |
---|
1702 | elseif ( z .le. zgrid(i) ) then |
---|
1703 | grid_R8 = i-1 |
---|
1704 | return |
---|
1705 | endif |
---|
1706 | enddo |
---|
1707 | grid_R8 = nz |
---|
1708 | return |
---|
1709 | |
---|
1710 | end |
---|
1711 | |
---|
1712 | |
---|
1713 | |
---|
1714 | !c*************************************************** |
---|
1715 | !c*************************************************** |
---|
1716 | |
---|
1717 | subroutine flujo(date) |
---|
1718 | |
---|
1719 | |
---|
1720 | !c fgg nov 2002 first version |
---|
1721 | !c*************************************************** |
---|
1722 | use dimphy |
---|
1723 | use conc |
---|
1724 | implicit none |
---|
1725 | |
---|
1726 | |
---|
1727 | ! common variables and constants |
---|
1728 | include "dimensions.h" |
---|
1729 | include "param.h" |
---|
1730 | include 'param_v4.h' |
---|
1731 | include "clesphys.h" |
---|
1732 | |
---|
1733 | ! Arguments |
---|
1734 | |
---|
1735 | real date |
---|
1736 | integer, parameter :: dateyr = 2006 |
---|
1737 | |
---|
1738 | ! Local variable and constants |
---|
1739 | real, parameter :: dist_sol=0.72 |
---|
1740 | integer i |
---|
1741 | integer inter |
---|
1742 | real nada |
---|
1743 | |
---|
1744 | !c************************************************* |
---|
1745 | |
---|
1746 | if(dateyr.lt.1985.) date=1985. |
---|
1747 | if(dateyr.gt.2001.) date=2001. |
---|
1748 | |
---|
1749 | do i=1,ninter |
---|
1750 | fluxtop(i)=1. |
---|
1751 | !Variation of solar flux with 11 years solar cycle |
---|
1752 | !For more details, see Gonzalez-Galindo et al. 2005 |
---|
1753 | !To be improved in next versions |
---|
1754 | if(i.le.24 .and.solvarmod.eq.0) then |
---|
1755 | fluxtop(i)=(((ct1(i)+p1(i)*date)/2.) |
---|
1756 | $ *sin(2.*3.1416/11.*(date-1985.-3.1416)) |
---|
1757 | $ +(ct2(i)+p2(i)*date)+1.)*fluxtop(i) |
---|
1758 | |
---|
1759 | end if |
---|
1760 | ! The solar flux calculated |
---|
1761 | ! is corrected for |
---|
1762 | ! the actual Venus-Sun dist |
---|
1763 | fluxtop(i)=fluxtop(i)*(1/dist_sol)**2 |
---|
1764 | |
---|
1765 | !TEST |
---|
1766 | c fluxtop(i) = fluxtop(i)*10 |
---|
1767 | |
---|
1768 | end do |
---|
1769 | |
---|
1770 | return |
---|
1771 | end |
---|