subroutine applyfilter(filter,h1f1,h1f2,h1f3,h1f4, *h2f1,h2f2,h2f3,h2f4,fcard,rejoht,badoht) c - Subroutine as part of "makework.f". It allows us to keep out of the work c - file anything we like, based upon the four flags for "oht1" and "oht2" c - which were read in makework.f. Because these filters could be very c - complex, it was felt that this subroutine should just be updated c - every time one is created. We begin JUST with filter #000 which c - is "everything goes through" c - The value "fcard" is a 200 character string where we describe c - what the filter does integer filter character*1 h1f1,h1f2,h1f3,h1f4 character*1 h2f1,h2f2,h2f3,h2f4 character*1 rejoht character*80 fcard logical badoht badoht = .false. rejoht = ' ' ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc if(filter.eq.0)then fcard = 'All points pass through' return endif ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc if(filter.eq.1)then fcard = 'Only 1st and 2nd order points pass through' if( (h1f1.eq.'1' .or. h1f1.eq.'2') .and. * (h2f1.eq.'1' .or. h2f1.eq.'2') )then badoht = .false. rejoht = ' ' else badoht = .true. rejoht = '9' endif return endif ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc if(filter.eq.2)then fcard = 'Only NAVD 88 HG points pass through' if (h1f3.eq.'H' .and. h1f4.eq.'G') then badoht = .false. rejoht = ' ' else badoht = .true. rejoht = '9' endif return endif ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc if(filter.eq.3)then fcard = 'Tim H recomm but USGS=yel: red=dead, '// * '2 x yellow=dead except HG' c - Do the REDs first: if(h1f3.eq.'F' .or. h2f3.eq.'F' .or. * h1f3.eq.'O' .or. h2f3.eq.'O' .or. * h1f3.eq.'S' .or. h2f3.eq.'S' .or. * h1f3.eq.'X' .or. h2f3.eq.'X' .or. * h1f4.eq.'H' .or. h2f4.eq.'H' .or. * h1f4.eq.'P' .or. h1f4.eq.'P')then badoht = .true. rejoht = '9' return endif c - Do the double yellows next: nyelold = 0 nyelnew = 0 if(h1f3.eq.'B' .or. h1f3.eq.'C' .or. * h1f3.eq.'G' .or. h1f3.eq.'H' .or. * h1f3.eq.'M' .or. h1f3.eq.'N' .or. * h1f3.eq.'P' .or. h1f3.eq.'U')nyelold = nyelold + 1 if(h2f3.eq.'B' .or. h2f3.eq.'C' .or. * h2f3.eq.'G' .or. h2f3.eq.'H' .or. * h2f3.eq.'M' .or. h2f3.eq.'N' .or. * h2f3.eq.'P' .or. h2f3.eq.'U')nyelnew = nyelnew + 1 if(h1f4.eq.'F' .or. h1f4.eq.'G' .or. * h1f4.eq.'T' .or. h1f4.eq.'E')nyelold = nyelold + 1 if(h2f4.eq.'F' .or. h2f4.eq.'G' .or. * h2f4.eq.'T' .or. h2f4.eq.'E')nyelnew = nyelnew + 1 c - Kill on 2 yellows (non-HG) on old datum: if(.not.(h1f3.eq.'H' .and. h1f4.eq.'G') .and. nyelold.eq.2)then badoht = .true. rejoht = '9' return endif c - Kill on 2 yellows (non-HG) on new datum: if(.not.(h2f3.eq.'H' .and. h2f4.eq.'G') .and. nyelnew.eq.2)then badoht = .true. rejoht = '9' return endif c - Get here? All's well: badoht = .false. rejoht = ' ' return endif ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc write(6,999)filter 999 format(6x,'FATAL in applylfilters: Bad filter number: ',i8) stop end