OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
check_segs.f
Go to the documentation of this file.
1  subroutine check_segs(ill,ilp,i1,i2,lflag1,lflag2,igood)
2 
3 c Subroutine to check for other land pixels contiguous to two segments
4  integer*4 ill(*),ilp(2,*)
5  byte lflag1(*),lflag2(*)
6 
7  igood = 0
8 
9 c Check at start of segments
10  if (ilp(1,i2).gt.ilp(1,i1)) then
11  do i=ilp(1,i1)-1,ilp(1,i2)-2
12  if(lflag2(i).ge.1) igood=-1
13  end do
14  else if (ilp(1,i2).lt.ilp(1,i1)) then
15  do i=ilp(1,i2)-1,ilp(1,i1)-2
16  if(lflag1(i).ge.1) igood=-1
17  end do
18  end if
19 
20 c Check at end of segments
21  if (ilp(2,i2).gt.ilp(2,i1)) then
22  do i=ilp(2,i1)+2,ilp(2,i2)+1
23  if(lflag1(i).ge.1) igood=-1
24  end do
25  else if (ilp(2,i2).lt.ilp(2,i1)) then
26  do i=ilp(2,i2)+2,ilp(2,i1)+1
27  if(lflag2(i).ge.1) igood=-1
28  end do
29  end if
30 
31  return
32  end
subroutine check_segs(ill, ilp, i1, i2, lflag1, lflag2, igood)
Definition: check_segs.f:2