COSMOS v7.655  COSMOSv7655
(AirShowerMC)
ktrpzIntegT.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine ktrpzintegt (t, intv, n, x0, dx, x, ans)
 

Function/Subroutine Documentation

◆ ktrpzintegt()

subroutine ktrpzintegt ( real*8, dimension(intv, n t,
integer  intv,
integer  n,
real*8  x0,
real*8  dx,
real*8  x,
real*8  ans 
)

Definition at line 3 of file ktrpzIntegT.f.

References d0.

Referenced by cinippx(), cinippxn(), cinteldndx(), and cinteldndxn().

3  implicit none
4  integer intv ! input. see below
5  integer n ! input. number of data values
6  real*8 t(intv, n) ! input. t(1, 1), t(1, 2), .. t(1, n) are used.
7  ! function values at x0, x0+dx, ..
8  real*8 x0 ! input the leftmost value of x.
9  real*8 dx ! input. step of x.
10  real*8 x ! input. integral is from x0 to x.
11  real*8 ans ! output. integral value
12  real*8 nx
13  integer i, m
14 
15  m = (x - x0)/(0.9999999d0*dx) + 1
16  nx = x0 + (m-1) * dx
17 
18 
19  ans = 0.
20  do i = 2, m-1
21  ans = ans + t(1, i)
22  enddo
23 
24  if(m .gt. 1) then
25  ans = (ans + (t(1,1) + t(1, m))/2)* dx
26  endif
27 
28  if(m .lt. n) then
29  ans = ans +
30  * ((t(1, m+1) - t(1,m))*(x - nx)/dx + t(1,m))*(x-nx)/2
31  endif
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
nodes i
integer npitbl real *nx dx real dx
Definition: Zcinippxc.h:10
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
block data include Zlatfit h c fitting region data data data data data d0 data data d0 data data m
Definition: ZlatfitBD.h:35
nodes t
integer n
Definition: Zcinippxc.h:1
! structure defining a particle at production ! Basic idea of what is to be contained in ! the particle structue is that dynamical ones should be included those derivable from the particle code ! is not included ******************************************************type fmom momentum sequence union map real e endmap map real * x
Definition: Zptcl.h:21
Here is the caller graph for this function: