1 ! Author: Aime' Fournier
2 ! E-mail: fournier@ucar.edu
4 SUBROUTINE dwta_partition(iv,iw,ia,lm,lh,lg)
6 ! create indexes for dwtai()
9 INTEGER j,lg,lh,lm ! lg,lh=filter lengths
10 INTEGER, DIMENSION(0:lm) :: iv ! in iv[0]: data length/out iv[1:lm]: v-space length
11 INTEGER, DIMENSION(0:lm) :: iw ! out iw[0:lm]: w-space lengths
12 INTEGER, DIMENSION(0:lm) :: ia ! out: ia[0] transform length; ia[1:lm] w starts
14 DO j=1,lm ! loop to maximum level:
15 iv(j)=FLOOR(.5*(iv(j-1)+lh))
16 iw(j)=FLOOR(.5*(iv(j-1)+lg))
18 iw(0)=0 ! no w space at level 0
19 ia(lm)=iv(lm) ! start of largest-scale w
23 END SUBROUTINE dwta_partition