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

Go to the source code of this file.

Functions/Subroutines

program __proclat0.f__
 
subroutine proclatbin
 

Function/Subroutine Documentation

◆ __proclat0.f__()

program __proclat0.f__ ( )

Definition at line 9 of file procLat0.f.

References proclatbin().

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

◆ proclatbin()

subroutine proclatbin ( )

Definition at line 41 of file procLat0.f.

References kwhistd(), kwhistr(), kwhists(), nfai, and proclat().

41  implicit none
42 #include "../ZprivateSub.h"
43 #include "../../../Hist/Z90histc.h"
44 #include "../../../Hist/Z90histo.h"
45 #include "../../../Hist/Z90hist1.h"
46  character*80 buf
47  type(histogram1) h10 ! 1D histogram area
48 
49  character*6 histid0 ! get histogram id here
50  integer icon
51  real normf
52  data normf/-1.0/ ! use normalization as already done
53  integer ansites
54  data ansites/1/ ! number of layers where histogram was taken
55  integer fnot/31/ ! file number.
56  character*256 filename
57 
58  integer ir, ifai
59  integer code
60  integer nbinhisto, status
61  integer kwhistreadascii
62  integer i
63  integer klena
64  external klena
65  save
66 
67  call getarg(2, filename, status)
68 ! write(0,*) ' status=',status
69 ! write(0,*) 'file=',filename(1:klena(filename))
70 
71  open(fnot, file=filename,
72  * iostat=status, access='sequential',
73  * form='unformatted', action='read')
74  if(status .ne. 0 ) then
75  write(0,*) ' cannot open file ='
76  write(0,*) filename
77  stop 123
78  else
79 ! write(0,*) filename(1:klena(filename)),
80 ! * ' opened'
81  endif
82 
83 ! web sector region
84  do i = 1, ansites
85  do code = 1, 4
86  do ifai= 1, nfai
87  read( fnot, end=100 ) histid0
88  if( histid0 .ne. '#hist1' ) then
89  write(0,*) ' histogram is not 1-D: ',histid0
90  stop 111
91  endif
92  call kwhistr(h10, fnot, icon)
93 ! statistical calculation
94  call kwhists(h10, normf)
95 ! lat analysis
96  call proclat(h10, ifai, code, i)
97 ! deallocate
98  call kwhistd( h10 )
99  enddo
100  enddo
101  enddo
102  close(fnot)
103  return
104  100 continue
105  write(0,*) ' unexpected EOF '
106  stop 2345
107 ! **********************
108  entry proclatascii
109 ! **********************
110  call getarg(2, filename, status)
111 ! write(0,*) ' status=',status
112 ! write(0,*) 'file=',filename(1:klena(filename))
113 
114  open(fnot, file=filename,
115  * iostat=status, access='sequential',
116  * form='formatted', action='read')
117  if(status .ne. 0 ) then
118  write(0,*) ' cannot open file ='
119  write(0,*) filename
120  stop 222
121  else
122 ! write(0,*) filename(1:klena(filename)),
123 ! * ' opened '
124  endif
125 
126 
127  do i = 1, ansites
128  do code = 1, 4
129  do ifai= 1, nfai
130  nbinhisto=kwhistreadascii(h10, fnot)
131  if(nbinhisto .le. 0 ) then
132  write(0,*) ' ascii read failed'
133  stop 333
134  else
135 ! write(0,*) ' hist data =',nbinhisto
136  endif
137 ! call kwhistr(h10, fnoT, icon)
138 ! statistical calculation
139  call kwhists(h10, normf)
140 ! lat analysis
141  call proclat(h10, ifai, code, i)
142 ! deallocate
143  call kwhistd( h10 )
144  enddo
145  enddo
146  enddo
147  close(fnot)
nodes i
void kwhistd(struct histogram1 *h)
subroutine proclat(h, idxf, code, layer)
Definition: procLat.f:4
*Zfirst p fm *Zfirst p Zfirst p code
Definition: ZavoidUnionMap.h:1
void kwhistr(struct histogram1 *h, FILE *bfnor, int icon)
integer function klena(cha)
Definition: klena.f:20
void kwhists(struct histogram1 *h, float inorm)
! timing nfai
Definition: Zprivate2.h:12
Here is the call graph for this function: