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

Go to the source code of this file.

Functions/Subroutines

program __proctime0.f__
 
subroutine proctimebin (reduced, nfraca)
 

Function/Subroutine Documentation

◆ __proctime0.f__()

program __proctime0.f__ ( )

Definition at line 10 of file procTime0.f.

References proctimebin().

10  integer binorascii, reduced, nfraca
Here is the call graph for this function:

◆ proctimebin()

subroutine proctimebin ( integer  reduced,
integer  nfraca 
)

Definition at line 75 of file procTime0.f.

References kwhistd(), kwhistr(), kwhists(), nfai, nrbin, and proctime().

75  implicit none
76 #include "ZprivateSub.h"
77 #include "../../Hist/Z90histc.h"
78 #include "../../Hist/Z90histo.h"
79 #include "../../Hist/Z90hist1.h"
80  character*80 buf
81  integer reduced ! 0-->time is not reduced time
82  ! 1--> reduced time
83  integer nfraca ! 2 --> T10% is used. (1~11)
84  type(histogram1) h10 ! 1D histogram area
85 
86  character*6 histid0 ! get histogram id here
87  integer icon
88  real normf
89  data normf/-1.0/ ! use normalization as already done
90  integer ansites
91  data ansites/1/ ! number of layers where histogram was taken
92  integer fnot/31/ ! file number.
93  character*256 filename
94 
95  integer ir, ifai
96  integer code
97  integer nbinhisto, status, webonly
98  integer kwhistreadascii
99  integer i
100 ! now mode must be always 2
101 
102  call getarg(4, buf, status)
103  read(buf, *) webonly
104  call getarg(5, buf, status)
105  read(buf, *) smooth
106  call getarg(6, filename, status)
107 ! write(0,*) status, filename
108 
109  open(fnot, file=filename,
110  * iostat=status, access='sequential',
111  * form='unformatted', action='read')
112  if(status .ne. 0 ) then
113  write(0,*) ' cannot open file ='
114  write(0,*) filename
115  stop
116  endif
117 
118 ! skip time data for core region
119  if(webonly .eq. 0) then
120  do i = 1, ansites
121  do code = 1, 4
122  read( fnot, end=100 ) histid0
123  if( histid0 .ne. '#hist1' ) then
124  write(0,*) ' histogram is not 1D: ',histid0
125  stop
126  endif
127  call kwhistr(h10, fnot, icon)
128  call kwhists(h10, normf)
129 ! deallocate
130  call kwhistd( h10 )
131  enddo
132  enddo
133  endif
134 ! web sector region
135  do i = 1, ansites
136  do code = 1, 4
137  do ifai= 1, nfai
138  do ir= 1, nrbin
139  read( fnot, end=100 ) histid0
140  if( histid0 .ne. '#hist1' ) then
141  write(0,*) ' histogram is not 1-D: ',histid0
142  stop
143  endif
144  call kwhistr(h10, fnot, icon)
145 ! statistical calculation
146  call kwhists(h10, normf)
147 ! time analysis: 6 is for stdout output
148  call proctime(h10, 6, nfraca, reduced,
149  * ir, ifai, code, i)
150 ! deallocate
151  call kwhistd( h10 )
152  enddo
153  enddo
154  enddo
155  enddo
156  close(fnot)
157  return
158  100 continue
159  write(0,*) ' unexpected EOF '
160  stop 2345
161 ! **********************
162  entry proctimeascii(reduced, nfraca)
163 ! **********************
164  call getarg(4, buf, status)
165  read(buf, *) webonly
166  call getarg(5, buf, status)
167  read(buf, *) smooth
168  call getarg(6, filename, status)
169 ! write(0,*) status, filename
170 
171  open(fnot, file=filename,
172  * iostat=status, access='sequential',
173  * form='formatted', action='read')
174  if(status .ne. 0 ) then
175  write(0,*) ' cannot open file ='
176  write(0,*) filename
177  stop
178  endif
179 
180  if(webonly .eq. 0 ) then
181 ! skip time data for core region
182  do i = 1, ansites
183  do code = 1, 4
184  nbinhisto=kwhistreadascii(h10, fnot)
185  if(nbinhisto .le. 0 ) then
186  write(0,*) ' ascii read failed'
187  stop
188  endif
189  call kwhists(h10, normf)
190 ! deallocate
191  call kwhistd( h10 )
192  enddo
193  enddo
194  endif
195 ! web sector region
196  do i = 1, ansites
197  do code = 1, 4
198  do ifai= 1, nfai
199  do ir= 1, nrbin
200  nbinhisto=kwhistreadascii(h10, fnot)
201  if(nbinhisto .le. 0 ) then
202  write(0,*) ' ascii read failed'
203  stop
204  endif
205 ! statistical calculation
206  call kwhists(h10, normf)
207 ! time analysis
208 ! 6: output on stdout
209  call proctime(h10, 6, nfraca, reduced,
210  * ir, ifai, code, i)
211 ! deallocate
212  call kwhistd( h10 )
213  enddo
214  enddo
215  enddo
216  enddo
217  close(fnot)
nodes i
void kwhistd(struct histogram1 *h)
! timing nrbin
Definition: Zprivate2.h:12
*Zfirst p fm *Zfirst p Zfirst p code
Definition: ZavoidUnionMap.h:1
void kwhistr(struct histogram1 *h, FILE *bfnor, int icon)
void kwhists(struct histogram1 *h, float inorm)
subroutine proctime(h, fnotf, nfraca, reduced, idxr, idxf, code, layer)
Definition: procTime.f:44
! timing nfai
Definition: Zprivate2.h:12
Here is the call graph for this function: