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