COSMOS v7.655  COSMOSv7655
(AirShowerMC)
atmosd4.f
Go to the documentation of this file.
1 #include "BlockData/cblkGene.h"
2  implicit none
3 #include "Zcondc.h"
4 #include "Zmanagerp.h"
5 #include "Zatmos.h"
6 #include "ZcosmosExt.h"
7 !
8 ! depth --> rho, height
9 !
10  integer i
11 
12  real*8 cvh2den, cvh2denp, cvh2den2p, cvh2temp, cthick2h
13  real*8 cvh2scaleh, cvh2thick, cthick2den, h
14 
15  real*8 sh
16  real*8 d0, d, rho0, dep0
17 
18  real*8 rl ! r.l in g/cm2
19  data rho0/1.205d-3/ ! Epics Air default density g/cm3
20 ! d: obs. depth step/2
21  parameter(rl=36.566717d0)
22 ! divide 1 rl into 1/nstep rl where the density is
23 ! taken to be constant.
24  integer ndep, nstep, detail
25  parameter(detail=8, nstep=4*detail, d=rl/nstep, ndep=nstep*25)
26  real*8 h1(0:ndep), t(0:ndep), dep(0:ndep), rho(0:ndep),
27  * rhoc(0:ndep)
28 
29  save
30 
31 #if ATMOSPHERE == 1
32  call creadparam(5)
33  call creadatmosd
34 !
35  call catmoscnst1
36  call catmoscnst2
37 #elif ATMOSPHERE == 2
38 ! default
39 ! read segmented atmosphere data
40  call creadatmosd
41 ! manipulate data
42  call catmoscnst1
43 #endif
44 !
45  write(0,*) 'Enter starting depth in g/cm2'
46  read(*,*) d0
47  dep0 = d0
48  write(0,'(a)')
49  * '# depth(g/cm2) height(m) rho(g/cm3) rho/rho0'
50  do i = 0, ndep
51  dep(i) = dep0
52  t(i) = dep(i)*10.
53  h1(i) = cthick2h(t(i))
54  rho(i) = cthick2den(t(i))/1000.
55  rhoc(i) = rho(i)/rho0
56  write(0, '(1p5G13.5)') dep(i), h1(i), rho(i), rhoc(i)
57  dep0 = dep0 + d
58  enddo
59  write(*,'(a,f8.2,a,f8.2, a, i1, a)')
60  * "# atmosphere from depth ",d0, " to ", dep(ndep),
61  * " g/cm2 with step 2/", nstep, "r.l"
62  write(*,'(a)') '--------------------------------------------'
63  do i = 0, ndep-2
64  if(mod(i,2) .eq. 0) then
65  if(mod(i,nstep) .ne. 0) then
66  write(*,'(i3, a, f7.5, a, 1p, g12.5)')
67  * i/2+1, " box Air*",rhoc(i+1),
68  * " 0 = 0 / = = + = = ",
69  * ( h1(i)-h1(i+2) )*100.
70  else
71  if(i .eq. 0) then
72  write(*,'(i3, a, f7.5, a, 1p, g12.5)')
73  * i/2+1, " box Air*",rhoc(i+1),
74  * " 0 1 0 / 0 0 0 1.e6 1.e6 ",
75  * ( h1(i)-h1(i+2) )*100.
76  else
77  write(*,'(i3, a, f7.5, a, 1p, g12.5)')
78  * i/2+1, " box Air*",rhoc(i+1),
79  * " 1 = 0 / = = + = = ",
80  * ( h1(i)-h1(i+2) )*100.
81  endif
82  endif
83  endif
84  enddo
85  write(*,'(a)')
86  * '------------------------------------------'
87  write(*,*)
88  * " next can be used as DepthList definition in Cosmos"
89  write(*,*) "HeightOfInj=", h1(0)
90  write(*,'(" DepthList=")')
91  write(*,'(10f9.2)')
92  * (dep(i)*10., i=nstep,ndep,nstep)
93  end
integer npitbl real *nx parameter(n=101, npitbl=46, nx=n-1) real *8 uconst
nodes i
subroutine catmoscnst2
Definition: catmosCnst1.f:115
real(8) function cthick2den(t)
Definition: cNRLAtmos.f:591
subroutine creadatmosd
Definition: creadAtmosD.f:2
subroutine creadparam(io)
Definition: creadParam.f:5
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
subroutine catmoscnst1
Definition: catmosCnst1.f:2
nodes a atmos atmos temp real * cthick2h
dE dx *! Nuc Int sampling table d
Definition: cblkMuInt.h:130
nodes t