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