[334] | 1 | subroutine read_phototable |
---|
| 2 | c |
---|
| 3 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
| 4 | c |
---|
| 5 | c subject: |
---|
| 6 | c -------- |
---|
| 7 | c |
---|
| 8 | c read photolysis lookup table |
---|
| 9 | c |
---|
| 10 | c VERSION: 17/03/2011 |
---|
| 11 | c |
---|
| 12 | c Author: Franck Lefevre |
---|
| 13 | c |
---|
| 14 | c Arguments: |
---|
| 15 | c ---------- |
---|
| 16 | c |
---|
| 17 | c The output variable is jphot and is put in common chimiedata. |
---|
| 18 | c |
---|
| 19 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
| 20 | c |
---|
[460] | 21 | ! to use 'getin' |
---|
| 22 | USE ioipsl_getincom |
---|
| 23 | |
---|
[334] | 24 | implicit none |
---|
| 25 | c |
---|
| 26 | #include "dimensions.h" |
---|
| 27 | #include "chimiedata.h" |
---|
| 28 | #include "datafile.h" |
---|
| 29 | c |
---|
| 30 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
| 31 | c local: |
---|
| 32 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
| 33 | c |
---|
| 34 | integer fic, ij, iozo, isza, itemp, iz, itau, ierr |
---|
| 35 | c |
---|
| 36 | real xsza |
---|
[460] | 37 | character(len=128) :: phototable ! photolysis table file name |
---|
[334] | 38 | c |
---|
| 39 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
| 40 | c |
---|
[460] | 41 | ! set photolysis table input file name |
---|
| 42 | phototable="jmars.20111014" ! default |
---|
| 43 | ! look for a " phototable= ..." option in def files |
---|
| 44 | call getin("phototable",phototable) |
---|
| 45 | |
---|
[334] | 46 | fic = 81 |
---|
| 47 | |
---|
| 48 | open(fic, form = 'formatted', status = 'old', |
---|
[461] | 49 | &file =trim(datafile)//"/"//trim(phototable),iostat=ierr) |
---|
[334] | 50 | |
---|
| 51 | IF (ierr.NE.0) THEN |
---|
[460] | 52 | write(*,*)'Error : cannot open photolysis lookup table ', |
---|
| 53 | & trim(phototable) |
---|
[334] | 54 | write(*,*)'(in aeronomars/init_chemistry.F)' |
---|
| 55 | write(*,*)'It should be in :',trim(datafile),'/' |
---|
[460] | 56 | write(*,*)'1) You can change this directory path in physiq.def' |
---|
| 57 | write(*,*)' with:' |
---|
| 58 | write(*,*)' datadir=/path/to/the/directory' |
---|
| 59 | write(*,*)'2) You can change the input phototable file name in' |
---|
| 60 | write(*,*)' physiq.def with:' |
---|
| 61 | write(*,*)' phototable=filename' |
---|
[334] | 62 | STOP |
---|
| 63 | ENDIF |
---|
| 64 | |
---|
| 65 | c |
---|
[460] | 66 | print*, 'read photolysis lookup table ',trim(phototable) |
---|
[334] | 67 | c |
---|
| 68 | do itau = 1,ntau |
---|
| 69 | do itemp = 1,ntemp |
---|
| 70 | do iozo = 1,nozo |
---|
| 71 | do isza = 1,nsza |
---|
| 72 | do iz = 200,0,-1 |
---|
| 73 | read(fic,*) colairtab(iz), xsza, table_ozo(iozo) |
---|
| 74 | c print*, colairtab(iz), xsza, table_ozo(iozo) |
---|
| 75 | read(fic,'(7e11.4)') |
---|
| 76 | $ (jphot(itemp,isza,iz,iozo,itau,ij), ij= 1,nd) |
---|
| 77 | do ij = 1,nd |
---|
| 78 | if (jphot(itemp,isza,iz,iozo,itau,ij) |
---|
| 79 | $ .eq. 1.e-30) then |
---|
| 80 | jphot(itemp,isza,iz,iozo,itau,ij) = 0. |
---|
| 81 | end if |
---|
| 82 | end do |
---|
| 83 | end do |
---|
| 84 | end do |
---|
| 85 | end do |
---|
| 86 | end do |
---|
| 87 | end do |
---|
| 88 | c |
---|
| 89 | print*, 'lookup table...ok' |
---|
| 90 | close(fic) |
---|
| 91 | c |
---|
| 92 | return |
---|
| 93 | end |
---|