C------------------------------------------------------------------------
        subroutine ftzero(nbuff,nwords)

C       fill the common block buffer with zeros, as efficiently as possible

        integer nbuff,nwords,i,nw2

        double precision buff1,buff2,buff3,buff4,buff5,buff6
        double precision buff7,buff8,buff9,buff10,buff11,buff12
        common /ft00b1/buff1(360)
        common /ft00b2/buff2(360)
        common /ft00b3/buff3(360)
        common /ft00b4/buff4(360)
        common /ft00b5/buff5(360)
        common /ft00b6/buff6(360)
        common /ft00b7/buff7(360)
        common /ft00b8/buff8(360)
        common /ft00b9/buff9(360)
        common /ft0b10/buff10(360)
        common /ft0b11/buff11(360)
        common /ft0b12/buff12(360)

        nw2=(nwords+1)/2
        if (nbuff .eq. 1)then
                do 10 i=1,nw2
10              buff1(i)=0
        else if (nbuff .eq. 2)then
                do 20 i=1,nw2
20              buff2(i)=0
        else if (nbuff .eq. 3)then
                do 30 i=1,nw2
30              buff3(i)=0
        else if (nbuff .eq. 4)then
                do 40 i=1,nw2
40              buff4(i)=0
        else if (nbuff .eq. 5)then
                do 50 i=1,nw2
50              buff5(i)=0
        else if (nbuff .eq. 6)then
                do 60 i=1,nw2
60              buff6(i)=0
        else if (nbuff .eq. 7)then
                do 70 i=1,nw2
70              buff7(i)=0
        else if (nbuff .eq. 8)then
                do 80 i=1,nw2
80              buff8(i)=0
        else if (nbuff .eq. 9)then
                do 90 i=1,nw2
90              buff9(i)=0
        else if (nbuff .eq. 10)then
                do 100 i=1,nw2
100             buff10(i)=0
        else if (nbuff .eq. 11)then
                do 110 i=1,nw2
110             buff11(i)=0
        else if (nbuff .eq. 12)then
                do 120 i=1,nw2
120             buff12(i)=0
        end if
        end
