| 1 | subroutine param_read |
|---|
| 2 | |
|---|
| 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 | |
|---|
| 16 | use datafile_mod, only: datadir |
|---|
| 17 | use mod_phys_lmdz_para, only : is_master |
|---|
| 18 | USE mod_phys_lmdz_transfert_para, ONLY: bcast |
|---|
| 19 | |
|---|
| 20 | implicit none |
|---|
| 21 | |
|---|
| 22 | |
|---|
| 23 | c local variables |
|---|
| 24 | |
|---|
| 25 | integer i,j,k,inter !indexes |
|---|
| 26 | integer ierr |
|---|
| 27 | real nada |
|---|
| 28 | |
|---|
| 29 | |
|---|
| 30 | c*************************+PROGRAM STARTS************************** |
|---|
| 31 | |
|---|
| 32 | c Reads tabulated functions |
|---|
| 33 | |
|---|
| 34 | if (is_master) then |
|---|
| 35 | |
|---|
| 36 | !Tabulated column amount |
|---|
| 37 | open(210, status = 'old', |
|---|
| 38 | c $file=trim(datadir)//'/EUVDAT/coln.dat',iostat=ierr) |
|---|
| 39 | $file=trim(datadir)//'/EUVDAT/param_v5/coln.dat',iostat=ierr) |
|---|
| 40 | |
|---|
| 41 | IF (ierr.NE.0) THEN |
|---|
| 42 | write(*,*)'cant find directory EUVDAT containing param_v5 subdir' |
|---|
| 43 | write(*,*)'(in aeronomars/param_read.F)' |
|---|
| 44 | write(*,*)'It should be in :', trim(datadir),'/' |
|---|
| 45 | write(*,*)'1) You can change this directory address in ' |
|---|
| 46 | write(*,*)' callphys.def with datadir=/path/to/dir' |
|---|
| 47 | write(*,*)'2) If necessary, EUVDAT (and other datafiles)' |
|---|
| 48 | write(*,*)' can be obtained online on:' |
|---|
| 49 | write(*,*)' http://www.lmd.jussieu.fr/~lmdz/planets/mars/datadir' |
|---|
| 50 | STOP |
|---|
| 51 | ENDIF |
|---|
| 52 | |
|---|
| 53 | !Tabulated photoabsorption coefficients |
|---|
| 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') |
|---|
| 80 | |
|---|
| 81 | |
|---|
| 82 | do i=210,300,10 |
|---|
| 83 | read(i,*) |
|---|
| 84 | read(i,*) |
|---|
| 85 | end do |
|---|
| 86 | |
|---|
| 87 | do i=150,180,10 |
|---|
| 88 | read(i,*) |
|---|
| 89 | read(i,*) |
|---|
| 90 | end do |
|---|
| 91 | |
|---|
| 92 | do i=390,510,10 |
|---|
| 93 | read(i,*) |
|---|
| 94 | read(i,*) |
|---|
| 95 | enddo |
|---|
| 96 | |
|---|
| 97 | do i=nz2,1,-1 |
|---|
| 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) |
|---|
| 100 | end do |
|---|
| 101 | |
|---|
| 102 | do i=nz2,1,-1 |
|---|
| 103 | read(220,*) (jabsifotsintpar(i,2,j),j=1,16) |
|---|
| 104 | end do |
|---|
| 105 | |
|---|
| 106 | do i=nz2,1,-1 |
|---|
| 107 | read(230,*) (jabsifotsintpar(i,3,j),j=1,16) |
|---|
| 108 | end do |
|---|
| 109 | |
|---|
| 110 | do i=nz2,1,-1 |
|---|
| 111 | read(240,*) (jabsifotsintpar(i,1,j),j=1,16) |
|---|
| 112 | end do |
|---|
| 113 | |
|---|
| 114 | do i=nz2,1,-1 |
|---|
| 115 | read(250,*) (jabsifotsintpar(i,2,j),j=17,24) |
|---|
| 116 | end do |
|---|
| 117 | |
|---|
| 118 | |
|---|
| 119 | do i=nz2,1,-1 |
|---|
| 120 | read(260,*) (jabsifotsintpar(i,2,j),j=25,31) |
|---|
| 121 | end do |
|---|
| 122 | |
|---|
| 123 | do i=nz2,1,-1 |
|---|
| 124 | read(270,*) (jabsifotsintpar(i,1,j),j=17,24) |
|---|
| 125 | end do |
|---|
| 126 | |
|---|
| 127 | do i=nz2,1,-1 |
|---|
| 128 | read(280,*) (jabsifotsintpar(i,1,j),j=25,31) |
|---|
| 129 | end do |
|---|
| 130 | |
|---|
| 131 | do i=nz2,1,-1 |
|---|
| 132 | read(290,*) jabsifotsintpar(i,1,32) |
|---|
| 133 | end do |
|---|
| 134 | |
|---|
| 135 | do i=nz2,1,-1 |
|---|
| 136 | read(300,*) (jabsifotsintpar(i,2,j),j=32,34) |
|---|
| 137 | end do |
|---|
| 138 | |
|---|
| 139 | do i=nz2,1,-1 |
|---|
| 140 | read(160,*) (jabsifotsintpar(i,5,j),j=1,15) |
|---|
| 141 | end do |
|---|
| 142 | |
|---|
| 143 | do i=nz2,1,-1 |
|---|
| 144 | read(150,*) (jabsifotsintpar(i,4,j),j=25,31) |
|---|
| 145 | end do |
|---|
| 146 | |
|---|
| 147 | do i=nz2,1,-1 |
|---|
| 148 | read(170,*) (jabsifotsintpar(i,6,j),j=25,35) |
|---|
| 149 | end do |
|---|
| 150 | |
|---|
| 151 | do i=nz2,1,-1 |
|---|
| 152 | read(180,*) (jabsifotsintpar(i,7,j),j=34,36) |
|---|
| 153 | end do |
|---|
| 154 | |
|---|
| 155 | do i=nz2,1,-1 |
|---|
| 156 | read(390,*) (jabsifotsintpar(i,8,j),j=2,16) |
|---|
| 157 | enddo |
|---|
| 158 | |
|---|
| 159 | do i=nz2,1,-1 |
|---|
| 160 | read(400,*) (jabsifotsintpar(i,8,j),j=17,24) |
|---|
| 161 | enddo |
|---|
| 162 | |
|---|
| 163 | do i=nz2,1,-1 |
|---|
| 164 | read(410,*) (jabsifotsintpar(i,9,j),j=1,16) |
|---|
| 165 | enddo |
|---|
| 166 | |
|---|
| 167 | do i=nz2,1,-1 |
|---|
| 168 | read(420,*) (jabsifotsintpar(i,10,j),j=2,16) |
|---|
| 169 | enddo |
|---|
| 170 | |
|---|
| 171 | do i=nz2,1,-1 |
|---|
| 172 | read(430,*) (jabsifotsintpar(i,10,j),j=17,24) |
|---|
| 173 | enddo |
|---|
| 174 | |
|---|
| 175 | do i=nz2,1,-1 |
|---|
| 176 | read(440,*) (jabsifotsintpar(i,10,j),j=25,32) |
|---|
| 177 | enddo |
|---|
| 178 | |
|---|
| 179 | do i=nz2,1,-1 |
|---|
| 180 | read(450,*) (jabsifotsintpar(i,11,j),j=2,16) |
|---|
| 181 | enddo |
|---|
| 182 | |
|---|
| 183 | do i=nz2,1,-1 |
|---|
| 184 | read(460,*) (jabsifotsintpar(i,11,j),j=17,24) |
|---|
| 185 | enddo |
|---|
| 186 | |
|---|
| 187 | do i=nz2,1,-1 |
|---|
| 188 | read(470,*) (jabsifotsintpar(i,11,j),j=25,29) |
|---|
| 189 | enddo |
|---|
| 190 | |
|---|
| 191 | do i=nz2,1,-1 |
|---|
| 192 | read(480,*) (jabsifotsintpar(i,12,j),j=2,16) |
|---|
| 193 | enddo |
|---|
| 194 | |
|---|
| 195 | do i=nz2,1,-1 |
|---|
| 196 | read(490,*) (jabsifotsintpar(i,13,j),j=2,16) |
|---|
| 197 | enddo |
|---|
| 198 | |
|---|
| 199 | do i=nz2,1,-1 |
|---|
| 200 | read(500,*) (jabsifotsintpar(i,13,j),j=17,24) |
|---|
| 201 | enddo |
|---|
| 202 | |
|---|
| 203 | do i=nz2,1,-1 |
|---|
| 204 | read(510,*) (jabsifotsintpar(i,13,j),j=25,36) |
|---|
| 205 | enddo |
|---|
| 206 | |
|---|
| 207 | do i=210,300,10 |
|---|
| 208 | close(i) |
|---|
| 209 | end do |
|---|
| 210 | |
|---|
| 211 | do i=150,180,10 |
|---|
| 212 | close(i) |
|---|
| 213 | end do |
|---|
| 214 | |
|---|
| 215 | do i=390,510,10 |
|---|
| 216 | close(i) |
|---|
| 217 | enddo |
|---|
| 218 | |
|---|
| 219 | |
|---|
| 220 | c set t0 |
|---|
| 221 | |
|---|
| 222 | do i=1,nz2 |
|---|
| 223 | t0(i)=195. |
|---|
| 224 | end do |
|---|
| 225 | |
|---|
| 226 | |
|---|
| 227 | do i=1,ninter |
|---|
| 228 | fluxtop(i)=1. |
|---|
| 229 | end do |
|---|
| 230 | |
|---|
| 231 | !Parameters for the variation of the solar flux with 11 years cycle |
|---|
| 232 | open(100,file=trim(datadir)//'/EUVDAT/param_v5/varflujo.dat') |
|---|
| 233 | read(100,*) |
|---|
| 234 | do i=1,24 |
|---|
| 235 | read(100,*) inter,ct1(i),p1(i),ct2(i),p2(i),nada |
|---|
| 236 | end do |
|---|
| 237 | close(100) |
|---|
| 238 | |
|---|
| 239 | c dissociation and ionization efficiencies |
|---|
| 240 | |
|---|
| 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 |
|---|
| 266 | |
|---|
| 267 | |
|---|
| 268 | c CO2, O2, NO |
|---|
| 269 | |
|---|
| 270 | open(120,file=trim(datadir)//'/EUVDAT/param_v5/efdis_inter.dat') |
|---|
| 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 |
|---|
| 282 | |
|---|
| 283 | |
|---|
| 284 | c N2 |
|---|
| 285 | |
|---|
| 286 | efdisn2(15)=0.1 |
|---|
| 287 | do inter=16,ninter |
|---|
| 288 | efdisn2(inter)=1. |
|---|
| 289 | enddo |
|---|
| 290 | |
|---|
| 291 | |
|---|
| 292 | c CO |
|---|
| 293 | |
|---|
| 294 | efdisco(16)=0.5 |
|---|
| 295 | do inter=17,ninter |
|---|
| 296 | efdisco(inter)=1. |
|---|
| 297 | enddo |
|---|
| 298 | |
|---|
| 299 | |
|---|
| 300 | c O, N, H |
|---|
| 301 | |
|---|
| 302 | do inter=1,ninter |
|---|
| 303 | efdiso(inter)=0. |
|---|
| 304 | efdisn(inter)=0. |
|---|
| 305 | efdish(inter)=0. |
|---|
| 306 | enddo |
|---|
| 307 | |
|---|
| 308 | |
|---|
| 309 | c H2O, H2O2, O3, NO2 |
|---|
| 310 | |
|---|
| 311 | do inter=25,31 |
|---|
| 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 |
|---|
| 341 | |
|---|
| 342 | !For O(3p) total ionization under 91.1 nm |
|---|
| 343 | do inter=1,16 |
|---|
| 344 | efiono3p(inter)=1.d0 |
|---|
| 345 | enddo |
|---|
| 346 | |
|---|
| 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 |
|---|
| 369 | |
|---|
| 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 | |
|---|
| 385 | endif ! of if (is_master) |
|---|
| 386 | |
|---|
| 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 | |
|---|
| 424 | return |
|---|
| 425 | |
|---|
| 426 | |
|---|
| 427 | end |
|---|
| 428 | |
|---|