COSMOS v7.655  COSMOSv7655
(AirShowerMC)
modbin2ascii Module Reference

Functions/Subroutines

subroutine get1hyb (rew)
 
subroutine mergehyb1 (h1)
 
subroutine openhyb (icon)
 

Variables

integer, parameter ndepth =50
 
integer fn1
 
real *8, dimension(ndepthasdep
 
real *8, dimension(ndepthmunit
 
real *8, dimension(ndepthesize0
 
real *8, dimension(ndepthage0
 
real *8, dimension(ndepthcogdep0
 
real *8, dimension(ndepthseloss0
 
real *8, dimension(ndepthng0
 
real *8, dimension(ndepthne0
 
real *8, dimension(ndepthnmu0
 
real *8 cog0
 
integer evno0
 

Function/Subroutine Documentation

◆ get1hyb()

subroutine modbin2ascii::get1hyb ( logical  rew)

Definition at line 15 of file bin2ascii.f.

References age0, asdep, cog0, cogdep0, esize0, evno0, fn1, munit, ne0, ng0, nmu0, and seloss0.

15  implicit none
16  logical rew
17  character*256 input0
18  integer i, klena
19 
20 
21 ! data format
22 ! 1 xxx
23 ! 1 xxx
24 ! 1 xxx
25 ! 1 xxx
26 !
27 ! 2 xxx
28 ! 2 xxx
29 ! 2 xxx
30 ! 2 xxx
31 !
32 ! 3 xxx
33 ! 3 xxx
34 ! 3 xxx
35 ! 3 xxx
36  if(rew) rewind fn1
37  input0 = "x"
38  do while (input0(1:10) .ne. " ")
39  input0=" "
40  read( fn1 ,'(a)') input0
41  if(input0(1:10) .ne. " ") then
42  read(input0(1:klena(input0)), *)
43  * evno0, i, asdep(i), esize0(i), age0(i),
44  * cogdep0(i), seloss0(i),
45  * munit(i), ng0(i), ne0(i), nmu0(i), cog0
46  endif
47  enddo
nodes i
integer function klena(cha)
Definition: klena.f:20

◆ mergehyb1()

subroutine modbin2ascii::mergehyb1 ( type(histogram1 h1)

Definition at line 51 of file bin2ascii.f.

References age0, asdep, cog0, evno0, get1hyb(), and munit.

Referenced by main().

51  use modhistogram1
52  use modhistogram2
53  use modhistogram3
54  implicit none
55  type(histogram1) h1
56  type(histogram2) h2
57  type(histogram3) h3
58 
59 
60  integer klena
61  integer j
62 
63  do while (h1%c%eventno .ne. evno0)
64  call get1hyb( h1%c%eventno .lt. evno0)
65  enddo
66 !
67 ! available variables
68 ! * idx, ASdep(idx), Esize0(idx), age0(idx),
69 ! * SEloss0(idx), munit(idx),
70 ! * Ng0(idx), Ne0(idx), Nmu0(idx),
71 ! * ASdep(idx)/cog0, cog0
72 !
73 ! this part must be consistent with
74 ! FleshHist/interface.f output for evid
75  read(h1%c%id, '(i3)') j
76  write(h1%c%id,
77  * '(i3, i5, f5.2, f5.2,
78  * i5, i4)')
79  * j, int( asdep(j) ),
80  * age0(j), asdep(j)/cog0,
81  * int(munit(j)), int(cog0)
82 
83  return
84 ! *******************
85  entry mergehyb2(h2)
86 ! *******************
87 
88 
89  do while (h2%c%eventno .ne. evno0)
90  call get1hyb( h2%c%eventno .lt. evno0)
91  enddo
92  read(h2%c%id, '(i3)') j
93 
94  write(h2%c%id,
95  * '(i3, i5, f5.2, f5.2,
96  * i5, i4)')
97  * j, int( asdep(j) ),
98  * age0(j), asdep(j)/cog0,
99  * int(munit(j)), int(cog0)
100 
101  return
102 ! *****************
103  entry mergehyb3(h3)
104 ! ****************
105 
106 
107  do while (h3%c%eventno .ne. evno0)
108  call get1hyb( h3%c%eventno .lt. evno0)
109  enddo
110 
111  read(h3%c%id, '(i3)') j
112  write(h3%c%id,
113  * '(i3, i5, f5.2, f5.2,
114  * i5, i4)')
115  * j, int( asdep(j) ),
116  * age0(j), asdep(j)/cog0,
117  * int(munit(j)), int(cog0)
118 
119 
subroutine get1hyb
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code kiron data j
Definition: cblkHeavy.h:36
integer function klena(cha)
Definition: klena.f:20
Here is the call graph for this function:
Here is the caller graph for this function:

◆ openhyb()

subroutine modbin2ascii::openhyb ( integer  icon)

Definition at line 123 of file bin2ascii.f.

References copenfw2(), evno0, and fn1.

Referenced by main().

123  implicit none
124  integer icon ! output. 1--> hybrid must be read
125  ! 0--> hybrid need not be used
126  integer leng
127 
128  character*256 hyb0
129  integer kgetenv2
130 
131 
132  fn1= 3
133  leng = kgetenv2("HYBFILE0", hyb0)
134  call copenfw2(fn1, hyb0, 1, icon)
135  if(icon .ne. 1) then
136  write(0,*)
137  * '*************** caution ************'
138  write(0,*)
139  * "You haven't given env. var. HYBFILE0"
140  write(0,*)
141  * "or File specified by HYBFILE0"
142  if( icon .eq. 0) then
143  write(0,*) 'not exists'
144  else
145  write(0,*) ' cannot be opened '
146  endif
147  write(0,*)
148  * "It's ok if you don't merge hybrid data file"
149  icon = 0
150  else
151  write(0,*) hyb0(1:leng), ' opened'
152  icon = 1
153  endif
154 
155  evno0 =0
156 
integer function kgetenv2(envname, envresult)
Definition: cgetLoginN.f:77
integer leng
Definition: interface2.h:1
subroutine copenfw2(io, fnin, form, icon)
Definition: copenf.f:205
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ age0

real*8, dimension(ndepth) age0

Definition at line 6 of file bin2ascii.f.

Referenced by get1hyb(), and mergehyb1().

◆ asdep

real*8, dimension(ndepth) asdep

Definition at line 5 of file bin2ascii.f.

Referenced by get1hyb(), and mergehyb1().

5  real*8 asdep(ndepth), munit(ndepth)

◆ cog0

real*8 cog0

Definition at line 6 of file bin2ascii.f.

Referenced by get1hyb(), and mergehyb1().

◆ cogdep0

real*8, dimension(ndepth) cogdep0

Definition at line 6 of file bin2ascii.f.

Referenced by get1hyb().

◆ esize0

real*8, dimension(ndepth) esize0

Definition at line 6 of file bin2ascii.f.

Referenced by get1hyb().

6  real*8 esize0(ndepth),
7  * age0(ndepth), cogdep0(ndepth),
8  * seloss0(ndepth),
9  * ng0(ndepth), ne0(ndepth), nmu0(ndepth),
10  * cog0

◆ evno0

integer evno0

Definition at line 11 of file bin2ascii.f.

Referenced by get1hyb(), mergehyb1(), and openhyb().

11  integer evno0

◆ fn1

integer fn1

Definition at line 4 of file bin2ascii.f.

Referenced by get1hyb(), and openhyb().

4  integer fn1

◆ munit

real*8, dimension(ndepth) munit

Definition at line 5 of file bin2ascii.f.

Referenced by get1hyb(), and mergehyb1().

◆ ndepth

integer, parameter ndepth =50

Definition at line 3 of file bin2ascii.f.

3  integer,parameter:: ndepth=50

◆ ne0

real*8, dimension(ndepth) ne0

Definition at line 6 of file bin2ascii.f.

Referenced by get1hyb().

◆ ng0

real*8, dimension(ndepth) ng0

Definition at line 6 of file bin2ascii.f.

Referenced by get1hyb().

◆ nmu0

real*8, dimension(ndepth) nmu0

Definition at line 6 of file bin2ascii.f.

Referenced by get1hyb().

◆ seloss0

real*8, dimension(ndepth) seloss0

Definition at line 6 of file bin2ascii.f.

Referenced by get1hyb().