OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
find_segs.f
Go to the documentation of this file.
1  subroutine find_segs(ill,ilp,ilf,i1,imax,jll,jlp,iln,nln)
2 
3 c This subroutine finds additional segments in the list
4 c adjacent to the current segment
5 
6 c Calling Arguments
7 
8 c Name Type I/O Description
9 c
10 c ill(*) I*4 I Array of segment line numbers
11 c ilp(2,*) I*4 I Array of segment endpoint pixel numbers
12 c ilf(*) I*4 I Array of flags (1=segment already checked)
13 c i1 I*4 I First segment to check in list
14 c imax I*4 I Number of segments in list
15 c jll I*4 I Line number of current segment
16 c jlp(2) I*4 I End pixel numbers of current segment
17 c iln(10) I*4 O Indices of continguous segments
18 c nln I*4 O Number of contiguous segments found
19 
20 c Subprograms Called:
21 
22 c Program written by: Frederick S. Patt
23 c General Sciences Corporation
24 c April 17, 1994
25 c
26 c Modification History:
27 
28 
29 
30  integer*4 ill(*),ilp(2,*),ilf(*),jll,jlp(2),iln(10)
31 
32 
33  nln = 0
34  do i=i1,imax
35  if (ilf(i).eq.0) then
36  if ((ill(i)-jll).gt.1) then
37  return
38  else if ((ilp(1,i).le.(jlp(2)+1)).and.
39  * (ilp(2,i).ge.(jlp(1)-1)).and.
40  * (abs((ill(i)-jll)).eq.1)) then
41  nln = nln + 1
42  iln(nln) = i
43  end if
44  end if
45  end do
46 
47  return
48  end
subroutine find_segs(ill, ilp, ilf, i1, imax, jll, jlp, iln, nln)
Definition: find_segs.f:2
#define abs(a)
Definition: misc.h:90