1 | subroutine param_read_e107 |
---|
2 | |
---|
3 | use dimphy |
---|
4 | use conc |
---|
5 | implicit none |
---|
6 | |
---|
7 | |
---|
8 | c common variables and constants |
---|
9 | include "dimensions.h" |
---|
10 | include 'param.h' |
---|
11 | include 'param_v4.h' |
---|
12 | c include 'datafile.h' |
---|
13 | include "clesphys.h" |
---|
14 | |
---|
15 | |
---|
16 | c local variables |
---|
17 | |
---|
18 | integer i,j,k,inter !indexes |
---|
19 | integer ierr,lnblnk |
---|
20 | real nada |
---|
21 | character*13 filename |
---|
22 | character (len=100) :: datafile="/u/forget/WWW/datagcm/datafile" |
---|
23 | |
---|
24 | c*************************+PROGRAM STARTS************************** |
---|
25 | |
---|
26 | |
---|
27 | c Reads tabulated functions |
---|
28 | |
---|
29 | !Tabulated column amount |
---|
30 | open(210, status = 'old', |
---|
31 | c $file=trim(datafile)//'/EUVDAT/coln.dat',iostat=ierr) |
---|
32 | $file=trim(datafile)//'/EUVDAT/param_v6/coln.dat',iostat=ierr) |
---|
33 | |
---|
34 | IF (ierr.NE.0) THEN |
---|
35 | write(*,*)'cant find directory EUVDAT containing param_v6 subdir' |
---|
36 | write(*,*)'(in aeronomars/param_read.F)' |
---|
37 | write(*,*)'It should be in :', trim(datafile),'/' |
---|
38 | write(*,*)'1) You can change this directory address in ' |
---|
39 | write(*,*)' callphys.def with datadir=/path/to/dir' |
---|
40 | write(*,*)'2) If necessary, EUVDAT (and other datafiles)' |
---|
41 | write(*,*)' can be obtained online on:' |
---|
42 | write(*,*)' http://www.lmd.jussieu.fr/~forget/datagcm/datafile' |
---|
43 | STOP |
---|
44 | ENDIF |
---|
45 | |
---|
46 | !Tabulated photoabsorption coefficients |
---|
47 | open(220,file=trim(datafile)//'/EUVDAT/param_v6/trans2_an.dat') |
---|
48 | open(230,file=trim(datafile)//'/EUVDAT/param_v6/trans3_an.dat') |
---|
49 | open(240,file=trim(datafile)//'/EUVDAT/param_v6/trans1_an.dat') |
---|
50 | open(250,file=trim(datafile)//'/EUVDAT/param_v6/trans2_bn.dat') |
---|
51 | open(260,file=trim(datafile)//'/EUVDAT/param_v6/trans2_cn.dat') |
---|
52 | open(300,file=trim(datafile)//'/EUVDAT/param_v6/trans2_dn.dat') |
---|
53 | open(270,file=trim(datafile)//'/EUVDAT/param_v6/trans1_bn.dat') |
---|
54 | open(280,file=trim(datafile)//'/EUVDAT/param_v6/trans1_cn.dat') |
---|
55 | open(290,file=trim(datafile)//'/EUVDAT/param_v6/trans1_dn.dat') |
---|
56 | open(150,file=trim(datafile)//'/EUVDAT/param_v6/trans4n.dat') |
---|
57 | open(160,file=trim(datafile)//'/EUVDAT/param_v6/trans5n.dat') |
---|
58 | open(170,file=trim(datafile)//'/EUVDAT/param_v6/trans6n.dat') |
---|
59 | open(180,file=trim(datafile)//'/EUVDAT/param_v6/trans7n.dat') |
---|
60 | open(390,file=trim(datafile)//'/EUVDAT/param_v6/trans8_an.dat') |
---|
61 | open(400,file=trim(datafile)//'/EUVDAT/param_v6/trans8_bn.dat') |
---|
62 | open(410,file=trim(datafile)//'/EUVDAT/param_v6/trans9n.dat') |
---|
63 | open(420,file=trim(datafile)//'/EUVDAT/param_v6/trans10_an.dat') |
---|
64 | open(430,file=trim(datafile)//'/EUVDAT/param_v6/trans10_bn.dat') |
---|
65 | open(440,file=trim(datafile)//'/EUVDAT/param_v6/trans10_cn.dat') |
---|
66 | open(450,file=trim(datafile)//'/EUVDAT/param_v6/trans11_an.dat') |
---|
67 | open(460,file=trim(datafile)//'/EUVDAT/param_v6/trans11_bn.dat') |
---|
68 | open(470,file=trim(datafile)//'/EUVDAT/param_v6/trans11_cn.dat') |
---|
69 | open(480,file=trim(datafile)//'/EUVDAT/param_v6/trans12n.dat') |
---|
70 | open(490,file=trim(datafile)//'/EUVDAT/param_v6/trans13_an.dat') |
---|
71 | open(500,file=trim(datafile)//'/EUVDAT/param_v6/trans13_bn.dat') |
---|
72 | open(510,file=trim(datafile)//'/EUVDAT/param_v6/trans13_cn.dat') |
---|
73 | |
---|
74 | |
---|
75 | do i=210,300,10 |
---|
76 | read(i,*) |
---|
77 | read(i,*) |
---|
78 | end do |
---|
79 | |
---|
80 | do i=150,180,10 |
---|
81 | read(i,*) |
---|
82 | read(i,*) |
---|
83 | end do |
---|
84 | |
---|
85 | do i=390,510,10 |
---|
86 | read(i,*) |
---|
87 | read(i,*) |
---|
88 | enddo |
---|
89 | |
---|
90 | do i=nz2,1,-1 |
---|
91 | read(210,*) (c1_16(i,j),j=1,16),c17_24(i),c25_29(i),c30_31(i), |
---|
92 | $ c32(i),c33(i),c34(i),c35(i),c36(i) |
---|
93 | end do |
---|
94 | |
---|
95 | do i=nz2,1,-1 |
---|
96 | read(220,*) (jabsifotsintpar(i,2,j),j=1,16) |
---|
97 | end do |
---|
98 | |
---|
99 | do i=nz2,1,-1 |
---|
100 | read(230,*) (jabsifotsintpar(i,3,j),j=1,16) |
---|
101 | end do |
---|
102 | |
---|
103 | do i=nz2,1,-1 |
---|
104 | read(240,*) (jabsifotsintpar(i,1,j),j=1,16) |
---|
105 | end do |
---|
106 | |
---|
107 | do i=nz2,1,-1 |
---|
108 | read(250,*) (jabsifotsintpar(i,2,j),j=17,24) |
---|
109 | end do |
---|
110 | |
---|
111 | |
---|
112 | do i=nz2,1,-1 |
---|
113 | read(260,*) (jabsifotsintpar(i,2,j),j=25,31) |
---|
114 | end do |
---|
115 | |
---|
116 | do i=nz2,1,-1 |
---|
117 | read(270,*) (jabsifotsintpar(i,1,j),j=17,24) |
---|
118 | end do |
---|
119 | |
---|
120 | do i=nz2,1,-1 |
---|
121 | read(280,*) (jabsifotsintpar(i,1,j),j=25,31) |
---|
122 | end do |
---|
123 | |
---|
124 | do i=nz2,1,-1 |
---|
125 | read(290,*) jabsifotsintpar(i,1,32) |
---|
126 | end do |
---|
127 | |
---|
128 | do i=nz2,1,-1 |
---|
129 | read(300,*) (jabsifotsintpar(i,2,j),j=32,34) |
---|
130 | end do |
---|
131 | |
---|
132 | do i=nz2,1,-1 |
---|
133 | read(160,*) (jabsifotsintpar(i,5,j),j=1,15) |
---|
134 | end do |
---|
135 | |
---|
136 | do i=nz2,1,-1 |
---|
137 | read(150,*) (jabsifotsintpar(i,4,j),j=25,31) |
---|
138 | end do |
---|
139 | |
---|
140 | do i=nz2,1,-1 |
---|
141 | read(170,*) (jabsifotsintpar(i,6,j),j=25,35) |
---|
142 | end do |
---|
143 | |
---|
144 | do i=nz2,1,-1 |
---|
145 | read(180,*) (jabsifotsintpar(i,7,j),j=34,36) |
---|
146 | end do |
---|
147 | |
---|
148 | do i=nz2,1,-1 |
---|
149 | read(390,*) (jabsifotsintpar(i,8,j),j=2,16) |
---|
150 | enddo |
---|
151 | |
---|
152 | do i=nz2,1,-1 |
---|
153 | read(400,*) (jabsifotsintpar(i,8,j),j=17,24) |
---|
154 | enddo |
---|
155 | |
---|
156 | do i=nz2,1,-1 |
---|
157 | read(410,*) (jabsifotsintpar(i,9,j),j=1,16) |
---|
158 | enddo |
---|
159 | |
---|
160 | do i=nz2,1,-1 |
---|
161 | read(420,*) (jabsifotsintpar(i,10,j),j=2,16) |
---|
162 | enddo |
---|
163 | |
---|
164 | do i=nz2,1,-1 |
---|
165 | read(430,*) (jabsifotsintpar(i,10,j),j=17,24) |
---|
166 | enddo |
---|
167 | |
---|
168 | do i=nz2,1,-1 |
---|
169 | read(440,*) (jabsifotsintpar(i,10,j),j=25,32) |
---|
170 | enddo |
---|
171 | |
---|
172 | do i=nz2,1,-1 |
---|
173 | read(450,*) (jabsifotsintpar(i,11,j),j=2,16) |
---|
174 | enddo |
---|
175 | |
---|
176 | do i=nz2,1,-1 |
---|
177 | read(460,*) (jabsifotsintpar(i,11,j),j=17,24) |
---|
178 | enddo |
---|
179 | |
---|
180 | do i=nz2,1,-1 |
---|
181 | read(470,*) (jabsifotsintpar(i,11,j),j=25,29) |
---|
182 | enddo |
---|
183 | |
---|
184 | do i=nz2,1,-1 |
---|
185 | read(480,*) (jabsifotsintpar(i,12,j),j=2,16) |
---|
186 | enddo |
---|
187 | |
---|
188 | do i=nz2,1,-1 |
---|
189 | read(490,*) (jabsifotsintpar(i,13,j),j=2,16) |
---|
190 | enddo |
---|
191 | |
---|
192 | do i=nz2,1,-1 |
---|
193 | read(500,*) (jabsifotsintpar(i,13,j),j=17,24) |
---|
194 | enddo |
---|
195 | |
---|
196 | do i=nz2,1,-1 |
---|
197 | read(510,*) (jabsifotsintpar(i,13,j),j=25,36) |
---|
198 | enddo |
---|
199 | |
---|
200 | do i=210,300,10 |
---|
201 | close(i) |
---|
202 | end do |
---|
203 | |
---|
204 | do i=150,180,10 |
---|
205 | close(i) |
---|
206 | end do |
---|
207 | |
---|
208 | do i=390,510,10 |
---|
209 | close(i) |
---|
210 | enddo |
---|
211 | |
---|
212 | |
---|
213 | c set t0 |
---|
214 | |
---|
215 | do i=1,nz2 |
---|
216 | t0(i)=195. |
---|
217 | end do |
---|
218 | |
---|
219 | |
---|
220 | do i=1,ninter |
---|
221 | fluxtop(i)=1. |
---|
222 | end do |
---|
223 | |
---|
224 | !Parameters for the variation of the solar flux with 11 years cycle |
---|
225 | open(620,file=trim(datafile)//'/EUVDAT/param_v6/fit_js_e107.dat') |
---|
226 | do i=1,ninter |
---|
227 | read(620,*) |
---|
228 | do j=1,nabs |
---|
229 | read(620,*)coefit0(i,j),coefit1(i,j),coefit2(i,j), |
---|
230 | $ coefit3(i,j),coefit4(i,j) |
---|
231 | enddo |
---|
232 | enddo |
---|
233 | close(620) |
---|
234 | |
---|
235 | |
---|
236 | !Tabulated values for E10.7 |
---|
237 | c if(solvaryear.eq.23) then |
---|
238 | c filename="e107_MY23.dat" |
---|
239 | c else if(solvaryear.eq.24) then |
---|
240 | c filename="e107_MY24.dat" |
---|
241 | c else if(solvaryear.eq.25) then |
---|
242 | c filename="e107_MY25.dat" |
---|
243 | c else if (solvaryear.eq.26) then |
---|
244 | c filename="e107_MY26.dat" |
---|
245 | c else if (solvaryear.eq.27) then |
---|
246 | c filename="e107_MY27.dat" |
---|
247 | c else if (solvaryear.eq.28) then |
---|
248 | c filename="e107_MY28.dat" |
---|
249 | c else if (solvaryear.eq.29) then |
---|
250 | c filename="e107_MY29.dat" |
---|
251 | c else if(solvaryear.eq.30) then |
---|
252 | c filename="e107_MY30.dat" |
---|
253 | c else |
---|
254 | c write(*,*)"param_read_e107: " |
---|
255 | c write(*,*)"bad value for solvaryear in callphys.def" |
---|
256 | c write(*,*)"solvaryear must be between 24 and 30" |
---|
257 | c stop |
---|
258 | c endif |
---|
259 | |
---|
260 | c open(640,file=trim(datafile)//'/EUVDAT/param_v6/'//filename) |
---|
261 | c read(640,*) |
---|
262 | c do i=1,669 |
---|
263 | c read(640,*)date_e107(i),e107_tab(i) |
---|
264 | c write(*,*)'param_read_e107/292',date_e107(i),e107_tab(i),i |
---|
265 | c enddo |
---|
266 | c close(640) |
---|
267 | |
---|
268 | |
---|
269 | c dissociation and ionization efficiencies |
---|
270 | |
---|
271 | ! do inter=1,ninter |
---|
272 | ! efdisco2(inter)=0. |
---|
273 | ! efdiso2(inter)=0. |
---|
274 | ! efdish2(inter)=0. |
---|
275 | ! efdish2o(inter)=0. |
---|
276 | ! efdish2o2(inter)=0. |
---|
277 | ! efdiso3(inter)=0. |
---|
278 | ! efdisco(inter)=0. |
---|
279 | ! efdisn2(inter)=0. |
---|
280 | ! efdisno(inter)=0. |
---|
281 | ! efdisno2(inter)=0. |
---|
282 | ! efionco2(inter,1)=0. |
---|
283 | ! efionco2(inter,2)=0. |
---|
284 | ! efionco2(inter,3)=0. |
---|
285 | ! efionco2(inter,4)=0. |
---|
286 | ! efiono3p(inter)=0. |
---|
287 | ! efionn2(inter,1)=0. |
---|
288 | ! efionn2(inter,2)=0. |
---|
289 | ! efionco(inter,1)=0. |
---|
290 | ! efionco(inter,2)=0. |
---|
291 | ! efionco(inter,3)=0. |
---|
292 | ! efionn(inter)=0. |
---|
293 | ! efionh(inter)=0. |
---|
294 | ! efionno(inter)=0. |
---|
295 | ! enddo |
---|
296 | |
---|
297 | |
---|
298 | c CO2, O2, NO |
---|
299 | |
---|
300 | ! open(120,file=trim(datafile)//'/EUVDAT/param_v5/efdis_inter.dat') |
---|
301 | ! read(120,*) |
---|
302 | !! do i=1,21 |
---|
303 | !! read(120,*)inter,efdisco2(inter),efdiso2(inter),efdisno(inter) |
---|
304 | ! do inter=8,28 |
---|
305 | ! read(120,*)i,efdisco2(inter),efdiso2(inter),efdisno(inter) |
---|
306 | ! enddo |
---|
307 | ! do inter=29,ninter |
---|
308 | ! efdisco2(inter)=1. |
---|
309 | ! efdiso2(inter)=1. |
---|
310 | ! efdisno(inter)=1. |
---|
311 | ! enddo |
---|
312 | |
---|
313 | |
---|
314 | c N2 |
---|
315 | |
---|
316 | ! efdisn2(15)=0.1 |
---|
317 | ! do inter=16,ninter |
---|
318 | ! efdisn2(inter)=1. |
---|
319 | ! enddo |
---|
320 | |
---|
321 | |
---|
322 | c CO |
---|
323 | |
---|
324 | ! efdisco(16)=0.5 |
---|
325 | ! do inter=17,ninter |
---|
326 | ! efdisco(inter)=1. |
---|
327 | ! enddo |
---|
328 | |
---|
329 | |
---|
330 | c O, N, H |
---|
331 | |
---|
332 | ! do inter=1,ninter |
---|
333 | ! efdiso(inter)=0. |
---|
334 | ! efdisn(inter)=0. |
---|
335 | ! efdish(inter)=0. |
---|
336 | ! enddo |
---|
337 | |
---|
338 | |
---|
339 | c H2O, H2O2, O3, NO2 |
---|
340 | |
---|
341 | ! do inter=25,31 |
---|
342 | ! efdish2o(inter)=1. |
---|
343 | ! enddo |
---|
344 | ! do inter=25,35 |
---|
345 | ! efdish2o2(inter)=1. |
---|
346 | ! enddo |
---|
347 | ! do inter=34,36 |
---|
348 | ! efdiso3(inter)=1. |
---|
349 | ! enddo |
---|
350 | ! do inter=27,36 |
---|
351 | ! efdisno2(inter)=1. |
---|
352 | ! enddo |
---|
353 | ! do inter=1,15 |
---|
354 | ! efdish2(inter)=1. |
---|
355 | ! enddo |
---|
356 | |
---|
357 | !4 possible channels for CO2 ionization |
---|
358 | ! do inter=14,16 |
---|
359 | ! efionco2(inter,1)=1.-efdisco2(inter) |
---|
360 | ! enddo |
---|
361 | ! efionco2(13,1)=0.805*(1.-efdisco2(13)) |
---|
362 | ! efionco2(13,2)=0.195*(1.-efdisco2(13)) |
---|
363 | ! do inter=11,12 |
---|
364 | ! efionco2(inter,3)=1.-efdisco2(inter) |
---|
365 | ! enddo |
---|
366 | ! efionco2(10,3)=0.9*(1.-efdisco2(10)) |
---|
367 | ! efionco2(10,4)=0.1*(1.-efdisco2(10)) |
---|
368 | ! do inter=2,9 |
---|
369 | ! efionco2(inter,4)=1.-efdisco2(inter) |
---|
370 | ! enddo |
---|
371 | |
---|
372 | !For O(3p) total ionization under 91.1 nm |
---|
373 | ! do inter=1,16 |
---|
374 | ! efiono3p(inter)=1.d0 |
---|
375 | ! enddo |
---|
376 | |
---|
377 | !2 channels for N2 ionization |
---|
378 | ! do inter=9,15 |
---|
379 | ! efionn2(inter,1)=1.-efdisn2(inter) |
---|
380 | ! enddo |
---|
381 | ! do inter=2,8 |
---|
382 | ! efionn2(inter,2)=1.-efdisn2(inter) |
---|
383 | ! enddo |
---|
384 | |
---|
385 | !3 channels for CO ionization |
---|
386 | ! do inter=11,16 |
---|
387 | ! efionco(inter,1)=1.-efdisco(inter) |
---|
388 | ! enddo |
---|
389 | ! efionco(10,1)=0.87*(1.-efdisco(10)) |
---|
390 | ! efionco(10,2)=0.13*(1.-efdisco(10)) |
---|
391 | ! do inter=8,9 |
---|
392 | ! efionco(inter,2)=1.-efdisco(inter) |
---|
393 | ! enddo |
---|
394 | ! efionco(7,2)=0.1*(1.-efdisco(7)) |
---|
395 | ! efionco(7,3)=0.9*(1.-efdisco(7)) |
---|
396 | ! do inter=2,6 |
---|
397 | ! efionco(inter,3)=1.-efdisco(inter) |
---|
398 | ! enddo |
---|
399 | |
---|
400 | !Total ionization under 85 nm for N |
---|
401 | ! do inter=1,16 |
---|
402 | ! efionn(inter)=1. |
---|
403 | ! enddo |
---|
404 | |
---|
405 | !NO |
---|
406 | ! do inter=2,28 |
---|
407 | ! efionno(inter)=1.-efdisno(inter) |
---|
408 | ! enddo |
---|
409 | |
---|
410 | !Total ionization under 90 nm for H |
---|
411 | ! do inter=3,16 |
---|
412 | ! efionh(inter)=1. |
---|
413 | ! enddo |
---|
414 | |
---|
415 | |
---|
416 | return |
---|
417 | |
---|
418 | |
---|
419 | end |
---|
420 | |
---|