[38] | 1 | subroutine param_read |
---|
| 2 | |
---|
[1266] | 3 | use param_v4_h, only: jfotsout,crscabsi2, |
---|
| 4 | . c1_16,c17_24,c25_29,c30_31,c32,c33,c34,c35,c36, |
---|
| 5 | . co2crsc195,co2crsc295,t0, |
---|
| 6 | . jabsifotsintpar,ninter,nz2, |
---|
| 7 | . efdisco2,efdiso2,efdish2o, |
---|
| 8 | . efdish2o2,efdish2,efdiso3, |
---|
| 9 | . efdiso,efdisn,efdish, |
---|
| 10 | . efdisno,efdisn2,efdisno2, |
---|
| 11 | . efdisco,efionco2,efionn2, |
---|
| 12 | . efionco,efiono3p,efionn, |
---|
| 13 | . efionno,efionh, |
---|
| 14 | . fluxtop,ct1,ct2,p1,p2 |
---|
| 15 | |
---|
[1918] | 16 | use datafile_mod, only: datadir |
---|
| 17 | |
---|
[38] | 18 | implicit none |
---|
| 19 | |
---|
[635] | 20 | |
---|
[38] | 21 | c local variables |
---|
| 22 | |
---|
| 23 | integer i,j,k,inter !indexes |
---|
[705] | 24 | integer ierr |
---|
[38] | 25 | real nada |
---|
[635] | 26 | |
---|
| 27 | |
---|
[38] | 28 | c*************************+PROGRAM STARTS************************** |
---|
| 29 | |
---|
| 30 | c Reads tabulated functions |
---|
| 31 | |
---|
[635] | 32 | !Tabulated column amount |
---|
| 33 | open(210, status = 'old', |
---|
[1918] | 34 | c $file=trim(datadir)//'/EUVDAT/coln.dat',iostat=ierr) |
---|
| 35 | $file=trim(datadir)//'/EUVDAT/param_v5/coln.dat',iostat=ierr) |
---|
[38] | 36 | |
---|
[635] | 37 | IF (ierr.NE.0) THEN |
---|
[705] | 38 | write(*,*)'cant find directory EUVDAT containing param_v5 subdir' |
---|
[658] | 39 | write(*,*)'(in aeronomars/param_read.F)' |
---|
[1918] | 40 | write(*,*)'It should be in :', trim(datadir),'/' |
---|
[38] | 41 | write(*,*)'1) You can change this directory address in ' |
---|
[705] | 42 | write(*,*)' callphys.def with datadir=/path/to/dir' |
---|
[38] | 43 | write(*,*)'2) If necessary, EUVDAT (and other datafiles)' |
---|
| 44 | write(*,*)' can be obtained online on:' |
---|
[1381] | 45 | write(*,*)' http://www.lmd.jussieu.fr/~lmdz/planets/mars/datadir' |
---|
[38] | 46 | STOP |
---|
| 47 | ENDIF |
---|
[635] | 48 | |
---|
| 49 | !Tabulated photoabsorption coefficients |
---|
[1918] | 50 | open(220,file=trim(datadir)//'/EUVDAT/param_v5/j2_an.dat') |
---|
| 51 | open(230,file=trim(datadir)//'/EUVDAT/param_v5/j3_an.dat') |
---|
| 52 | open(240,file=trim(datadir)//'/EUVDAT/param_v5/j1_an.dat') |
---|
| 53 | open(250,file=trim(datadir)//'/EUVDAT/param_v5/j2_bn.dat') |
---|
| 54 | open(260,file=trim(datadir)//'/EUVDAT/param_v5/j2_cn.dat') |
---|
| 55 | open(300,file=trim(datadir)//'/EUVDAT//param_v5/j2_dn.dat') |
---|
| 56 | open(270,file=trim(datadir)//'/EUVDAT//param_v5/j1_bn.dat') |
---|
| 57 | open(280,file=trim(datadir)//'/EUVDAT//param_v5/j1_cn.dat') |
---|
| 58 | open(290,file=trim(datadir)//'/EUVDAT//param_v5/j1_dn.dat') |
---|
| 59 | open(150,file=trim(datadir)//'/EUVDAT//param_v5/j4n.dat') |
---|
| 60 | open(160,file=trim(datadir)//'/EUVDAT//param_v5/j5n.dat') |
---|
| 61 | open(170,file=trim(datadir)//'/EUVDAT//param_v5/j6n.dat') |
---|
| 62 | open(180,file=trim(datadir)//'/EUVDAT//param_v5/j7n.dat') |
---|
| 63 | open(390,file=trim(datadir)//'/EUVDAT//param_v5/j8_an.dat') |
---|
| 64 | open(400,file=trim(datadir)//'/EUVDAT//param_v5/j8_bn.dat') |
---|
| 65 | open(410,file=trim(datadir)//'/EUVDAT//param_v5/j9n.dat') |
---|
| 66 | open(420,file=trim(datadir)//'/EUVDAT//param_v5/j10_an.dat') |
---|
| 67 | open(430,file=trim(datadir)//'/EUVDAT//param_v5/j10_bn.dat') |
---|
| 68 | open(440,file=trim(datadir)//'/EUVDAT//param_v5/j10_cn.dat') |
---|
| 69 | open(450,file=trim(datadir)//'/EUVDAT//param_v5/j11_an.dat') |
---|
| 70 | open(460,file=trim(datadir)//'/EUVDAT//param_v5/j11_bn.dat') |
---|
| 71 | open(470,file=trim(datadir)//'/EUVDAT//param_v5/j11_cn.dat') |
---|
| 72 | open(480,file=trim(datadir)//'/EUVDAT//param_v5/j12n.dat') |
---|
| 73 | open(490,file=trim(datadir)//'/EUVDAT//param_v5/j13_an.dat') |
---|
| 74 | open(500,file=trim(datadir)//'/EUVDAT//param_v5/j13_bn.dat') |
---|
| 75 | open(510,file=trim(datadir)//'/EUVDAT//param_v5/j13_cn.dat') |
---|
[38] | 76 | |
---|
[635] | 77 | |
---|
| 78 | do i=210,300,10 |
---|
[38] | 79 | read(i,*) |
---|
| 80 | read(i,*) |
---|
| 81 | end do |
---|
| 82 | |
---|
[635] | 83 | do i=150,180,10 |
---|
[38] | 84 | read(i,*) |
---|
| 85 | read(i,*) |
---|
| 86 | end do |
---|
| 87 | |
---|
[635] | 88 | do i=390,510,10 |
---|
| 89 | read(i,*) |
---|
| 90 | read(i,*) |
---|
| 91 | enddo |
---|
| 92 | |
---|
[38] | 93 | do i=nz2,1,-1 |
---|
[635] | 94 | read(210,*) (c1_16(i,j),j=1,16),c17_24(i),c25_29(i),c30_31(i), |
---|
| 95 | $ c32(i),c33(i),c34(i),c35(i),c36(i) |
---|
[38] | 96 | end do |
---|
| 97 | |
---|
| 98 | do i=nz2,1,-1 |
---|
[658] | 99 | read(220,*) (jabsifotsintpar(i,2,j),j=1,16) |
---|
[38] | 100 | end do |
---|
| 101 | |
---|
| 102 | do i=nz2,1,-1 |
---|
[658] | 103 | read(230,*) (jabsifotsintpar(i,3,j),j=1,16) |
---|
[38] | 104 | end do |
---|
| 105 | |
---|
| 106 | do i=nz2,1,-1 |
---|
[658] | 107 | read(240,*) (jabsifotsintpar(i,1,j),j=1,16) |
---|
[38] | 108 | end do |
---|
| 109 | |
---|
| 110 | do i=nz2,1,-1 |
---|
[658] | 111 | read(250,*) (jabsifotsintpar(i,2,j),j=17,24) |
---|
[38] | 112 | end do |
---|
| 113 | |
---|
[635] | 114 | |
---|
[38] | 115 | do i=nz2,1,-1 |
---|
[658] | 116 | read(260,*) (jabsifotsintpar(i,2,j),j=25,31) |
---|
[38] | 117 | end do |
---|
| 118 | |
---|
| 119 | do i=nz2,1,-1 |
---|
[658] | 120 | read(270,*) (jabsifotsintpar(i,1,j),j=17,24) |
---|
[38] | 121 | end do |
---|
| 122 | |
---|
| 123 | do i=nz2,1,-1 |
---|
[658] | 124 | read(280,*) (jabsifotsintpar(i,1,j),j=25,31) |
---|
[38] | 125 | end do |
---|
| 126 | |
---|
| 127 | do i=nz2,1,-1 |
---|
[658] | 128 | read(290,*) jabsifotsintpar(i,1,32) |
---|
[38] | 129 | end do |
---|
| 130 | |
---|
| 131 | do i=nz2,1,-1 |
---|
[658] | 132 | read(300,*) (jabsifotsintpar(i,2,j),j=32,34) |
---|
[38] | 133 | end do |
---|
| 134 | |
---|
| 135 | do i=nz2,1,-1 |
---|
[658] | 136 | read(160,*) (jabsifotsintpar(i,5,j),j=1,15) |
---|
[38] | 137 | end do |
---|
| 138 | |
---|
| 139 | do i=nz2,1,-1 |
---|
[658] | 140 | read(150,*) (jabsifotsintpar(i,4,j),j=25,31) |
---|
[38] | 141 | end do |
---|
| 142 | |
---|
[635] | 143 | do i=nz2,1,-1 |
---|
[658] | 144 | read(170,*) (jabsifotsintpar(i,6,j),j=25,35) |
---|
[635] | 145 | end do |
---|
| 146 | |
---|
| 147 | do i=nz2,1,-1 |
---|
[658] | 148 | read(180,*) (jabsifotsintpar(i,7,j),j=34,36) |
---|
[635] | 149 | end do |
---|
| 150 | |
---|
| 151 | do i=nz2,1,-1 |
---|
[658] | 152 | read(390,*) (jabsifotsintpar(i,8,j),j=2,16) |
---|
[635] | 153 | enddo |
---|
| 154 | |
---|
| 155 | do i=nz2,1,-1 |
---|
[658] | 156 | read(400,*) (jabsifotsintpar(i,8,j),j=17,24) |
---|
[635] | 157 | enddo |
---|
| 158 | |
---|
| 159 | do i=nz2,1,-1 |
---|
[658] | 160 | read(410,*) (jabsifotsintpar(i,9,j),j=1,16) |
---|
[635] | 161 | enddo |
---|
| 162 | |
---|
| 163 | do i=nz2,1,-1 |
---|
[658] | 164 | read(420,*) (jabsifotsintpar(i,10,j),j=2,16) |
---|
[635] | 165 | enddo |
---|
| 166 | |
---|
| 167 | do i=nz2,1,-1 |
---|
[658] | 168 | read(430,*) (jabsifotsintpar(i,10,j),j=17,24) |
---|
[635] | 169 | enddo |
---|
| 170 | |
---|
| 171 | do i=nz2,1,-1 |
---|
[658] | 172 | read(440,*) (jabsifotsintpar(i,10,j),j=25,32) |
---|
[635] | 173 | enddo |
---|
| 174 | |
---|
| 175 | do i=nz2,1,-1 |
---|
[658] | 176 | read(450,*) (jabsifotsintpar(i,11,j),j=2,16) |
---|
[635] | 177 | enddo |
---|
| 178 | |
---|
| 179 | do i=nz2,1,-1 |
---|
[658] | 180 | read(460,*) (jabsifotsintpar(i,11,j),j=17,24) |
---|
[635] | 181 | enddo |
---|
| 182 | |
---|
| 183 | do i=nz2,1,-1 |
---|
[658] | 184 | read(470,*) (jabsifotsintpar(i,11,j),j=25,29) |
---|
[635] | 185 | enddo |
---|
| 186 | |
---|
| 187 | do i=nz2,1,-1 |
---|
[658] | 188 | read(480,*) (jabsifotsintpar(i,12,j),j=2,16) |
---|
[635] | 189 | enddo |
---|
| 190 | |
---|
| 191 | do i=nz2,1,-1 |
---|
[658] | 192 | read(490,*) (jabsifotsintpar(i,13,j),j=2,16) |
---|
[635] | 193 | enddo |
---|
| 194 | |
---|
| 195 | do i=nz2,1,-1 |
---|
[658] | 196 | read(500,*) (jabsifotsintpar(i,13,j),j=17,24) |
---|
[635] | 197 | enddo |
---|
| 198 | |
---|
| 199 | do i=nz2,1,-1 |
---|
[658] | 200 | read(510,*) (jabsifotsintpar(i,13,j),j=25,36) |
---|
[635] | 201 | enddo |
---|
| 202 | |
---|
| 203 | do i=210,300,10 |
---|
[38] | 204 | close(i) |
---|
| 205 | end do |
---|
| 206 | |
---|
[635] | 207 | do i=150,180,10 |
---|
[38] | 208 | close(i) |
---|
| 209 | end do |
---|
| 210 | |
---|
[635] | 211 | do i=390,510,10 |
---|
| 212 | close(i) |
---|
| 213 | enddo |
---|
[38] | 214 | |
---|
| 215 | |
---|
[635] | 216 | c set t0 |
---|
| 217 | |
---|
| 218 | do i=1,nz2 |
---|
| 219 | t0(i)=195. |
---|
[38] | 220 | end do |
---|
| 221 | |
---|
[635] | 222 | |
---|
[38] | 223 | do i=1,ninter |
---|
[635] | 224 | fluxtop(i)=1. |
---|
[38] | 225 | end do |
---|
| 226 | |
---|
[635] | 227 | !Parameters for the variation of the solar flux with 11 years cycle |
---|
[1918] | 228 | open(100,file=trim(datadir)//'/EUVDAT/param_v5/varflujo.dat') |
---|
[635] | 229 | read(100,*) |
---|
[38] | 230 | do i=1,24 |
---|
[635] | 231 | read(100,*) inter,ct1(i),p1(i),ct2(i),p2(i),nada |
---|
[38] | 232 | end do |
---|
[635] | 233 | close(100) |
---|
[38] | 234 | |
---|
[635] | 235 | c dissociation and ionization efficiencies |
---|
[38] | 236 | |
---|
[635] | 237 | do inter=1,ninter |
---|
| 238 | efdisco2(inter)=0. |
---|
| 239 | efdiso2(inter)=0. |
---|
| 240 | efdish2(inter)=0. |
---|
| 241 | efdish2o(inter)=0. |
---|
| 242 | efdish2o2(inter)=0. |
---|
| 243 | efdiso3(inter)=0. |
---|
| 244 | efdisco(inter)=0. |
---|
| 245 | efdisn2(inter)=0. |
---|
| 246 | efdisno(inter)=0. |
---|
| 247 | efdisno2(inter)=0. |
---|
| 248 | efionco2(inter,1)=0. |
---|
| 249 | efionco2(inter,2)=0. |
---|
| 250 | efionco2(inter,3)=0. |
---|
| 251 | efionco2(inter,4)=0. |
---|
| 252 | efiono3p(inter)=0. |
---|
| 253 | efionn2(inter,1)=0. |
---|
| 254 | efionn2(inter,2)=0. |
---|
| 255 | efionco(inter,1)=0. |
---|
| 256 | efionco(inter,2)=0. |
---|
| 257 | efionco(inter,3)=0. |
---|
| 258 | efionn(inter)=0. |
---|
| 259 | efionh(inter)=0. |
---|
| 260 | efionno(inter)=0. |
---|
| 261 | enddo |
---|
[38] | 262 | |
---|
| 263 | |
---|
[635] | 264 | c CO2, O2, NO |
---|
[38] | 265 | |
---|
[1918] | 266 | open(120,file=trim(datadir)//'/EUVDAT/param_v5/efdis_inter.dat') |
---|
[635] | 267 | read(120,*) |
---|
| 268 | ! do i=1,21 |
---|
| 269 | ! read(120,*)inter,efdisco2(inter),efdiso2(inter),efdisno(inter) |
---|
| 270 | do inter=8,28 |
---|
| 271 | read(120,*)i,efdisco2(inter),efdiso2(inter),efdisno(inter) |
---|
| 272 | enddo |
---|
| 273 | do inter=29,ninter |
---|
| 274 | efdisco2(inter)=1. |
---|
| 275 | efdiso2(inter)=1. |
---|
| 276 | efdisno(inter)=1. |
---|
| 277 | enddo |
---|
[38] | 278 | |
---|
| 279 | |
---|
[635] | 280 | c N2 |
---|
[38] | 281 | |
---|
[635] | 282 | efdisn2(15)=0.1 |
---|
| 283 | do inter=16,ninter |
---|
| 284 | efdisn2(inter)=1. |
---|
| 285 | enddo |
---|
[38] | 286 | |
---|
| 287 | |
---|
[635] | 288 | c CO |
---|
[38] | 289 | |
---|
[635] | 290 | efdisco(16)=0.5 |
---|
| 291 | do inter=17,ninter |
---|
| 292 | efdisco(inter)=1. |
---|
| 293 | enddo |
---|
[38] | 294 | |
---|
[635] | 295 | |
---|
| 296 | c O, N, H |
---|
[38] | 297 | |
---|
[635] | 298 | do inter=1,ninter |
---|
| 299 | efdiso(inter)=0. |
---|
| 300 | efdisn(inter)=0. |
---|
| 301 | efdish(inter)=0. |
---|
| 302 | enddo |
---|
[38] | 303 | |
---|
[635] | 304 | |
---|
| 305 | c H2O, H2O2, O3, NO2 |
---|
| 306 | |
---|
[38] | 307 | do inter=25,31 |
---|
[635] | 308 | efdish2o(inter)=1. |
---|
| 309 | enddo |
---|
| 310 | do inter=25,35 |
---|
| 311 | efdish2o2(inter)=1. |
---|
| 312 | enddo |
---|
| 313 | do inter=34,36 |
---|
| 314 | efdiso3(inter)=1. |
---|
| 315 | enddo |
---|
| 316 | do inter=27,36 |
---|
| 317 | efdisno2(inter)=1. |
---|
| 318 | enddo |
---|
| 319 | do inter=1,15 |
---|
| 320 | efdish2(inter)=1. |
---|
| 321 | enddo |
---|
| 322 | |
---|
| 323 | !4 possible channels for CO2 ionization |
---|
| 324 | do inter=14,16 |
---|
| 325 | efionco2(inter,1)=1.-efdisco2(inter) |
---|
| 326 | enddo |
---|
| 327 | efionco2(13,1)=0.805*(1.-efdisco2(13)) |
---|
| 328 | efionco2(13,2)=0.195*(1.-efdisco2(13)) |
---|
| 329 | do inter=11,12 |
---|
| 330 | efionco2(inter,3)=1.-efdisco2(inter) |
---|
| 331 | enddo |
---|
| 332 | efionco2(10,3)=0.9*(1.-efdisco2(10)) |
---|
| 333 | efionco2(10,4)=0.1*(1.-efdisco2(10)) |
---|
| 334 | do inter=2,9 |
---|
| 335 | efionco2(inter,4)=1.-efdisco2(inter) |
---|
| 336 | enddo |
---|
[38] | 337 | |
---|
[635] | 338 | !For O(3p) total ionization under 91.1 nm |
---|
| 339 | do inter=1,16 |
---|
| 340 | efiono3p(inter)=1.d0 |
---|
| 341 | enddo |
---|
[38] | 342 | |
---|
[635] | 343 | !2 channels for N2 ionization |
---|
| 344 | do inter=9,15 |
---|
| 345 | efionn2(inter,1)=1.-efdisn2(inter) |
---|
| 346 | enddo |
---|
| 347 | do inter=2,8 |
---|
| 348 | efionn2(inter,2)=1.-efdisn2(inter) |
---|
| 349 | enddo |
---|
| 350 | |
---|
| 351 | !3 channels for CO ionization |
---|
| 352 | do inter=11,16 |
---|
| 353 | efionco(inter,1)=1.-efdisco(inter) |
---|
| 354 | enddo |
---|
| 355 | efionco(10,1)=0.87*(1.-efdisco(10)) |
---|
| 356 | efionco(10,2)=0.13*(1.-efdisco(10)) |
---|
| 357 | do inter=8,9 |
---|
| 358 | efionco(inter,2)=1.-efdisco(inter) |
---|
| 359 | enddo |
---|
| 360 | efionco(7,2)=0.1*(1.-efdisco(7)) |
---|
| 361 | efionco(7,3)=0.9*(1.-efdisco(7)) |
---|
| 362 | do inter=2,6 |
---|
| 363 | efionco(inter,3)=1.-efdisco(inter) |
---|
| 364 | enddo |
---|
[38] | 365 | |
---|
[635] | 366 | !Total ionization under 85 nm for N |
---|
| 367 | do inter=1,16 |
---|
| 368 | efionn(inter)=1. |
---|
| 369 | enddo |
---|
| 370 | |
---|
| 371 | !NO |
---|
| 372 | do inter=2,28 |
---|
| 373 | efionno(inter)=1.-efdisno(inter) |
---|
| 374 | enddo |
---|
| 375 | |
---|
| 376 | !Total ionization under 90 nm for H |
---|
| 377 | do inter=3,16 |
---|
| 378 | efionh(inter)=1. |
---|
| 379 | enddo |
---|
| 380 | |
---|
| 381 | |
---|
[38] | 382 | return |
---|
| 383 | |
---|
| 384 | |
---|
| 385 | end |
---|
[635] | 386 | |
---|