1 ! This
is to express atmosphere
using cspline
function 3 ! -------------------------------------
5 ! --------------------------vertical
height to density
14 !
if(
z .
ne. zsave) then
15 if(
z .gt. atmos%
z(atmos%nodes) ) then
16 ans = atmos%rho(atmos%nodes)*
17 * exp(-(
z-atmos%
z(atmos%nodes))/Hinf)
18 elseif(
z .lt. atmos%
z(1)) then
20 * exp( (atmos%
z(1)-
z)/atmos%
H(1) )
22 call kcsplIntp(atmos%
z, atmos%logrho, atmos%nodes,
23 * atmos%coefh2r, maxnodes, z,
temp)
30 ! ----------------------------------
34 ! vettical
height to temperatur (Kelvin)
37 ! output
is temperature of the atmospher in Kelvin
41 if( z .gt. atmos%z(atmos%nodes) ) then
42 ans = atmos%
T(atmos%nodes)
43 elseif(z .lt. atmos%z(1)) then
44 ans = atmos%
T(1) + atmos%
b(1)*(z - atmos%z(1))
46 call kcsplIntp(atmos%z, atmos%
T, atmos%nodes,
47 * atmos%coefh2T, maxnodes, z, ans)
52 !---------------------------------------------
56 real*8
t ! input. air thickness in kg/
m^2
62 if(
t .gt. atmos%cumd(1) ) then
64 * (logt - atmos%logcumd(1) )*atmos%
H(1)
65 elseif(
t .lt. atmos%cumd(atmos%nodes)) then
66 ans = atmos%
z(atmos%nodes) -
67 * Hinf* log(
t/atmos%cumd(atmos%nodes))
69 call kcsplIntp(atmos%logcumdi, atmos%zi, atmos%nodes,
70 * atmos%coefd2h, maxnodes, logt, ans)
75 !---------------------------------------------
79 real*8
t ! input. air thickness in kg/
m^2
86 if(
t .gt. atmos%cumd(1) ) then
89 elseif(
t .lt. atmos%cumd(atmos%nodes)) then
93 call kcsplIntp(atmos%logcumdi, atmos%logrhoi,
95 * atmos%coefd2r, maxnodes, logt, ans)
100 ! -------------------------------------
102 ! -------------------------------------
110 if( z .gt. atmos%z(atmos%nodes) ) then
112 elseif(z .lt. atmos%z(1)) then
113 ans =- atmos%rho(1)/atmos%
H(1)*
114 * exp( (atmos%z(1)-z)/atmos%
H(1) )
116 call kcsplDif(atmos%z, atmos%nodes,
117 * atmos%coefh2r, maxnodes, z, ans, d2)
118 call kcsplIntp(atmos%z, atmos%logrho, atmos%nodes,
119 * atmos%coefh2r, maxnodes, z, temp)
120 ans = exp(temp) * ans
124 ! ----------------------------------
126 ! ----------------------------------
132 if( z .gt. atmos%z(atmos%nodes-1) ) then
133 ans = atmos%
H(atmos%nodes-1)
134 elseif(z .lt. atmos%z(1)) then
137 call kcsplIntp(atmos%z, atmos%
H, atmos%nodes-1,
138 * atmos%coefh2H, maxnodes, z, ans)
142 ! -------------------------------------
144 ! -------------------------------------
151 if( z .gt. atmos%z(atmos%nodes) ) then
153 elseif(z .lt. atmos%z(1)) then
154 ans = atmos%rho(1)/atmos%H(1)/atmos%H(1)*
155 * exp( (atmos%z(1)-z)/atmos%H(1) )
157 call kcsplDif(atmos%z, atmos%nodes,
158 * atmos%coefh2r, maxnodes, z, d1, d2)
159 call kcsplIntp(atmos%z, atmos%logrho, atmos%nodes,
160 * atmos%coefh2r, maxnodes, z, temp)
161 ans = exp(temp) * (d2 + d1**2)
165 ! ---------------------------------------
167 ! ---------------------------------------
174 if( z .gt. atmos%z(atmos%nodes) ) then
175 ans = atmos%cumd(atmos%nodes) *
176 * exp((atmos%
z(atmos%nodes) - z)/Hinf )
177 elseif(z .lt. atmos%z(1)) then
179 * exp( (atmos%z(1)-z)/atmos%H(1) )
181 call kcsplIntp(atmos%z, atmos%logcumd, atmos%nodes,
182 * atmos%coefh2d, maxnodes, z, temp)
real(8), parameter, public m
real *8 function cvh2denp(z)
********************block data cblkHeavy ********************integer j data *HeavyG2symbol H
atmos%rho(atmos%nodes) **exp(-(z-atmos%z(atmos%nodes))/Hinf) elseif(z .lt. atmos%z(1)) then ans=atmos%rho(1) **exp((atmos%z(1) -z)/atmos%H(1)) else call kdwhereis(z, atmos%nodes, atmos%z, 1, i) a=atmos%a(i) if(a .ne. 0.d0) then ans=atmos%rho(i) **(1+a *(z-atmos%z(i))/atmos%H(i)) **(-1.0d0-1.d0/a) else ans=*atmos%rho(i) *exp(-(z-atmos%z(i))/atmos%H(i)) endif endif ! zsave=z ! endif cvh2den=ans end ! ---------------------------------- real *8 function cvh2temp(z) implicit none ! vettical height to temperatur(Kelvin) real *8 z ! input. vertical height in m ! output is temperature of the atmospher in Kelvin real *8 ans integer i if(z .gt. atmos%z(atmos%nodes)) then ans=atmos%T(atmos%nodes) elseif(z .lt. atmos%z(1)) then ans=atmos%T(1)+atmos%b(1) *(z - atmos%z(1)) else call kdwhereis(z, atmos%nodes, atmos%z, 1, i) ans=atmos%T(i)+atmos%b(i) *(z-atmos%z(i)) endif cvh2temp=ans end !--------------------------------------------- real *8 function cthick2h(t) implicit none real *8 t ! input. air thickness in kg/m^2 real *8 logt, ans integer i real *8 dod0, fd, a logt=log(t) if(t .ge. atmos%cumd(1)) then ans=atmos%z(1) - *(logt - atmos%logcumd(1)) *atmos%H(1) elseif(t .le. atmos%cumd(atmos%nodes)) then ans=atmos%z(atmos%nodes) - *Hinf *log(t/atmos%cumd(atmos%nodes)) else call kdwhereis(t, atmos%nodes, atmos%cumd, 1, i) ! i is such that X(i) > x >=x(i+1) ans
block data cblkMuInt integer i ! Pair total X sec data(MuPrTX(i), i=1, 38)/1 0.431132E-02
real(4), dimension(:), allocatable, save temp
real(8) function cthick2den(t)
integer maxbin nregion c minsave drx2 ! drawing region real maxdep integer maxpos integer to
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p *Zfirst pos xyz Zfirst pos xyz *Zfirst pos *Zfirst pos Zfirst pos height
real *8 function cvh2den2p(z)
nodes a atmos atmos temp real * cthick2h
dE dx *! Nuc Int sampling table d
! type magfield sequence ! Note that position vector where the magnetic field is given ! is not included here ! unit of field strength is in T(1 gauss=10 **-4 T) union map real *8 x
real(8) function cvh2scaleh(vh)
real *8 function cvh2den(z)
dE dx *! Nuc Int sampling table b
real *8 function cvh2thick(z)
real(8) function cvh2temp(vh)
block data cblkIncident data *Za1ry is