OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
match.f
Go to the documentation of this file.
1  real*4 xlat(500),xlon(500),xlatc(8000),xlonc(8000)
2  integer*2 ipix(500),inum(500)
3  character*50 iname
4 
5  type *,'Enter island file name'
6  read (*,'(a50)') iname
7  open(51,file=iname,readonly)
8  do i=1,500
9  read(51,*,end=500) inum(i),xlat(i),xlon(i),ilin,ipix(i)
10  ni = i
11  end do
12 
13  500 open(52,file='/u3/fred/bak/islands.all',readonly)
14  do i=1,8000
15  read(52,*,end=600) xlonc(i),xlatc(i),wlon,wlat
16  nc = i
17  end do
18 
19  600 continue
20 
21  do i=1,ni
22  dlm = 999.
23  ic = 0
24  nn = 0
25  do j=1,nc
26  dlon = abs(xlon(i)-xlonc(j))
27  dlat = abs(xlat(i)-xlatc(j))
28  if ((dlon.lt.0.2).and.(dlat.lt.0.2)) then
29  nn = nn + 1
30  dll = sqrt(dlon*dlon+dlat*dlat)
31  if (dll.lt.dlm) then
32  ic = j
33  dlm = dll
34  end if
35  end if
36  end do
37  if (ic.ne.0) then
38  write (*,1200) i,xlon(i),xlat(i),ic,xlonc(ic),xlatc(ic),
39  * dlm,ipix(i),inum(i),nn
40  1200 format (2(i5,2f11.5),f9.5,3i5)
41 c else
42 c write (*,1200) i,xlon(i),xlat(i)
43  end if
44  end do
45  stop
46  end
47 
#define real
Definition: DbAlgOcean.cpp:26
#define abs(a)
Definition: misc.h:90