module bound { # mark helix filter outputs where input is off data. use helixcartmod use helicon use regrid contains subroutine boundn ( nold, nd, na, aa) { integer, dimension( :), intent( in) :: nold, nd, na # (ndim) type( filter) :: aa integer, dimension( size( nd)) :: nb, ii real, dimension( :), allocatable :: xx, yy integer :: iy, my, ib, mb, stat nb = nd + 2*na; mb = product( nb) # nb is a bigger space to pad into. allocate( xx( mb), yy( mb)) # two large spaces, equal size xx = 0. # zeros do ib = 1, mb { # surround the zeros with many ones call helix2cart( nb, ib, ii) # ii( ib) if( any( ii <= na .or. ii > nb-na)) xx( ib) = 1. } call helicon_init( aa) # give aa pointer to helicon.lop call regridn( nold, nb, aa); aa%flt = 1. # put all 1's in filter stat = helicon_lop( .false., .false., xx, yy) # apply filter call regridn( nb, nd, aa); aa%flt = 0. # remake filter for orig data. my = product( nd) allocate( aa%mis( my)) # attach missing designation to y_filter do iy = 1, my { # map from unpadded to padded space call helix2cart( nd, iy, ii ) call cart2helix( nb, ii+na, ib ) # ib( iy) aa%mis( iy) = ( yy( ib) > 0.) # true where inputs missing } deallocate( xx, yy) } } # I see nold is not equal to nd on two occasions. # #321 kana> grep boundn */*/*.r90 */*/*.f90 Src/*.f90 Ops/*.r90 #lace.r90: call boundn( n, n, (/ a(1)*jump, a(2:) /), aa) #noiz/duel90/Maskinv.f90: call boundn ( n, n, a, aa1); call find_mask(known,aa1) #noiz/duel90/Maskinv.f90: call boundn ( n, n, a, aa2); call find_mask(known,aa2) #noiz/duel90/Maskinv.f90: call boundn ( n, n, a, aa3); call find_mask(known,aa3) #noiz/pefdeburst90/Pefdeburst.f90: call boundn ((/ n1 /), (/ n1 /), aa) #prc/sep94/Invint.f90:! call boundn ((/ m1 /), (/ m1 /), aa) #prc/sep94/Invint.f90: call boundn ((/ m1 /), (/ m1 /), (/ filt /), aa) #Src/Lopef.f90: call boundn (w, w, a, bb) #Src/MSMiss.f90: call boundn (m, n, a*jump(is), bb) <<<<<<<<<<<<<<< #Src/MSPef.f90: call boundn (n, n, a*jump(is), bb) #Src/Miss.f90: call boundn (m, n, a, aa) <<<<<<<<<<<<<<< #Src/Pef.f90: call boundn( n, n, a, aa)