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

Go to the source code of this file.

Functions/Subroutines

subroutine crigcut (azmin, zen, rig, prob)
 
subroutine k2dtblv (tbl, xs, ys, adj, xm, ym, dx, dy, x, y, ans)
 
subroutine cgetrigcut (azmin, zen, rigcut)
 
subroutine cgetrigprob (tbl, izen, iphi, irig, i1, i2, i3, prob)
 
subroutine crigcut0 (file)
 
subroutine crigcutfmt1
 
subroutine creadrigcut (io, tbl, azm, zen, adj)
 
subroutine cfillrigcut (tbl, azm, zen)
 
subroutine cqrigcutplace (tlt, tlg, mdec)
 
subroutine crigcutfmt2
 
subroutine crigcutfmt4
 
subroutine crdrigcut2 (fmt, io, tbl, izen, iphi, irig)
 
subroutine crdrigcut4 (fmt, io, minval, tbl, izen, irig)
 
subroutine crigcutfmt5
 

Function/Subroutine Documentation

◆ cfillrigcut()

subroutine cfillrigcut ( real*8, dimension(azm, zen tbl,
integer  azm,
integer  zen 
)

Definition at line 284 of file crigCut.f.

Referenced by crigcutfmt1(), and crigcutfmt5().

284  implicit none
285  integer azm, zen
286  real*8 tbl(azm, zen)
287  integer i
288 
289  do i = 1, zen
290  tbl(azm, i) = tbl(1, i)
291  enddo
nodes i
integer Charge2heavyG charge of heavy rightarrow heavy group index conversion array integer HeavyG2massN heavy group index rightarrow mass number conversion array integer HeavyG2charge heavy group index rightarrow charge of heavy conversion array integer HeavyG2code heavy group index rightarrow particle code conversion array integer Code2massN particle code rightarrow mass number conversion array integer Code2heavyG particle code rightarrow heavy group index conversion array real *FragmentTbl tbl(i, j)
real zen
Definition: Zflux.h:1
Here is the caller graph for this function:

◆ cgetrigcut()

subroutine cgetrigcut ( real*8  azmin,
real*8  zen,
real*8  rigcut 
)

Definition at line 117 of file crigCut.f.

References cerrormsg(), d0, and k4ptdi().

Referenced by __drawrigcut.f__().

117  implicit none
118 #include "ZrigCut.h"
119 ! get rigidity cut (for old table only); use crigCut now
120 !
121  real*8 azmin ! input. value of azimuth angle at a given location.
122  ! deg.
123  real*8 zen ! input. value of zenith angle at a given location.
124  real*8 rigcut ! output. cutoff rigidity. in GV
125 !
126 
127  real*8 azm
128 
129  azm = azmin
130 
131  if(azm .lt. 0.) then
132  azm = azm + 360.
133  endif
134  azm = mod(azmin, 360.d0)
135  if(rdatafmt .eq. 1) then
136  call k4ptdi(rigcuttbl, azmsize, zensize, azmsize, minazm,
137  * minzen, dazm, dzen, azm, zen, rigcut)
138  else
139  call cerrormsg(
140  * 'only old cutoff table can be used', 0)
141  endif
subroutine cerrormsg(msg, needrtn)
Definition: cerrorMsg.f:4
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
subroutine k4ptdi(f, im, jm, iadj, x0, y0, hx, hy, x, y, ans)
Definition: k4ptdi.f:21
real zen
Definition: Zflux.h:1
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cgetrigprob()

subroutine cgetrigprob ( real, dimension(izen, iphi, irig)  tbl,
integer  izen,
integer  iphi,
integer  irig,
integer  i1,
integer  i2,
integer  i3,
real*8  prob 
)

Definition at line 145 of file crigCut.f.

Referenced by crigcut().

145  implicit none
146 #include "ZrigCut.h"
147 
148  integer izen, iphi, irig
149  real tbl(izen, iphi, irig)
150  integer i1, i2, i3
151  real*8 prob
152 
153 ! if( i3 .lt. RigSize ) then
154 ! prob = dlogrig/LogDRig *
155 ! * (tbl(i1,i2,i3+1)-tbl(i1, i2, i3))
156 ! * + tbl(i1,i2,i3)
157 ! else
158 ! prob = tbl(i1,i2,i3)
159 ! endif
160 
161  prob = tbl(i1,i2,i3)
162 
integer Charge2heavyG charge of heavy rightarrow heavy group index conversion array integer HeavyG2massN heavy group index rightarrow mass number conversion array integer HeavyG2charge heavy group index rightarrow charge of heavy conversion array integer HeavyG2code heavy group index rightarrow particle code conversion array integer Code2massN particle code rightarrow mass number conversion array integer Code2heavyG particle code rightarrow heavy group index conversion array real *FragmentTbl tbl(i, j)
Here is the caller graph for this function:

◆ cqrigcutplace()

subroutine cqrigcutplace ( real*8  tlt,
real*8  tlg,
real*8  mdec 
)

Definition at line 295 of file crigCut.f.

295  implicit none
296 #include "ZrigCut.h"
297  real*8 tlt, tlg, mdec
298 
299 
300 ! to inform lat, long, magdec
301  tlt = latit
302  tlg = longi
303  mdec = magdec

◆ crdrigcut2()

subroutine crdrigcut2 ( integer  fmt,
integer  io,
real*4, dimension(izen, iphi, irig)  tbl,
integer  izen,
integer  iphi,
integer  irig 
)

Definition at line 396 of file crigCut.f.

References cerrormsg().

Referenced by crigcutfmt2().

396 ! read cut off table for format 2
397  implicit none
398  integer fmt ! input. fmt=2 or 3, if 3, data for izen, iphi, irig are
399  ! not given
400  integer io ! input. table dev. number
401  integer izen ! input. table for zenith angle
402  integer iphi ! input. table for azimuthal angle
403  integer irig ! input. table for rigidity
404  real*4 tbl(izen, iphi, irig) ! output. 3D table which shows prob. that
405  ! given ptcl with izen, iphi, irig can enter the earth
406  ! NOTE: this is real*4--------------------
407 
408  integer i1, i2, i3
409  integer j1, j2, j3
410  character*128 msg
411 
412 
413  do i1= 1 , izen
414  do i2 = 1, iphi
415  do i3 = 1, irig
416  if(fmt .eq. 2) then
417  read(io, *, end=100) j1, j2, j3, tbl(i1, i2, i3)
418  if(i1 .ne. j1+1 .or.
419  * i2 .ne. j2+1 .or.
420  * i3 .ne. j3+1) then
421  write(msg, *)
422  * ' data index mismatch in new rigidit cut table',
423  * i1, j1+1, i2, j2+1, i2, j3+1
424  call cerrormsg(msg, 0)
425  endif
426  else
427  read(io, *) tbl(i1, i2, i3)
428  endif
429  enddo
430  enddo
431  enddo
432  return
433  100 continue
434  call cerrormsg(
435  * 'Unexpected EOF in new rigidity cut table',0)
subroutine cerrormsg(msg, needrtn)
Definition: cerrorMsg.f:4
integer Charge2heavyG charge of heavy rightarrow heavy group index conversion array integer HeavyG2massN heavy group index rightarrow mass number conversion array integer HeavyG2charge heavy group index rightarrow charge of heavy conversion array integer HeavyG2code heavy group index rightarrow particle code conversion array integer Code2massN particle code rightarrow mass number conversion array integer Code2heavyG particle code rightarrow heavy group index conversion array real *FragmentTbl tbl(i, j)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ crdrigcut4()

subroutine crdrigcut4 ( integer  fmt,
integer  io,
real*8  minval,
real*4, dimension(izen, irig)  tbl,
integer  izen,
integer  irig 
)

Definition at line 439 of file crigCut.f.

References cerrormsg(), and e.

Referenced by crigcutfmt4().

439 ! read cut off table for format 4
440  implicit none
441  integer fmt ! input. fmt=4
442  integer io ! input. table dev. number
443  real*8 minval ! input minimum value of rigidty (for check)
444  integer izen ! input. table for zenith angle
445  integer irig ! input. table for rigidity
446  real*4 tbl(izen, irig) ! output. 2D table which shows prob. that
447  ! given ptcl with izen, irig can enter the earth
448  ! NOTE: this is real*4--------------------
449 
450  integer i1, i3
451  integer j1, idummy
452  real*4 dummy
453  character*128 msg
454 
455 
456  do i1= 1 , izen
457  do i3 = 1, irig
458  read(io, *, end=100)
459  * j1, idummy, idummy, dummy, tbl(i1, i3)
460  if(i3 .eq. 1) then
461  if( abs(dummy - minval)/minval .gt. 1.e-3) then
462  write(msg,*)
463  * 'check min rigidity in headr=', minval,
464  * ' in table=', dummy
465  call cerrormsg(msg, 0)
466  endif
467  endif
468  if(i1 .ne. j1) then
469  write(msg, *)
470  * ' data index mismatch in new rigidit cut table',
471  * i1, j1
472  call cerrormsg(msg, 0)
473  endif
474  enddo
475  enddo
476  return
477  100 continue
478  call cerrormsg(
479  * 'Unexpected EOF in new rigidity cut table',0)
subroutine cerrormsg(msg, needrtn)
Definition: cerrorMsg.f:4
dE dx *! Nuc Int sampling table e
Definition: cblkMuInt.h:130
integer Charge2heavyG charge of heavy rightarrow heavy group index conversion array integer HeavyG2massN heavy group index rightarrow mass number conversion array integer HeavyG2charge heavy group index rightarrow charge of heavy conversion array integer HeavyG2code heavy group index rightarrow particle code conversion array integer Code2massN particle code rightarrow mass number conversion array integer Code2heavyG particle code rightarrow heavy group index conversion array real *FragmentTbl tbl(i, j)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ creadrigcut()

subroutine creadrigcut ( integer  io,
real*8, dimension(adj, zen tbl,
integer  azm,
integer  zen,
integer  adj 
)

Definition at line 263 of file crigCut.f.

References cerrormsg().

Referenced by crigcutfmt1(), and crigcutfmt5().

263  implicit none
264  integer io, azm, zen, adj
265  real*8 tbl(adj, zen)
266 
267 
268  integer i, j, ios
269  character*150 msg
270 
271  do j=1, zen
272  read(io, *, iostat=ios) ( tbl(i, j), i = 1, azm)
273  if(ios .ne. 0) then
274  write(msg, *) 'Unexpected EOF at rigicity table reading'
275  call cerrormsg(msg, 1)
276  write(msg, *) ' line number=', j, ' azm=',azm, ' zen=',
277  * zen, ' adj=',adj
278  call cerrormsg(msg, 0)
279  endif
280  enddo
subroutine cerrormsg(msg, needrtn)
Definition: cerrorMsg.f:4
nodes i
integer Charge2heavyG charge of heavy rightarrow heavy group index conversion array integer HeavyG2massN heavy group index rightarrow mass number conversion array integer HeavyG2charge heavy group index rightarrow charge of heavy conversion array integer HeavyG2code heavy group index rightarrow particle code conversion array integer Code2massN particle code rightarrow mass number conversion array integer Code2heavyG particle code rightarrow heavy group index conversion array real *FragmentTbl tbl(i, j)
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code kiron data j
Definition: cblkHeavy.h:36
real zen
Definition: Zflux.h:1
Here is the call graph for this function:
Here is the caller graph for this function:

◆ crigcut()

subroutine crigcut ( real*8  azmin,
real*8  zen,
real*8  rig,
real*8  prob 
)

Definition at line 6 of file crigCut.f.

References cerrormsg(), cgetrigprob(), d0, k2dtblv(), and k4ptdi().

Referenced by cifcutoff(), crigfunc2(), funcazim(), and primdn().

6  implicit none
7 #include "ZrigCut.h"
8 ! Before calling this subroutine, you must have called
9 ! crigCut0 to get the table which contains the information
10 ! of cutoff rigidities.
11 
12 !
13  real*8 azmin ! input. value of azimuth angle at a given location.
14  ! deg.
15  ! For format# 5, this is longitude of a place
16  real*8 zen ! input. value of zenith angle at a given location.
17  ! It may be deg, or cos, depending on the table.
18  ! For format# 5, this is latitude of the place.
19  ! It may be deg, or cos, depending on the table.
20  real*8 rig ! input. value of particle rigidity (GV) p/Z
21 
22  real*8 prob ! output. probability that 'r' can enter the earth.
23  ! For format# 5, this is 0 or 1. 1 dose not necessary
24  ! mean that the particle can enter the earth;
25  ! there is possibility so you have to examine.
26  ! if 0, there is no possibility so you may discard it.
27 !
28 ! Note: This system cannot treat multiple locations at a time.
29 !
30 !
31  real*8 rigcut
32 
33  real*8 azm
34 
35  integer i1, i2, i3
36 
37  azm = azmin
38  if(azm .lt. 0.) then
39  azm = azm + 360.
40  else
41  azm = mod(azm, 360.d0)
42  endif
43 
44  if(rdatafmt .eq. 1 ) then
45  call k4ptdi(rigcuttbl, azmsize, zensize, azmsize, minazm,
46  * minzen, dazm, dzen, azm, zen, rigcut)
47  if(rig .lt. rigcut) then
48  prob = 0.
49  else
50  prob = 1.
51  endif
52  elseif(rdatafmt .le. 4) then
53 ! i3 = log10(rig/MinRig)/LogDRig + 1
54 ! i3 <= log10(rig)*20 < i3+1 (i3=0,1..)
55 ! logrig = log10(rig)/LogDRig
56 ! i3 = logrig + 1
57 ! dlogrig=(logrig - (i3-1))*LogDRig
58 
59  i3 = log10(rig/minrig)/logdrig + 1
60  if(i3 .lt. 1) then
61  prob = 0.
62  goto 100
63  endif
64  if(i3 .ge. rigsize) then
65  prob = 1.
66  goto 100
67  endif
68  if(rdatafmt .eq. 4) then
69  i2=1
70  else
71  i2 = azm/dazm + 1
72  i2 =min(azmsize, i2)
73  endif
74  i1 = (zen-zenmax)/dzen +1 ! DZen < 0
75  i1 = min(zensize, i1)
76  call cgetrigprob(
77  * rigtbl2, zensize, azmsize, rigsize, i1, i2, i3,
78  * prob )
79  prob = min(prob, 1.d0)
80  elseif( rdatafmt .eq. 5) then
81 ! essentiall the same as 1 case. but rather should not
82 ! make interpolation
83  call k2dtblv(rigcuttbl, azmsize, zensize, azmsize, minazm,
84  * minzen, dazm, dzen, azm, zen, rigcut)
85  if(rig .lt. rigcut) then
86  prob = 0.
87  else
88  prob = 1.
89  endif
90  else
91  call cerrormsg('format # error in rigidity table',0)
92  endif
93  100 continue
subroutine cerrormsg(msg, needrtn)
Definition: cerrorMsg.f:4
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
subroutine k4ptdi(f, im, jm, iadj, x0, y0, hx, hy, x, y, ans)
Definition: k4ptdi.f:21
subroutine cgetrigprob(tbl, izen, iphi, irig, i1, i2, i3, prob)
Definition: crigCut.f:145
real zen
Definition: Zflux.h:1
subroutine k2dtblv(tbl, xs, ys, adj, xm, ym, dx, dy, x, y, ans)
Definition: crigCut.f:97
Here is the call graph for this function:
Here is the caller graph for this function:

◆ crigcut0()

subroutine crigcut0 ( character*(*)  file)

Definition at line 166 of file crigCut.f.

References cerrormsg(), copenf(), crigcutfmt1(), crigcutfmt2(), crigcutfmt4(), and crigcutfmt5().

Referenced by __drawrigcut.f__(), __drawrigcut2.f__(), and cbeginrun().

166  implicit none
167 #include "Zmanagerp.h"
168 #include "ZrigCut.h"
169 
170  character*(*) file
171  character*192 msg
172  integer icon
173 
174  call copenf(tempdev, file, icon)
175  if(icon .ne. 0) then
176  write(msg, *) ' file specification error '
177  call cerrormsg(msg, 0)
178  endif
179 !
180  read(tempdev, '(1x,i1)') rdatafmt ! format 1 or 2 or 3 or 4
181  if(rdatafmt .eq. 1) then
182  call crigcutfmt1
183  elseif(rdatafmt .eq. 2 .or. rdatafmt .eq. 3) then
184  call crigcutfmt2
185  elseif(rdatafmt .eq. 4) then
186  call crigcutfmt4
187  elseif(rdatafmt .eq. 5) then
188  call crigcutfmt5
189  else
190  write(msg, *) 'rigidity cut data format =',rdatafmt,
191  * ' ivalid'
192  call cerrormsg(msg, 0)
193  endif
subroutine cerrormsg(msg, needrtn)
Definition: cerrorMsg.f:4
subroutine crigcutfmt4
Definition: crigCut.f:351
subroutine crigcutfmt1
Definition: crigCut.f:197
subroutine crigcutfmt5
Definition: crigCut.f:485
subroutine crigcutfmt2
Definition: crigCut.f:308
subroutine copenf(io, fnin, icon)
Definition: copenf.f:8
Here is the call graph for this function:
Here is the caller graph for this function:

◆ crigcutfmt1()

subroutine crigcutfmt1 ( )

Definition at line 197 of file crigCut.f.

References cerrormsg(), cfillrigcut(), creadrigcut(), cskipcomment(), and d0.

Referenced by crigcut0().

197  implicit none
198 #include "Zmanagerp.h"
199 #include "ZrigCut.h"
200 
201 
202  character*192 msg
203 
204  integer icon
205 
206  read(tempdev, *) ! skip
207  read(tempdev, *) place, latit, longi, magdec, azmvalue,
208  * dazm, azmsize, zenvalue, dzen, zensize
209 
210 ! skip until -------------- line
211  call cskipcomment(tempdev, icon)
212  if(icon .ne. 0) then
213  call cerrormsg('cut-off table data has no ---- line', 0)
214  endif
215 ! see if azimuthal angle range is from 0 to 360 or from 0 to 360-DAzm
216 
217  if(azmvalue .eq. 'deg') then
218 ! assume min of Azimuthal angle is 0 deg.
219  minazm = 0.
220  if( (azmsize - 1)* dazm .lt. (360.d0- dazm* 0.1d0) ) then
221 ! fill the last col. by the first col.
222 
223  call creadrigcut(tempdev, rigcuttbl, azmsize, zensize,
224  * azmsize+1)
225  azmsize = azmsize + 1
226  call cfillrigcut(rigcuttbl, azmsize, zensize)
227  else
228  call creadrigcut(tempdev, rigcuttbl, azmsize, zensize,
229  * azmsize)
230  endif
231 
232  else
233 
234  write(msg, *)
235  * ' Azimuthal angle unit must be deg for rigidity cut table'
236  call cerrormsg(msg, 1)
237  write(msg, *) ' But it is ', azmvalue
238  call cerrormsg(msg, 0)
239  endif
240 
241  close(tempdev)
242 
243  if(zenvalue .eq. 'cos') then
244 ! DZen should be negative and min is 1.0
245  minzen = 1.0
246  if(dzen .ge. 0.) then
247  write(msg, *)
248  * ' step of Zenith angle for rigidity cut should be < 0'
249  call cerrormsg(msg, 1)
250  write(msg, *) ' because you give it in cos value'
251  call cerrormsg(msg, 0)
252  endif
253  endif
254 !
255 !
256  write(msg,*) 'Rigidity cut-off table has been read:',
257  * ' place=',place,' latitute=',latit, ' longitude=',longi,
258  * ' mag. dec=', magdec
259  call cerrormsg(msg, 1)
subroutine cerrormsg(msg, needrtn)
Definition: cerrorMsg.f:4
subroutine creadrigcut(io, tbl, azm, zen, adj)
Definition: crigCut.f:263
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
subroutine cfillrigcut(tbl, azm, zen)
Definition: crigCut.f:284
subroutine cskipcomment(io, icon)
Definition: cskipComment.f:19
Here is the call graph for this function:
Here is the caller graph for this function:

◆ crigcutfmt2()

subroutine crigcutfmt2 ( )

Definition at line 308 of file crigCut.f.

References cerrormsg(), crdrigcut2(), and cskipcomment().

Referenced by crigcut0().

308  implicit none
309 #include "Zmanagerp.h"
310 #include "ZrigCut.h"
311 
312  character*192 msg
313 
314  integer icon
315 
316 
317  read(tempdev, *) ! skip
318  read(tempdev, *)
319  * place, latit, longi, magdec, zenvalue, zenmax, dzen, zensize,
320  * azmvalue, minazm, dazm, azmsize, minrig, logdrig, rigsize
321 
322 
323 ! skip until -------------- line
324  call cskipcomment(tempdev, icon)
325  if(icon .ne. 0) then
326  call cerrormsg('cut-off table data has no ---- line', 0)
327  endif
328  call crdrigcut2(
329  * rdatafmt, tempdev, rigtbl2, zensize, azmsize, rigsize)
330  close(tempdev)
331 
332  if(zenvalue .eq. 'cos') then
333 ! DZen should be negative
334  if(dzen .ge. 0.) then
335  write(msg, *)
336  * ' step of Zenith angle for rigidity cut should be < 0'
337  call cerrormsg(msg, 1)
338  write(msg, *) ' because you give it in cos value'
339  call cerrormsg(msg, 0)
340  endif
341  endif
342 !
343 !
344  write(msg,*) 'New rigidity cut-off table has been read:',
345  * ' place=',place,' latitute=',latit, ' longitude=',longi,
346  * ' mag. dec=', magdec
347  call cerrormsg(msg, 1)
subroutine cerrormsg(msg, needrtn)
Definition: cerrorMsg.f:4
subroutine crdrigcut2(fmt, io, tbl, izen, iphi, irig)
Definition: crigCut.f:396
subroutine cskipcomment(io, icon)
Definition: cskipComment.f:19
Here is the call graph for this function:
Here is the caller graph for this function:

◆ crigcutfmt4()

subroutine crigcutfmt4 ( )

Definition at line 351 of file crigCut.f.

References cerrormsg(), crdrigcut4(), and cskipcomment().

Referenced by crigcut0().

351  implicit none
352 #include "Zmanagerp.h"
353 #include "ZrigCut.h"
354 
355  character*192 msg
356 
357  integer icon
358 
359 ! real pw
360 
361  read(tempdev, *) ! skip
362  read(tempdev, *)
363  * place, latit, longi, magdec, zenvalue, zenmax, dzen, zensize,
364  * minrig, logdrig, rigsize
365 
366  azmsize=1
367 
368 
369 ! skip until -------------- line
370  call cskipcomment(tempdev, icon)
371  if(icon .ne. 0) then
372  call cerrormsg('cut-off table data has no ---- line', 0)
373  endif
374  call crdrigcut4(
375  * rdatafmt, tempdev, minrig, rigtbl2, zensize, rigsize)
376  close(tempdev)
377 
378  if(zenvalue .eq. 'cos') then
379 ! DZen should be negative
380  if(dzen .ge. 0.) then
381  write(msg, *)
382  * ' step of Zenith angle for rigidity cut should be < 0'
383  call cerrormsg(msg, 1)
384  write(msg, *) ' because you give it in cos value'
385  call cerrormsg(msg, 0)
386  endif
387  endif
388 !
389  write(msg,*) 'New rigidity cut-off table (fmt4) has been read:',
390  * ' place=',place,' latitute=',latit, ' longitude=',longi,
391  * ' mag. dec=', magdec
392  call cerrormsg(msg, 1)
subroutine cerrormsg(msg, needrtn)
Definition: cerrorMsg.f:4
subroutine crdrigcut4(fmt, io, minval, tbl, izen, irig)
Definition: crigCut.f:439
subroutine cskipcomment(io, icon)
Definition: cskipComment.f:19
Here is the call graph for this function:
Here is the caller graph for this function:

◆ crigcutfmt5()

subroutine crigcutfmt5 ( )

Definition at line 485 of file crigCut.f.

References cerrormsg(), cfillrigcut(), creadrigcut(), cskipcomment(), and d0.

Referenced by crigcut0().

485  implicit none
486 #include "Zmanagerp.h"
487 #include "ZrigCut.h"
488 
489  character*192 msg
490 
491  integer icon
492 
493 
494  read(tempdev, *) ! skip
495  read(tempdev, *)
496  * zenvalue, zenmax, dzen, zensize,
497  * azmvalue, minazm, dazm, azmsize
498 
499 
500 ! skip until -------------- line
501  call cskipcomment(tempdev, icon)
502  if(icon .ne. 0) then
503  call cerrormsg('cut-off table data has no ---- line', 0)
504  endif
505 
506  if(azmvalue .eq. 'deg') then
507 ! assume min of logitudinal angle is 0 deg.
508  minazm = 0.
509  if( (azmsize - 1)* dazm .lt. (360.d0- dazm* 0.1d0) ) then
510 ! fill the last col. by the first col.
511  call creadrigcut(tempdev, rigcuttbl, azmsize, zensize,
512  * azmsize+1)
513  azmsize = azmsize + 1
514  call cfillrigcut(rigcuttbl, azmsize, zensize)
515  else
516  call creadrigcut(tempdev, rigcuttbl, azmsize, zensize,
517  * azmsize)
518  endif
519  close(tempdev)
520  else
521  write(msg, *)
522  * ' Azimuthal angle unit must be deg for rigidity cut table'
523  call cerrormsg(msg, 1)
524  write(msg, *) ' But it is ', azmvalue
525  call cerrormsg(msg, 0)
526  endif
527 
528 
529  if(zenvalue .eq. 'cos') then
530 ! DZen should be negative and min is 1.0
531  minzen = 1.0
532  if(dzen .ge. 0.) then
533  write(msg, *)
534  * ' step of Zenith angle for rigidity cut should be < 0'
535  call cerrormsg(msg, 1)
536  write(msg, *) ' because you give it in cos value'
537  call cerrormsg(msg, 0)
538  endif
539  endif
540 !
541 !
542  write(msg,*) 'Rough rigidity cut-off table has been read:'
543  call cerrormsg(msg, 1)
subroutine cerrormsg(msg, needrtn)
Definition: cerrorMsg.f:4
subroutine creadrigcut(io, tbl, azm, zen, adj)
Definition: crigCut.f:263
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
subroutine cfillrigcut(tbl, azm, zen)
Definition: crigCut.f:284
subroutine cskipcomment(io, icon)
Definition: cskipComment.f:19
Here is the call graph for this function:
Here is the caller graph for this function:

◆ k2dtblv()

subroutine k2dtblv ( real*8, dimension(adj, ys)  tbl,
integer  xs,
integer  ys,
integer  adj,
real*8  xm,
real*8  ym,
real*8  dx,
real*8  dy,
real*8  x,
real*8  y,
real*8  ans 
)

Definition at line 97 of file crigCut.f.

Referenced by crigcut().

97  integer xs
98  integer ys
99  integer adj
100  real*8 xm
101  real*8 ym
102  real*8 dx
103  real*8 dy
104  real*8 x, y
105  real*8 ans
106  real*8 tbl(adj, ys)
107 
108  integer i, j
109 
110  i = (x-xm)/dx + 1
111  j = (y-ym)/dy + 1
112  ans = tbl(i,j)
atmos%rho(atmos%nodes) **exp(-(z-atmos%z(atmos%nodes))/Hinf) elseif(z .lt. atmos%z(1)) then ans=atmos%rho(1) **exp((atmos%z(1) -z)/atmos%H(1)) else call kdwhereis(z, atmos%nodes, atmos%z, 1, i) a=atmos%a(i) if(a .ne. 0.d0) then ans=atmos%rho(i) **(1+a *(z-atmos%z(i))/atmos%H(i)) **(-1.0d0-1.d0/a) else ans=*atmos%rho(i) *exp(-(z-atmos%z(i))/atmos%H(i)) endif endif ! zsave=z ! endif cvh2den=ans end ! ---------------------------------- real *8 function cvh2temp(z) implicit none ! vettical height to temperatur(Kelvin) real *8 z ! input. vertical height in m ! output is temperature of the atmospher in Kelvin real *8 ans integer i if(z .gt. atmos%z(atmos%nodes)) then ans=atmos%T(atmos%nodes) elseif(z .lt. atmos%z(1)) then ans=atmos%T(1)+atmos%b(1) *(z - atmos%z(1)) else call kdwhereis(z, atmos%nodes, atmos%z, 1, i) ans=atmos%T(i)+atmos%b(i) *(z-atmos%z(i)) endif cvh2temp=ans end !--------------------------------------------- real *8 function cthick2h(t) implicit none real *8 t ! input. air thickness in kg/m^2 real *8 logt, ans integer i real *8 dod0, fd, a logt=log(t) if(t .ge. atmos%cumd(1)) then ans=atmos%z(1) - *(logt - atmos%logcumd(1)) *atmos%H(1) elseif(t .le. atmos%cumd(atmos%nodes)) then ans=atmos%z(atmos%nodes) - *Hinf *log(t/atmos%cumd(atmos%nodes)) else call kdwhereis(t, atmos%nodes, atmos%cumd, 1, i) ! i is such that X(i) > x >=x(i+1) ans
nodes i
integer npitbl real *nx dx real dx
Definition: Zcinippxc.h:10
! constants thru Cosmos real ! if multiplied to deg radian Torad ! light velocity m sec ! infinty ! kg m2 *Togpcm2 g cm2 ! g cm2 *Tokgpm2 kg m2 ! cm *Tom m ! m *Tocm cm ! g cm3 *Tokgpm3 kg m3 ! kg m3 *Togpcm3 g cm3 ! sec *Tonsec nsec ! Tesla m ! Avogadro *A2deninv ! mfp *n * xs
Definition: Zglobalc.h:18
integer Charge2heavyG charge of heavy rightarrow heavy group index conversion array integer HeavyG2massN heavy group index rightarrow mass number conversion array integer HeavyG2charge heavy group index rightarrow charge of heavy conversion array integer HeavyG2code heavy group index rightarrow particle code conversion array integer Code2massN particle code rightarrow mass number conversion array integer Code2heavyG particle code rightarrow heavy group index conversion array real *FragmentTbl tbl(i, j)
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code kiron data j
Definition: cblkHeavy.h:36
latitude latitude this system is used *****************************************************************! type coord sequence union map real y
Definition: Zcoord.h:25
! structure defining a particle at production ! Basic idea of what is to be contained in ! the particle structue is that dynamical ones should be included those derivable from the particle code ! is not included ******************************************************type fmom momentum sequence union map real e endmap map real * x
Definition: Zptcl.h:21
Here is the caller graph for this function: