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

Go to the source code of this file.

Functions/Subroutines

subroutine kpolintp2 (xa, xstep, dx, ya, ystep, dy,
 

Function/Subroutine Documentation

◆ kpolintp2()

subroutine kpolintp2 ( real*8, dimension(xstep, m xa,
integer  xstep,
real*8  dx,
real*8, dimension(ystep, n ya,
integer  ystep,
real*8  dy 
)

Definition at line 41 of file kpolintp2.f.

References kdwhereis(), kpolintp(), kpolintpeqs(), and parameter().

Referenced by cmunsmpe().

41  * za, adj, m, n, ma, na, x, y, z, error)
42 ! ********************************************************
43 ! real*8 xa(xstep, m). input.
44 ! real*8 ya(ystep, n). input.
45 ! real*8 dx. input. if non zero, xa is assumed to be
46 ! equistepd with dx.
47 ! real*8 dy. input. the same as dx for y.
48 ! integer adj. input. adjustable dim. fo z >= m
49 ! real*8 za(adj, n). input. function values at (xa, ya)
50 ! real*8 x. input.
51 ! real*8 y. input.
52 ! real*8 z. output. estimated func. value at (x, y).
53 !
54 ! integer ma. input. a max of ma points around x is used
55 ! integer na. input. a max of na points around y is used.
56 ! ma, na <= maxp(=10)
57 !
58  implicit none
59  integer xstep, ystep, n, m, na, ma, adj
60  real*8 xa(xstep, m), ya(ystep, n), za(adj, n)
61  real*8 x, y, z, error, dx, dy
62 
63  integer lx, ly, kx, ky, i, maxp
64  parameter(maxp = 10) ! max # of points.
65  real*8 ztmp(maxp)
66  if(ma .gt. maxp .or. na .gt. maxp) then
67  write(*, *) "kpolintp2: too large number of point"
68  stop
69  endif
70 
71  if(dx .eq. 0.) then
72  call kdwhereis(x, m, xa, xstep, lx)
73  else
74  lx = (x - xa(1,1))/dx+1
75  endif
76 
77  if(dy .eq. 0.) then
78  call kdwhereis(y, n, ya, ystep, ly)
79  else
80  ly = (y-ya(1,1))/dy +1
81  endif
82  kx = min(max(lx - (ma -1)/2,1), m+1-ma) ! max of ma points from kx
83  ky = min(max(ly - (na -1)/2,1), n+1-na) ! max of na points from ky
84 
85 ! make ztmp: scan along x direction
86  do i = kx, min(m, kx + ma-1)
87  if(dy .eq. 0.) then
88  call kpolintp(ya(1, ky), ystep, za(i, ky), adj,
89  * min(na, n- ky +1), y, ztmp(i-kx+1), error)
90  else
91  call kpolintpeqs( (ya(1, 1)+(ky-1)*dy), dy, za(i, ky), adj,
92  * min(na, n- ky +1), y, ztmp(i-kx+1), error)
93  endif
94  enddo
95  if(dx .eq. 0.) then
96  call kpolintp(xa(1, kx), xstep, ztmp, 1,
97  * min(ma, m-kx +1), x, z, error)
98  else
99  call kpolintpeqs( (xa(1, 1)+(kx-1)*dx), dx, ztmp, 1,
100  * min(ma, m-kx +1), x, z, error)
101  endif
integer npitbl real *nx parameter(n=101, npitbl=46, nx=n-1) real *8 uconst
nodes z
nodes i
integer npitbl real *nx dx real dx
Definition: Zcinippxc.h:10
subroutine kpolintp(xa, xstep, ya, ystep, n, x, y, error)
Definition: kpolintp.f:163
subroutine kdwhereis(x, in, a, step, loc)
Definition: kdwhereis.f:27
subroutine kpolintpeqs(x0, dx, ya, ystep, n, x, y, error)
Definition: kpolintp.f:228
latitude latitude this system is used *****************************************************************! type coord sequence union map real y
Definition: Zcoord.h:25
block data include Zlatfit h c fitting region data data data data data d0 data data d0 data data m
Definition: ZlatfitBD.h:35
!onst int maxp
Definition: Zprivate.h:3
integer n
Definition: Zcinippxc.h:1
! 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 call graph for this function:
Here is the caller graph for this function: