[414] | 1 | c*********************************************************************** |
---|
| 2 | |
---|
| 3 | subroutine cm15um_hb_simple (ig,icurt) |
---|
| 4 | |
---|
| 5 | c computing the curtix matrixes for the 15 um hot bands |
---|
| 6 | c (las de las bandas fudnamentales las calcula cm15um_fb) |
---|
| 7 | |
---|
| 8 | c jan 98 malv version de mod3/cm_15um.f para mz1d |
---|
| 9 | c jul 2011 malv+fgg adapted to LMD-MGCM |
---|
| 10 | c*********************************************************************** |
---|
| 11 | |
---|
| 12 | implicit none |
---|
| 13 | |
---|
| 14 | !!!!!!!!!!!!!!!!!!!!!!! |
---|
| 15 | ! common variables & constants |
---|
| 16 | |
---|
| 17 | include 'nltedefs.h' |
---|
| 18 | include 'nlte_atm.h' |
---|
| 19 | include 'nlte_data.h' |
---|
| 20 | ! include '../CMN/tcr_15um.cmn' |
---|
| 21 | include 'tcr_15um.h' |
---|
| 22 | include 'nlte_results.h' |
---|
| 23 | include 'nlte_matrix.h' |
---|
| 24 | include 'nlte_curtis.h' |
---|
| 25 | |
---|
| 26 | !!!!!!!!!!!!!!!!!!!!!!! |
---|
| 27 | ! arguments |
---|
| 28 | |
---|
| 29 | integer ig ! ADDED FOR TRACEBACK |
---|
| 30 | integer icurt ! icurt=0,1,2 |
---|
| 31 | ! new calculations? (see caa.f heads) |
---|
| 32 | |
---|
| 33 | !!!!!!!!!!!!!!!!!!!!!!! |
---|
| 34 | ! local variables |
---|
| 35 | |
---|
| 36 | real*4 cdummy(nl,nl), csngl(nl,nl) |
---|
| 37 | |
---|
| 38 | real*8 cax1(nl,nl), cax2(nl,nl), cax3(nl,nl) |
---|
| 39 | real*8 v1(nl), v2(nl), v3(nl), cm_factor, vc_factor |
---|
| 40 | |
---|
| 41 | integer itauout,icfout,itableout, interpol,ismooth, isngldble |
---|
| 42 | integer i,j,ik,ist,isot,ib,itt |
---|
| 43 | |
---|
| 44 | !character bandcode*2 |
---|
| 45 | character isotcode*2 |
---|
| 46 | character codmatrx_hot*5 |
---|
| 47 | |
---|
| 48 | !!!!!!!!!!!!!!!!!!!!!!! |
---|
| 49 | ! external functions |
---|
| 50 | |
---|
| 51 | external bandid |
---|
| 52 | character*2 bandid |
---|
| 53 | |
---|
| 54 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 55 | ! subroutines called: |
---|
| 56 | ! mz4sub, dmzout, readc_mz4, readcupdw, mztf |
---|
| 57 | |
---|
| 58 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 59 | ! formatos |
---|
| 60 | 132 format(i2) |
---|
| 61 | |
---|
| 62 | ************************************************************************ |
---|
| 63 | ************************************************************************ |
---|
| 64 | |
---|
| 65 | call zerom (c121,nl) |
---|
| 66 | |
---|
| 67 | call zerov (vc121,nl) |
---|
| 68 | |
---|
| 69 | call zerom (cup121,nl) |
---|
| 70 | call zerom (cdw121,nl) |
---|
| 71 | |
---|
| 72 | call zerov (taugr121,nl) |
---|
| 73 | |
---|
| 74 | |
---|
| 75 | itauout = 0 ! =1 --> with output of tau |
---|
| 76 | icfout = 0 ! =1 --> with output of cf |
---|
| 77 | itableout = 0 ! =1 --> with output of table of taus |
---|
| 78 | isngldble = 1 ! =1 --> dble precission |
---|
| 79 | |
---|
| 80 | codmatrx_hot=' ' |
---|
| 81 | if (icurt.eq.2) then |
---|
| 82 | icfout=1 |
---|
| 83 | elseif (icurt.eq.0) then |
---|
| 84 | write (*,'(a,a$)') |
---|
| 85 | @ ' hot bands. code for old matrixes (5 chars): ' |
---|
| 86 | read (*,'(a)') codmatrx_hot |
---|
| 87 | endif |
---|
| 88 | |
---|
| 89 | fileroot = 'cfl' |
---|
| 90 | |
---|
| 91 | ! ====================== curtis matrixes for fh bands ================== |
---|
| 92 | |
---|
| 93 | |
---|
| 94 | ! una piedra en el camino ... |
---|
| 95 | ! write (*,*) ' cm15um_hb/1 ' |
---|
| 96 | |
---|
| 97 | ccc |
---|
| 98 | if ( input_cza.ge.1 ) then |
---|
| 99 | ccc |
---|
| 100 | |
---|
| 101 | if (icurt.eq.2) then |
---|
| 102 | write (*,'(a,a$)') |
---|
| 103 | @ ' new calculation of curt. mat. for fh bands.', |
---|
| 104 | @ ' code for new matrixes : ' |
---|
| 105 | read (*,'(a)') codmatrx_hot |
---|
| 106 | elseif (icurt.eq.0) then |
---|
| 107 | write (*,'(a,a$)') |
---|
| 108 | @ ' reading in curt. mat. for fh bands.', |
---|
| 109 | @ ' code for old matrixes : ' |
---|
| 110 | read (*,'(a)') codmatrx_hot |
---|
| 111 | else |
---|
| 112 | ! write (*,'(a)') |
---|
| 113 | ! @ ' new calculation of curt. mat. for fh bands.' |
---|
| 114 | end if |
---|
| 115 | |
---|
| 116 | ! fh bands for the 626 isotope ================================- |
---|
| 117 | |
---|
| 118 | ist = 1 |
---|
| 119 | isot = 26 |
---|
| 120 | ! encode (2,132,isotcode) isot |
---|
| 121 | write (isotcode,132) isot |
---|
| 122 | |
---|
| 123 | do 11, ik=1,3 |
---|
| 124 | |
---|
| 125 | ib=ik+1 |
---|
| 126 | |
---|
| 127 | if (icurt.gt.0) then |
---|
| 128 | call zero3m (cax1,cax2,cax3,nl) |
---|
| 129 | ! una piedra en el camino ... |
---|
| 130 | !write (*,*) ' cm15um_hb/11 ' |
---|
| 131 | !write (*,*) ' ib, ist, irw, imu =', ib, ist, irw_mztf, imu |
---|
| 132 | call mztf ( ig,cax1,cax2,cax3,v1,v2, ib,ist,irw_mztf,imu, |
---|
| 133 | @ itauout,icfout,itableout) |
---|
| 134 | ! else |
---|
| 135 | ! bandcode = bandid(ib) |
---|
| 136 | ! filend=isotcode//dn//bandcode//codmatrx_hot |
---|
| 137 | !! write (*,*) char(9), fileroot//filend |
---|
| 138 | ! call zero3m (cax1,cax2,cax3,nl) |
---|
| 139 | ! call readcud_mz1d ( cax1,cax2,cax3, v1, v2, |
---|
| 140 | ! @ fileroot,filend, csngl, nl,nan,0,isngldble) |
---|
| 141 | end if |
---|
| 142 | |
---|
| 143 | c calculating the total c121(n,r) matrix for the first hot band |
---|
| 144 | do i=1,nl |
---|
| 145 | |
---|
| 146 | if ( ib .eq. 4 ) then |
---|
| 147 | ! write (*,*) ' ' |
---|
| 148 | ! write (*,*) i, ' ib,ist, altura :', ib,ist, zl(i) |
---|
| 149 | endif |
---|
| 150 | |
---|
| 151 | ! if ( v1(i) .le. 1.d-99 ) v1(i) = 0.0d0 |
---|
| 152 | ! if ( v2(i) .le. 1.d-99 ) v2(i) = 0.0d0 |
---|
| 153 | |
---|
| 154 | |
---|
| 155 | if(ik.eq.1)then |
---|
| 156 | cm_factor = (dble(618.03/667.75))**2.d0* |
---|
| 157 | @ exp( dble(ee*(667.75-618.03)/t(i)) ) |
---|
| 158 | vc_factor = dble(667.75/618.03) |
---|
| 159 | elseif(ik.eq.2)then |
---|
| 160 | cm_factor = 1.d0 |
---|
| 161 | vc_factor = 1.d0 |
---|
| 162 | elseif(ik.eq.3)then |
---|
| 163 | cm_factor = ( dble(720.806/667.75) )**2.d0* |
---|
| 164 | @ exp( dble(ee*(667.75-720.806)/t(i)) ) |
---|
| 165 | vc_factor = dble(667.75/720.806) |
---|
| 166 | end if |
---|
| 167 | do j=1,nl |
---|
| 168 | ! if (cax1(i,j) .le. 1.d-99 ) cax1(i,j) = 0.0d0 |
---|
| 169 | ! if (cax2(i,j) .le. 1.d-99 ) cax2(i,j) = 0.0d0 |
---|
| 170 | ! if (cax3(i,j) .le. 1.d-99 ) cax3(i,j) = 0.0d0 |
---|
| 171 | c121(i,j) = c121(i,j) + cax1(i,j) * cm_factor |
---|
| 172 | cup121(i,j) = cup121(i,j) + cax2(i,j) * cm_factor |
---|
| 173 | cdw121(i,j) = cdw121(i,j) + cax3(i,j) * cm_factor |
---|
| 174 | end do |
---|
| 175 | |
---|
| 176 | ! write (*,*) ' i =', i |
---|
| 177 | ! write (*,*) ' vc_factor =', vc_factor |
---|
| 178 | ! write (*,*) ' v1 =', v1(i) |
---|
| 179 | ! write (*,*) ' v2 =', v2(i) |
---|
| 180 | ! write (*,*) vc121(i), taugr121(i) |
---|
| 181 | ! write (*,*) v1(i) * vc_factor |
---|
| 182 | ! write (*,*) vc121(i) + v1(i) * vc_factor |
---|
| 183 | |
---|
| 184 | vc121(i) = vc121(i) + v1(i) * vc_factor |
---|
| 185 | |
---|
| 186 | |
---|
| 187 | ! write (*,*) v2(i) * vc_factor |
---|
| 188 | ! write (*,*) taugr121(i) + v2(i) * vc_factor |
---|
| 189 | |
---|
| 190 | taugr121(i) = taugr121(i) + v2(i) * vc_factor |
---|
| 191 | |
---|
| 192 | end do |
---|
| 193 | 11 continue |
---|
| 194 | |
---|
| 195 | ccc |
---|
| 196 | end if |
---|
| 197 | ccc |
---|
| 198 | |
---|
| 199 | |
---|
| 200 | return |
---|
| 201 | end |
---|