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 17 of file procLat0.f.

References proclatbin().

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

◆ proclatbin()

subroutine proclatbin ( )

Definition at line 49 of file procLat0.f.

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

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